Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Jaskowicz1/AIMaze

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Maze

This is my AI Maze project! I've always been fascinated by AI (only in the form of good use) since I was ~14 so making this definitely made younger me happy.

The code is pretty messy, I won't lie. The only part that isn't is NdArray. The reason it's pretty messy is because I'm still learning C++ so some questionable choices were made whilst writing this.

How does this work?

This project uses the Q-Learning algorithm to navigate through the grid. This works by assigning each tile as a possible state to the AI and then telling the AI the moves it can perform (generating our Q-Table). From here, our AI has a big choice to make, exploit or explore? With a random number generator and our epsilon, we can pick to either exploit or explore. Exploiting means it will just pick the best action depending on it's state (exploiting the best choice) whereas explore means it will just pick a random action. Then we tell it to do that quite a few times until we're happy and it'll eventually have the best route. Now, how do we get it to pick the best route every time? Well, once it's actually figured out the best route, we can tell it to just pick the numbers from its Q-Table that have the highest value based on its current state (highest value will be the best action from the current state), then it does that action and we move on.

How does Q-Learning work and what is it?

I wont be documenting that here but if you would like to know, I go more in depth on My Site about how Q-Learning works and what it is.

Libraries Used

Preview

image

About

An AI that navigates a maze

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published