Article
files/football

An Overview of the AI in Football Games from Cheating to Machine Learning

Alex J. Champandard on January 25, 2008

While the spotlight for AI in games is often on first-person shooters or real-time strategy games, sports games also present some rather unique challenges and solutions. There certainly isn’t as much research or industry experience available to learn from, but enough to get a good overview of what happens behind closed doors at Electronic Arts or Take 2 every year!

This week’s question comes from Anthony, who’s looking to do a masters project relating to football games:

“What are people’s opinions on sports game AI? […] I’d think that sports AI would be one of the tougher tests for developers as you don’t have the “freedom” that might come from a fantasy style game (given that most players would never have had real life experience of those situations).

Almost everyone has played sports at some point in their lives and would have a certain level of expectation of how a game would play. Does anyone know of any good academic resources I could look into in this area?”

Generally speaking, the AI of a sports game is structured in a similar way than for FPS or RTS games, with layers for animation and control at the bottom, individual decision making in the middle, and tactical reasoning at the top. Within each of those layers, however, there are bigger differences compared to other types of games.

Screenshot 1: Madden NFL 2008 has some of the best football AI to date.

Character Animation

While players generally have high expectations of sports simulations, the motion of the players is by far the most important. These game require an increased level of realism for actors moving, handling a ball, or even interacting with other characters. Everything else is built on top of this.

To confirm the importance of animation in sports games, look into the amount of research done in this field! Many leading animation projects are co-funded or sponsored by EA and other publishers. In particular, read papers from recent Siggraph conferences, you’ll be surprised how many of them use AI-related technology:

There’s lots of room for improvement in this field, but motion synthesis requires a tough stomach! The fact that NaturalMotion, a provider of middleware for animation, is working on a football simulation (called Backbreaker) is a sign that there’s more work to be done in this field.

Physics and procedural simulation certainly has a role to play, but realistic animation can only be achieved using motion capture these days — for now and the foreseeable future. Studios end up using simulation for short clips when a physical reaction is needed, then blending back to motion capture as soon as possible to provide purposeful behaviors again.

Screenshot 2: Playing the perfect animation to intercept a projectile is technically very difficult.

Individual Behaviors

At the mid-level in the architecture, the AI for individuals is much simpler than the animation layer. Typically, this is done using multiple steering behaviors that control the characters by combining basic rules like: staying away from opponents, moving towards a target, finding open space, etc.

The rest of the I at an individual is very similar to traditional first- or third-person shooter AI. It typically involves simple decision making techniques like finite state machines to execute the tactics passed down from the higher level AI. There’s not too much active research in this field, as it’s much better understood.

See the following pages:

  • Craig Reynold’s steering behaviors for an idea of how this works in theory, and consider OpenSteer for the implementation.

  • Mat Buckland’s book Programming Game AI by Example, which has a section on how to apply these ideas to a football game.

Screenshot 3: The basic behaviors of players is implemented as a finite state machine.

Tactical AI

From a tactical perspective, sports games seem to be simpler than the average shooter. There’s only one pitch size rather than multiple levels, there’s no complex geometry. The only thing you have to take into account is the different members on the team. Granted, it’s not a trivial problem. But the fact that so many details from other games are missing means that the AI developers can focus on what’s important: adapting to the player in both offense and defense.

As it turns out, there has been some research on adaptive AI in sports games, particularly in the Madden NFL games. Over the years, the developers have gone from simple cheating by using the player’s choices to help counter his tactics, to using

  • This document (PDF) has a pretty impressive history of the AI in Madden games, from the mid-90s until 2004.

  • Also, check out these research projects at the University of Alberta (as pointed out by Anthony), using statistics to learn both online and offline.

Screenshot 4: The initial placement and purpose of each player is critical for tactics.

Do you have any insights on AI technology in sports games? How do you feel about the behaviors of these games?

Discussion 3 Comments

William on January 27th, 2008

The article is not explicit in this, but you seem to leave out team/franchise management from your assessment of AI in sports games. EA's NFL games come with decent franchise management AI, involving player scouting and trading. For soccer games there are stand-alone management games which sell well.

Dave Mark on January 27th, 2008

The difficulty involved in the tactical issues surrounding football (or any other sports game) is that the programmer/designer must have a very in-depth knowledge of the intricacies of the game. I had a conversation at a GDC party a few years back. I don't remember with whom... but he was an AI programmer for a football title that I had played. I mentioned to him "do you realize that you can march down the field using 10-yard button-hook patterns?" He acknowledged that it was something they had fretted over. Well, I have been a student of the (real) game since I was a kid so I immediately answered about how one would solve that situation in the "real world". I told him that there were two ways of defending that problem. [LIST=1] [*]Eventually the cornerback would have to start anticipating the hook route and play up on the receiver. [*]Slide an outside linebacker into the short zone underneath that receiver to cut off the pass route.[/LIST]I suggested an accumulator that would build up how many times that type of play had been run against them and adjust the reaction of the cornerback or linebacker accordingly. There was an awkward moment where he then said "but the player could run that pattern a few times until the cornerback bit on the route and then the player could run a fake stop and go right past the corner". I simply stared at him until it dawned on him that this sort of cat-and-mouse happens every single week in the NFL... and isn't that what we are trying to accomplish in our games? My point is... because I had a better grasp on how the granular level tactics work than he did, I was able to immediately come up with a beer-fogged solution to a problem that he was aware of, but not necessarily aware of how it is solved in the "real world". Unfortunately, football is likely the most complex of the sports from an individual and team-level AI. I do have to cut him some slack on that. I'm generally quite pleased with Madden on how they have done that over the years. (Of course, they have had how many iterations in order to fine tune it?)

avok23 on February 2nd, 2008

The document on the history of madden football is pretty inaccurate and flattering. Tecmo Bowl came up with play calling not madden. Madden is not the greatest sport AI show piece, that title probably belonged to a 2k sports title (at the time that article was written and even till present) or to a soccer title made by konami. Yes sport A.I is seriously looked down upon. Just even the blog containing this post did sound bias claiming it was slightly easier as there is a fixed field or play. This is the only genre where bad AI is unforgiveable as it kills the game instantly. AI has to consider animation an physics while making its descision as well as keep up to the unpredictable philosophy the player might employ. Non-team based sports seem to fare much better but their main source of woe would be animation and bad physics (virtua tennis 3 v top spin 2). One problem with sports ai is that often the developer is only looking from certain point of views or limited style of play which means u are forced to play one way most of the time or cpu is very repeatitive. Sliders should be avoided at all cost mainly because these sporting heroes are known for their own specific style of play hence characterisation and personality will go a long way in improving sports AI. In some strange EA related cases you can see that those making the game know very little about the sport they are making (very noticeable when u hear them speak in interviews a la Danny Isaac). It would be nice to see more articles that dont feature any form of shooters in them for a change.

If you'd like to add a comment or question on this page, simply log-in to the site. You can create an account from the sign-up page if necessary... It takes less than a minute!