Pathfinding Using Reinforcement Learning
- Q-table
- Q-network
- PPO
- DQN (with the Double DQN extension) - work in progress, not currently working as intended
- DRQN - work in progress, not currently working as intended
python
+ pip
, version 3.6 or greater
Note: It's recommended that you install the Python dependencies in a virtual environment. virtualenv
and virtualenvwrapper
:
pip install virtualenv
pip install virtualenvwrapper
Note: To get matplotlib
to work on a Mac with a virtual environment you have to use venv
instead
mkvirtualenv purl
or with venv
:
python -m venv purl-venv
First, switch to the virtual environment:
workon purl
or with venv
:
source purl-venv/bin/activate
Note: You can set up an alias in your shell to make the virtual environment more accessible,
e.g alias actpurl='source /path/to/purl/purl-venv/bin/activate'
Then, install the dependencies by running:
pip install -r requirements.txt
or if you have pip-sync
installed:
pip-sync
There are two main subcommands to PURL
To train a model, run:
./purl train
For example, to train a model using the PPO algorithm on the MiniGrid-LavaCrossingS9N1-v0
environment, use the following arguments:
./purl train --algorithm ppo --environment MiniGrid-LavaCrossingS9N1-v0
To visualize a model, run:
./purl vizualize
Python dependencies are managed by pip-compile
To add a new package, simply add it to the list in requirements.in
.
You then update the requirements.txt
-file by running
pip-compile --output-file requirements.txt requirements.in
- gym-minigrid - Minimalistic gridworld environment for OpenAI Gym
- PyTorch - Tensors and Dynamic neural networks in Python
- Anne Engström
- Joel Lidin
- Gustav Molander
- Olle Månsson
- Noa Onoszko
- Hugo Ölund
This project is licensed under the MIT License - see the LICENSE file for details