Teaching an AI to play a simple game using Q-learning

In this post I will walk you through how to teach a computer to master a simple video game using the q-learning reinforcement learning algorithm. We will implement the algorithm from scratch in Ruby without the use of external gems.

To enable us to illustrate the inner workings of the algorithm we will be teaching it to play a very simple 1 dimensional game. This algorithm can however can easily be applied to much more complex games.


Teaching an AI to play a simple game using Q-learning #ruby #rubydeveloper #rubyonrails #ai https://rubyonrails.ba/single/teaching-an-ai-to-play-a-simple-game-using-q-learning

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles