Class notes 1 (Introduction)
Download
Report
Transcript Class notes 1 (Introduction)
Course:
Engineering Artificial Intelligence
Dr. Radu Marinescu
Cork Constraint Computation Centre (4C)
University College Cork
University College Cork (Ireland) Department of Civil and Environmental Engineering
CE6017
o
Course homepage
• http://4c.ucc.ie/~rmarines/teaching.html
• and the UCC Blackboard
o
Lectures
• Tuesdays 17:30 – 19:00 + tutorial 19:30 – 20:30
• 2 blocks 13 & 14 November
• Final project (80%)
• Homework (20%)
o
Instructor
• Dr. Radu Marinescu (email: [email protected])
• Office hours (by appointment): Monday 18:00 – 19:00
location: Western Gateway Building (on Western Rd.), Room 2-70
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 2
Course resources
o
Textbook
• “Artificial Intelligence – A Modern Approach” 2nd edition by Stuart
Russell and Peter Norvig. Prentice Hall Series in Artificial
Intelligence, 2003
o
Resources on the Web
• AI on the Web: A very comprehensive list of Web resources about
AI from the RN textbook (http://aima.cs.berkeley.edu/ai.html)
o
Essays
• What is AI?, John McCarthy
• Computing Machinery and Intelligence, Alan Turing
• Rethinking Artificial Intelligence, Patrick H. Winston
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 3
Course overview
Introduction
o Intelligent agents
o Search
o
Constraint processing
o Representation and reasoning with logic
o Learning
o
o
Uncertainty
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 4
Today’s class
What is Artificial Intelligence?
o Intelligent agents
o A brief history
o
o
State-of-the-art AI systems
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 5
What is Artificial Intelligence?
o
Could you please give your definition?
• For me, AI is …
• AI may be defined as …
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 6
What is Artificial Intelligence?
o
What is artificial intelligence?
• It is the science and engineering of making intelligent
machines, especially intelligent computer programs.
• It is related to the similar task of using computers to
understand human intelligence, but AI does not have to
confine itself to methods that are biologically observable.
o
Yes, but what is intelligence?
• Intelligence is the computational part of the ability to
achieve goals in the world. Varying kinds and degrees of
intelligence occur in people, animals and some machines.
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 7
What is Artificial Intelligence?
o
Isn't there a solid definition of intelligence that
doesn't depend on relating it to human
intelligence?
• Not yet. The problem is that we cannot yet characterize in general
what kinds of computational procedures we want to call intelligent.
We understand some of the mechanisms of intelligence and not
others.
o
More in:
• http://www-formal.stanford.edu/jmc/whatisai/node1.html
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 8
What is Artificial Intelligence?
o
“The science of making machines do things that
would require intelligence if done by humans”
Marvin Minsky
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 9
Artificial Intelligence
o
Although AI has a strong science fiction
connotation, it forms a vital branch of computer
science, dealing with intelligent behavior,
learning and adaptation in machines
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 10
What is Artificial Intelligence?
o
Views on AI fall into four categories:
Think humanly
Think rationally
Acting humanly
Acting rationally
o
Human-centered approach
• Must be an empirical science, involving hypothesis and
experimental confirmation
o
Rationalist approach
• Involves a combination of mathematics and engineering
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 11
Acting Humanly - The Turing test
o
Can machines think?
• The computer passes the test if a human interrogator, after posing
some written questions, cannot tell if whether the written
responses come from a person or not (Alan Turing, 1950)
o
Requires
• Natural language processing
• Knowledge representation
• Automated reasoning
• Machine learning
• Vision and robotics (to pass the full test)
These six disciplines compose most of AI
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 12
Thinking Humanly
o
o
If we’re going to say that a program thinks like a
human, we must have a way of determining how
humans think (we need to get inside the actual
working of the human mind)
If the program’s input/output and timing behaviors
match corresponding human behavior, that is
evidence that some of the program’s mechanisms
could also be operating in humans
• GPS (General Problem Solver) by Allen Newell and Herbert
Simon – the author were not interested to see if the program
solves the problems correctly, but rather they were interested to
compare the trace of its reasoning steps to traces of human
subjects solving the same problems
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 13
Thinking Rationally – the “laws of thought” approach
o
o
So-called logicist approach within artificial
intelligence hopes to build programs that, in
principle, could solve any solvable problem
described in logical notation
Problems
• It is not easy to take informal knowledge and state it in the formal
terms required by logical notation, particularly when the
knowledge is not 100% certain
• There is a big difference between being able to solve a problem
“in principle” and doing so in practice. Even problems with a few
dozen facts can exhaust the computational resources of a modern
computer, unless it has some guidance as to which reasoning
steps to apply first
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 14
Acting Rationally – the rational agent approach
o
A rational agent is one that acts so as to achieve the
best possible outcome or, when there is uncertainty,
the best expected outcome
• Operating under autonomous control, perceiving its environment,
persisting over prolonged period of time, adapting to change, and
being able of taking on another’s goals
o
Rational-agent design
• More general than “think rationally” (logical) approach, because
correct inference is just one of several mechanisms for achieving
rationality
• Amendable to scientific development than human-centered
approaches because human behavior or human thought are not
fully understood
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 15
Research in AI
o
Research in AI is concerned with producing
machines to automate tasks requiring intelligent
behavior
• It is a scientific discipline, focused on providing solutions to real
life problems
• AI systems are now in routine use: economics, medicine,
engineering, military, as well as home computer software
applications and video games (see examples later)
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 16
Research in AI
o
Major subfields
• Control
• Planning
• Vision
• Robotics
• Natural Language Processing
• Speech Processing
• Automated Reasoning (probabilistic, deterministic)
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 17
History of AI
o
o
o
o
o
1943
1950
1956
1952--69
1950s
o
o
1965
1966--73
o
o
o
o
o
1969--79
1980-1986-1987-1995--
McCulloch & Pitts: Boolean circuit model of brain
Turing's "Computing Machinery and Intelligence"
Dartmouth meeting: "Artificial Intelligence" adopted
Look, Ma, no hands!
Early AI programs, including Samuel's checkers
program, Newell & Simon's Logic Theorist (GPS),
Gelernter's Geometry Engine
Robinson's complete algorithm for logical reasoning
AI discovers computational complexity
Neural network research almost disappears
Early development of knowledge-based systems
AI becomes an industry
Neural networks return to popularity
AI becomes a science
The emergence of intelligent agents
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 18
State-of-the-art AI systems
o
Deep Blue
• Computer chess program defeated world champion Garry
Kasparov in 1997
o
Automated Theorem Prover EQP
• William McCune proved in 1996 a mathematical conjecture
(Robbins conjecture) unsolved for decades
o
During the 1991 Gulf War, US forces deployed
DART an AI logistics planning and scheduling
program that involved up to 50,000 vehicles,
cargo, and people
o
Google
• The search engine employs AI technology such as machine
learning, information retrieval, etc.
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 19
State-of-the-art AI systems
o
DARPA grand challenge 2005-2007
• Stanley (Stanford) autonomous vehicle finished a 132 mile offroad course in less than 7 hours (won the $2,000,000 prize)
• Boss (CMU) autonomous vehicle won the 2007 DARPA Urban
Challenge in 2007 (60 miles urban area course)
o
NASA Spirit and Opportunity Mars rovers
• 2003-2009 the two rovers operated autonomously on Mars
o
ROBOCUP
• 1993 – present: autonomous soccer robots competition
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 20
Agents
Agents and environments
o Rationality
o PEAS (Performance measure, Environments,
Actuators, Sensors)
o Environment types
o Agent types
o
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 21
Agents
o
An agent is anything that can be viewed as
perceiving its environment through sensors and
acting upon that environment through actuators
o
Human agent
• Sensors: eyes, ears, and other organs
• Actuators: legs, hands and other body parts
o
Robotic agent
• Sensors: cameras and infrared range finders
• Actuators: various motors
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 22
Agents and environments
o
The agent function maps from percept histories
to actions
[f: P* A]
o
The agent program runs on the physical
architecture to produce f (ie, implements f)
o
Agent = architecture + program
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 23
Vacuum cleaner world
o
o
Percepts: location and dirt (e.g., [A, dirty])
Actions: Left, Right, Suck, No-Op
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 24
Vacuum cleaner world
Percept sequence
Action
[A, Clean]
Right
[A, Dirty]
Suck
[B, Clean]
Left
[A, Clean], [A, Clean]
Right
[A, Clean], [A, Dirty]
Suck
[A, Clean, [A, Clean], [A, Dirty]
Suck
…
…
Partial tabulation of the agent function f
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 25
Rational agents
o
An agent should strive to "do the right thing",
based on what it can perceive and the actions it
can perform.
• The right action is the one that will cause the agent to be most
successful according to some Performance Measure:
ie, an objective criterion for success of an agent's behavior
o
Example of performance measures:
• performance measure of a vacuum-cleaner agent could be:
amount of dirt cleaned up,
amount of time taken,
amount of electricity consumed,
amount of noise generated
etc.
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 26
Rational (intelligent) agents
o
Rational Agent
• For each possible percept sequence, a rational agent should
select an action that is expected to maximize its performance
measure, given the evidence provided by the percept sequence
and whatever built-in knowledge the agent has
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 27
Rational (intelligent) agents
o
Ability to interact with the real world
• to perceive, understand, and act
• e.g., speech recognition and understanding and synthesis, image
understanding, ability to take actions which have an effect
o
Knowledge Representation, Reasoning and Planning
• modeling the external world, given input
• solving new problems, planning and making decisions
• ability to deal with unexpected problems, uncertainties
o
Learning and Adaptation
• we are continuously learning and adapting
• our internal models are always being “updated”
e.g. a baby learning to categorize and recognize animals
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 28
PEAS: Performance, Environment, Actuators, Sensors
o
To design a rational agent we must specify the
task environment
o
Example: designing an automated taxi
• Performance measure?
Safe, fast, legal, comfortable trip, maximize profit
• Environment?
Roads, other traffic, pedestrians, customers, weather
• Actuators?
Steering, accelerator, brake, signal, horn, navigation display
• Sensors?
Cameras, sonar, speedometer, GPS, odometer, engine sensors
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 29
Environment types
o
Fully observable vs. partially observable
• Agent’s sensors give access to the complete state of the
environment at each point in time
Convenient, because the agent need not maintain any internal state
to keep track of the world
e.g., chess player is fully observable, taxi driver is partially
observable
o
Deterministic vs. stochastic
• If the next state of the environment is completely determined by
the current state
e.g., taxi driver is stochastic (cannot predict traffic, a tire may blow
out), vacuum cleaner and chess player are deterministic
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 30
Environment types
o
Episodic vs. sequential
• In an episodic task environment, the agent’s experience is divided
into atomic episodes. The next episode does not depend on the
actions taken in previous episodes. In sequential environments,
the current decision may affect all future decisions.
e.g., part-picking robot on the assembly line is episodic, chess player
and taxi driver are sequential
o
Static vs. dynamic
• If the environment can change while the agent is deliberating then
it is called dynamic, otherwise it is static
e.g., taxi driver is dynamic (the other cars and taxi are moving while
the agent is deliberating about the next move), crossword puzzle is
static (the grid does not change)
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 31
Environment types
o
Discrete vs. continuous
• The discrete/continuous distinction can be applied to the state of
the environment, to the way time is handled, and to the percepts
and actions of the agent
e.g., chess player is discrete-state (finite number of distinct states)
and it also has discrete percepts and actions; taxi driver is a
continuous state, continuous-time problem (speed and location of the
taxi and other vehicles have continuous real values) and continuous
actions (steering angle, etc.)
o
Single vs. multi-agent
e.g., crossword puzzle is single agent, chess player involves two
agents (competitive multi-agent environment), taxi driver is also
multi-agent (cooperative multi-agent environment to avoid collisions)
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 32
Examples
Solitaire
Backgammon
Part-picking robot
Taxi
Observable?
Yes
Yes
Partly
No
Deterministic?
Yes
No
No
No
Episodic?
No
No
Yes
No
Static?
Yes
Semi
No
No
Discrete?
Yes
Yes
No
No
Agents?
Single
Multi
Single
Multi
The environment type largely determines the agent design
The real world is (of course) partially observable, stochastic,
sequential, dynamic, continuous and multi-agent
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 33
Agent types
o
Four basic types in order of increasing
generality
• Simple reflex agents
• Reflex agents with state
• Goal-based agents
• Utility-based agents
o
All these can be turned into learning agents
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 34
Agent types
o
Example: automated taxi agent
o
Simple reflex
• If car-in-front-is-breaking then initiate-breaking
o
Reflex with state (keeps track of the world)
• If car-in-front-is-breaking and on motor-way then initiate-breaking
• needs internal state
o
Goal-based
• If car-in-front-is-breaking and needs to get to hospital then go to
adjacent lane and plan
• search and planning
o
Utility-based
• If car-in-front-is-breaking and on motor-way and needs to get to hospital
alive then search of a way to get to the hospital that will make your
passengers happy
• needs utility function that maps a state to a real function (am I happy?)
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 35
Summary
o
What is Artificial Intelligence?
• Modeling humans thinking, acting, should think, should act
o
Brief history of AI
o
Intelligent agents
• We want to build agents that act rationally
o
Real-World Applications of AI
• AI is alive and well in various “every day” applications
Many products, systems, have AI components
o
Assigned Reading
• Chapters 1 and 2 in the RN textbook
University College Cork (Ireland) Department of Civil and Environmental Engineering
R. Marinescu 20-October-2009
page 36