O'Reilly logo

Programming Game AI by Example by Mat Buckland

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

No agent wanting to close a sale would utter such a seemingly conflict
-
ing statement. One of the problems with [this method] is that the trans
-
formation from [(p and q) then r] to [(p then r) or (q then r)] shifts our
focus from one rule to what appears to be the union of two (or more)
rules. In addition, since each of these alternative rules can contain dif
-
ferent consequent subsets, they seem to be contradicting each other:
either my premium is high OR my premium is low. How can it be both?
For many of you, the counterintuitiveness of this method may be a stum
-
bling block but if so, persevere — it’s definitely worth the effort if you find
yourself working with large rule bases.
Fuzzy Inference and the Combs Method
When using the Combs method, rules are processed as normal. To clarify,
let’s work through an example with the same figures used in the example
shown earlier in the chapter: 200 pixels for distance and 8 for ammo status.
Calculating the result of each rule we get:
Target_Close ® Undesirable (0.0)
Target_Medium ® VeryDesirable (0.67)
Target_Far ® Undesirable (0.33)
Ammo_Low ® Undesirable (0.22)
Ammo_Okay ® Desirable (0.78)
Ammo_Loads ® VeryDesirable (0.0)
454 | Chapter 10
The Combs Method
Figure 10.29

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required