Challenge: Ricochet Robotsby LanX (Sage)
|on Feb 18, 2021 at 16:16 UTC||Need Help??|
Ricochet Robots is a board game about optimizing moves. (see wikipedia description)
The 4 pieces represent the "robots" Blue, Yellow, Red and Green on a board with 16x16 cells and some walls.
Rules: Each round one of the robots can be moved horizontally or vertically, and does not stop until it reaches an obstacle - either a wall or another robot.
E.G. in this example the Yellow on B14 can only reach A14 or B16 in one move, and nothing in between. You can only move one robot per round.
The object of the game is to bring one specific robot to an indicated target (here C9 marked with * ) using as few moves as possible.
(Since the goal has no neighboring wall you'll need to position other robots as obstacles nearby to reach it)
If you are still bored...
I do have a script I wrote 16 years ago.
It needed over an hour back than and runs today in 1:30 min on my laptop, so it's solvable within the given margin. :)
But it took me two days to write it, and you might run into memory problems.
I had a lot back then, and learned a lot. Hope you too ... :)
added some clarifications and links
here the positions of the walls (yes strings as non-strict barewords, this script is old)
It's specifically requested to bring Yellow on target, the first version was misleading, sorry.