Skip to content

This is a simple implementation of a game player using reinforcement-learning

Notifications You must be signed in to change notification settings

DaniDF/AutonomousGameDiamond

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

In this repo is implemented a simple game and it's player. This game is composed by a car represented with the symbol # and a coin represented with the symbol *. In the board the car has to reach the coin to win the game.


Board

The board is generated automatically from the game engine, implemented in the file $game.py$, with the following aspect: $$ \begin{matrix} 0 & 0 & 0 & 0 \ 0 & # & 0 & 0 \ 0 & 0 & 0 & 0 \ 0 & 0 & 0 & * \end{matrix} $$ The dimension of the board is a parameter of the $game.py$'s class.


Game

To win the game the player has to move the car in order to reach the coin. The car can move only in four directions: up, right, down, left. This possible moves are implemented in the file $move.py$.


Player

In the file $player.py$ is implemented a "AI" player using Reinforcement Learning in particular implements q-learning algorithm.


Code

Launch

In order to execute the game and the player use the following command:

$ python main.py [board dimension]

About

This is a simple implementation of a game player using reinforcement-learning

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages