The Wizards Wiki

Explore your world

User Tools

Site Tools


documentation:behaviourtrees

Behaviour Trees

Behaviour trees are an AI algorithm thats interesing because it allows for defining behaviours for AI's in a way that it is more scalable.

See the implementation for more information. The current design features a tree datastructure which can be used for multiple agents. The BehaviourTreeAgent represents a single agent and stores the agent's state.

A node can have 3 result states: success, fail and running. My current interpretation about running nodes is that the running nodes are stored to resume in the next frame. However other nodes that could potentially override the running behaviour are checked first, and if one of these returns success, the old running states are cleared.

Another option would be to see the running state as a preference state, if there are multiple options available, use the running state to give priority to resuming the previous frames action, instead of chosing another one. This method current seems insufficient to me, since this could cause unfinished sequences to start in the middle of the sequence. The previous behaviour allows that sequences only complete if all actions were executed sequentially, without other actions in between.

References

AltDevBlog very interesting on behaviour trees

documentation/behaviourtrees.txt · Last modified: 2024/08/26 13:25 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki