👉 Read in datamachines 👉 Read in Towards Data Science
This is part 2 of my course Hands-on reinforcement learning.
In this part we use SARSA to help a poor car win the battle against gravity!
Be like a train; go in the rain, go in the sun, go in the storm, go in the dark tunnels! Be like a train; concentrate on your road and go with no hesitation!
--Mehmet Murat Ildan
The easiest way to get the code working in your machine is by using Poetry.
-
You can install Poetry with this one-liner:
$ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
-
Git clone the code
$ git clone https://github.com/Paulescu/hands-on-rl.git
-
Navigate to this lesson code
02_mountain_car
$ cd hands-on-rl/02_mountain_car
-
Install all dependencies from `pyproject.toml:
$ poetry install
-
Activate the virtual environment
$ poetry shell
-
Set PYTHONPATH and launch jupyter (jupyter-lab param may fix launch problems on some systems)
$ export PYTHONPATH=".." $ jupyter-lab --NotebookApp.use_redirect_file=False