Reinforcement Learning on Topological Labyrinth Environments
Set up python environment for this project (anaconda, venv, etc.) and install requirements:
pip install -r requirements.txtplease let me know if requirements are missing.
For now, we can train an agent with an MLP-Policy using the A2C, PPO and DQN algorithms. The implementations are provided by the stable-baselines3 library.
But first, we need to generate some mazes (it also comes with a help page, so just pass the -h flag to see how to customize):
python maze_sampler.pyIt will generate a maze dictionary file at mazes/mazes_<lx>x<lz>_<maze_dict_key>.p.
You can visualize the maze dictionary by executing
python viz_maze.py <path/to/mazes.p>To run training with multiprocessing execute
mpiexec -n 5 python mpi_train.py <path/to/mazes.p>This will train the agent and drop logs at results/experiments_<experiment_key>.
The viz_ scripts will help you visualize the results.
So, for example execute:
python viz_progress.py <path/to/experiment/results>or
python viz_progress.py <path/to/experiment/results>