This is the Arduino Uno R3 code that I created that utilizes the Q-Learning algorithm to navigate any maze.
I built the robotic car with the following hardware: Arduino Uno Rev 3
Parallax Ping (28015) – Distance sensor
Adafruit Motor Sheild Rev. 2.3 (I needed to solder pins which was very difficult)
Vilros Micro Servo 99 (SG90) – Spins the sensor in different directions
Multi-colored LED light – used to signal when training is completess
8 AA batteries to power motor shield
1 9V battery to power Arduino
Infrared receiver – to receive signal from remote control
Remote control - any remote control will do
4 wheel robotic smart car chasis
It uses the Q-Learning algorithm to learn the algorithm the best option.