Skip to content
/ mazebot Public

Train a bot to walk a simple maze based on q-learning algorithm

License

Notifications You must be signed in to change notification settings

MGMCN/mazebot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mazebot

This is a demo I created when I was learning the basics of reinforcement learning. It uses the Q-learning algorithm to train a bot to navigate a maze automatically.

license last_commit

Usage

version: Python 3.11

For macOS users, if you encounter ModuleNotFoundError: No module named 'tkinter' when running the code, you need to execute the corresponding commands for your version.

$ brew install python-tk@3.11

Install dependencies.

$ pip3 install -r requirements.txt

Run main.py

$ python3 main.py

Black represents traps, brown represents walls, green represents the destination, red represents the starting point, and gray represents the accessible path.👇🏻 (ps: If the bot falls into a trap, it will be returned to the starting point.)

The bot will become smarter as it tries different moves.

Contributing

Contributions must be available on a separately named branch based on the latest version of the main branch.

About

Train a bot to walk a simple maze based on q-learning algorithm

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages