Most AI programmers I know (myself included) have a love-hate relationship with priority-levels for AI behaviors. Developers often use them reluctantly — assuming there must be a better solution out there. These priorities are the subject of this week’s developer discussion.
Basically, the idea is to assign priority levels to every AI behavior to help decide which is most important when they are applicable at the same time, or execute concurrently. Simple right? Well, things get tricky for multiple reasons…
Maintaining a standard convention for the meaning of priorities is necessary, but hard to achieve in practice.
Priority levels always seem to run out when you make the mistake of picking the wrong value for an important behavior!
Sometimes, finding static priorities values for a behavior is a challenge in itself!
How do you resolve this problem in practice?
Do you need/use priorities for your AI behaviors?
Are you happy with this approach?
Have you found something better?
Personally, I split up behaviors with dynamic priorities until I can assign a static value to them (like in Halo). Then I try to keep the designer-editable priority levels down to a minimum, for example HIGH priority for highly functional behaviors, and LOW priority for cosmetic behaviors like reactions to events. In the end, I get the AI work out the relative priorities by analyzing the behavior tree, but that approach has its challenges too!
What do you think about behavior priorities? Do you have any advice to share on this subject?