Fuzzy logic
description
Transcript of Fuzzy logic
Copyright © Wondershare SoftwareCopyright © Wondershare Software
Fuzzy logic in short term strategy games
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Introduction
Binary Logic-It’s either true or false, On or Off.
Fuzzy Logic-
1. A person is having his 26th birthday. A comment from someone is "you're not young anymore”.
2. Whether to guard a basketball player in basketball game or not.
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Problem
During the game how to decide whether the monster should attack or flee.
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Problem….
If we have 5 states and 2 in put variables then we will have to handle 5^2 states(as states grow exponentially)
How you tackle 5 states and 6 inputs as states will grow to 5^6=625 ????
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Terms & their definitions
Fuzzy Set-A fuzzy set is a pair (A,m) where A is a set and m:A->[0,1] X is called fuzzy member if 0<m(x)<1
Fuzzy Logic-Fuzzy logic is a form of multi-valued logic derived from fuzzy set theory to deal with reasoning that is approximate rather than accurate.
Fuzzy logic means of representing problems to computers in way like the way human solve them and the essence of fuzzy logic is that everything is a matter of degree.”-Lofty
Zadeh
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Strategy to solve
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Solutions..
Let’s try to solve man’s age problem keeping other parameters same …
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Fuzzy logic in a real game
Making a fuzzy system-
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Fuzzy logic in a real game..
Weighing rules-
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Fuzzy logic in a real game..
Weighing rules in overlapping area-
………
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Fuzzy logic in a real game..
Weighing rules-
………
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Fuzzy logic in a real game..
Making the output-
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Fuzzy logic in a real game..
Reaction-
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Fuzzy logic in a real game..
Extra weights-
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term decisions elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term decisions elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term decisions elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term decisions elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term decisions elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term decisions elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term calculations elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term calculations elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term calculations elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term calculations elaborated
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term calculations elaborated
Defuzzification- Rules to manipulate fuzzy input to generate
crisp output.
1.Combs Method: This method uses logical equality [(p and q) then r] = [(p then r) or (q then r)] this method reduces states from s^n to s*n.
2.Center of mass Method: This method crops the extra upper part of triangle, makes it trapezoid and finds the center of mass of figure……
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Short term calculations elaborated
Degree of guard is 0.7,degree of sometimes guard is 0.4, and never guard is 0.4
Copyright © Wondershare SoftwareCopyright © Wondershare SoftwareCompany LogoCompany Logo
Conclusion
Fuzzy logic emerged as a consequence of the 1965 proposal of fuzzy set theory by Lotfi Zadeh.
Though fuzzy logic has been applied to many fields, from control theory to artificial intelligence.
It still remains controversial among most statisticians, who prefer Bayesian logic, and some control engineers, who prefer traditional two-valued logic.
Copyright © Wondershare SoftwareCopyright © Wondershare Software
Thank you !