Skip to content

Considerations

There are 3 kinds of considerations:

  • Boolean consideration: Returns a score of 0.0 or 1.0.
    • Use this if you need to consider a Yes-No question. If the answer is yes, it returns 1.0, and vice versa.
    • For example:
      • IsTargetInAttackRange
      • IsTargetInDamageArea
      • IsInAttackCooldown
  • Variable consideration: Returns a score from 0.0 to 0.1.
    • Use this if you need a consideration that returns a score that changes dynamically based on the current input.
    • For example:
      • TargetInSightRadius
      • TargetInAttackRange
      • MyHealthIsLow
      • TargetHealthIsHigh
  • Constant consideration: Returns a constant score in [0.0, 1.0]. Use this when:
    • You need a consideration that always returns a constant score, e.g., 0.1 or 0.2, etc.
    • You need a fallback decision that will be selected if the the agent doesn’t know which decision to choose in the current situation.
    • For example:
      • Idle

Common Consideration Recipes

Distance

IsTarget(Not)InRange

  • Returns 1.0 if the target is within the specified range or 0.0 if it is outside the range.
  • Recipe
    • Input: DistanceToTargetInput
    • InputNormalization: IsInRangeNormalization
    • ResponseCurve: Basic Linear (Inverse Linear)

TargetInRange

  • Returns a score in [0.0, 1.0]. It maps the input value (DistanceToTargetInput) from [Start, End] to [0.0, 1.0].
    • If the input value is less than Start, returns 0.0
    • If the input value is greater than End, returns 1.0
  • Recipe

Is(StateName)State

  • Returns 1.0 if input state is the specified state; otherwise returns 0.0.
  • Recipe:
    • Input: User Custom Input (often an Enum)
      • Returns a state of the agent or the target.
    • InputNormalization: User Custom Input
      • Returns 1.0 if input state is the specified state.
      • Returns 1.0 if input state is not the specified state.
    • ResponseCurve: Basic Linear (Inverse Linear)

Is(Not)InCooldown

  • Returns 1.0 if the CooldownElapsedTimeInput is within the cooldown duration; otherwise returns 0.0
  • Recipe:
    • Input: CooldownElapsedTimeInput
    • InputNormalization: IsInCooldownNormalization
    • ResponseCurve: Basic Linear (Inverse Linear)

Random

  • Returns a random score in [0.0, 1.0]
  • Recipe:
    • Input: User Custom Input
      • Returns a random input value.
    • InputNormalization: BasicNormalization
    • ResponseCurve: Basic Linear

Health

  • The input value will be normalized by dividing by 100
    • If the input is less than 0.0, returns 0.0
    • If the input is greater than 100, returns 1.0
  • Recipe

Idle

  • Returns a constant score (often 0.1)
  • Recipe:
    • Input: None
    • InputNormalization: None
    • ResponseCurve: Constant

Which ResponseCurve you should use

  • Boolean considerations:
    • Basic Linear or Inverse Linear
  • Variable considerations:
    Suppose the input gradually increases from 0.0 to 1.0:
    • The score is proportional to the input and increases gradually.
      • Linear: Basic Linear
      • Slow at first, fast later: Basic Quadric Lower Right
      • Fast at first, slow later: Basic Quadric Upper Left
      • Slow at either end, fast in the middle: Basic Logistic
      • Fast at either end, slow in the middle: Basic Logit
    • The score is inversely proportional to the input and decreases gradually.
      • Linear: Inverse Linear
      • Slow at first, fast later: Basic Quadric Upper Right
      • Fast at first, slow later: Basic Quadric Lower Left
      • Slow at either end, fast in the middle: Inverse Logistic
      • Fast at either end, slow in the middle: Inverse Logit
    • The score fluctuates
      • Slow at either end, fast in the middle: Basic Bell Curve or Inverse Bell Curve
      • Fast at either end, slow in the middle: Basic Logit or Inverse Logit
      • More dynamic: Basic Sine or Inverse Sine
  • Constant considerations:
    • Constant

If you like Utility Intelligence, please consider supporting it by leaving a 5-star review on the Asset Store. Your positive feedback motivates me to keep improving and delivering more updates for this framework.
Thank you so much for your support. I love you all! 🥰


Last update : March 11, 2025
Created : January 18, 2025