Hey!
I'm building some 'Sims-like' AI experiments with BD at the moment, and I'm trying to wrap my head around the best way to structure my trees when working with a Utility Selector. My project is going to be a fairly long-term undertaking, so would be great to get some feedback just to make sure I am on the right track.
So - What is the best way to work with many different objects that could fulfill the same needs? For example, if I was to augment the Utility Theory example (Decorator version) such that instead of one option for 'Work', there were many options more or less appealing depending on location, and efficiency. My best guess would be to create a custom Evaluator which has 2 curves, one for distance and one for effectiveness that would be assigned to each additional work action. Each new work location/action would be placed under the Utility Selector as 'top level choices', presuming that nesting of utility selectors is probably a bad idea.
Instead of simple 'Work', 'Eat', 'Sleep' evaluators under the Utility Selector, a more complex example might be something like 'WorkComputer', 'WorkDesk', 'SleepBed', 'SleepCouch', 'EatTakeout', 'EatKitchen' and so on. This would mean that as more options and variety for the Sim are added, the direct children of the Utility Selector keep expanding.
As a side note, I figure that if the behavior of any of these choices is more or less identical (Go to object, trigger animation) - I could use an external behavior tree to avoid repeating too much logic.
The other thing that I am curious about, is how I might be able to insert logic into the behavior tree when a new object is included in the scene. Say my Sim purchases a new Television; how would I inject the TV's behavior tree into the Sims?
Thanks!
Sam
I'm building some 'Sims-like' AI experiments with BD at the moment, and I'm trying to wrap my head around the best way to structure my trees when working with a Utility Selector. My project is going to be a fairly long-term undertaking, so would be great to get some feedback just to make sure I am on the right track.
So - What is the best way to work with many different objects that could fulfill the same needs? For example, if I was to augment the Utility Theory example (Decorator version) such that instead of one option for 'Work', there were many options more or less appealing depending on location, and efficiency. My best guess would be to create a custom Evaluator which has 2 curves, one for distance and one for effectiveness that would be assigned to each additional work action. Each new work location/action would be placed under the Utility Selector as 'top level choices', presuming that nesting of utility selectors is probably a bad idea.
Instead of simple 'Work', 'Eat', 'Sleep' evaluators under the Utility Selector, a more complex example might be something like 'WorkComputer', 'WorkDesk', 'SleepBed', 'SleepCouch', 'EatTakeout', 'EatKitchen' and so on. This would mean that as more options and variety for the Sim are added, the direct children of the Utility Selector keep expanding.
As a side note, I figure that if the behavior of any of these choices is more or less identical (Go to object, trigger animation) - I could use an external behavior tree to avoid repeating too much logic.
The other thing that I am curious about, is how I might be able to insert logic into the behavior tree when a new object is included in the scene. Say my Sim purchases a new Television; how would I inject the TV's behavior tree into the Sims?
Thanks!
Sam
Last edited: