Day 1

Basic game

The objective of the game is to face two AI against each other on a small football.
Currently, collisions with the ball have been made.
The ball goes in the direction that depends on the position of the player at the moment of impact.
The rebounds on the edges have been done.
At the AI level, the Q-Table is done, the rewards table as well as most of the functions but they have not yet been tested.

Day 2

Start screen

The menu to launch the game has been carried out.
Just press the space bar to start the game.

Game implemented

The background was made using a sprite repeated all over the screen and the lines of touches/goals were made with SDLRect to simplify the calculations when creating the pitch.
A timer has been implemented to limit playing time.
Score management is done.
An end screen will appear indicating who won or indicating "Egalité" if so.
AI is still being implemented.

Choice of states

The choice of states and actions.

Day 3

AI implemented

AI has been implemented. There are two AIs that play against each other after training based on a defined QTable to help it act a little as you want.
Today was a lot of debugging.
Tomorrow's goal is to train the AI from an unforced QTable.

Day 4

AI learning

Here, both AIs learned from an empty QTable.
We notice that the two AIs remain fairly fair with each other.
This is due to the fact that during learning, the first AI to do an action is random so they have almost equivalent learning.
Abdeljalil Zoghlami produced our soundtrack for us (a big thank you to him!):

Learning from a pre-populated matrix

Here is a matrix pre-filled by hand allowing to have a special behavior (here the player follows the ball and shoots when he is close to it).
We can then give this matrix to the learning function in order to refine the parameters of the matrix and obtain a cleaner behavior.
Compared to an empty matrix at the start, this method makes it possible to obtain a coherent result (in this example, the player cannot shoot towards the goal when he is located between the cages and the ball).

2 vs 2

Here is an example of a game with 4 players.
Each player at the QTable of the trained player as before in 1vs1.