lundi 25 mai 2020

Finite State Machine (FSM) & Behavior Tree (BT)

Presentation

In video games, two of the most AI algorithm use are Finite State Machine (FSM)
and Behavious Tree (BT). They are easy to implement and can have good result

FSM

FSM is the easier AI algorithm to create. Each behavious are state so it's easy
to create new behavious. A lot of document is already made on this subject
and it's use on commercial engine like Unreal Engine (Animation use state machine)

On this example project. Actor moves to eat or sleep depend of this state,
if its ok for eat or sleep . He goes to work



Behavious Tree

Behavious tree is the 2nd AI Algorithm, as the name suggests, it's a tree algorithm.
It's go on each branch and see if the condition is met, depend on the node (selector or sequence)
behavious leaf is selected

On this example. The Actor patrol on the waypoint path, random gold are spawn on the map,
so actor can pick gold.. If the actor see the player, he will pursuit him to catch the player

With selector, BT can give priorities on actor actions, on this example
the most importants actions are : Chase the player, Pick gold then patrol



Aucun commentaire:

Enregistrer un commentaire