Sports management AI
I''m developing a match engine for a cricket managment simulation at present and am looking for a bit of guidance with regards to AI.
When a ball is bowled, a batsman interprets where it lands on the pitch and depending on where a randomn number falls, he either plays a defensive, normal or attacking stroke. It works out which ''region'' of the field the ball goes to depending on which shot they have played.
This isn''t exactly how I''d imagined would be the best option when implementing something like this. Does anyone know of any good AI tips when doing a sports management sim like this?
Sports management (as in team management) or sports simulation (as in the players'' AI)?
Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
Dave Mark - President and Lead Designer
Intrinsic Algorithm - "Reducing the world to mathematical equations!"
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!"
As in Player AI... I''m developing it in C++ but haven''t really had much experience with AI in the past. What are the typical approaches to this problem in match engines?
The player AI for sports sims is typically driven by a finite state machine (FSM). Each player role: batsman, fielder, bowler, may have one or several states associated with it. The players change state depending on one or more conditions, which you as the programmer create (It's also possible to use other techniques in the creation of these conditions or rulesets but don't worry about that, you can create a perfectly fine sports sim using hand crafted FSMs).
For example a fielder may have the states:
Wait at Position
Run toward ball
Catch Ball
Throw ball to player X
One of the exit conditions for the Wait at Position state may be that a batsman has hit the ball toward the fielder's sector. This condition would change the fielder's state to Run Toward Ball.
One of the exit conditions for Run Toward Ball might be that the ball is within catching range at which point the fielder will change state to Catch the Ball. Another exit condition for Run Toward Ball might be that the ball has landed too far away in which case the fielder should change state to Wait at Position.
And so on
Hope this helps
My Website: ai-junkie.com | My Book: AI Techniques for Game Programming
[edited by - fup on August 8, 2003 11:51:33 AM]
For example a fielder may have the states:
Wait at Position
Run toward ball
Catch Ball
Throw ball to player X
One of the exit conditions for the Wait at Position state may be that a batsman has hit the ball toward the fielder's sector. This condition would change the fielder's state to Run Toward Ball.
One of the exit conditions for Run Toward Ball might be that the ball is within catching range at which point the fielder will change state to Catch the Ball. Another exit condition for Run Toward Ball might be that the ball has landed too far away in which case the fielder should change state to Wait at Position.
And so on
Hope this helps
My Website: ai-junkie.com | My Book: AI Techniques for Game Programming
[edited by - fup on August 8, 2003 11:51:33 AM]
My Website: ai-junkie.com | My Books: 'Programming Game AI by Example' & 'AI Techniques for Game Programming'
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement