Problem 44709. Toads and Frogs Puzzle
Solution Stats
Problem Comments
-
1 Comment
Your description of the game is at odds with your example. In particular, you write that "Toads and Frogs take turns moving", but in your example, in the 3rd and 4th moves, the toads move twice in a row.
Perhaps this is because there is no valid move for the frogs after the third move. However, when moves are skipped when there is no valid move, the game will generally end in unwinnable situations where neither frogs nor toads can make further progress.
Finally, you say that "whenever there is a choice between a slide and a jump, the jump must be made". Assuming that this only refers to the player whose turn it is, this isn't possible: if it's (say) the toads' turn, then a jump is only possible if the board looks like [ ... T F X ... ], and no slide is then possible.
It would be nice if you could clarify what rules are actually supposed to be used for the game.
Solution Comments
Show commentsProblem Recent Solvers17
Suggested Problems
-
8389 Solvers
-
283 Solvers
-
Put two time series onto the same time basis
312 Solvers
-
Check if number exists in vector
9574 Solvers
-
366 Solvers
More from this Author18
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!