Chapter 11 - CENG METU

Chapter 11:
Artificial Intelligence
Copyright © 2012 Pearson Education, Inc.
Chapter 11: Artificial Intelligence
•
•
•
•
•
•
Intelligence and Machines
Perception
Reasoning
Additional Areas of Research
Artificial Neural Networks
Robotics
Copyright © 2012 Pearson Education, Inc.
0-2
Artificial intelligence
Artificial intelligence is the field of computer
science that seeks to build autonomous
machines that can carry out complex tasks
without human intervention.
AI areas: Psychology, neurology, mathematics,
linguistics, and electrical and mechanical
engineering.
Copyright © 2012 Pearson Education, Inc.
0-3
Intelligent Agents
• Agent: A “device” that responds to stimuli
from its environment
– Sensors
– Actuators
– An interactive video game
– A process communicating with other processes
over the Internet
• Much of the research in AI can be viewed in
the context of building agents that behave
intelligently
Copyright © 2012 Pearson Education, Inc.
0-4
Levels of Intelligent Behavior
• Reflex: actions are predetermined responses
to the input data
• More intelligent behavior requires knowledge
of the environment and involves such
activities as:
– Goal searching
– Learning
Copyright © 2012 Pearson Education, Inc.
0-5
The eight-puzzle in its solved configuration
Copyright © 2012 Pearson Education, Inc.
0-6
Here.
Copyright © 2012 Pearson Education, Inc.
0-7
Our puzzle-solving machine
1. Perceive in the sense that it must
extract the current puzzle state from
the image it receives from its
camera
2. Develop and implement a plan for
obtaining a goal.
Copyright © 2012 Pearson Education, Inc.
0-8
Approaches to Research in AI
Engineering track
– develop systems that exhibit intelligent behavior
– natural language processing
Theoretical track
– develop a computational understanding of
human intelligence
– Linguists
Copyright © 2012 Pearson Education, Inc.
0-9
Turing Test
• Test setup: Human communicates with test
subject by typewriter.
• Test: Can the human distinguish whether the
test subject is human or machine?
Copyright © 2012 Pearson Education, Inc.
0-10
Turing test examples
Internet viruses carry on “intelligent” dialogs with a
human victim in order to trick the human into dropping
his or her malware guard.
Computer games such as chess-playing programs.
These programs select moves merely by applying
brute-force techniques, humans competing against
the computer often experience the sensation that the
machine possesses creativity and even a personality.
Copyright © 2012 Pearson Education, Inc.
0-11
Techniques for understanding Images
• Template matching
• Image processing
identifying characteristics of the image
• Image analysis
process of understanding what characteristics mean
Copyright © 2012 Pearson Education, Inc.
0-12
A smartphone AI application
Copyright © 2012 Pearson Education, Inc.
0-13
Language Processing
• Syntactic Analysis
– Parsing. Finding the object, subject, verb of a sentence.
– Grammatical roles.
• Semantic Analysis
– the task of identifying the semantic role of each word
• Contextual Analysis
– The sentence is brought into the understanding process
Copyright © 2012 Pearson Education, Inc.
0-14
A semantic net for information extraction
Copyright © 2012 Pearson Education, Inc.
0-15
Reasoning
Copyright © 2012 Pearson Education, Inc.
0-16
Components of a Production Systems
1. Collection of states
– Start (or initial) state
– Goal state (or states)
2. Collection of productions: rules or moves
– Each production may have preconditions
3. Control system:
decides which production to apply next
Copyright © 2012 Pearson Education, Inc.
0-17
Reasoning by searching
• State Graph: All states and productions
• Search Tree: A record of state transitions
explored while searching for a goal state
– Breadth-first search
– Depth-first search
Copyright © 2012 Pearson Education, Inc.
0-18
A small portion of the eight-puzzle’s state graph
Copyright © 2012 Pearson Education, Inc.
0-19
Deductive reasoning
Copyright © 2012 Pearson Education, Inc.
0-20
Deductive reasoning in the context of a production
system
Copyright © 2012 Pearson Education, Inc.
0-21
An unsolved eight-puzzle
Copyright © 2012 Pearson Education, Inc.
0-22
A sample search tree
Copyright © 2012 Pearson Education, Inc.
0-23
Productions stacked for later execution
Copyright © 2012 Pearson Education, Inc.
0-24
Heuristic Strategies
• Heuristic: A “rule of thumb” for making
decisions
• Requirements for good heuristics
– Must be easier to compute than a complete
solution
– Must provide a reasonable estimate of proximity
to a goal
Copyright © 2012 Pearson Education, Inc.
0-25
An unsolved eight-puzzle
Copyright © 2012 Pearson Education, Inc.
0-26
An algorithm for a control system
using heuristics
Copyright © 2012 Pearson Education, Inc.
0-27
The beginnings of our heuristic search
Copyright © 2012 Pearson Education, Inc.
0-28
The search tree after two passes
Copyright © 2012 Pearson Education, Inc.
0-29
The search tree after three passes
Copyright © 2012 Pearson Education, Inc.
0-30
The complete
search tree
formed by our
heuristic system
Copyright © 2012 Pearson Education, Inc.
0-31
Handling Real-World Knowledge
• Representation and storage
• Accessing relevant information
– Meta-Reasoning
– Closed-World Assumption
• Frame problem
Copyright © 2012 Pearson Education, Inc.
0-32
Learning
• Imitation
• Supervised Training
– Training Set
• Reinforcement
Copyright © 2012 Pearson Education, Inc.
0-33
Genetic Algorithms
• Begins by generating a random pool of trial
solutions:
– Each solution is a chromosome
– Each component of a chromosome is a gene
• Repeatedly generate new pools
– Each new chromosome is an offspring of two
parents from the previous pool
– Probabilistic preference used to select parents
– Each offspring is a combination of the parent’s
genes
Copyright © 2012 Pearson Education, Inc.
0-34
Artificial Neural Networks
• Artificial Neuron
– Each input is multiplied by a weighting factor.
– Output is 1 if sum of weighted inputs exceeds the
threshold value; 0 otherwise.
• Network is programmed by adjusting weights
using feedback from examples.
Copyright © 2012 Pearson Education, Inc.
0-35
A neuron in a living biological system
Copyright © 2012 Pearson Education, Inc.
0-36
The activities within a processing unit
Copyright © 2012 Pearson Education, Inc.
0-37
Representation of a processing unit
Copyright © 2012 Pearson Education, Inc.
0-38
A neural network with two different
programs
Copyright © 2012 Pearson Education, Inc.
0-39
The structure of ALVINN
Copyright © 2012 Pearson Education, Inc.
0-40
Associative Memory
• Associative memory: The retrieval of
information relevant to the information at hand
• Build associative memory using neural networks
that when given a partial pattern, transition
themselves to a completed pattern.
Copyright © 2012 Pearson Education, Inc.
0-41
An artificial neural network
implementing an associative memory
Copyright © 2012 Pearson Education, Inc.
0-42
The steps leading to a stable configuration
Copyright © 2012 Pearson Education, Inc.
0-43
Robotics
• Truly autonomous robots require progress
in perception and reasoning.
• Major advances being made in mobility
• Plan development versus reactive
responses
• Evolutionary robotics
Copyright © 2012 Pearson Education, Inc.
0-44
Issues Raised by AI
• When should a computer’s decision be trusted
over a human’s?
• If a computer can do a job better than a human,
when should a human do the job anyway?
• What would be the social impact if computer
“intelligence” surpasses that of many humans?
Copyright © 2012 Pearson Education, Inc.
0-45
Isaac Asimov's "Three Laws of Robotics"
• A robot may not injure a human being or, through
inaction, allow a human being to come to harm.
• A robot must obey orders given it by human beings
except where such orders would conflict with the
First Law.
• A robot must protect its own existence as long as
such protection does not conflict with the First or
Second Law.
Copyright © 2012 Pearson Education, Inc.
0-46