Markov Project Final
The video below shows a finished product of the 2D Soccer Game with the AI making its decisions using a Markov system. You can see in the video that the red AI begins the game running to random locations because it does not know where the ball is going to go, once there has been previous situations the AI can begin to predict where it is going and about half way through the video it does start to make correct decisions. At this point the player changes where they are going and temporarily the AI goes the wrong way because it predicts that the player will continue their original movement. This corrects it self when the played is passing the ball up and down and the AI eventually just sits in between the two blue circles as it knows the pass will go between these two.
To show what the AI is thinking the window in the top right corner prints where the ball currently is and where the AI predicts it will go.
I am quite happy with how this project has turned out, however if i was to improve it in the future I would like to find a way to make it clearer what the AI is trying to do, as right now it consistently moves to the right position but it always gets there after the ball has passed, making it mostly useless.