Hello,
developing a game with Fuzzy Logic I'm starting to have too many rules. To solve that, I wanted to reduce its number by using "the combs method" (a AND b then C ==> a then C OR b then C).
I've seen many examples... but I just don't get it. It seems like they just "guess" logically which rules they can do again and they are supposed to work fine :S
So, that's the method?
Thanks!
Combs Method
I can't answer your exact question, but perhaps I can help you find an alternative to fuzzy logic, or at least a more manageable way to organize it. What's the game and what exactly are you using fuzzy logic for?
I'm not having problems about the Fuzzy Logic rules, but the understanding of the "Combs Method"
For instance, in "Programming Game AI By Example" the reduction thanks to combs method from nine rules to six seems to be "magical" for me.
I just don't understand how to apply the method, how the writer transforms 9 rules into 6
So far I'm having 125 rules (3 FLV with 5 Sets each one), and applying the Combs Method are supposed to be reduced to 15.
For instance, in "Programming Game AI By Example" the reduction thanks to combs method from nine rules to six seems to be "magical" for me.
I just don't understand how to apply the method, how the writer transforms 9 rules into 6
So far I'm having 125 rules (3 FLV with 5 Sets each one), and applying the Combs Method are supposed to be reduced to 15.
[font="Verdana"]For those who have trouble with the previous [color="#1C2837"]link to [color="#1C2837"]Programming Game AI By Example,[color="#1C2837"] here is the reduction example:
One major problem with fuzzy inference systems is that as the complexity of the problem increases, the number of rules required escalates at an alarming rate. For example, the simple module created to solve the weapon selection problem only required nine rules — one for each possible combination of the antecedent sets — but if we add just one more FLV, again consisting of three member sets, then 27 rules are necessary. It gets much worse if the number of member sets in each FLV has to be increased to obtain more precision. For instance, 125 rules are required for a system with three FLVs each containing five member sets. Add another FLV consisting of five member sets and the number skyrockets to 625 rules! This effect is known as combinatorial explosion and is a huge problem when designing fuzzy systems for time-critical applications, which of course is what computer games are.
Luckily for us, we have a knight in shining armor in the form of William Combs, an engineer with Boeing. In 1997 Combs proposed a system that enables the number of rules to grow linearly with the number of member sets instead of exponentially.
The theory behind the Combs method works on the principle that a rule such as:
IF Target_Far AND Ammo_Loads THEN Desirable
is logically equivalent to:
IF Target_Far THEN Desirable
OR
IF Ammo_Loads THEN Desirable
Using this principle, a rule base can be defined that contains only one rule per consequent member set. For example, the nine rules for the desirability of the rocket launcher given previously:
Rule 1. IF Target_Far AND Ammo_Loads THEN Desirable
Rule 2. IF Target_Far AND Ammo_Okay THEN Undesirable
Rule 3. IF Target_Far AND Ammo_Low THEN Undesirable
Rule 4. IF Target_Medium AND Ammo_Loads THEN VeryDesirable
Rule 5. IF Target_Medium AND Ammo_Okay THEN VeryDesirable
Rule 6. IF Target_Medium AND Ammo_Low THEN Desirable
Rule 7. IF Target_Close AND Ammo_Loads THEN Undesirable
Rule 8. IF Target_Close AND Ammo_Okay THEN Undesirable
Rule 9. IF Target_Close AND Ammo_Low THEN Undesirable
can be reduced to six rules:
Rule 1. IF Target_Close THEN Undesirable
Rule 2. IF Target_Medium THEN VeryDesirable
Rule 3. IF Target_Far THEN Undesirable
Rule 4. IF Ammo_Low THEN Undesirable
Rule 5. IF Ammo_Okay THEN Desirable
Rule 6. IF Ammo_Loads THEN VeryDesirable[/quote]
Maybe these two links may help:
[/font]
- [font="Verdana"]http://en.wikipedia....ki/Combs_method[/font]
- [font="Verdana"]http://gaia.ecs.csus...d_Inference.htm:The Combs Method for Rapid Inference (the original paper by William E. Combs)[/font][font="Verdana"]
I'm also somehow surprised by the reduction example given in Programming Game AI By Example. For instance, we have
Rule 1. IF Target_Far AND Ammo_Loads THEN Desirable
Rule 4. IF Target_Medium AND Ammo_Loads THEN VeryDesirable
Rule 7. IF Target_Close AND Ammo_Loads THEN Undesirable
how come we get in the reduction:
Rule 6. IF Ammo_Loads THEN VeryDesirable?
If we average the output shouldn't we get instead:
Rule 6. IF Ammo_Loads THEN Desirable?[/font]
[font="Verdana"] [/font]
[font="Verdana"]Here are the output subsets:[/font]
[font="Verdana"]
[/font]
[font="Verdana"] [/font]
[font="Verdana"]Note that the original paper by William E. Combs redefines the output [/font][font=Verdana][size=2]subsets for the reduction, unlike [/font][font=Verdana][size=2]the example given in Programming Game AI By Example. Maybe that's the glitch?[/font]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement