A backtracking algorithm employing memoization*
-
Give the robot its destination coordinates, and decide how many obstacles you want to place
-
Press enter to see the board, and wait for the robot to find a path
-
Check out your robot's path!
*The chevrons ^ denote the memoized squares
A robot is in the top-left corner of a grid, and wants to travel to a given destination (r, c). She can only move DOWN and to the RIGHT. Determine her path from (0,0) to (r,c).
There are obstacles!
To implement this, the user enters a number of obstacles to be randomly dispersed throughout the game board.
Clone the git repo:
git clone https://github.com/reeddunkle/Backtrack_Robot.git
Navigate to the repo:
cd Backtrack_Robot
Run it with the Python3 interpreter:
python3 backtrack.py