A downloadable project for Windows

Download NowName your own price

This project was made in Unity for an AI class's final project in my Fall 2021 semester. The project was to learn how to code and implement the SARSA-Lambda machine-learning algorithm into a 2D grid-based game world. This simulation tool allows the user to control how many times the AI will attempt to find the golden tile. 

The rules are that if the AI runs into a wall they are considered to have failed and if they find the gold tile they will have won. In both cases, the AI will be reset to a random tile in the world and have to start searching again. Every time the AI either wins or loses they save the path they took as weights to the tiles they go on "Remembering" the tiles and directions they used to get there. If they lose, they will decrease the strength of the path they took in their "memory," but if they win they will increase the strength of the path they took in their "memory." This means that the more times the user runs the simulation the better the AI will be at finding the golden tile and red arrows will start to grow larger as the AI figures out the "correct" directions to go to get to the golden tile.

There are a few options you are presented when you get into the application. You can change:

  • The number of runs | Enter a whole number greater than 0 | This controls the number of epochs or the number of times the AI will reset before finishing and giving control back to the user.
  • The speed of the steps | Enter a float (a number with a decimal point) that is between 0.05 - 1 | This controls how many seconds it takes for the AI to move one tile on the screen.
  • The starting explore rate | Enter a float (a number with a decimal point) between 0.1 - 1 | This controls how likely the AI will choose to take a random direction instead of the path with the highest weight. This helps to prevent getting stuck in a movement loop and does change based on the number of times the AI has gone to the same tiles multiple times in a run.

There are two file options for the downloads. The first is the project build with some weights already present from about 10,000+ epochs/runs and the second file (the one with No Saved Weights) is a fresh slate and will allow you to test how long the AI will take to start learning what paths to take to get to the golden tile.

Download

Download NowName your own price

Click download now to get access to the following files:

Grid World - A SARSA-Lambda Project 18 MB
Grid World (No Saved Weights) 18 MB

Leave a comment

Log in with itch.io to leave a comment.