Skip to content

🧊 Gym environment solving the FrozenLake problem using Q-Learning.

License

Notifications You must be signed in to change notification settings

jlenon7/frozenlake_gym_env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI Frozen Lake Gym Environment 🧊

Gym environment solving the Frozen Lake problem using Q-Learning.

Results

Result

Tip

To train the model faster, comment the env.render(mode='human') call in bin/agent.py or change the render_interval variable as desired.

Epoch reward tracker

Epoch reward tracker

TODOs

  • Train the agent using Q-Learning
  • Save the model to be reused with a library like stable-baselines

Running

To run the gym environment first create a new Python environment and activate it. I'm using Anaconda for setting the python version that pipenv should use to set up the environment. The command bellow will automatically setup the environment with conda and pipenv:

make env

Now install all the project dependencies:

make install-all

To run the game to be played by a human run (use arrows <, ^, >, v):

make play

Warning

Since FrozenLake doesn't have a NoOP action, the default will always be 0. Which means that when playing it will always go to the left. Try pressing the arrows faster to bypass that.

To run the game and run random actions run:

make sample

To run the agent to complete the game task run:

make agent

About

🧊 Gym environment solving the FrozenLake problem using Q-Learning.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published