﻿ Game Development

Free JavaScript Editor     Ajax Editor ﻿

Main Page

### Summary

Fuzzy techniques are based on foundations in fuzzy set theory, as well as fuzzy logic:

• A fuzzy set is modeled as a membership function with smooth variations within unit range.

• A fuzzy variable is a symbol associated with a degree of membership to a function.

• Linguistic variables are collections of fuzzy variables defined over a base variable.

• Logical operations such as conjunction (AND) and disjunction (OR) are performed with MIN and MAX operators.

• Fuzzy modifiers are functions applied to change the meaning of sets and values.

Because the fuzzy representation and the processing of fuzzy values differ from standard crisp values, it's often necessary to convert between the two:

• Fuzzification is the process of converting a crisp value to a fuzzy value using a membership function.

• Defuzzification is a matter of interpreting fuzzy values and their corresponding membership function to determine the most accurate crisp estimate.

To harness the full power of fuzzy logic, fuzzy expert systems are used in a similar fashion to rule-based systems. However, key differences exist:

• All the rules are matched, but the fuzzy value of the body differs depending on the fuzzy value of the condition.

• To determine the value of a fuzzy variable, the bodies of rules are combined by composition.

• Two working memory arrays are needed to maintain consistency, one with the current fuzzy values and one that's being computed.

Fuzzy systems are particularly suited to providing smooth control and making decisions with partial truths. In the next chapter, fuzzy logic is applied to control the behaviors of animats, notably climbing ladders and opening doors.

## Practical Demo

An animat known as Dominator uses a fuzzy expert system to drive all aspects of the AI. Fuzzy rules are used as a control technique for movement and shooting, whereas the weapon selection uses fuzziness in the decision making. Of all the animats using pure AI techniques as brains, Dominator performs among the best. The source and data files can be found online at http://AiGameDev.com/.

﻿

Ajax Editor     JavaScript Editor