Possible solutions are represented by a sequence of moves - chromosomes with every move thought of as a gene. The puzzle squares are numbered left to right starting with 0. Moves are designated by the number of the square from which the move is made. At any particular stage of the puzzle, only two moves are possible. All chromosomes have the same length which I chose to be 5 genes longer than necessary.
Crossover is an operator that for a pair of chromosomes produces two other chromosomes.
The population of ten chromosomes is sorted according to their fitness. On a single evolutionary step either all but the fittest chromosome are replaced, or I replace only the two worst performers. The mating chromosomes are selected randomly with probabilities proportional to their fitness. The algorithm usually finds one of the two solutions in less than 1000 iterations. It requires only little ingenuity to carry out the algorithm for a small puzzle manually.