Contents:
This document contains editing information for the Q3A bot.
The Q3A bot is an artificial player for the computer game Quake III Arena.
Author:
Mr Elusive
Last update:
2000-01-04
Copyright 2000 id Software, Inc.
Fuzzy Logic
Fuzzy logic is a superset of conventional (Boolean) logic. This logic was extended to
handle the concept of partial truth, also using values between "completely true"
and "completely false". It was introduced by Dr. Lotfi Zadeh of UC/Berkeley in the
1960's as a means to model the uncertainty of natural language.
Fuzzy Subsets
Just as there is a strong relationship between Boolean logic and the concept of a subset,
there is a similar strong relationship between fuzzy logic and fuzzy subset theory.
Let's assume there's a set S and to all its elements there's one element of the set {0,1}
attached. The subset U of the set S is defined as all the elements of S that have an '1'
attached. The truth or falsity of the statement "x is in U" can be determined. The
statement is true if there's a '1' attached to the element 'x' in S. Otherwise the
statement is false.
Similarly for the fuzzy case there's a set S. But now a value from the interval [0, 1] is
attached to every element of S. The subset U of the set S isn't strictly defined in this
case. However it can be determined how much an element from the set S belongs to the fuzzy
subset U. A value of zero attached to an element from S represents complete non membership
of U. A value of one represents complete membership. The values between zero and one represent
intermediate degrees of membership. The degree to which the statement "x is in U" is true can
also be determined. The degree of truth of the statement is given by the attached value to
the element x in the set S.
Fuzzy functions and relations
Often a value from the interval [0, 1] is attached to an element of the set S using a function,
the membership function. Such a function is one-dimensional because it's based solely on one
criterion. In practice functions are based on two or even more criteria. Such a function gives a
value from the interval [0, 1] to a combination of criteria and is often referred to as a
"fuzzy relation". The criteria don't have to be elements from the same set they could just as
well be elements from different sets. The criteria also don't have to be elements from sets.
Variables of some kind could also be used as criteria.
Bot and fuzzy logic
The bot uses fuzzy relations to specify how much the bot wants to do, have or
use something. For instance a value is attached to how much the bot wants to have a certain
item. The 'fuzzy relation' is based on the current situation and environment of the bot. The
situation and environment are represented by a set of variables.
The fuzzy relations which the bot uses are stored using a tree-like structures. The leaves
of this tree store fuzzy values. A node in the tree can link to either a leaf or one of the
nodes on the next level of the tree. Linking to another node is based on one of the criteria
of the fuzzy relation.
The fuzzy relations are stored in plain text using a C-like syntax.
Here is an example of a fuzzy relation:
Evaluation of a fuzzy relation
Fuzzy relation code pros and cons
Item weights
Weapon weights