Stealth AI – AI Brain, Looking at Coroutines and State Machines

My AI script is split into multiple parts, there’s a script to handle animations inputs, one for visual and audio detection and the final one for its behavior, the AIBrain.

AIVersion01_004.png

The AI plays the surprise animation as it transistions to the chase state

Since i’m treating this version of the AI script as an experimental script for prototyping, not a final product, I decided to try out making it with a coroutine based state machine. While this made certain elements, like constant detection inputs, more difficult to mange it had some major pros in that it allowed me to give each state a linear intro sequence of events, a looping middle, and a linear outro.

AIVersion01_005.png

This allowed for very directed transition between states that allowed me to give my patroller some specific behaviors, beyond immediately responding to new inputs.

Advertisements
Stealth AI – AI Brain, Looking at Coroutines and State Machines

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s