Frogs and Toads

Frogs and Toads is a puzzle in which three counters or pegs representing frogs are placed on three successive positions on the left of a string of seven squares, and three different tokens representing toads are placed on the three rightmost squares. Frogs only move to the right, toads only to the left. Every move is either a slide to the adjacent square or a jump over one position, which is allowed only if the latter is occupied by a member of the other species. No two animals are ever allowed on the same square. The goal is to move the toads into the three leftmost positions and the frogs into three rightmost positions in the fewest possible moves. Many different versions of this puzzle have appeared over the centuries and it may be Arabic in origin. The number of pieces on each side may vary, as may the number of empty starting places in the middle; other names for the puzzle have included Sheep and Goats and Sphinxes and Pyramids.