Skip to content

This is a simple Q learning example. [ The mouse learns the correct path to reach the cheese ]

Notifications You must be signed in to change notification settings

kavishka-sulakshana/mouse_n_cheese_q_learning

Repository files navigation

The mouse & the cheese

Capture2

Install the requirements.txt

  • Create a virtual environment with python -m venv venv
  • Activate the environment with running venv\Scripts\activate
  • After that install the dependencies with running pip install -r /path/to/requirements.txt

Run the QLearn.py to start learning process

  • With adjusting the sleep times you can visually see the learning process.
  • After this process it will generate the q-table and saved to q_table.json.
  • The q-table plot and the direction values will be plotted in the screen.

Run the demo.py to see the mouse is following the learned paths to eat the cheese.

  • Input a starting position in the beginning of the program.

About

This is a simple Q learning example. [ The mouse learns the correct path to reach the cheese ]

Topics

Resources

Stars

Watchers

Forks

Languages