This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

ElNo
ElNo presents ...

2015/10/4

Maze-Robots

This szenario shows the difference between three maze-solving-algorithms (https://en.wikipedia.org/wiki/Maze_solving_algorithm): the red and the green robot use the wall-follower-algorithm (left-hand-rule and right-hand-rule) and the blue robot uses the Pledge-Algorithm (a kind of modified left-hand-rule).
The szenario first creates a simply connected maze without "islands" in the size according to the chosen settings that can always be solved by each of the three robots although they will probably choose different paths.
The user can also choose to remove some of the walls to create a (probably) disjoint maze. Depending on the startposition and the layout of the maze the red and green robot will not be able to solve it whereas the blue one still always solves the maze.

After creating the maze Greenfoot will stop to give you the possibility to orient yourself before the robots will start running around... You will have to press te Greenfoot-Run-Button again, then the robots will start moving and will try to solve the maze.

(The language in the settings is German, as beside the greenfoot-webside this program will be mostly used by Germans.)

The settings were prorammed by using the UILibrary witten by mik, thanks! (http://www.greenfoot.org/scenarios/1930)

7078 views / 9 in the last 7 days

1 vote | 0 in the last 7 days

Tags: demo maze pledge-algorithm left-hand-rule

Your browser does not support the canvas tag.
A new version of this scenario was uploaded on 2015-10-05 08:29:57 UTC The robots are now leaving dots in their respective color. This helps to keep track of the differences in their movingpattern and illustrates clearly when the left-hand-rule-robot is caught in an infinite loop.
A new version of this scenario was uploaded on 2015-10-10 13:00:09 UTC In this version you can choose your own settings. A third robots was added (right-hand-rule). The dot-trace is now painted on the background and this way the szenario won't slow down during an infinite loop.
A new version of this scenario was uploaded on 2015-10-10 13:03:36 UTC In this version you can choose your own settings. A third robots was added (right-hand-rule). The dot-trace is now painted on the background and this way the szenario won't slow down during an infinite loop.
A new version of this scenario was uploaded on 2015-10-12 18:00:10 UTC Bigger Settings-Screen to ensure that you can see the whole maze at once later on.

Want to leave a comment? You must first log in.

Who likes this?

mik