The Game of Toads and Frogs
Requires a Wolfram Notebook System
Interact on desktop, mobile and cloud with the free Wolfram Player or other Wolfram Language products.
A number of educated amphibians are placed on a line. The toads are arranged in the first squares and the frogs in the last squares, each animal facing the center with a single vacancy in between the two sets. From this initial configuration our problem is to transfer all toads to where the frogs are and vice versa by means of two kind of movements performed sequentially by one pet at a time. Any pet can move to the empty space if it happens to be next to it; if this is not the case, it can jump in the direction it is facing over an adjacent pet regardless of its type, provided that the empty space is the square it lands on. At all times the process is performed within the limits of the squares.
Contributed by: Jaime Rangel-Mondragon (March 2011)
Open content licensed under CC BY-NC-SA
"The Game of Toads and Frogs"
Wolfram Demonstrations Project
Published: March 15 2011