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