15 puzzle solver: Difference between revisions
Content deleted Content added
→{{header|Scala}}: Use 2.12 compatible, previously was 2.13.2 |
|||
Line 4,649:
// Playing with weight of heuristic vs travelled so far. Giving equal weight take too long.
// Heuristic only will converge too fast on a longer than 52 steps solution.
def aStar() = heuristic() *
// Find children/neighbour that is not himself.
def children: List[Board] = List(this.up(), this.down(), this.right(), this.left()).flatten
|