theunsigned
New member
Good day,
I have been reading as much as I can about utility theory (http://www.gameaipro.com/GameAIPro/...ecisions_into_Your_Existing_Behavior_Tree.pdf and some other summaries) as well as normalization (https://www.statology.org/normalize-data-between-0-and-100/ and others) but I'm struggling to understand how to apply it. I do not have a strong background in math but I'm loving it as I learn and I would describe myself as a low-intermediate C# coder.
Here's my use-case:
I have a Stats class that has a stat scriptable object, value (min and max), sensitivity (min and max), and threshold (min and max). I made a list of these Stats in my NPC controller, which has a Utility Selector Behavior Designer Tree for Energy, Socialization, and Individual Growth. I cobbled together a strange formula to select which Stat to attend to in a Stat Evaluator and plugged in the three different stats to evaluate; the current formula is this: 1-(.01*( stat value - (stat threshold +(stat sensitivity*2)))) -- this is then evaluated along the animation curve
The challenge is that I want each evaluator to factor in different things. I could do this in the controller and have it contribute to the related Stat's value or make unique evaluators for each one. Either way, I need to better understand the normalization process that is described at the bottom of page 131 in the chapter on Utility Theory linked to above.
The author describes normalizing the heal and delay values and adds a power factor in example 10.4 but I'm not sure if that's a power on top of the power applied in the previous example (10.3) or something else entirely and I'm not clear on how to normalize a single value between 0-100. The formulas I have found depend on the range of a data set. but the chapter describes normalizing each value before plugging it into the formula (10.4). Is this the case or is the utility value normalized based on the range of the heal and delay values?
In my example, let's take Socialization, I'd like to factor in the number of friends an NPC has compared to their ideal number of friends, time since last contact compared to ideal time between contacts, etc. as well as how long it will take to go to their friends or hangout spots to determine if it's worth leaving their homes, where they can eat, sleep, and tend to their basic Energy needs. I think some of these calculations may be better done in the NPC Controller script and the evaluator can just read the Stat value but I would really like to better understand this so I can improve my use of Behavior Designer.
Thank you very much for such a great tool and prompting me to expand my knowledge!
I have been reading as much as I can about utility theory (http://www.gameaipro.com/GameAIPro/...ecisions_into_Your_Existing_Behavior_Tree.pdf and some other summaries) as well as normalization (https://www.statology.org/normalize-data-between-0-and-100/ and others) but I'm struggling to understand how to apply it. I do not have a strong background in math but I'm loving it as I learn and I would describe myself as a low-intermediate C# coder.
Here's my use-case:
I have a Stats class that has a stat scriptable object, value (min and max), sensitivity (min and max), and threshold (min and max). I made a list of these Stats in my NPC controller, which has a Utility Selector Behavior Designer Tree for Energy, Socialization, and Individual Growth. I cobbled together a strange formula to select which Stat to attend to in a Stat Evaluator and plugged in the three different stats to evaluate; the current formula is this: 1-(.01*( stat value - (stat threshold +(stat sensitivity*2)))) -- this is then evaluated along the animation curve
The challenge is that I want each evaluator to factor in different things. I could do this in the controller and have it contribute to the related Stat's value or make unique evaluators for each one. Either way, I need to better understand the normalization process that is described at the bottom of page 131 in the chapter on Utility Theory linked to above.
The author describes normalizing the heal and delay values and adds a power factor in example 10.4 but I'm not sure if that's a power on top of the power applied in the previous example (10.3) or something else entirely and I'm not clear on how to normalize a single value between 0-100. The formulas I have found depend on the range of a data set. but the chapter describes normalizing each value before plugging it into the formula (10.4). Is this the case or is the utility value normalized based on the range of the heal and delay values?
In my example, let's take Socialization, I'd like to factor in the number of friends an NPC has compared to their ideal number of friends, time since last contact compared to ideal time between contacts, etc. as well as how long it will take to go to their friends or hangout spots to determine if it's worth leaving their homes, where they can eat, sleep, and tend to their basic Energy needs. I think some of these calculations may be better done in the NPC Controller script and the evaluator can just read the Stat value but I would really like to better understand this so I can improve my use of Behavior Designer.
Thank you very much for such a great tool and prompting me to expand my knowledge!