and Membership Functions
The enhanced movement behaviors are defined in terms of concepts in the world, which must be
using either fuzzy variables or linguistic variables (that is, a combination of terms). Conceptually, these variables are used by a fuzzy expert system, either inputs to the system or outputs linked to actions. There's no need for internal variables in the actual fuzzy interpreter because the behaviors are truly reactive.
First, the fuzzy system needs to control the movement. A linguistic variable called
is defined with three different terms:
. The base variable is defined as the movement velocity.
is defined as half a
membership function, corresponding to 0 degree of membership (DoM) when the velocity is null, and a DoM of 1 when the velocity is full.
is defined as the exact
, defined as 1 DoM when the full velocity is in reverse. To define the third
, we use a fuzzy equation of the primary terms:
stop = not (forwards or backwards)
This relationship is relatively intuitive. However, want to sharpen the meaning of
, because the slope is a bit too gentle. So, we use the fuzzy modifier
to obtain a steeper curve, much closer to the informal meaning of
The second form of control needed on the movement is turning the body to influence the direction of travel. To achieve this with a fuzzy interpreter, we'll use another linguistic variable called
. The base variable for
is defined as the relative yaw turning angle in degrees. There are five fuzzy terms defined over this base variable to form the linguistic variable, each of which indicates objects that must be turned toward:
. These are dynamic membership functions, because the relative position of these objects changes over time. The triangle membership function is used; the point of the triangle matches the angular position of the object, and the base always goes through the origin. (That is, zero membership means no turn.)
A final variable, called
, controls pitch separately. This is a simpler linguistic variable, defined statically. There are two fuzzy terms:
. The term
corresponds to a pitch of 90, with the base of the triangle going through the origin. The term
corresponds to a pitch of 0, with the base of the triangle at ±90.
The senses are other linguistic variables. The
is defined over the height of the opening (base variable); the door is defined as "
" if the player can crawl through, which
off to a DoM of 0 as the door touches the floor. We can also define the fuzzy term "fully open" as a combination of the primary term
and the offset modifier
. When the player can walk through, the DoM is 1, and 0 when the player can crawl through.
Then, we define a
term, which is really more of a Boolean singleton than a fuzzy variable. There is no continuous base variable to use (except maybe time), and more to the point, there's little benefit in using one.
The linguistic variable
is defined as two terms:
. Readiness is measured as the distance off the floor, and how easy it is to climb on. The DoM is 1 when the platform is at the starting point, fully on the floor; the DoM triangle then
0 when the player needs to double-jump to get onto the platform. The state
is measured as the distance to the final location; full DoM corresponds to a distance of 0; when 0, DoM requires a double-jump to get off.
Another simple term, called
, indicates whether the animat is on the platform. It's defined with a membership of 0 when the animat is not on the platform. This peaks at the center of the platform to a degree of membership of 1. The base variables are the x and y coordinates on the floor, rather than the distance to the center of the platform. This makes the membership function seem like a pyramid on the platform.
Finally, the linguistic variable for the
is defined as two terms:
. The term
is defined over time, taking its full 1 DoM value after 1 second of touching, and back to 0 after it has released for a second. The term
is defined over height as a base variable. When the player can just walk off, it has 1 DoM; the DoM triangle reaches 0 one step away from the top.