Authors: Michele Conti and Luca Iezzi.
Codebase for the Deep Learning and Applied AI course project at Sapienza University of Rome (ay 2020/2021). This consists of a reimplementation of World Models, and its adaptation on Plunder, one of the environments from Procgen Benchmark.
| Agent playing |
|---|
This implementation is based on Python 3.8. To install all the requirements:
$ pip install -r requirements.txt| VAE | MDN-RNN | Controller | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
The complete pipeline to train the 3 model components:
First, we generate 1000 rollouts from a random policy:
$ PYTHONPATH=. python3 src/generate_data.py --rollouts 1000We then split the data in train, validation, and test:
$ PYTHONPATH=. python3 src/split_data.pyFinally, we reorganize the data in order to train the MDN-RNN:
$ PYTHONPATH=. python3 src/pl_data/new_dataset.pyTo train the Vision, set config_name="vae" in line 149 of the run.py script, then run the following:
$ PYTHONPATH=. python3 src/run.pyTo train the Memory, set config_name="mdrnn" in line 149 of the run.py script, then run the following:
$ PYTHONPATH=. python3 src/run.pyTo train the Controller, run the following:
$ PYTHONPATH=. python3 src/controller.pyWe took inspiration from the implementations of Corentin Tallec and Sebastian Risi.