BTW this might look like a FSM but it’s mostly not, it’s just one data point: how aggravated the enemy is. It doesn’t directly drive AI actions, it’s just one piece of data I can use in the utility calculations to choose what to do, and to modify actions. Eg if they’re investigating a sound, if they’re annoyed they’ll run to that location rather than walk. It sort of behaves like a one-item FSM in how it changes, but the link to actions is much looser meaning it’s a lot more flexible
@sinbad honest op.
Your missing curious/random
Introduce a small % chance of entering curious state where it performs high level planning (not route finding ect...) completely randomly. Usually quick to add and while it can be a source of bugs it introduced a complexity and depth which delights players.
Many early game ai had this design by accident because they ran out of stack memory or some other performance stat which then they pulled the current state. Eg Xcom.
@kimau that’s kinda my passive mood, they’re often just wandering about randomly in that mood. It’s a mood data point rather than a full state, there are several things they can actually do when in that mood
I’ve definitely seen the benefit of using “weighted random top N” utility action choice, it adds some nice variation. I started off using best choice and you still need it for some cases but I’ve tried to make most of my action choices have some level of randomness within groups
Add comment