Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 1.76 KB

README.md

File metadata and controls

56 lines (41 loc) · 1.76 KB

SARSA to beat gravity 🚃

👉 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

Quick setup

The easiest way to get the code working in your machine is by using Poetry.

  1. You can install Poetry with this one-liner:

    $ curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python -
  2. Git clone the code

    $ git clone https://github.com/Paulescu/hands-on-rl.git 
  3. Navigate to this lesson code 02_mountain_car

    $ cd hands-on-rl/02_mountain_car
  4. Install all dependencies from `pyproject.toml:

    $ poetry install
  5. Activate the virtual environment

    $ poetry shell
  6. Set PYTHONPATH and launch jupyter (jupyter-lab param may fix launch problems on some systems)

    $ export PYTHONPATH=".."
    $ jupyter-lab --NotebookApp.use_redirect_file=False

Notebooks

  1. Explore the environment
  2. Random agent baseline
  3. SARSA agent
  4. Momentum agent
  5. Homework