Matlab2TorchRL
This project is a pipeline that connects a Matlab simulation (Simulink) to an OpenAI Gym wrapper for PyTorch Reinforcement Learning using DQN algorithm (and various ML/DL algorithms eventually).
Matlab simulations offer an excellent way to model real-world scenarios. This project aims to establish a connection between Matlab simulations and third-party libraries and open-source AI solutions. As such, we have chosen to develop an interface that bridges a Matlab simulation with Python AI libraries
The simulation that we used to test the interface is based on a Robot (Thymio) navigating through a maze, the robot has multiple sensors to measure the distance to nearby walls with the goal of learning how to efficiently navigate throught the maze and exit it safely.
What things you need to install the software and how to install them:
- Matlab
- Simulink
- OpenAI Gym
- PyTorch
- Clone the repo :
git clone --recursive https://github.com/Spinkoo/Matlab2TorchRL
(to get the Matlab2Py submodule) - Navigate to the project directory
- Install requirements.txt
pip install -r requirements.txt
- Install Matlab engine for Python
- Matlab based on the amazing implementation of The Pledge Algorithm - Thymio Robot Model on a Maze
- OpenAI Gym - The reinforcement learning wrapper
- TorchRL and DQN - The deep learning library used, various algorithms can be implemented easily other than DQN that we used
Initial work - Spinkoo
see the LICENSE.md file for details
- This work was supported by the French National Research Agency under the France 2030 program project IRT Nanoelec (ANR-10-AIRT-05).
Citation pour cette source
Spinkoo (2025). Matlab2TorchRL (https://github.com/Spinkoo/Matlab2TorchRL), GitHub. Extrait(e) le .
Compatibilité avec les versions de MATLAB
Plateformes compatibles
Windows macOS LinuxTags
Remerciements
Inspiré par : The Pledge Algorithm - Thymio Robot Model on a Maze
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Découvrir Live Editor
Créez des scripts avec du code, des résultats et du texte formaté dans un même document exécutable.
gyms/envs/maze
gyms/envs/maze
Les versions qui utilisent la branche GitHub par défaut ne peuvent pas être téléchargées
Version | Publié le | Notes de version | |
---|---|---|---|
1.0.0 |
|