Overview of HFSM2
masterHFSM2 is a high-performance, header-only Hierarchical Finite State Machine (HFSM) framework written in C++11. It is designed for environments where performance and predictability are critical, such as game development and embedded systems.
Key characteristics include:
- Fully Static Structure: The FSM structure is defined at compile-time using variadic templates, ensuring no dynamic allocations occur during runtime.
- Zero Virtual Methods: It uses inline-friendly compile-time polymorphism instead of virtual methods to maintain high performance.
- Type-Safe Transitions: Transitions can be triggered using
FSM.changeTo<TargetState>(), supporting optional payloads. - Hierarchical Support: Supports composite (sub-machine) regions and orthogonal regions.
- Advanced AI Features: Includes support for dynamic planning, utility theory (max score and ranked weighted random), and event-based workflows via
State::react().