simple living, careful thinking, collective fun
How about you? How would you escape from a labirinth?
Would you walk around randomly, risking to run out of energy before making your way out?
Or do you have a better strategy?
Unlike labirinths found in the puzzles section of newspapers and magazines, this robot does not have a map to provide him with a bird's-eye view of the problem.
This is the setting for my most recent challenge: the information required to find the exit is not immediately available...
Instead, it must be gathered as you move step by step through the maze, touching the walls to determine whether the path continues forward or to the left or to the right.
Once you play enough times, consider coding your way of solving it in Prequel, creating a Prequel bot.
The generated mazes cannot be solved by a simple wall follower strategy.
However, since the exit is always located at the outer edge of these 2D mazes, the Pledge Algorithm is suitable to solve them efficiently, once the key is found.
Currently, there are two Prequel bots on the GitHub repository, both are variants of a random walk.
Pull requests for Prequel bots with different strategies are welcome.
Test your maze solving skills here.
EDIT 2023/10/17: Added key. Removed mythology references.
April 8, 2020
While going through these difficult times, I am using Prequel to introduce my kids to programming.
Maybe more people can find it useful...
I have just added my take on the century-old game Battleship, with a Prequel twist.
Prequel bots are welcome.
Develop your Prequel bot and feel free to create a pull request on the GitHub repository.
Tutorials for Prequel are planned, but meanwhile my priority is to create applications (such as Battleship) that make use of the language.
At the moment, although not easy, it is possible to learn Prequel by example.
I will create more examples, before working on tutorials.
In the meantime, have a look at the Prequel grammar when in doubt of whether a particular syntax is supported.
April 1, 2020