GDC 2013: David Mark - "Architecture Tricks: Managing Behaviors in Time, Space, and Depth"
Created on 2023-10-02T18:09:23-05:00
Infinite Axis Utility System
Starts at 34 minute mark.
Action: sets what should be done, subject to considerations.
Consideration: takes a sensor input, remaps it to 0-1, then remaps again through a response curve.
Response Curve: a curve such as linear, quadratic, logistic, or logit, controlled by hyperparameters m, k, b, c, which remap the desirability of something.
Actions may have their own weight which is applied after calculation. This allows balancing idle actions vs emergency ones, even when the considerations within the action might not think the action is important right now.
All considerations are checked and multiplied together to score an action. Then multiplied again by the action's own weight.
Multiple target actions and considerations are possible. Treat each viable target as a new "action" and perform the scoring equations on it.
A single target attack looks at distance and health of opponent and is programmed as a single action. The intelligence system then makes a spiritual copy of the action for each legal target and scores the whole action separately. Attack actions are weighed against all other normal options.
Downside: this can't strategize. If you have mechanics like D&D's extra attacks or action surges you have to model the use of those explicitly.
Formulas
Linear
y = m * (x - c)^k + b
m = slope
k = exponent
b = y-intercept (vertical shift)
c = x-intercept (horizontal shift)
Logistic
y = (k * 1/(1+(1000em^(-1*x+c))))+b
m = slope of line at inflection point
k = vertical size of the curve
b = y-intercept (vertical shift)
c = x-intercept of the inflection point (horizontal shift)
Input clearing house
Inputs tend to be modeled as enumerations in the editing software; then the engine checks that with a big switch and returns the value.