Hi,
I’m learning concepts of AI, and I’m stuck on something I found hard to do with basic ideas mentioned above. Let’s introduce what I think should be simple to achieve with AI system in place.
I have an Actor that has number of params and a set of actions with different priorities - Walk, Eat, Relax.
If Actor is hungry, should be able to eat (“Eat”)
If Actor is tired, should be able to relax (“Dance”)
If nothing special, just Walk. (“wander”)
Simple enough so far. First twist: Actions should be able to run in groups, and only actions with highest priority per group.
So walk is Body action, eat is Act action, and Relax is BOTH. That way Actor can Walk and Eat, but cannot Walk and Relax or Eat and Relax - as Dance occupies Body and Act groups. With this simplified Actor, we have flow like this:
Actor Walk, then when he’s hungry he Eats while Walking. When he feels tired, he Relax. If during Relax he became hungry, he will Eat (and stop relaxing!), then continue Relaxing.
With such system, I can add new Actions by defining priority and which groups it belongs to. Let’s say I want to add hmm Toilet action :). This one is highest priority and occupies all groups. That way whatever Actor is doing, he’ll drop it and run to Toilet.
Ok, concept aside. With the above, how am I supposed to implement it?
I think FSM are out instantly. Maybe multiple FSM, one per group? But then the Actions has to be split into BodyRelaxAction and ActRelaxAction, and they need to know about each other as they can run only together.
BT can run actions in parallel, so one parallel action per group, but then above applies again - actions need to know what other parallel actions are running.
Any ideas which of the AI concepts covers above situation?