I am writing a Best-First Search program in Ruby but I have never done
searches before and so am a bit lost. This routine is being applied to
8-puzzle problem of moving 8 tiles plus a blank space in an 3 x 3 grid.
Since I am new to both Ruby and search algorithms in general, I a
for a template or actual code as a Ruby program. I’ve already written
Manhattan move method to determine the heuristic value of each state,
the move function for making a move, and a third method for determining
moves are possible. But writing the first-best routine without some
template to use is beyond my current capabilities. I’m trying to move
beyond that limitation.
I’ve done a Google search and referenced five books on Ruby and not
any good template, pseudo code, or even a Ruby routine that would do the
searches. Does anyone know of a coded example in Ruby of the Best-First
search algorithm? It it is applied to the 8-puzzle that is even better,
if I can find a template I should be able to apply it to my problem.
Thanks in advance for being pointed in the right direction.
Always something new to learn.