Utility AI Plugin

Awesome stuff, I hope it will work out in the end.

This would be very much needed for my project. But there’s an optimization possible. For example, when AI is in the rendering range, I would need more detailed set of scoring functions. For example, an NPC goes into a cafe where the player is. Now NPC has to evaluate if it wants to drink some coffee or to chat with the shop assistant or another NPC. But if the same AI is not visible, it should not run through those detailed scoring functions - the player only needs to know that an NPC agent left its home at 9 AM, visited a cafe for 10 minutes and continued its way. No need to run through all those “should I have one more coffee?” and “should I chat with the shop assistant?” scoring functions if the NPC is out of rendering range.

I guess, for this to happen, at first, we would need some abstract system to push/pop a set of scoring functions depending on some event. And if we have that done, we can treat “leave/enter rendering range” as one of those events and so developers can then decide which set of utility scoring functions to push/pop.