Advertisement

Soccer Defense

Started by December 15, 2007 02:40 PM
7 comments, last by IADaveMark 16 years, 11 months ago
Hi, I'm need to develop a pretty simple form of defensive positioning in soccer (aka football). There is a huge simplification though, this is the classic form of soccer. It goes pretty much like this: offense kicks ball once --> ball rolls, goes out of bounds, into goal, ect.. --> once ball has stopped, defense update position strategically (defend goal, get in way of offense, don't run into the offense or defensive teammates) based on where the ball stopped (players can only travel a maximum distance) --> repeat I'm very new to AI. Where would the best place to start to do this? I don't know the differences between the various forms of AI, but would genetic algorithms, A*, or neural networks be appropriate? Any suggestion on where to start are welcomed :) Thank, Jedd [Edited by - bronxbomber92 on December 15, 2007 3:51:34 PM]
I'd think you could use a finite state machine, since that's kind of the way you process information when you're actually playing defense. I think Matt Buckland wrote a book, AI for Game Developers, maybe, that had a pretty good example of what it sounds like you're trying to do.
Eric Richards
Advertisement
http://www.ai-junkie.com/books/toc_pgaibe.html
This is the follow up book Programming game AI by example also by Mat Buckland. It goes through the development of a full five-a-side football game.
The source is also dloadable from the website.
Thanks a lot! I'll give the book and source code a look :)
Jedd,

have a look at the work done by Peter Stone (while at CMU) for synthetic robosoccer (RoboCup). Although the game differs a bit from real soccer (no vertical dimension), they share many of the tactics. Peter has applied learning techniques to create winning robocup AI.
http://www.cs.cmu.edu/afs/cs/usr/pstone/mosaic/thesis/index.html

In addition, Jack van Rijswijck published his efforts of using force-fields to improve EA (Toronto's?) FIFA AI at GDC 2003:
http://www.gamasutra.com/features/gdcarchive/2003/Van_Ryswyck_Jack.doc
Quote: Original post by bronxbomber92
offense kicks ball once --> ball rolls, goes out of bounds, into goal, ect.. --> once ball has stopped, defense update position strategically (defend goal, get in way of offense, don't run into the offense or defensive teammates) based on where the ball stopped (players can only travel a maximum distance) --> repeat


It sounds like you are almost doing a turn-based soccer game. Is that correct? Once the ball is repositioned, everyone gets updated? In that case, you could almost pull off positioning using influence maps. That's a way of analyzing the field and deciding where the best place to be on it is. After that, it's an excercise in geometric math. Mat covers a similar, yet slightly more involved, approach in "Programming Game AI by Example" as mentioned previously.

Quote: I'm very new to AI. Where would the best place to start to do this? I don't know the differences between the various forms of AI, but would genetic algorithms, A*, or neural networks be appropriate?

No. And I would love to know who gave you the idea that GAs and NNs would be feasible for this... as a beginner. This is nothing against you - I've just got to find out where this wellspring of NN/GA mania is coming from.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Advertisement
Quote: Original post by Megaman_22
I'd think you could use a finite state machine, since that's kind of the way you process information when you're actually playing defense. I think Matt Buckland wrote a book, AI for Game Developers, maybe, that had a pretty good example of what it sounds like you're trying to do.


I think that your suggestion of FSMs is incomplete. The state in the FSM would tell the agent simply what he should be doing (i.e. defend goal, steal ball, cover man) but not necessarily how he would go about that (e.g. how do I defend the goal? which man do I cover and how?) That's the part that gets a bit more involved.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

WilliamvanderSterren, Thank you for the information, it looks like a very good read!

InnocuousFox, That is exactly what it is like. A turn-based soccer game. It sounds like influence maps are the exact thing I need. Besides Mat books, do you have any other recommended reading about influence maps?

I don't know anything about the complexity of GAs and NNs, so no particular reason about asking about them except if they would be what is needed.
Quote: Original post by bronxbomber92
...do you have any other recommended reading about influence maps?

Not off hand - If you have the AI Wisdom books, there some great articles in there on them - some written by our very own Ferretman. My guess is that many can be found either searching this site or the web. It's a common term and a common technique.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

This topic is closed to new replies.

Advertisement