I have been tasked to create an algorithm that replicates the rat-in-a-maze experiment in C#.
In this expermiement, The rat or mouse makes its way through the maze while being carefully observed by scientists until it eventually reaches the exit at which it is rewarded with food.
The following criteria needed to be met:
- '0' represents a path
- '1' represents a wall
- The maze must have an enterance an exit.
- The maze must be surrounded by walls.
- The enterance must close off after the rat enters.
- Although an exit is required if there is no exit an error must produce.
- The rat must be able to travel 8 directions: North, North-east, East, South-east, South, South-West, West, North-West
- The path to the exit must be displayed.
All criteria in my program has been met.
Although not required by the criteria, I have included an extra maze to show extra functionality of my maze and made it so it will regularly print the maze to clearly show what is happening.