luxkun/ReGoap

Why you need FSM?

dimmduh opened this issue · 2 comments

Thanks for great framework!
Can you describe more detailed why you add FSM to example?
How FSM can be used and helps?

Goap creates a plan like MoveToTarget, AttackTarget, ReloadGun. These are high level tasks. When one is executed it's translated into low level tasks. Note how each of these actions is either movement, animation or both. A FSM or a queue can be used to implement this.

The first 2 pages go into more detail: https://alumni.media.mit.edu/~jorkin/gdc2006_orkin_jeff_fear.pdf

Its not the only way to implement the execution of goals. It would be perfectly possible (maybe even preferable?) to use a Behavior tree (Ie have a big selector task that looks at what the current plan step is and then executes the behavior tree branch. But yeah Jeff Orkins original version used a surprisingly simple tri-state FSM for the task, although those states where definately hiding a lot of complexity underneath them