Find the Cheese!

Source: alexeygorskiy/find_the_cheese

Problem Description

The goal of this project was to design an environment where a mouse learns to find the cheese. Below is a demonstration of the mouse after 30 games:

Below are demonstrations of every 10th game (up to game 30):

How It Works

The mouse has a limited line of sight and in the beginning has no idea where or in which general direction the cheese is located. When it finds the cheese for the first time, it assigns a high value to the adjacent tiles marking that there is a high expected reward if you find yourself in one of those tiles:

The next time it sees those tiles, it will remember that there is a high expected reward associated with them and will thus move towards them. As the mouse explores the map, it will assign a value to every tile on the map that will be lower the further away the tile is from the cheese. After a number of games, the map will be explored and pretty much all the tiles will have an associated value of expected reward:

As such, the mouse will always move in the direction of increasing expected reward, i.e. towards the cheese, and will therefore always take the shortest path to the cheese from anywhere on the map.