User Tools

Site Tools


ai:customrules

Custom Rules

Here you can design your own fuzzy rules with an intuitive logic process. Fuzzy Logic operates with Linguistic Variables to facilitate the weight calculation process.

This process uses .\UFE Addons\Runtime\AIRulesGenerator.cs to automatically generates its own fuzzy rules.


Rule

A rule is a set of events and conditions that tell the engine how likely a reaction should be.

This interface was created to better emulate linguist variables into UFE through its events and conditions. From a logical operator point of view, think of events, conditions and reactions with the following operators:

IF (Condition1 AND Condition2 AND …) OR (Condition3 AND Condition4 AND …) THEN [Reaction] is [Desirability Value]

Where:
(Condition1 AND Condition2 AND …) Equals Event1
(Condition3 AND Condition4 AND …) Equals Event2
And so on…

The linguistic variables used by the engine are a direct translation of this system, and they can be seen by clicking on Generated Fuzzy Rules.

By default, every reaction has 0 weight, and by default, if no weight is applied to reactions, the character should stay idle.

Rule Name: Use this to make a small description of what the rule is suppose to do.


Event

Events contain conditions. A Rule is active when at least one of the events is valid.

Valid when all conditions are: Allow you to invert the logic of this event. If set to false, this event will be considered as a valid entry for the Reaction weight manipulation if its not true.

Enabled If disabled, this event will not be considered for validation. Use this option for debugging purposes.


Event: Condition

An event is only valid if all of its conditions are valid.

Valid when condition is: Allow you to invert the logic of this condition. If set to false, this condition will be considered to be valid if the dictated entry is not true.

Enabled If disabled, this condition will not be considered for validation. Use this option for debugging purposes.

Target: Should this condition happen to the opponent or to itself.

Condition Type:

  • Idle: Condition valid if the target is idle.
  • Horizontal Movement: Condition valid if the target is moving horizontally.
    • Direction
      • Moving Forward: is moving forward.
      • Still: is not moving horizontally.
      • Moving Back: is moving back.
    • Movement Speed: The speed the target is moving (numeric values for this option can be defined under Definitions).
  • Vertical Movement: Condition valid if the target is moving vertically.
    • Direction
      • Crouching: is crouching.
      • Standing: is not moving vertically.
      • Jumping: is jumping or moving vertically through applied force.
  • Health Status: Condition valid if the target's health matches the Health variation set here (numeric values for this option can be defined under Definitions).
  • Gauge Status: Condition valid if the target's gauge/meter matches the Gauge variation set here.
  • Distance: Condition valid if the target's distance matches the Proximity variation set here(numeric values for this option can be defined under Definitions).
  • Attacking: Condition valid if target is playing a move matching the conditions below.
  • Blocking: Condition valid if target is blocking.
    • Blocking State: Is the target blocking High|Low|Air.
  • Stunned: Condition valid if target is stunned.
  • Down: Condition valid if target is down.

Reaction

When the conditions for one of the events is true, how likely is the AI to attempt the following reaction.

Reaction Type: Tells the AI to execute the following command

  • Idle: Stop pressing inputs.
  • Move Forward/Back: Attempts to move forward/back.
  • Crouch: Attempts to crouch.
  • Jump Straight/Forward/Back: Attempts to jump Straight/Forward/Back.
  • Crouch Block: Attempts to crouch and block at the same time.
  • Stand Block: Attempts to block while standing. If your game is set to have “hold back” as potential block, the character will also move backwards.
  • Jump Block: Attempts to block while jumping.
  • Change Behaviour: The AI will attempt to load a new instruction file based on the behaviour selected. Only works if the character has an instruction set for that behaviour.

Desirability: Tells the AI how desirable (or not) this reaction is (numeric values for this option can be defined under Definitions).


Generated Fuzzy Rules

Allows you to read the result of all the rules being generated by these options. Useful to debug how each combination interact and the end result that is sent to the Fuzzy Core.

This option is for debug viewing only and it has no impact on the game.


< Back to A.I. Editor

ai/customrules.txt · Last modified: 2014/12/05 15:33 by Mistermind