#### Archived

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

# Sports management AI

This topic is 5606 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

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?

##### Share on other sites
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!"

##### Share on other sites
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?

##### Share on other sites
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]

1. 1
2. 2
3. 3
4. 4
Rutin
13
5. 5

• 26
• 10
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633695
• Total Posts
3013378
×