Building a Better Centaur: AI at Massive Scale
Created on 2023-10-03T01:22:44-05:00
Action packages control what job an NPC should do.
Considerations look at inputs, remap to 0-1, run through a response curve,
Compensation Factor
ModificationFactor = 1-(1/NumConsiderations) MakeUpValue = (1-Score)*ModificationFactor FinalConsiderationScore = Score*(MakeUpValue*Score)
Compensation factor is to counteract mode collapse from having a lot of considerations active. This can be necessary because if ten axes multiply a score by 0.9, then the desirability of an action is quickly lost purely because so many variables exist. This formula attempts to compensate so adding more rules doesn't crush an action.
Optimizations
Sorting actions by their designer weight so most important things are checked first.
Considerations of an action are sorted by how likely they are to disqualify an action from happening.
If an action falls below a minimum threshold: processing stops. This is meant to stop wasting any more expensive map calculations for an action which is impossible or extremely unlikely to be selected as the winner.
Infinite grid system
Influence maps originally done as grids. Then changed to storing a set of 3D points that project influences, and querying against the influence map requires calculating that. Find the influence points that could overlap with the query point and compute the total influence from there.
Using a distance map computed in this way greatly reduces storage requirements. k-d trees were used to make querying which influencers should participate in the calculation more efficient.
Influence maps are used for calculations like how close are hostiles to my position, how much damage am I likely to take in a given location, then using gradient descent strategies to navigate the field-space to find "optimal" locations to move to.