2.3 – Utility Demo 1

<Utility name="Utility_Test_2">
  <Action id="Attack">
    <Consideration name="SeeEnemy">
      <ResponseCurve type="Step" slope="1" exponent="1" xshift="0" yshift="0"/>
      <Input id="SeeEnemy"/>
    </Consideration>
    <Consideration name="NearEnemy">
      <ResponseCurve type="Linear" slope="-1" exponent="1" xshift="0" yshift="1"/>
      <Input id="Distance"/>
    </Consideration>
    <Consideration name="HealthIsHigh">
      <ResponseCurve type="Linear" slope="1" exponent="1" xshift="0" yshift="0"/>
      <Input id="Health"/>
    </Consideration>
    <Consideration name="EnemyHealthIsLow">
      <ResponseCurve type="Linear" slope="-1" exponent="1" xshift="0" yshift="1"/>
      <Input id="EnemyHealth"/>
    </Consideration>
  </Action>
  <Action id="Search">
    <Consideration name="NotSeeEnemy">
      <ResponseCurve type="Step" slope="-1" exponent="1" xshift="0" yshift="1"/>
      <Input id="SeeEnemy"/>
    </Consideration>
    <Consideration name="HealthIsHigh">
      <ResponseCurve type="Linear" slope="1" exponent="1" xshift="0" yshift="0"/>
      <Input id="Health"/>
    </Consideration>
  </Action>
  <Action id="Run">
    <Consideration name="HealthIsLow">
      <ResponseCurve type="Linear" slope="-1" exponent="1" xshift="0" yshift="1"/>
      <Input id="Health"/>
    </Consideration>
    <Consideration name="NearEnemy">
      <ResponseCurve type="Linear" slope="-1" exponent="1" xshift="0" yshift="1"/>
      <Input id="Distance"/>
    </Consideration>
  </Action>
</Utility>

You May Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *

The AI Project