Você está na página 1de 18

Artificial Intelligence

and
Fuzzy Logic

By
Ahmed
Bashar

1
Outlines
Introduction to AI
AI Applications
AI Techniques
Fuzzy Definitions
Fuzzy Applications
Fuzzy Sets
Fuzzy Sets Representation

2
Introduction to AI
Artificial Intelligence (AI) is the field that studies
the synthesis and analysis of computational
machines or software that exhibits intelligence. It
embodies the computing methods for automated
perception, learning, understanding and reasoning.

3
Intelligent Agent

Environment
Agent

4
Applications of AI
Finance
Robotics
Games
Medicine
The web

5
AI in Robotics

Environment
Robot

Decision

6
You and your Doctor
You and
Environment
your Doctor
AI in Medicine

Decision
Diagnostic
agent

7
AI Techniques
A. Fuzzy Logic

Fuzzy Logic is a form of reasoning and an approach


used in Artificial Intelligence that deals with
imperfect or imprecise information with multiple
degrees of truth. Unlike traditional binary decision
making which utilizes well-defined parameters and
definite Boolean values, fuzzy logic involves all
intermediate possibilities between 0 and 1.
Additionally, it allows partial set membership of
input rather than crisp division between
membership or non-membership. This method of
reasoning simulates how
8
a human brain makes real-world decisions, only
much faster.
AI Techniques
B. Behavior Trees

Behavior trees are a powerful tool that is


extensively used in modern video games to
program AI for Non- Playable Characters (NPCs),
including popular titles like Halo, Bioshock and
Spore . A behavior tree is a tree structure of
hierarchical nodes that control the decision path of
an AI agent. Unlike decision trees, behavior trees
maintain a state for each behavior and uses
composition and decorator nodes to handle more
complex actions.

9
Definition
Experts rely on common sense when they solve
problems.

How can we represent expert knowledge


that uses vague and ambiguous terms in a
computer?

Fuzzy logic is not logic that is fuzzy, but logic that


is used to describe fuzziness. Fuzzy logic is the
theory of fuzzy sets, sets that calibrate
vagueness.

Fuzzy logic is based on the idea that all things


1 admit of degrees. Temperature, height, speed,
0 distance, beauty all come on a sliding scale.
Fuzzy Applications
Theory of fuzzy sets and fuzzy logic has been applied to
problems in a variety of fields:
taxonomy; topology; linguistics; logic; automata theory; game
theory; pattern recognition; medicine; law; decision support;
Information retrieval; etc.

And more recently fuzzy machines have been developed


including:
automatic train control; tunnel digging machinery; washing
machines; rice cookers; vacuum cleaners; air conditioners,
etc.

1
1
Advertisement:
Extraklasse Washing Machine - 1200 rpm. The Extraklasse
machine has a number of features which will make life easier
for you.
Fuzzy Logic detects the type and amount of laundry in the
drum and allows only as much water to enter the machine as
is really needed for the loaded amount. And less water will
heat up quicker - which means less energy consumption.
Foam detection
Too much foam is compensated by an additional rinse cycle: If
Fuzzy Logic detects the formation of too much foam in the
rinsing spin
Imbalance cycle, it simply activates an additional rinse cycle.
compensation
InFantastic!
the event of imbalance, Fuzzy Logic immediately calculates the
maximum possible speed, sets this speed and starts spinning. This
provides optimum utilization of the spinning time at full speed []
Washing without wasting - with automatic water level
adjustment
Fuzzy automatic water level adjustment adapts water and
energy consumption to the individual requirements of each
wash programme, depending on the amount of laundry and
1 type of fabric []
2
More Definitions
Fuzzy logic is a set of mathematical principles for
knowledge representation based on degrees of
membership.

Unlike two-valued Boolean logic, fuzzy logic is multi-


valued. It deals with degrees of membership and
degrees of truth.

Fuzzy logic uses the continuum of logical values between


0 (completely false) and 1 (completely true). Instead of
just black and white, it employs the spectrum of colours,
accepting that things can be partly true and partly false
at the same time.
0 0 0 1 1 1 0 0 0.2 0.4 0.6 0.8 1 1
(a) Boolean Logic. (b) Multi-valued Logic.

13
Fuzzy Sets
The concept of a set is fundamental to mathematics.

However, our own language is also the supreme expression of


sets. For example, car indicates the set of cars. When we say a
car, we mean one out of the set of cars.

The classical example in fuzzy sets is tall men. The elements of


the fuzzy set tall men are all men, but their degrees of
membership depend on their height. (see table on next page)

14
Fuzzy Sets
Degree of Membership
Name Height, cm
Crisp Fuzzy
Chris 208 1 1.00
Mark 205 1 1.00
John 198 1 0.98
Tom 181 1 0.82
David 179 0 0.78
Mike 172 0 0.24
Bob 167 0 0.15
Steven 158 0 0.06
Bill 155 0 0.01
Peter 152 0 0.00
15
Crisp Vs Fuzzy Sets
Degree of
Crisp Sets
The x-axis represents the Membership
1.0
universe of discourse
0.8
the range of all possible Tall Men
0.6
values applicable to a
0.4
chosen variable. In our
0.2
case, the variable is the
0.0
man height. According to 150 160 170 180 190 200 210

this representation, the Degree of Height, cm


Fuzzy Sets
universe of mens heightsMembership
1.0
consists of all tall men. 0.8
The y-axis represents the 0.6
membership value of 0.4
the fuzzy set. In our 0.2

case, the fuzzy set of tall0.0


150 160 170 180 190 200 210
men maps height values Height, cm
16 into corresponding
Fuzzy Set Representation
Degree of Crisp Sets
Membership
1.0

0.8 Short Average Short


Tall
Tall Men
0.6
0.4

0.2

0.0
150 160 170 180 190 200 210
Height, cm
Degree of Fuzzy Sets
Membership
1.0

0.8
0.6 Short Average Tall

0.4

0.2 Tall

0.0
150 160 170 180 190 200 210
17
Fuzzy Set Representation
Typical functions that can be used to represent a fuzzy set
are sigmoid, Gaussian and pi. However, these functions
increase the time of computation. Therefore, in practice,
most applications use linear fit functions.

(x)
X Fuzzy Subset A
1

0
x
Crisp Subset A Fuzziness Fuzziness

18

Você também pode gostar