Vous êtes sur la page 1sur 46

Unit 1:Introduction to Artificial Intelligence

Hridaya Kandel
hridayakandel@gmail.com
AI Lecturer
BScCSIT Vth

Hridaya Kandel(AI Lecturer) 1


Why AI?

Hridaya Kandel(AI Lecturer) 2


What Else ??
Some AI systems : Deep Blue
Chess-playing computer developed by IBM
Won game against world Champion in 1996

Hridaya Kandel(AI Lecturer) 3


Some AI systems : Honda ASIMO
Advanced Step in Innovative Mobility
Humanoid Robot

http://world.honda.com/ASIMO/
Hridaya Kandel(AI Lecturer) 4
Some AI systems : Sony AIBO and Aldebaran
Robotics Nao

Humanoid Robot
Robotic Pet
Used in RoboCup Standard
Used in RoboCup Four-
Platform League (SPL)
Legged League
Hridaya Kandel(AI Lecturer) 5
Some AI systems : Natural Language Question
Answering System

http://start.csail.mit.edu/index.php

Hridaya Kandel(AI Lecturer) 6


Todays AI systems can do
In Computer vision, the systems are capable of face recognition
In Robotics, we have been able to make vehicles that are mostly autonomous.
In Natural language processing, we have systems that are capable of simple
machine translation.
Todays Expert systems can carry out medical diagnosis in a narrow domain
Speech understanding systems are capable of recognizing several thousand
words continuous speech
Planning and scheduling systems had been employed in scheduling experiments
with the Hubble Telescope.
The Learning systems are capable of doing text categorization into about a 1000
topics
In Games, AI systems can play at the Grand Master level in chess (world
champion), checkers, etc

Hridaya Kandel(AI Lecturer) 7


AI systems cannot do Yet

Understand natural language robustly (e.g., read and understand articles in


a newspaper)
Surf the web
Interpret an arbitrary visual scene
Learn a natural language
Construct plans in dynamic real-time domains
Exhibit true autonomy and intelligence

Hridaya Kandel(AI Lecturer) 8


What is AI?

These definitions vary along two main dimensions


thought processes and reasoning
Behavior
definitions on the left measure success in terms of human
performance
the right measure against an ideal concept of intelligence, which
we will call rationality.

Hridaya Kandel(AI Lecturer) 9


What is AI?
The exciting new effort to make The study of mental faculties through the use
computers thinks machine with minds, of computational models
in the full and literal sense (Haugeland (Charniak et al. 1985)
1985)
"[The automation of] activities that we "The study of the computations that make
associate with human thinking, activities it possible to perceive, reason, and act"
such as decision-making, problem solving, (Winston, 1992)
learning..."(Bellman, 1978)

The art of creating machines that perform A field of study that seeks to explain and
functions that require intelligence when emulate intelligent behavior in terms of
performed by people (Kurzweil, 1990) computational processes (Schalkol, 1990)
"The study of how to make computers do "The branch of computer science that is
things at which, at the moment, people concerned with the automation of intelligent
are better" (Rich and Knight, 1 99 1 ) behavior" (Luger and Stubblefield, 1993)

Systems that think like humans Systems that think rationally


Systems that act like humans Systems that act rationally
Hridaya Kandel(AI Lecturer) 10
Systems that think like humans: Cognitive modeling
approach
Definition
The exciting new effort to make computers thinks machine with
minds, in the full and literal sense (Haugeland 1985)

"[The automation of] activities that we associate with human thinking,


activities such as decision-making, problem solving, learning..."(Bellman,
1978)

Dimension: Thought Process/Thinking


Measures: Human Performance

Cognition means the action or process of acquiring knowledge and


understanding through thought, experience and senses.

Hridaya Kandel(AI Lecturer) 11


Systems that think like humans: Cognitive modeling
approach
Cognition means the action or process of acquiring knowledge and
understanding through thought, experience and senses.
Make Machines with Mind.
To make mind we need to understand it.
Scientific theories (Cognitive Model) of mind Required
Two ways to study mind or build a model
Predicting and testing human behavior (cognitive science)
Identification from neurological data (Cognitive neuroscience)

Hridaya Kandel(AI Lecturer) 12


Acting Humanly: The Turing Test Approach

Definition
The art of creating machines that perform functions that require
intelligence when performed by people (Kurzweil, 1990)

"The study of how to make computers do things at which, at the


moment, people are better" (Rich and Knight, 1991 )

Dimension: Behavior
Measures: Human Performance

Hridaya Kandel(AI Lecturer) 13


Acting Humanly: The Turing Test Approach

Alan Turing(1950)
Turing test Provides satisfactory operational definition of intelligence
The test involves an interrogator who interacts with one human and
one machine through written questions.
Within a given time the interrogator has to find out which of the two is
human or a machine.

Hridaya Kandel(AI Lecturer) 14


Acting Humanly: The Turing Test Approach

Some capabilities needed to possess by machine to past test


Natural Language Processing: Must be able to communicate in English
successfully
Knowledge representation: To store what it knows and hears.
Automated reasoning: Answer the Questions based on the stored
information.
Machine learning: Must be able to adapt in new circumstances.

The total Turing test


includes video signals and manipulation capability
interrogator can test
perceptual abilities and
object manipulation ability.

Following additional capabilities Required:


Computer Vision: To perceive objects
Robotics:
Hridaya Kandel(AI Lecturer) To manipulate objects
15 and move
Systems that think rationally: The laws of thought approach

Definition
The study of mental faculties through the use of computational models
(Charniak et al. 1985)

"The study of the computations that make it possible to perceive,


reason, and act (Winston, 1992)

Dimension: Thought Process/Thinking


Measures: ideal concept of intelligence i.e Rationality

Hridaya Kandel(AI Lecturer) 16


Systems that think rationally: The laws of thought approach

What is Idle thinking/intelligence?


Aristotle (~ 450 B.C.) first attempt to codify the right thinking that is
irrefutable reasoning process
He gave Syllogisms that always yielded correct conclusion when correct
premises are given.
Example:
All men are mortal
Ram is a man
Ram is mortal

This study initiated the field of logic. The logicist tradition in AI


hopes to create intelligent systems using logic programming.

Problems:
What if knowledge is not 100% certain?
Solving problem principally is different from doing it in practice.
Hridaya Kandel(AI Lecturer) 17
Systems that act rationally: The rational Agent approach

Definition
Rational behavior: Doing the right thing!

A field of study that seeks to explain and emulate intelligent behavior in


terms of computational processes (Schalkol, 1990)
"The branch of computer science that is concerned with the automation
of intelligent behavior" (Luger and Stubblefield, 1993)

Dimension: Behavior
Measures: ideal concept of intelligence i.e Rationality

Hridaya Kandel(AI Lecturer) 18


Systems that act rationally: The rational Agent approach

An agent acts in an environment


Agent is something that acts. Computer agent is expected to have
following attributes:
Autonomous control
Perceiving their environment
Persisting over a prolonged period of time
Adapting to change
And capable of taking on anothers goal
Rational behavior means doing the right thing.
Right thing for maximizing goal achievement, given the available
information
Agent maximizes the goal achievement.

Hridaya Kandel(AI Lecturer) 19


Agents

What is an agent ?
An agent is anything that perceiving its environment through sensors and
acting upon that environment through actuators
Example:
Human is an agent
A robot is also an agent with cameras and motors
A thermostat detecting room temperature.
A discrete agent receives percepts one at a time, and maps this percept sequence
to a sequence of discrete actions.
Properties
Autonomous
Reactive to the environment
Pro-active (goal-directed)
Interacts with other agents
via the environment
Hridaya Kandel(AI Lecturer) 20
Agents

What AI should fill


Hridaya Kandel(AI Lecturer) 21
Terms
Percept
Agents perceptual inputs at any given instant
Percept sequence
Complete history of everything that the agent has ever perceived.
Agent function & program
Agents behavior is mathematically described by
Agent function
A function mapping any given percept sequence to an action
Practically it is described by
An agent program
The real implementation
Performance measure
An objective function that determines
How the agent does successfully
E.g., 90% or 30% ?
No universal performance measure for all agents
Hridaya Kandel(AI Lecturer) 22
Human as an Agent
Humans
Sensors: Eyes (vision), ears (hearing), skin (touch), tongue (gustation), nose
(olfaction), neuromuscular system (proprioception)
Percepts:
At the lowest level electrical signals from these sensors
After preprocessing objects in the visual field (location, textures, colors, ),
auditory streams (pitch, loudness, direction),
Effectors: limbs, digits, eyes, tongue,
Actions: lift a finger, turn left, walk, run, carry an object,

percepts and actions need to be carefully defined, possibly at


different levels of abstraction

Hridaya Kandel(AI Lecturer) 23


Automated taxi driving system
Percepts: Video, sonar, speedometer, odometer, engine sensors, keyboard input,
microphone, GPS,
Actions: Steer, accelerate, brake, horn, speak/display,
Goals: Maintain safety, reach destination, maximize profits (fuel, tire wear),
obey laws, provide passenger comfort,
Environment: U.S. urban streets, freeways, traffic, pedestrians, weather,
customers,
Different aspects of driving may require different types of agent programs!

Hridaya Kandel(AI Lecturer) 24


Rationality
For each possible percept sequence,
an rational agent should select
an action expected to maximize its performance measure, given the
evidence provided by the percept sequence and whatever built-in
knowledge the agent has
E.g., an exam
Maximize marks, based on
the questions on the paper & your knowledge

Rationality Need a performance measure to say how well a task has been
achieved.
What is rational at any given time depends on four things:
The performance measure defining the criterion of success
The agents prior knowledge of the environment
The actions that the agent can perform
The agentss percept sequence up to now
Hridaya Kandel(AI Lecturer) 25
Autonomy
If an agent just relies on the prior knowledge of its designer rather than its own
percepts then the agent lacks autonomy
Therefore, a system is not autonomous if it is guided by its designer according to
a priori decisions.
E.g., a clock
No input (percepts)
Run only but its own algorithm (prior knowledge)
No learning, no experience, etc.

A system is autonomous to the extent that its own behavior is determined by its
own experience.
To survive, agents must have:
Enough built-in knowledge to survive.
The ability to learn.

Hridaya Kandel(AI Lecturer) 26


Software Agents
Sometimes, the environment may not be the real world. Agents
working on such environments are called software agents or softbot.
Imagine a softbot designed to fly a flight simulator
Such environment are complex.

Hridaya Kandel(AI Lecturer) 27


Structure of agents
Agent = architecture + program
Architecture = some sort of computing device (sensors + actuators)
(Agent) Program = some function that implements the agent mapping = ?
Agent Program = Job of AI
Input for Agent Program
Only the current percept
Input for Agent Function
The entire percept sequence
The agent must remember all of them
Implement the agent program as
A look up table (agent function)

Hridaya Kandel(AI Lecturer) 28


Types of agent programs/agents
Four types
Simple reflex agents
Model-based reflex agents
Goal-based agents
Utility-based agents

Note:
Rectangles: to denote the current internal state of the agent's decision process
Ovals: to represent background information used in the process.

Hridaya Kandel(AI Lecturer) 29


Agent Types: Simple Reflex Agents
It uses just condition-action rules
The rules are like the form if then
efficient but have narrow range of applicability
Because knowledge sometimes cannot be stated explicitly
Work only
if the environment is fully observable

Hridaya Kandel(AI Lecturer) 30


Agent Types: Simple Reflex Agents

Hridaya Kandel(AI Lecturer) 31


Agent Types: Model-based Reflex Agents

For the world that is partially observable


the agent has to keep track of an internal state
That depends on the percept history
Reflecting some of the unobserved aspects
E.g., driving a car and changing lane
Requiring two types of knowledge
How the world evolves independently of the agent
How the agents actions affect the world

Hridaya Kandel(AI Lecturer) 32


Agent Types: Model-based Reflex Agents

Hridaya Kandel(AI Lecturer) 33


Agent Types: Goal-based agents

Current state of the environment is always not enough


The goal is another issue to achieve
Judgment of rationality / correctness
Actions chosen goals, based on
the current state
the current percept
Goal-based agents are less efficient
but more flexible
Agent Different goals different tasks
Search and planning
two other sub-fields in AI
to find out the action sequences to achieve its goal

Hridaya Kandel(AI Lecturer) 34


Agent Types: Goal-based agents

Hridaya Kandel(AI Lecturer) 35


Agent Types: Utility-based agents
Goals alone are not enough
to generate high-quality behavior
E.g. meals in Canteen, good or not ?
Many action sequences the goals
some are better and some worse
If goal means success,
then utility means the degree of success (how successful it is)
it is said state A has higher utility
If state A is more preferred than others
Utility is therefore a function
that maps a state onto a real number
the degree of success
Hridaya Kandel(AI Lecturer) 36
Agent Types: Utility-based agents

Hridaya Kandel(AI Lecturer) 37


Agent Types: Learning Agents
After an agent is programmed, can it work immediately?
No, it still need teaching
In AI,
Once an agent is done
We teach it by giving it a set of examples
Test it by using another set of examples
We then say the agent learns
A learning agent

Hridaya Kandel(AI Lecturer) 38


Agent Types: Learning Agents

Four conceptual components


Learning element
Making improvement
Takes feedback from critics
Performance element
Selecting external actions
Takes percepts decides actions
Critic
Tells the Learning element how well the agent is doing with respect to
fixed performance standard.
(Feedback from user or examples, good or not?)
Problem generator
Suggest actions that will lead to new and informative experiences.

Hridaya Kandel(AI Lecturer) 39


Agent Types: Learning Agents

Hridaya Kandel(AI Lecturer) 40


Task Environments

Task environments are the problems


While the rational agents are the solutions
Specifying the task environment
PEAS
Performance
Environment
Actuators
Sensors
In designing an agent, the first step must always be to specify the task
environment as fully as possible.
automated taxi driver as an example

Hridaya Kandel(AI Lecturer) 41


Task Environments example :Automated Taxi
driver

Hridaya Kandel(AI Lecturer) 42


Properties of Task Environments
Fully observable/Partially observable.
If an agents sensors give it access to the complete state of the environment
needed to choose an action, the environment is fully observable.
An environment might be Partially observable because of noisy and
inaccurate sensors or because parts of the state are simply missing from the
sensor data.
Example:
A local dirt sensor of the cleaner cannot tell
Whether other squares are clean or not
Deterministic/Stochastic.
An environment is deterministic if the next state of the environment is
completely determined by the current state of the environment and the
action of the agent; in a stochastic environment, there are multiple,
unpredictable outcomes
In a fully observable, deterministic environment, the agent need not deal
with uncertainty.
Hridaya Kandel(AI Lecturer) 43
Properties of Task Environments
Static/Dynamic.
A dynamic environment is always changing over time
E.g., the number of people in the street
While static environment does not
E.g., the destination
Episodic/Sequential.
An episodic environment means that subsequent episodes do not depend
on what actions occurred in previous episodes.
In a sequential environment, the agent engages in a series of connected
episodes.
Such environments do not require the agent to plan ahead.
Ex taxi driving and chess

Hridaya Kandel(AI Lecturer) 44


Properties of Task Environments
Discrete/Continuous.
If the number of distinct percepts and actions is limited, the environment is
discrete E.g., Chess game, otherwise it is continuous. E.g Taxi driving

Single agent/Multi-agent.
If the environment contains other intelligent agents, the agent needs to be
concerned about strategic, game-theoretic aspects of the environment (for
either cooperative or competitive agents)
Most engineering environments dont have multi-agent properties, whereas
most social and economic systems get their complexity from the
interactions of (more or less) rational agents.
Example: Playing a crossword puzzle single agent
Chess playing two agents
Competitive multiagent environment
Chess playing
Cooperative multiagent environment
Automated
Hridaya Kandel(AI Lecturer) taxi driver 45
Properties of Task Environments: examples

Hridaya Kandel(AI Lecturer) 46

Vous aimerez peut-être aussi