▲ | GistNoesis 3 days ago | |||||||||||||||||||||||||||||||
Have you tried some generic pathfinding algorithm like D star lite on the graph with heuristic being the hamming distance from current node to the start ? For the 4x4 board there is only 2^16 nodes, and 8*2^16 edges, so you can materialize the graph and get away with brute-forcing the whole graph. But for bigger boards you won't be able to materialize the whole graph. Maybe there are better heuristics to be found than the simple hamming distance. You should try have an AI look for them, by comparing the performance of a RL path planning vs the basic heuristic. | ||||||||||||||||||||||||||||||||
▲ | vitus 3 days ago | parent [-] | |||||||||||||||||||||||||||||||
I tried implementing A* using pointwise Hamming distance, found that it was inadmissible (since it yielded a suboptimal result on par with my manual attempt), then tried again with row-wise Hamming distance but was pretty sure that's inadmissible too (although it did yield an optimal result). I then tried min(row-Hamming, column-Hamming) but I'm not convinced that's admissible either. I then switched to pure Dijkstra which ended up being faster because evaluation was much cheaper at each step, and despite these heuristics being inadmissible, they didn't result in substantially fewer nodes expanded. That's almost certainly a function of the problem size -- if it were 5x5, this approach would not have been as successful. | ||||||||||||||||||||||||||||||||
|