Skip to content

Latest commit

 

History

History
100 lines (69 loc) · 2.8 KB

README.md

File metadata and controls

100 lines (69 loc) · 2.8 KB

Q-learning to drive a taxi 🚕

You talkin' to me?

-- Robert de Niro (Taxi driver)

Venice’s taxis 👆 by Helena Jankovičová Kováčová from Pexels 🙏

Table of Contents

Welcome 🤗

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!

Quick setup

Make sure you have Python >= 3.7. Otherwise, update it.

  1. 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
    
  2. Make sure you have the virtualenv tool in your Python installation

    $ pip3 install virtualenv
    
  3. 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.

  4. 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="."
    
  5. 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
    
  6. Play and learn. And do the homework 😉.

Lecture transcripts

📝 Q learning

Notebooks

Let's connect!

Do you wanna become a PRO in Machine Learning?

👉🏽 Subscribe to the datamachines newsletter.

👉🏽 Follow me on Medium.