Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence in Game Design Probabilistic Finite State Machines.

Similar presentations


Presentation on theme: "Artificial Intelligence in Game Design Probabilistic Finite State Machines."— Presentation transcript:

1 Artificial Intelligence in Game Design Probabilistic Finite State Machines

2 Randomness in Games Adds to playability –Characters less predictable, more “realistic” –World itself is less predictable –Greater replayability Goal: Randomness should not appear random –Part of character “personality” –Part of unpredictable world

3 Randomness Inside State Randomness in actions taken by NPC –Randomness inside update method –Can depend on current state ConfidentAngryFrightened Attack Left40%60%30% Attack Right 40%35%20% Defend20%5%50%

4 Randomness Inside State Randomness in Initial Setup –Randomness in enter method –Example: choice of weapon in Fight state 60%5%35%

5 Randomness in Transitions Same current state + same stimuli = one of several possible next states –Possibly including current state Performing different tasks at random Patrol in front of Door Player visible Guard Door and Shout for Help Chase Player 60% 40%

6 Random Behavior Timeouts Continue strong emotional behavior for random number of steps Wander Predator seen Flee Predator not seen 10% Predator seen Predator not seen 90%

7 Unpredictability of World Small chance of “unexpected” occurrence –Adds “newness” to game even after multiple plays –Adds to “realism” of world Reload Finished reloading AimFire Target in sights 98% Gun Jam Target in sights 2% Normal case Unexpected case Gun cleared

8 Randomness in Emotional States ConfidentAngry Frightened Player HP < 10 60% Small hit by player 25% My HP < 10 50% Heavy hit by me 30% Heavy hit by player 30% Emotional transitions less predictable Effect of “delayed reaction” My HP < 10 50% Small hit by player 75% Player HP < 10 40% Heavy hit by player 70% Heavy hit by me 70%

9 Probabilities and Personality NPCs with probabilities can give illusion of personalities Differences must be large enough for player to notice in behavior ConfidentAngry Frightened Player HP < 10 20% Small hit by player 90% My HP < 10 20% Heavy hit by me 30% Heavy hit by player 30% My HP < 10 80% Small hit by player 10% Player HP < 10 80% Heavy hit by player 70% Heavy hit by me 70% Orc with anger management issues

10 Dynamic Probabilities Likelihood of transition depends on something else –More realistic (but not completely predictable) –Can give player clues about state of NPC Firing Player not firing Reload 1- % of bullets left % of bullets left Patrol in front of Door Player visible Guard Door and Shout for Help Chase Player Energy % 1- Energy %

11 Emergent Group Behavior Each NPC in group can choose random behavior –Can appear to “cooperate” –Half of group fires immediately giving “cover” to rest –If player shoots firing players, rest will have time to reach cover Patrol Player visible Fire Take Cover 50 % Cover reached

12 Emergent Group Behavior Potential problem: Possibility all in group can choose same action –All either shoot or take cover –No longer looks intelligent Can base probabilities on actions others take Patrol Player visible Fire Take Cover % of other players firing Cover reached 1 - % of other players firing

13 Potential Problems Possibly many parameters to tweak –How do we know these are the best probabilities to use? Difficult to thoroughly test –Combinations of probabilities may create a bad case (i.e. easy win) which is possible but very unlikely –That case will be found by some customer ConfidentAngryFrightened Attack Left40%60%30% Attack Right40%35%20% Defend20%5%50%


Download ppt "Artificial Intelligence in Game Design Probabilistic Finite State Machines."

Similar presentations


Ads by Google