Advertisement

AI FAQ Getting Started in AI?

Started by July 30, 2009 01:50 PM
4 comments, last by burnthepc 15 years, 3 months ago
I couldn't find a FAQ for AI listed here. If I am mistaken, please point me in the direction of the FAQ. I am looking for material to study up on AI as it pertains to 3D games. A FAQ would be perfect, but short of that I just need a good starting point. I am working on a 3D football game and am going to be using prescripted plays meaning that the "logic" and movement paths are pretty much predetermined, but what I need to know is what the best approach would be to doing the AI in this situation. I guess I could do a series of if then statements, but I get the feeling there is a pattern or more suitable way of doing this. When I say the plays are scripted I mean as follows. Sample logic. QB1: 1. Take Handoff/snap 2. Move to (x,y,z) 3. Check Receivers (WR1, WR2, WR3, WR4) In that order to see if they are open 4. Throw to open WR or C 1. Snap Ball 2. Pass Block So with that in mind. Witin the AI, I will need to define what it means to "Pass Block" or "Snap Ball" or "Check Receivers"(aka. GO through the QB's progression) Any thoughts?
Quote: Original post by murdock
I am looking for material to study up on AI as it pertains to 3D games.


For materials I suggest "AI Game Engine Programming" it's so useful and easy to understand. Also there's a dedicated chapter for Sports Games (chapter 10)
Advertisement
Also, Mat Buckland's "Programming Game AI by Example" is generally the #1 book recommended. (And of course, there's my book... *shrug*)

However, as a note, you have bit off a pretty big hunk of AI tackling a project such as yours. The best way to approach any AI decision is to make a list of the factors that you would have to consider to make a decision and decide how they interrelate. Then, express that behavior in terms that the computer can understand. Basically, hold a conversation with yourself as if you were a 10-year old child. In this case, think "little league coach".

For checking receivers:

"I want to see if they are open." (Define "open".)
"Open means they are not covered." (Define "covered".)
"Covered means there is a defender close to them." (How close is too close?)
"If he can block the pass before it gets there, he is too close." (How do you calculate that distance then?)
"It has to do with how long it would take the ball to fly there compared to how long it would take the defender to run there." (... at this point, you can now start to write a formula for "is covered")

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!"

I get what you are saying and I think I was making it harder than it actually was. I was looking for some design pattern or algorithm or list of such things that might fit here.

I will read through those books when I get some time. Also, I realize it's a tough task to take on; however, it's just the end result I'm looking for and I am willing to take the steps and work up to it, but I need to know what smaller steps to take in order to work up to the bigger task; henceforth, the need for finding a good starting place. =)
Unfortunately, there are not a lot of FAQs for AI. This is usually because there are no answers on how to solve specific design issues such as yours. There are only tools. After that, it is up to you how to put them together.

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!"

I'd recommend Mat Buckland's book too. It has a section on a AI in a soccer game fairly early on - the logic will be similar.

If you want to start something without a book, I'd use a state machine as a basis. link

You could build QB logic as

State 1) before snap
action: do snap

state 1 would lead either passing or running play states

State 2) passing
action : check receivers leads to state: pass
action : check danger (defender's proximity): leads to state:throw away ball


How do they work - a bit of if then and else. But you can change the states so only a selection of if and else run related to that state rather than all possible if's and elses.

This topic is closed to new replies.

Advertisement