pdf(for print) - Computer Graphics Laboratory
pdf(for print) - Computer Graphics Laboratory
pdf(for print) - Computer Graphics Laboratory
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Extending the Basic FSM<br />
A Hierarchical FSM Example<br />
• Extending states<br />
• Begin-end end block<br />
BeginDoAction();<br />
DoActions();<br />
EndDoAction();<br />
Gather<br />
Treasure<br />
Monster dead<br />
Monster in sight<br />
No monster<br />
Flee<br />
• Stacks & FSMs<br />
• Stack-based<br />
“history” of FSMs<br />
• “Remember” the sequence of states passed through<br />
• “Retrace” its steps at will<br />
• Hierarchical FSM<br />
• Polymorphic FSMs<br />
• Fuzzy State Machine<br />
• Combined with fuzzy logic<br />
Find<br />
Treasure<br />
Take<br />
Treasure<br />
Go To<br />
Treasure<br />
Fight<br />
Find<br />
Treasure<br />
Gather<br />
Treasure<br />
Live<br />
Stack<br />
Cornered<br />
Active FSM<br />
55<br />
56<br />
Another Hierarchical FSM Example<br />
Done Patrol Done<br />
Noise<br />
Investigate<br />
Saw Enemy<br />
Saw Enemy<br />
Attack<br />
Motion Behavior<br />
• Action selection<br />
• Steering<br />
• Locomotion<br />
Patrol<br />
Go to A<br />
Look <strong>for</strong><br />
Intruders<br />
Go to B<br />
Look <strong>for</strong><br />
Intruders<br />
Investigate<br />
noise<br />
Report<br />
Noise<br />
Go Over<br />
To Noise<br />
noise<br />
Look <strong>for</strong><br />
Intruders<br />
False<br />
Alarm!<br />
A Hierarchy of Motion Behavior<br />
57<br />
58<br />
Action Selection<br />
• Game AI engine<br />
• State machine<br />
• Discussed in “Finite State Machine” section<br />
• Goals<br />
• Planning<br />
• Strategy<br />
• Scripting<br />
• Assigned by players<br />
• Players’ input<br />
Steering<br />
• Path determination<br />
• Path finding or path planning<br />
• Discussed in “Path Finding”<br />
• Behaviors<br />
• Seek & flee<br />
• Pursuit & evasion<br />
• Obstacle avoidance<br />
• Wander<br />
• Path following<br />
• Unaligned collision avoidance<br />
• Group steering<br />
59<br />
60<br />
10