Geometric mean for AI considerations (#1812)
* Geometric mean for AI cons More forgiving for having more considerations for an action. * You had 1 job Co-authored-by: Metal Gear Sloth <metalgearsloth@gmail.com>
This commit is contained in:
@@ -112,19 +112,14 @@ namespace Content.Server.AI.Utility.Actions
|
||||
UpdateBlackboard(context);
|
||||
var considerations = GetConsiderations(context);
|
||||
DebugTools.Assert(considerations.Count > 0);
|
||||
// I used the IAUS video although I did have some confusion on how to structure it overall
|
||||
// as some of the slides seemed contradictory
|
||||
|
||||
// Ideally we should early-out each action as cheaply as possible if it's not valid
|
||||
|
||||
// We also need some way to tell if the action isn't going to
|
||||
// have a better score than the current action (if applicable) and early-out that way as well.
|
||||
|
||||
// 23:00 Building a better centaur
|
||||
// Overall structure is based on Building a better centaur
|
||||
// Ideally we should early-out each action as cheaply as possible if it's not valid, thus
|
||||
// the finalScore can only go down over time.
|
||||
|
||||
var finalScore = 1.0f;
|
||||
var minThreshold = min / Bonus;
|
||||
context.GetState<ConsiderationState>().SetValue(considerations.Count);
|
||||
// See 10:09 for this and the adjustments
|
||||
|
||||
foreach (var consideration in considerations)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user