Table of Contents

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:


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

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