AI in soccer
Given with a Java application that simulates a soccer match between two computer-controlled teams in real time, we implement an artificial intelligence for the players in order to beat the opponent team, being controlled by an existing AI.
In possession, our AI focuses on making predetermined circumferential runs towards the opponent's goal, while trying to avoid defenders by running around them. The player in possession passes the ball to unmarked players when the opponent's defenders' pressure got too high, while his fellow attackers would run to certain positions to offer support. At a certain distance, the attackers shoot the ball when there is a clear line to the goal. Without possession, the attackers focus on putting pressure on the opponents, while defenders remain in the back for cover.
It is quite hard to find a good strategy, trying to balance offensive and defensive capabilities. We have to make sure we are not merely countering one (or all) of the existing AIs, but aim to really make it smarter than the others. We split the players in attackers and defenders, keeping the attackers very active, rushing for goal in possession, and pressuring the opponent without. The defenders are more static, offering cover at the back line for when the ball gets past the attackers. This way, we are able to defeat all default AIs, and also perform well during a tournament in which new AIs play against each other.
This project was implemented using Java.