This is part 1 of the Hands-on RL course.
Let's use (tabular) Q-learning to teach an agent to solve the Taxi-v3 environment from OpenAI gym.
Fasten your seat belt and get ready. We are ready to depart!
Make sure you have Python >= 3.7. Otherwise, update it.
-
Pull the code from GitHub and cd into the
01_taxi
folder:$ git clone https://github.com/Paulescu/hands-on-rl.git $ cd hands-on-rl/01_taxi
-
Make sure you have the
virtualenv
tool in your Python installation$ pip3 install virtualenv
-
Create a virtual environment and activate it.
$ virtualenv -p python3 venv $ source venv/bin/activate
From this point onwards commands run inside the virtual environment.
-
Install dependencies and code from
src
folder in editable mode, so you can experiment with the code.$ (venv) pip install -r requirements.txt $ (venv) export PYTHONPATH="."
-
Open the notebooks, either with good old Jupyter or Jupyter lab
$ (venv) jupyter notebook
$ (venv) jupyter lab
If both launch commands fail, try these:
$ (venv) jupyter notebook --NotebookApp.use_redirect_file=False
$ (venv) jupyter lab --NotebookApp.use_redirect_file=False
-
Play and learn. And do the homework 😉.
Do you wanna become a PRO in Machine Learning?
👉🏽 Subscribe to the datamachines newsletter.
👉🏽 Follow me on Medium.