We generate mazes for the training set by running the A* algorithm using the heuristic function from [1]} on a set of problem instances to identify a set of states generated during the A* search. All these sets form the training set. Since optimizing the heuristic by \(\mathrm {L}_2\)  loss requires knowing the true heuristic value (cost to reach the goal), we have used SymBA* [2]} to find the optimal plan from each state in the training set. For states for which SymBA* doesn't find a solution (dead-end states), the h value is replaced by a very large value. This construction, albeit very expensive, allows a fair comparison, since the training of heuristic by \(\mathrm {L}_2\)  loss will also use states off the optimal path of the original problem instance for which the states were generated.
