< Puzzles < Logic puzzles < Parachuted Robots
Puzzles | Logic puzzles | Parachuted Robots | Solution
One possible algorithm is the following, which is executed simultaneously by both robots:
10 Go right 20 Go left 30 Go right 40 If Not Parachute GOTO 10 50 Go right 60 GOTO 50
The idea is that both robots go slowly (10, 20, 30) until one of them hits a parachute, accelerating to catch up with the other robot.
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.