Reinforcement Learning (Q-Learning)

Versión 1.0.0.0 (9,94 KB) por Asad Ali
Demonstrates Reinforcement Learning (Q-Learning) algorithm using a maze
5K descargas
Actualizado 21 jun 2017

Ver licencia

This code demonstrates the reinforcement learning (Q-learning) algorithm using an example of a maze in which a robot has to reach its destination by moving in the left, right, up and down directions only. At each step, based on the outcome of the robot action it is taught and re-taught whether it was a good move or not eventually the whole process is repeated time and again until it reaches its destination. At this point the process will start again so that what ever has been learned can be verified and unnecessary moves made during the first pass can be forgotten and so on. It is good tutorial example for situations in which learning has to be done on the go i.e. without the use of training examples. Can be used in games to learn and improve the competitive capability of AI algorithm with that of human players and several other scenarios.
On small maze the convergence will be fast where as on large maze convergence can take some time. You can improve convergence speed by modifying the code to make Q-learning efficient.

There are four m-files
QLearning_Maze_Walk.m - demonstrates the working of Q-learning algorithm on a selected maze
Random_Maze_Walk.m - demonstrates the working of random selection for comparison
Read_Maze.m - will read the maze provided as input and translate into numeric representation for processing
Textscanu.m - reads the raw maze text file

Two maze files are included:
maze-9-9.txt
maze-61-21.txt

Citar como

Asad Ali (2024). Reinforcement Learning (Q-Learning) (https://www.mathworks.com/matlabcentral/fileexchange/63407-reinforcement-learning-q-learning), MATLAB Central File Exchange. Recuperado .

Compatibilidad con la versión de MATLAB
Se creó con R2010a
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Categorías
Más información sobre Labyrinth problems en Help Center y MATLAB Answers.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versión Publicado Notas de la versión
1.0.0.0