Archived

This topic is now archived and is closed to further replies.

zip7000

AI in a football game- how to start?

Recommended Posts

zip7000    122
hello, I create a football game(speedball game like if you know).there are 5 players on each side. I am a beginner in AI and even if I already have some ideas, I would like some advices to be sure that I go in the right way. Here are my ideas : - each player will have a piece of the pitch. If the ball comes in his area, then the player will go through the ball. - if the player has the ball, he will go to the goal of the adversary. When he will be at the limit of his area, he will give the ball in the direction of one of his team member front of him. -if an adversary comes in his area with the ball, he will strike him.(violent game ) Is it a good starting? Is someone has some ideas to make an AI for a team? what about the data structure? Thank you for any help you could give!

Share this post


Link to post
Share on other sites
alexjc    457
Sounds good. I don''t think any approach is wrong Some are just more limiting than others!

You might want to take a look at a couple month-old threads, both relating to the same topic. There are some intereting ideas there too.

Alex



Artificial Intelligence Depot - Maybe it''s not all about graphics...

Share this post


Link to post
Share on other sites
Jindocai    122
Sports games aren''t too hard to model (realism is hard) since players have generally have specific goals. For example you would have the QB deciding plays and choosing targets for handoffs or passes. A running back will try to run with the ball without being tackled. A wide recieve must run out for a pass catch it and then he becomes a running back. You probably would have to make a full state diagram.

Share this post


Link to post
Share on other sites
Oluseyi    2103
quote:
Original post by Jindocai
Sports games aren''t too hard to model (realism is hard) since players have generally have specific goals.

While I would generally agree with you, the pathetic state of all current sports game AI leads me to believe it must be harder than it seems. Either that, or these companies are full of weenies who never touched a pigskin or roundball...

I''m working lazily on a sports game myself, and have determined a number of rules for behavior. Implemented as a state machine, you''d have a huge monstrosity with deeply nested substates, so some other form of decision making is necessary (in conjunction with fairly high-level state processes). Also, a lot of reasoning in sports is purely "physical": when advancing downfield on offense, the offensive player will pick spots where [s]he is least likely to be intercepted/defended by the other team or most likely to gain advantage. These are complex position-velocity relationships that we instantaneously calculate in the real world, but a lot more complex to simulate authentically.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
RobertCostello    175
Being an "ex-wennie" of one those companies you are refering to, I can tell you first hand that many of the difficulties we ran into, especially on Supercross 2000, was adding the ''human factor'' to the AI. It was easy to make the AI logic play the game with computer accuracy and reflexes. The flaws happen when you try to make the AI play player X better then player Y. Also, team sports provide other interesting challenges, as the AIs need to react to what other players on the same team are doing. This is a big key to a decent AI in hockey, basketball or soccer (although you could make an argument against basketball if you are talking pro hoops! ). I don''t see it quite as important to American football, although the defense should probably be able to react as a team.

--
Robert Costello
www.moonthrone.com

Share this post


Link to post
Share on other sites
Oluseyi    2103
I find individual sports like racing to be a lot more life-like than team sports games. I distinctly remember being slack-jawed with amazement when I saw a competing rider off his bike with a spanner in his hand trying to fix some sort of mechanical fault in a 1990 moto grand prix game on my IBM XT (4.33MHz, 20MB HDD, etc).

Take basketball (my canonical example). Why it took until 2002 for the games to implement the break and transitions properly is beyond me. Prior to this year, point guards on the break would run into the frontcourt with an unobstructed path to the basket, and then pull up at the top of the arc allowing everybody else to catch up. Comments from this year''s developers lead me to believe they "patched" last years AI to "fix" this flaw rather than reevaluating their entire set of base assumptions/behaviors. I could go on about a myriad such issues. The really funny thing is that Lakers vs Celtics and the NBA Playoffs (EA, 1989) didn''t have this flaw. Go figure...

This is not to put them down as developers. I am very much aware of how much goes into making even the simplest of games, so I respect their ability to even produce these titles. Kudos to you and your former co-workers!

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
TheMuuj    122
*I must take a big breath to get all this out*

I have read interviews with EA Sports programmers who say it wouldn't be hard to make a perfect AI for most games, especially since each player could have access to what the other players "know" or "see."

It wouldn't be hard to make an AI that is impossible to beat.

Therefore, it seems to me that the hardest part about making a sports AI is making it dumb enough to be beaten. (I think basketball and soccor were the two exceptions of the rule given in the interview--those are supposed to be hard no matter what you do).

Remember, a single player usually has the advantage. I know when I'm playing against my friends that the person on a team by his/herself will usually win, because coordinating plays is easy (you throw the ball to yourself, run the play yourself, etc.). When playing on a team, I notice receivers doing stupid things like running the wrong way, or people who should be providing coverage trying to sack the quarterback. Computer AI would obviously have the advantage here.

Anyway, I don't think a completely real AI in sports would be that fun. In fact, complete realism (other than visual) in sports games makes them dull (that's why the default length is usually shorter). This is why I like NFL Blitz over Madden football. When I play Madden, I turn on Arcade mode and turn off a lot of the realistic features.

I know it's an oversimplification, but take TicTacToe for example. It's very easy to make a perfect AI that will never lost a game. But would this be fun? Of course not.

Same reason it's not as fun to play a nightmare bot in Quake 3 (oh wait, bad example. I've been into that lately because I can't play on the net here...stupid firewall).

And some advice I read in the book Secrets of the Sages.

Make a stupid AI. Watch it, and wait for it to make a mistake (shouldn't take long). Then code the fix for that mistake. This is basically training the AI.

I can't think of any other way to code AI than using iterative design. Start with making the AI move towards the player with the ball or something.

--TheMuuj

[edited by - TheMuuj on March 25, 2002 12:57:18 AM]

Share this post


Link to post
Share on other sites
Oluseyi    2103
quote:
Original post by TheMuuj
I have read interviews with EA Sports programmers who say it wouldn''t be hard to make a perfect AI for most games, especially since each player could have access to what the other players "know" or "see."

It wouldn''t be hard to make an AI that is impossible to beat.

That''s quite useless. And it''s a cop-out by those developers.

quote:
Therefore, it seems to me that the hardest part about making a sports AI is making it dumb enough to be beaten. (I think basketball and soccor were the two exceptions of the rule given in the interview--those are supposed to be hard no matter what you do).

The hardest part about making a sports AI is to make it genuinely challenging and play authentically, yet give the user a good shot at winning.

quote:

When playing on a team, I notice receivers doing stupid things like running the wrong way, or people who should be providing coverage trying to sack the quarterback. Computer AI would obviously have the advantage here.

The people suck. The people should lose.

A well-designed and implemented sports AI will require proper play to be beaten. I''m not looking for an arcade game (I''ve played enough NBA Jam and Hardwood Heroes to last me a lifetime), so I don''t require that every player be able to simply drive to the hole and dunk on Shaq. What I want to see is a game that rewards a player for tactics and technique, not penalizes him/her. NBA Live, for example, has always had pitiful gameplay. Doubleteaming (even when switched off) creates gaping holes in the defense that the computer exploits, resulting in losses that should not have been. Rebounding is off, there''s virtually no boxing out (even when team strategy is set to Box Out) so the computer gets offensive boards and second-chance opportunities...

You probably get my drift. The complete ignorance of the details of the game, the core that makes the exciting plays and fastbreak dunks possible in real life, are conspicuously absent from virtually every basketball game I have ever played. And I''ve played a lot.


But it''s easy to criticize, so allow me to give you some of my designs and ideas (technical implementation schematics, not abstract "concepts"). I also include ideas that I think are ancilliary to better AI:


  1. Control
    A critical part of being able to scale the AI up to realistic levels is giving the player more precise control over what happens. Being able to alter shots, for example, would change post and above-the-rim play remarkably. As it stands, a player can''t take the ball strong and make a layup; it always has to be a dunk or the ball will likely get blocked.

    More precise control of movement, passing and off the ball movement would also make significant differences. Ask for a screen, then wave it off (currently impossible). Maintain direction (as much as reasonable) so that plays are more efficient - moving in smooth arcs instead of zig-zagging all over the place - staying in bounds as much as logical (ie, allow a player to step out of bounds if "concentration" is low, "pressure" is high, or velocity is "out of control"). These little modifications to control already create a more expressive game. See my thread on input interpretation for more details on this.


  2. Motionsets are evil!
    Motionsets (static sequential animation data) are the bane of sports games. Why? Because they don''t allow the player respond as quickly as they would like. For example, the "spin move" motionset in Live takes so long and moves in such an arbitrary direction that it often causes the player to spin out of bounds. Stupid.

    Motionsets should be replaced with an interpolated skeletal animation scheme. The interpolation/composition allows the player to do two things at once and respond dynamically. A scheme similar is being employed in the new Unreal engine. My implementation had keyframe target vectors per joint, and the joint position was interpolated from current to target. This allowed a new target to instantly be set with a velocity and the skeleton to respond in a fluid, natural manner. I don''t talk about this too much because I haven''t implemented it yet, and as such it''s still "theory".

    Implementing an animation system like I have described increases user control and makes the user more able to respond to/compete with more advanced AI. I''ll expand on this shortly.


  3. "Physical reasoning"
    Sports are physical. Obvious, but profound. A lot of the responses by athletes are prompted by observing an action and attempting to anticipate the next step in a sequence. If you observe steals leaders like John Stockton, you''ll see that a lot of his steals come off blind side defensive help because he sees the ball handler turning into a zone where he wont be seen, so he quickly makes his move.

    Similarly on offense, the secret to Iverson''s crossover breakdowns is the fact that the defensive player will try to compensate for the first cross. So he shakes left, crosses right then fakes going left again. Compensation, but he didn''t move that way; he went right all the way and gets a layup. McGrady''s All-Star game toss-up dunk was made possible because the defensive players anticipated him tossing that lob to another player, not to himself off the board.

    Well, what does this mean for AI? If player A is at position x moving with velocity v at time t, it is logical that at time t+1 player A will be at x'' = v(t+1) + 0.5 v''(t+1)^2 - simple Newtonian physics. Why not use this as an input to defensive logic? Try to attain a position that narrows player A''s advance towards the basket earlier. The upside to a human player is that you can then fake motion, instead of the current system where defensive players are nearly "glued" onto you and the only way to beat them is a pump fake, a spin move (which might dump you out of bounds) or passing.

    Also, if a player has an unobstructed path to the basket, he should go for it. If nothing comes of that run and the defense catches up, then reset the offense. We see it all the time in the real game. Nothing kills me more than being on the 2-on-1 break, getting ready to throw up the lob for the alley-oop when the cutting player suddenly stops at high post position with no defender around. The entire play is broken.


Just employing these three tenets will yield a far superior AI and a much more challenging and rewarding game, IMO.

quote:

And some advice I read in the book Secrets of the Sages.

Make a stupid AI. Watch it, and wait for it to make a mistake (shouldn''t take long). Then code the fix for that mistake. This is basically training the AI.

I think that''s absolutely horrible advice.

quote:
I can''t think of any other way to code AI than using iterative design. Start with making the AI move towards the player with the ball or something.

Intelligent initial assumptions and base behaviors, and a good selection function beat "iterative design" for sports.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
TheMuuj    122
Oluseyi,

Unless I am mistaken, the original question was about how to go about coding AI for a sports game.

How can you base it on real players when the sport itself doesn't actually exists (or am I ignorant on the existance of speedball).

Of course you are right about most sports AI being dumb. But like I said, I don't like realistic sports games, which is where most of my reasoning comes from. I actually don't really like sports in general. I think a lot computer programmers also don't like sports (or else they wouldn't be computer programmers, would they). I know I'm generalizing, but until you get real experts teaching coders what the AI should do and WHY (this is the most important part...understanding WHY), sports games will continue to fall short of the real thing.

Of course, even though I know very little about the techniques used in various sports games, I know something must be wrong. Otherwise, my technique of running Shotgun plays every down and making big passing plays wouldn't work in a football video game. And it doesn't matter, I seem to be able to do this in most football games (it may have to do with how easy they make it to hit your target when passing). I was surprised when it worked in Madden 2002 and NFL Fever.

Of course, when playing with my friends the solution is to turn the penalty for pass interference off. Then it becomes a job of looking for a receiver who isn't being tackled or won't be tacked before the ball gets to him. I know this isn't real, but it does force me to work on my running game (which in turn does make it more real).

I think there needs to continue to be two distinct classes of sports games: realistic and arcade. I prefer arcade because it is impossible to capture the real "thrill" of the game. No matter what you do, a game won't be as exciting as the real thing. No amount of AI will fix that. Maybe it could be solved by making sports games from the First Person perspective. Then you would only be able to see what a real player in the game sees.

--TheMuuj

[edited by - TheMuuj on March 26, 2002 12:42:35 PM]

Share this post


Link to post
Share on other sites
Oluseyi    2103
quote:
Original post by TheMuuj
How can you base it on real players when the sport itself doesn''t actually exists (or am I ignorant on the existance of speedball).

Well, assume it was a real sport (there have been movies about similar things - RollerBall or something like that, and a movie actually titled Speedball). It would have rules and regulations, tactics and techniques, etc. This would serve as the foundation upon which to build a good AI for the game.

quote:
I think a lot computer programmers also don''t like sports (or else they wouldn''t be computer programmers, would they).

I think a lot of American computer programmers are socialize to be "nerdy" and exhibit a disdain for social and physical activities. It doesn''t mean I''m right, but in Nigeria all the programmers I know still enjoy sports. Football (soccer) is huge, and basketball is constantly gaining in popularity.

quote:
I know I''m generalizing, but until you get real experts teaching coders what the AI should do and WHY (this is the most important part...understanding WHY), sports games will continue to fall short of the real thing.

Well, I sort of agree and sort of don''t. I think the key is having developers who are great fans of the sports, who play the sports, who study the sports and who know the sports. Not some pickup half-court 3-on-3 basketball players, but guys (and girls) who have played in organized 5-a-side, 12-man team leagues. Developers who have been coached and have studied playbooks, analyzed games, watched miles of tape... Visual Concepts say their developers for NBA 2K2 play, watch and love the game, but I''m convinced they''re casual athletes who enjoy the highlights. I was on my college feeder team my first three years (in Nigeria); I got shot coaching, had to do "suicide drills", defensive manouvers and all the other things coaches do to make you better all round players. I have handles on the ball. I know the game.

quote:
I think there needs to continue to be two distinct classes of sports games: realistic and arcade.

I agree, and I classify pretty much all of the currently available basketball games as arcade (football too). I''m interested in creating a basketball simulatin - realistic to the hilt. I have a number of ancillary ideas that I detail in this thread on sports character development and MMO possibilities. As you can see, I have a very different type of game in mind.

quote:
...it is impossible to capture the real "thrill" of the game. No matter what you do, a game won''t be as exciting as the real thing.

But it could be exciting in a different way. Playing an RPG will never be as exciting as going on a real quest, but what''s the likelihood of that ever happening to you? And what about the dangers - of death, for instance? Video games allow us to explore roles and worlds that we likely never would in our day-to-day lives. Lots of people play sports, but few of them can compete at as high a level as professional athletes. Even pro athletes play these games, though, because no one pro athlete can assemble various teams on demand for exhibition games. No pro athlete can just take over management of a franchise and build it over a number of seasons, with no "real" risks.

Playing a sports simulation may not be as exciting as driving the Paris-Dakar, but it''s likely the closest most will get to running that turbo-charged Rally Accord across the Sahara.

For the record, I think an FP-sports game would suck. The lack of peripheral vision would seriously detract from gameplay, as would the inability to look in one direction while acting in another (and possible moving in a third).

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
TheMuuj    122
One thing really caught my eye in Oluseyi''s last post (in regards to peripheral vision).

In regards to the lack of peripheral vision...this is actually my major gripe with ALL first-person games.

Games (and computers in general) need to switch to widescreen aspect ratio. I would like to see more games REQUIRE 16:9 (or higher) to play, and anyone stuck on a 4:3 monitor or TV would have to live with black bars. Movies finally got it right with DVDs. How long until widescreen monitors are the norm? I hope it is soon. Once this is done, games can have an FOV more than 90 degrees without looking distorted. Of course, having a bigger screen helps too.

I hope console games systems will make the move to widescreen pretty soon. I''ve noticed that some games already have the option for widescreen, but you rarely gain anything from it (I''ve seen some just chop the top and bottom off, which causes you to LOSE something).

Computers will probably be last to make the transition to widescreen, and even then it may not happen. Maybe once we are using the same displays for TVs and computers, it will happen.

--TheMuuj

Share this post


Link to post
Share on other sites
TheMuuj    122
Well, 4:3 is by no means the golden ratio (but close enough, I suppose). You can always just buy widescreen monitors and use them with 4:3 resolutions (which will put black bars on the sides). Then you can use the extra space for post-it notes. :-D

--TheMuuj

Share this post


Link to post
Share on other sites
Oluseyi    2103
Widescreen doesn''t really represent peripheral vision correctly, and as such would be of little use in improving FPS gameplay. The problem is the fact that the image is being projected onto a fixed rectangle which we then observe from out position. Our real life peripheral vision still records movement beyond the extents of the screen, no matter its aspect ratio.

VR goggles/helmets, perhaps...

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
Timkin    864
Just a small point... going back to something said by TheMuuj about building perfect vs dumb AI....

One might consider a perfect AI as being an AI that has access to the entire game state vector at any time. Given this, one can presumably choose an optimal set of NPC actions based on a predefined ''script'' of gameplay. This is certainly what happens in many games (sports or otherwise) where NPCs use stock standard moves to effect some result.

Making the AI ''dumb'' may be as simple as choosing a sub-optimal action, which again is often what I see displayed in games.

It would seem to me that the best course of action would be to design an AI that computes the optimal action from limited information about the game state. This falls into the AI field of Reasoning Under Uncertainty and is a hot topic in planning for autonomous agents. This has been attempted: the SOAR QuakeBot is a good example. It would seem appropriate to me to extend this notion to cooperative team sports, where each NPCs action is based on their perception of the game state.

The difficulty of course comes down to a reasonable internal representation of the game state that allows for uncertainty. Human players have the benefit of exceptional visual skills. We can see a series of snapshots of the game state (displayed graphically) and interpolate a smoothly varying scene (if the frame rate is high enough!). From this we can extrapolate to possible future states. This is harder for a computer but certainly not impossible. Indeed I can visualise a fairly simple Switching State Space model for extrapolating motion of NPCs based on a time series of position observations. Indeed, this is done now in modern radar systems for tracking aircraft. Computationally it''s faily simple stuff and not too CPU intensive!

Anyway, enough of my ideas... please continue... I''m quite enjoying this thread!

Timkin

Share this post


Link to post
Share on other sites
TheMuuj    122
I have yet to do much game AI coding myself, but I have read my fair share of information on the subject. But I have an idea and I wonder if any game uses something like it.

Rather than the AI base its decisions on the present state, the AI could base its decisions of a state from the past (anywhere from about 1/3 of a second to about 3 seconds, depending on skill). No human has an instantaneous reaction time, so why should a computer?

And if this were be implemented, would the easiest way be to simply store a circular list (well, a vector would work) of game states (or at least the part of the state that the AI needs to know about)?

And then you could actually make the AI use all of the states before the one it is "seeing" to interpolate what is currently happening and what will happen. So in a game like Quake, the AI would actually be a little lagged, and would have to adjust accordingly.

Or is this too much trouble for such a minor difference?

--TheMuuj

Share this post


Link to post
Share on other sites
Oluseyi    2103
quote:
Original post by Timkin
It would seem to me that the best course of action would be to design an AI that computes the optimal action from limited information about the game state. This falls into the AI field of Reasoning Under Uncertainty and is a hot topic in planning for autonomous agents. This has been attempted: the SOAR QuakeBot is a good example. It would seem appropriate to me to extend this notion to cooperative team sports, where each NPCs action is based on their perception of the game state.

I had been toying with this idea for my "upcoming" sports game project (basketball). The logic is that players (in sports games we have do distinguish between "players" - the virtual athletes - and the gamer) only have so much information, and then make decisions based on that information and on their skills/personality/etc. This will make those ambiguous "awareness" ratings seen in most sports games actually more meaningful; they will represent, in some form, how frequently the player attempts to reacquire information about the general game state. Thus, a more aware player would be less likely to commit silly turnovers by stepping out of bounds due to carelessness, or to lose track of time and miss last-second opportunities. The thing is, I also want these attempts to acquire game state information to be consistent with the physical representation of the game - if a player''s field of view is blocked (and this will be determined by some vector math/heuristics), he may not be able to acquire an estimation of how much time is left on the shot clock, for example, or to update where a teammate is and as such might hold on to the ball for too long or pass to a previous position. This rewards the gamer by making strategies like "pressure defense" more effective and integral.

quote:
The difficulty of course comes down to a reasonable internal representation of the game state that allows for uncertainty. Human players have the benefit of exceptional visual skills. We can see a series of snapshots of the game state (displayed graphically) and interpolate a smoothly varying scene (if the frame rate is high enough!). From this we can extrapolate to possible future states. This is harder for a computer but certainly not impossible. Indeed I can visualise a fairly simple Switching State Space model for extrapolating motion of NPCs based on a time series of position observations. Indeed, this is done now in modern radar systems for tracking aircraft. Computationally it''s faily simple stuff and not too CPU intensive!

Precisely. While I hadn''t reasoned it out as fully as you have (and don''t have the experience to intuitively refer to other models, such as radar), I think you''ve provided an excellent suggestion for implementation. To balance this effect (ie, to mitigate the effects of the "all-seeingness" of the gamer), the same kinds of losses of acuity would need to be simulated for a gamer-controlled player, most likely in the form of loss of accuracy. For example, if a gamer-controlled athlete has the ball but is trapped in the corner and being triple-teamed, an attempt at a pass out of this situation is more likely to be blocked by one of the pressure defensive players or intercepted by a player out on the court (thanks to the anticipation model I briefly described earlier).

As I write this, my roommate is playing NBA Live 2000, and the game''s deficiencies are fuelling my creativity!

quote:
Anyway, enough of my ideas... please continue... I''m quite enjoying this thread!

I''ve found your (brief) contribution to be very valuable. You''ve helped me concretize some of my ideas.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
Oluseyi    2103
quote:
Original post by TheMuuj
Rather than the AI base its decisions on the present state, the AI could base its decisions of a state from the past (anywhere from about 1/3 of a second to about 3 seconds, depending on skill). No human has an instantaneous reaction time, so why should a computer?

Agreed, there is something we call "reaction time", and reaction time should affect AI players just as much as human players. However, reaction time isn''t due to a "cognitive delay", but rather to a physical delay - the time necessary to overcome inertia and get the muscles in motion. This reaction time decreases significantly with training, strength and "quickness" - a semi-intangible that the greatest athletes all posses. For all intents and purposes, reaction time can be ignored for professional athletes (and thus for simulations of professional athletes), especially since physical considerations by far outweigh reaction time as a factor. Overcoming your current velocity (inertia) to start moving in a different direction affects results far more than when you perceive and recognize a threat.

That said, I think my next statement/idea will mesh perfectly with what you''re trying to achieve. If a player acquires a "snapshot" of the game state (with physical limitations as detailed in my previous post) at time t and has an awareness that wont result in another acquisition until a time t + T, then the player''s image effectively decays and will naturally result in misplays.

quote:
And if this were be implemented, would the easiest way be to simply store a circular list (well, a vector would work) of game states (or at least the part of the state that the AI needs to know about)?

I actually think the gamestate would/should be stored as an aggregation of the positions, velocities and "apparent intentions" of all objects (at least for my game), and each AI in the game would have a single gamestate variable. Not all the values in the gamestate will be accurate - or even valid!

quote:
And then you could actually make the AI use all of the states before the one it is "seeing" to interpolate what is currently happening and what will happen. So in a game like Quake, the AI would actually be a little lagged, and would have to adjust accordingly.

Interpolation and estimation are fairly intrinsic to generating top-notch sports AI. A player intending a pass for a teammate should take a look at the teammate''s current position, estimate the distance of the pass (and the time necessary to complete it) and estimate the intersection of a pass path and the player path. If none can be found within a response cycle, a "mature" player would choose an alternate course of action, but an inexperience player would try to force the pass.

quote:
Or is this too much trouble for such a minor difference?

Personally, I think it makes a tremendous difference to the way a game plays and the whole experience - a tremendously positive one. Keep the ideas coming!

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites
Timkin    864
quote:
Original post by Oluseyi

That said, I think my next statement/idea will mesh perfectly with what you''re trying to achieve. If a player acquires a "snapshot" of the game state (with physical limitations as detailed in my previous post) at time t and has an awareness that wont result in another acquisition until a time t + T, then the player''s image effectively decays and will naturally result in misplays.



You''ve latched onto a very important phenomena in AI/information theory Oluseyi. I published a paper 2 years ago that showed the relationship between particular probabilistic models of states of a system and diffusion processes. The paper is particularly technical with a bit of advanced mathematics, but if you''re interested, it''s called, "Efficient Inference in Dynamic Belief Networks with Variable Temporal Resolution", T. A. Wilkin & A. E. Nicholson, Proceedings of the 6th Pacific Rim International Conference on Artificial Intelligence (PRICAI) 2000. (As a shameless plug, the paper was voted Best Paper for the conference!)

The fundamental result is that in the absence of observations of a system, knowledge about the particular state diffuses... in probability terms, the joint density function diffuses... this diffusion is governed by the same mathematical models that govern diffusion of smoke, or heat, for example.

It is fairly easy to incorporate this effect into a dynamic probabilistic model of a system... the only difficulty being that the complexity of inference is exponentially proportional to the complexity of the system being modelled.

If you want more details, I might be able to publish a short, non-technical summary of the paper on GD.net sometime in the near future.

Cheers,

Timkin

Share this post


Link to post
Share on other sites
Oluseyi    2103
quote:
Original post by Timkin
You''ve latched onto a very important phenomena in AI/information theory Oluseyi. I published a paper 2 years ago that showed the relationship between particular probabilistic models of states of a system and diffusion processes. The paper is particularly technical with a bit of advanced mathematics, but if you''re interested, it''s called, "Efficient Inference in Dynamic Belief Networks with Variable Temporal Resolution", T. A. Wilkin & A. E. Nicholson, Proceedings of the 6th Pacific Rim International Conference on Artificial Intelligence (PRICAI) 2000. (As a shameless plug, the paper was voted Best Paper for the conference!)

Fascinating! I must say that I''m quite pleased that my seemingly ad-hoc and hodge-podge ruminations on AI principles correlate with mathematically rigid theories, propositions and definitions.

quote:
this diffusion is governed by the same mathematical models that govern diffusion of smoke, or heat, for example.

Hmm... Time to whip out "Ye Olde Physics Textbooke". I''ll be trying out some simple experiments this summer (I''m mired in other, mostly user-interface work for now), so I''ll be sure to keep this in mind.

quote:
If you want more details, I might be able to publish a short, non-technical summary of the paper on GD.net sometime in the near future.

Absolutely. I would love to see it as an article, in part because I think too many of the articles focus on the glamorous and popular areas of 3D graphics and animation, and application frameworks. We need more articles that are designed to be contemplated rather than followed - more discussions and fewer tutorials.

[ GDNet Start Here | GDNet Search Tool | GDNet FAQ | MS RTFM [MSDN] | SGI STL Docs | Google! | Asking Smart Questions ]
Thanks to Kylotan for the idea!

Share this post


Link to post
Share on other sites