You may find in this repository all the files that are necessary for completing the coursework:
Task.pdfcontaining all the main coursework instructions and questions.starter_code.pyproviding Python 3 code which you will build upon during this tutorial and the associated coursework.environment.pyin which the environment is implemented. This file should not be modified.torch_example.pywhich gives an example of a supervised learning experiment in PyTorch (see section 2 inTutorial.pdffor more information).
You need to use Python 3.6 or greater.
To install the libraries, start by cloning this repository and enter the created folder:
git clone https://github.com/alvaroprat97/RL.gitVirtual environment (called venv here):
python3 -m venv ./venv Enter the environment:
source venv/bin/activateAnd install the libraries in the environment by launching the following command:
pip install -r requirements.txtThis will install the following libraries (and their dependencies) in the virtual environment venv:
torchopencv-pythonnumpymatplotlib
Before launching your experiment, be sure to use the right virtual environment in your shell:
source venv/bin/activate # To launch in the project directoryOnce you are in the right virtual environment, you can directly launch the scripts by using one of the following command:
python torch_example.py # To launch the pytorch example script
python starter_code.py # To launch the coursework scriptIt is also possible to use the virtual environment tools already included in IDEs (such as PyCharm).
If you want to leave the virtual environment, you just need to enter the following command:
deactivate