Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
doc/img
log
play
scripts
utils
.gitignore
LICENSE
README.md
dataset.py
models.py
quantilizer.py
requirements.txt
sarsa.py

README.md

Let's play the game Hopper-v2 (gym; source).

Getting paid

See the rules here.

Getting Started

  1. git clone https://github.com/mtrazzi/quantilizers.git

  2. cd quantilizers

  3. pip install -Ur gather_data_requirements.txt

  4. python gather_data.py

  5. Follow the specific instructions for your game (see below).

Instructions for Hopper-v2

  1. The goal of this game is to go as far as you can on the right, using three rotations: the first one is next to the foot, the middle one and a higher one.

  2. After launching python gather_data.py, you should see some mujocopy rendering (see image below).

  3. Press d to have "render every frame" set to Off, and press Tab to have an horizontal camera angle that follows you.

  4. After step 1), you will now start playing the game using your keyboard. To allow PyGame to listen to your keyboard movements, you must have the focus on the pygame black window (i.e. the black window must be in front of any rendering from the environment).

black window pygame

  1. When the pygame black window is in front, the keys to move are {j,k} (for the foot), {w,s} for the top junction and {a,d} for the middle junction. Those keys can be directly modified in the gather_data.py file, replacing {j,k,w,s,a,d} with your keys.

  2. To do a few steps, you can mostly use the keys for the foot (jk) and sometimes use the keys from the upper junction (sw). It's recommended to watch a video of a trained AI performing the Hopper-v2 task here before playing.

  3. When you're done, you can close the window using the [Esc] key.

You can’t perform that action at this time.