JavaScript EditorFree JavaScript Editor     Ajax Editor 



Main Page
  Previous Section Next Section

Summary

This chapter applied fuzzy logic to create robust and realistic reactive behavior sequences, capable of dealing with tricky contraptions. The development started with two important steps that need to be undertaken whenever fuzzy logic is applied to a problem:

  • A declaration of each fuzzy variable is provided, necessary to solve the problems.

  • The membership functions are described for the fuzzy variables that need to be fuzzified and defuzzified.

Given these variables, we had to define the fuzzy rules and ways for them to achieve their task simply:

  • The fuzzy rules kept track of the position in the sequence using sensory input only.

  • The knowledge is represented as implicitly as possible to reduce the number of rules.

  • Each rule is made as specific as possible to prevent nasty side effects of rules executing out of order.

Then, we needed to create a simple fuzzy logic interpreter, mostly inspired by the rule-based system from Part II:

  • There is a data interface to load persistent information from files on disk.

  • Native interface are necessary for handling C++ callbacks.

  • Dynamic accessors, such as Set() and Get(), provide all the additional flexibility needed.

The evaluation reveals that movement is pleasingly smooth and effective—to an untrained eye. Some of the assumptions made by the rule can cause a few problems, so we need to integrate the fuzzy logic output with lower-level navigation behaviors for the best results.

The major problem with the fuzzy approach is that it requires the designer to specify the behaviors. The next chapter covers genetic algorithms that provide ways to find near-optimal behaviors given high-level criteria.

      Previous Section Next Section
    



    JavaScript EditorAjax Editor     JavaScript Editor