RoboCup. It won’t arrest you
For the last 9 months I’ve been working with Nick and Stu on our final year project here at University. All CompSci students do a project, either in a research area or as a group implementation. Its like a dissertation for us. This post attempts to explain our final year project to the layman. It leaves a lot out!
RoboCup (not to be confused with the eponymous character of the 80’s film franchise!), is an international research initiative aiming to use principles of AI in the development of artificial soccer teams. The overall aim is that by 2050, a full size team of humanoid players should be able to take on the human world champions, and win.
In terms of our project, we didn’t have the time, funding or expertise to make physical robots. So, we have been developing a 2D simulated team capable of taking on other teams created by Universities and institutions. The pitch, referee, rules and game come ready provided, our task was just to implement 11 players which obeyed the rules and played the best game possible.
Doesn’t sound like much? Some days it doesn’t to me either. And in fact, writing the team itself isn’t whats taken so long. The real battle has been communication with the server. The soccer server (as provided by far smarter people) has its own language for telling players what they can see (ball? other players? corner flag?), what they can hear (referee messages, game modes), and what they can feel. Our first task, using the Java programming language, was to take these messages and translate them into objects to make decisions from. We took an existing framework for processing this language, and updated it to the newest version, a mammoth task that in itself took weeks.
Our next priority was to work out where our players were on the pitch. Whilst we could see their locations on the monitor quite easily, a players concept of its location is just “I can see the left top corner flag, and the left goal” for example. Working out locations based on semi-fixed objects is a very important part of artificial intelligence, which some researchers have dedicated whole careers to. Some methods rely on trigonometry and mathematics to calculate exact positions, some rely on distance and direction travelled to work out relative locations, and others use probability models to calculate the most likely location. After much deliberation, we settled on the mathematical approach, which given the input data is accurate approximately 70% of the time. In future we’d like to improve this – perhaps by combining all three approaches.
So now we have 11 players who know where they are on the pitch, what they can see and interact with, and what they can do (kick the ball, run, turn). Given this data human players will then make strategic decisions based on experience and skill, deciding whether to approach the ball, kick it to a teammate or shoot for goal. Our robotic players also had to make decisions, and in order for us to win, make the best decision possible. We implemented a Genetic Algorithm, which is a method for evolving behaviour in computers by repeated testing and evaluation. To start the ball rolling, we create 100 random teams with random strategy choices available. Each team plays a game against a control team, then is evaluated to calculate its fitness score. This score comprises both positive actions: goals scored, passes made; and negative actions: fouls made, offsides, goals conceded. The ‘healthier’ teams can then be selected, and spliced to create a new generation of teams. By repeating this cycle thousands of times, the best team evolves (subject to limitations).
This is where we are now. After months and months of work, and over a thousand man hours, we have created a framework for communicating with the server, built a functioning team, implemented a genetic algorithm, and a framework for assisting automated evolution of teams. We are currently in the documentation phase, trying to finish mountains of quality assurance whilst leaving the team to evolve autonomously.
Fingers crossed, in two weeks we’ll be ready for the final deadline!