Original Post
Hello,
I''ve been reading the "AI Techniques For Game Programmers" book and am trying to think up a way to solve the infamous 8 puzzle (eight squares numbered 1-8 and a blank square in a 3X3 grid) using a genetic algorithm.
Can someone give me an idea of the best way encode the chromosone? I was thinking of one chromosone containing a list of structures that identify a tile number and a direction to try moving it in. If the instruction can''t be followed (e.g. not moving in to the space) then it is ignored ad the next one tried. A fitness could be applied depending on how many of the tiles are left in the right place at the end.
I''m not sure of how many instructions to have as a maximum for the chromosone though.
I''d appreciate some idead on how would you tackle this problem?