SlideShare a Scribd company logo
18CSC305J ARTIFICIAL INTELLIGENCE
Introduction
1
ML and AI to build and optimize systems and also provide AI technology with
new data inputs for interpretation.
Artificial Intelligence
• ML and AI to build and optimize systems and also provide AI
technology with new data inputs for interpretation.
• Machine learning is about extracting knowledge from data.
• It is a research field at the intersection of statistics, artificial
intelligence, and computer science and is also known as predictive
analytics or statistical learning.
• AI and ML has become ubiquitous in everyday life
-commercial applications, data-driven research
Artificial Intelligence
UNIT 1 SRMIST KTR_problem and agents.pdf
UNIT 1 SRMIST KTR_problem and agents.pdf
Main reasons for AI advances
• Computing power
(GPU and Cloud computing)
• Big data
- Internet and sensors
- Large datasets
• Deep learning algorithms
- Software
- Improved techniques
- Toolboxes
UNIT 1 SRMIST KTR_problem and agents.pdf
What is AI?
8
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Acting humanly: Turing Test
• Turing (1950) "Computing machinery and intelligence":
• "Can machines think?" à "Can machines behave intelligently?"
• Operational test for intelligent behavior: the Imitation Game
The computer would need to possess the following capabilities:
• natural language processing to enable it to communicate successfully in English (or some
other human language);
• knowledge representation to store information provided before or during the interrogation;
• automated reasoning to use the stored information to answer questions and to draw new
conclusions;
•machine learning to adapt to new circumstances and to detect and extrapolate patterns. To
pass the total Turing Test, the computer will need
• computer vision to perceive objects
• robotics to move them about.
9
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Thinking humanly: cognitive modeling
Determining how humans think
• through introspection—trying to catch our own thoughts as they go by
• through psychological experiments
Express the theory as a computer program
• program's input/output and timing behavior matches human behavior
10
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Thinking rationally: "laws of thought"
•
•
• Aristotle: what are correct arguments/thought processes?
• Several Greek schools developed various forms of logic: notation and rules of derivation for thoughts;
may or may not have proceeded to the idea of mechanization
Direct line through mathematics and philosophy to modern AI
Problems:
1. Not all intelligent behavior is mediated by logical deliberation
2. What is the purpose of thinking? What thoughts should I have?
11
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Acting rationally: rational agent
• Rational behavior: doing the right thing
• The right thing: that which is expected to maximize goal achievement, given the available
information
• An agent is just something that perceives and acts
• Doesn't necessarily involve thinking – but thinking should be in the service of rational action
12
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Rational agents
• An agent is an entity that perceives and acts
• Abstractly, an agent is a function from percept histories to actions:
[f: P* à A]
• For any given class of environments and tasks, we seek the agent (or class of agents) with the best
performance
• computational limitations make perfect rationality unachievable
à design best program for given machine resources
13
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
History of AI
• AI has roots in a number of scientific disciplines
– computer science and engineering (hardware and software)
– philosophy (rules of reasoning)
– mathematics (logic, algorithms, optimization)
– cognitive science and psychology (modeling high
human/animal thinking)
– neural science (model low level human/animal brain activity)
– linguistics
level
• The birth ofAI (1943 – 1956)
– McCulloch and Pitts (1943): simplified mathematical model of
neurons (resting/firing states) can realize all propositional logic
primitives (can compute all Turing computable functions)
– Alan Turing: Turing machine and Turing test (1950)
– Claude Shannon: information theory; possibility of chess playing
computers
– Boole, Aristotle, Euclid (logics, syllogisms)
14
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
• Early enthusiasm (1952 – 1969)
– 1956 Dartmouth conference
John McCarthy (Lisp);
Marvin Minsky (first neural network machine);
Alan Newell and Herbert Simon (GPS);
– Emphasis on intelligent general problem solving
GSP (means-ends analysis);
Lisp (AI programming language);
Resolution by John Robinson (basis for automatic theorem
proving);
heuristic search (A*, AO*, game tree search)
• Emphasis on knowledge (1966 – 1974)
– domain specific knowledge is the key to overcome existing
difficulties
– knowledge representation (KR) paradigms
– declarative vs. procedural representation
History of AI
15
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
• Knowledge-based systems (1969 – 1999)
– DENDRAL: the first knowledge intensive system (determining 3D structures
of complex chemical compounds)
– MYCIN: first rule-based expert system (containing 450 rules for diagnosing
blood infectious diseases)
EMYCIN: an ES shell
– PROSPECTOR: first knowledge-based system that made significant profit
(geological ES for mineral deposits)
• AI became an industry (1980 – 1989)
– wide applications in various domains
– commercially available tools
– AI winter
• Current trends (1990 – present)
– more realistic goals
– more practical (application oriented)
– distributedAI and intelligent software agents
– resurgence of natural computation - neural networks and emergence of
genetic algorithms – many applications
– dominance of machine learning (big apps)
History of AI
16
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
State of the art
• HITECH, becomes the first computer program to defeat a grandmaster in a game
of chess (Arnold Denker)
• A speech understanding program named PEGASUS results in a confirmed
reservation that saves the traveller $894 over the regular coach fare.
• MARVEL, a real-time expert system that monitors the massive stream of data
transmitted by the spacecraft, handling routine tasks and alerting the analysts to
more serious problems.
17
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
• more powerful and more useful computers
• new and improved interfaces
• solving new problems
• better handling of information
• relieves information overload
• conversion of information into knowledge
Advantages of Artificial Intelligence
18
The Disadvantages
• increased costs
• difficulty with software development - slow and expensive
• few experienced programmers
• few practical products have reached the market as yet.
19
• AI deals with a large spectrum of Problems
• Applications spread across the domains, from medical to manufacturing with their own
complexities
• AI Deals with
• Various Day-to-day Problem
• Different identification and authentication problems (in security)
• Classification problems in Decision-making systems
• Interdependent and cross-domain problems (Such as Cyber-Physical
• Systems)
• The problems faced by AI is hard to resolve and also computationally
AI Technique
14
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
AI Technique
• Intelligence requires knowledge
(less desirable properties)
– voluminous
– hard to characterize accurately
– constantly changing
– differ from data by being organized in a way that
corresponds to the ways it will be used
21
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
Knowledge Representation
• Generalizations-defines property
• Understood by people -eg taking readings
• Easily modified – correct errors and reflect changes
• Used in a great many situations(even not accurate or complete)
• Can be used to reduce the possibilities that must be considered(bulk
to narrow)
Categories of problems
• Structured problems –goal state defined
• Unstructured problems- goal state not known
• Linear problems- based on dependent variable
• Non linear problems- no dependency between variables
22
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
Problem
• In AI, formally define a problem as
• a space of all possible configurations where each configuration is called a state
• The state-space is the configuration of the possible states and how they connect
to each other e.g. the legal moves between states.
• an initial state
• one or more goal states
• a set of rules/operators which move the problem from one state to the next
• In some cases, we may enumerate all possible states
• but usually, such an enumeration will be overwhelmingly large so we only
generate a portion of the state space, the portion we are currently examining
• we need to search the state-space to find an optimal path from a start state to a
goal state.
17
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
State space: Tic-Tac-Toe
Goal: Arrange in horizontal or vertical or diagonal to win
24
State space: 8 Puzzle
The 8 puzzle search space consists of 8! states (40320)
25
Search
• Search is a general algorithm that helps in finding the path in state space
• The path may lead to the solution or dead end.
• Control strategies- overall rules and approach towards searching
i) forward search(data directed)
Starts search from initial state towards goal state.
Ex: locating a city from current location
ii) backward search(goal directed)
Search stars from goal state towards a solvable initial state.
Ex: start from target city
26
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
Search
• Strategies to explore the states
• Informed search – No guarantee for solution but high probability of getting solution
-heuristic approach is used to control the flow of solution path
-heuristic approach is a technique based on common sense, rule of
thumb, educated guesses or intuitive judgment
• Uninformed search – generates all possible states in the state space and checks for
the goal state.
- time consuming due to large state space
- used where error in the algorithm has severe consequences
• Parameters for search evaluation
i) completeness: Guaranteed to find a solution within finite time
ii) space and time complexity: memory required and time factor needed
iii) optimality and admissibility: correctness of the solution
27
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
Problem solving with AI
Well structured problems- yield right answer or inference for an algorithm
Ex:
• Quadratic equation-find value of x
• Speed of ball when reaches to batsman
• Network flow analysis
Ill structured problems-do not yield a particular answer
Ex:
• How to dispose wet waste safely
• Security threats in big social gathering
Unstructured problems- exact goal state not known(many goal states)
Ex: improve life expectancy of human being
Linear problems-have a solution or will not have
Non Linear problems-relationship between input and output are not linear
28
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
29
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
AI Applications
• Credit granting
• Information management and retrieval
• AI and expert systems embedded in products
• Plant layout
• Help desk and assistance
• Employee performance evaluation
• Shipping
• Marketing
• Warehouse optimization
• In space workstation maintainance
• Satellite controls
• Network developments
• Nuclear management
30
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
AI Models
Semiotic models- Based on sign process, signification or communication
Statistical models- representation and formalization of relationships through statistical techniques.
- History of data for decision making
- uses probabilistic approaches
31
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
Data Acquisition and Learning Aspects in AI
• Knowledge Discovery- data mining and machine learning:
data-recorded facts
information-pattern underlying the data
data mining or knowledge discovery-extraction of meaning information.
machine learning-algorithms that improve performance with experience
• Computational Learning Theory(COLT)- formal mathematical models defined
complexity-computation, prediction and feasibility
analyze patterns-Probably Approximately Correct(PAC)-hypothesis
mistake bound-target function
• Neural and evolutionary computation- speed up mining of data
evolutionary computing- biological properties
decision making and optimization
Neural computing-neural behavior of human being
pattern recognition and classification
32
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
• Intelligent agents and multi agent systems- decision making in complex scenarios
Intelligent agents –based on knowledge, available resources and
perspectives
multi agent systems- combination of more than one percept of intelligent
agents
• Multi-perspective integrated intelligence-utilizing and exploiting knowledge from
different perspective
Data Acquisition and Learning Aspects in AI
33
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
Problem Solving: Definition
A problem exists when you want to get from “here” (a knowledge state) to “there” (another
knowledge state) and the path is not immediately obvious.
Makes optimal use of knowledge and information to select set of actions for reaching the goal.
What are problems?
nEveryday experiences
nHow to get to the airport?
nHow to study for a quiz, complete a paper, and finish a lab before
recitation?
nDomain specific problems
nPhysics or math problems
nPuzzles/games
nCrossword, anagrams, chess
Categories of problem solving
• General purpose: means-end analysis
present situation is compared with the goal to detect the difference
select action that reduces the difference
Ex:select the mode of transport
• Special purpose-modelled for the specific problem, which have specific features
Ex: classify legal document reference to particular case
34
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
Problem solving process
• Problem solving-process of generating solutions for the given situation
• Problem is defined,
1. in a context
2. has well defined objective
3. solution has set of activities
4. uses previous knowledge and domain knowledge Primary
objective-problem identification
35
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
• Problem solving technique involves
1. problem definition
2. problem analysis and representation
3. planning
4. execution
5. evaluating solution
6. consolidating gains
• A search algorithm takes a problem as input and returns a solution in the form of
an action sequence.
• execution phase-Once a solution is found, the actions it recommends can be
carried out.
Problem solving process
36
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
• Problem formulation is the process of deciding what actions and
states to consider, and follows goal formulation.
• Goal formulation-the agent may wish to decide on some other factors
that affect the desirability of different ways of achieving the goal.
37
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Formulating problems
Problem types:
Single-state problem-Agent knows exactly what each of its actions does and it can
calculate exactly which state it will be in after any sequence of actions.
Multiple-state problem-when the world is not fully accessible, the agent must
reason about sets of states that it might get to, rather than single states.
Contingency problem-the agent may be in need to now calculate a whole tree of
actions, rather than a single action sequence in which each branch of the tree deals
with a possible contingency that might arise.
Exploration problem-the agent learns a "map" of the environment, which it can then
use to solve subsequent problems.
• Well-defined problems and solutions
A problem is really a collection of information that the agent will use to decide what to do.
Elements of a problem:
1. The initial state that the agent knows itself to be in.
2. The set of possible actions available to the agent.
operator is used to denote the description of an action to
reach a state.
state space-the set of all states reachable from the initial state by
any sequence of actions.
A path in the state space is simply any sequence of actions
leading from one state to another.
3. The goal test, which the agent can apply to a single state description to determine if it is
a goal state.
4. A path cost function is a function that assigns a cost to a path.
The output of a search algorithm is a solution, that is, a path from the initial state to a state that
satisfies the goal test.
38
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Formulating problems
• Measuring problem-solving performance
Solution is obtained or not
Obtained solution is good solution or not(with a low path cost)
Search cost-associated with the time and memory required to find a solution.
total cost of the search is the sum of the path cost and the search cost
• Choosing states and actions
To decide a better solution, determine the measurement of path cost function
The process of removing detail from a representation is called abstraction
Formulating problems
39
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
• Example: Water jug problem-find out a way to empty 2 galloon jug and fill 5 galloon jug with 1
galloon of water
states: Amount of water in the jugs
actions: 1. empty the big jug
2. empty the small jug
3. pour water from small jug to big jug
4. . pour water from big jug to small jug
Goal: 1 galloon of water in big jug and empty the small jug
path cost: number of actions(minimum number of actions->better solution)
Representation: jugs(b,s), where b-amount of water in bigger jug, s- b-amount of water in
smaller jug
initial state: (5,2)
goal state: (1,0)
operators: i) empty the jug
ii) fill the jug
Problem Formulation and Representation
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
• Solution:
initial state: (5,2)
goal state: (1,0)
operators:
i) empty big(remove water from big jug)
ii) empty small(remove water from small jug)
iii) big is empty(pour water from small jug to big jug)
iv) small is empty(pour water from big jug to small jug)
actions of sequence: 2,4,2,4,2
Problem Formulation and Representation
41
Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
Toy problems
Intended to illustrate or exercise various problem-solving methods
The 8-puzzIe
• 3x3 board with eight numbered tiles and a blank space.
• A tile adjacent to the blank space can slide into the space.
• objective-to reach the configuration shown on the right of the figure.
Problem formulation:
• States: a state description specifies the location of each of the eight tiles in one of the nine
squares. For efficiency, it is useful to include the location of the blank.
• Operators: blank moves left, right, up, or down.
• Goal test: state matches the goal configuration shown in Figure.
• Path cost: each step costs 1, so the path cost is just the length of the path.
36
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
The 8-queens problem
• Place eight queens on a chessboard such that no queen attacks any other.
• There are two main kinds of formulation
The incremental formulation involves placing queens one by one
the complete-state formulation starts with all 8 queens on the board and moves
them around.
• Goal test: 8 queens on board, none attacked.
• Path cost: zero.
There are also different possible states and operators.
Consider the following for incremental formulation:
• States: any arrangement of 0 to 8 queens on board.
• Operators: add a queen to any square.
Consider the following for complete state formulation:
• States: arrangements of 8 queens, one in each column.
• Operators: move any attacked queen to another square in the same column.
Toy problems
43
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
The vacuum world
• Assume that the agent knows its location and the locations of all the pieces of dirt, and the
suction is still in good working order.
• States: one of the eight states
• Operators: move left, move right, suck.
• Goal test: no dirt left in any square.
• Path cost: each action costs 1.
Toy problems
44
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
• Letters stand for digits
• The aim is to find a substitution of digits for letters such that the resulting sum is arithmetically
correct.
• Each letter must stand for a different digit.
Problem formulation:
• States: a cryptarithmetic puzzle with some letters replaced by digits.
• Operators: replace all occurrences of a letter with a digit not already appearing in the puzzle.
• Goal test: puzzle contains only digits, and represents a correct sum.
• Path cost: zero. All solutions equally valid.
Toy problems
Cryptarithmetic
45
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Route finding
• routing in
computer network
automated travel advisory systems
airline travel planning systems.
• the actions in the problem do not have completely known outcomes:
flights can be late or overbooked
connections can be missed
fog or emergency maintenance can cause delays.
• Other real world problems(refer Artificial Intelligence :A Modern Approach by Stuart J. Russell and
Peter Norvig page 69)
Touring and travelling salesman problem
VLSI layout
Robot navigation
Assembly sequencing
Real world problems
More difficult and whose solutions people actually care about
46
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Problem types and Characteristics
Problem Characteristics:
To choose an appropriate method for a
particular Problem:
• Is the problem decomposable?
• Can solution steps be ignored or undone?
• Is the universe predictable?
• Is a good solution absolute or relative?
• Is the solution a state or a path?
• What is the role of knowledge?
• Does the task require human-interaction?
problem types
single-state problem-Agent knows exactly what
each of its actions does and it can calculate exactly which
state it will be in after any sequence of actions.
multiple-state problem-when the world is not
fully accessible, the agent must reason about sets of
states that it might get to, rather than single states.
contingency problem-the agent may be in need
to now calculate a whole tree of actions, rather than a
single action sequence in which each branch of the tree
deals with a possible contingency that might arise.
exploration problem-the agent learns a "map"
of the environment, which it can then use to solve
subsequent problems.
47
Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
1.Is the problem decomposable?
• Can the problem be broken down to smaller
problems to be solved independently?
• Decomposable problem can be solved easily.
Ex 1:- ∫ x2 + 3x + sin2x cos 2x dx
This can be done by breaking it into three smaller problems and solving each
by applying specific rules. Adding the results the complete solution is
obtained.
Ex2: blocks world problem
Problem Characteristics
48
Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
2. Can solution steps be ignored or undone?
1. Ignorable problems can be solved using a simple control structure that never
backtracks.
Ex:- theorem proving - In which solution steps can be ignored.(comment lines)
2. Recoverable problems can be solved using backtracking.
Ex:- 8 puzzle- In which solution steps can be undone(backtracking and rollback)
3. Irrecoverable problems can be solved by recoverable style methods via planning
Ex:- Chess- In which solution steps can’t be undone(Moves cannot be retracted.)
Problem Characteristics
49
Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
3.Is the universe predictable?
l Certain outcome-8-Puzzle
Every time we make a move, we know exactly what will
happen.
l Uncertain outcome-Playing Bridge
We cannot know exactly where all the cards are
or what the other players will do on their turns.
Problem Characteristics
50
Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
Eg: Marcus was a man.
Marcus was a Pompeian.
Marcus was born in 40 A.D.
All men are mortal.
All Pompeians died when the volcano erupted in 79 A.D.
No mortal lives longer than 150 years.
It is now 2004 A.D.
Is Marcus alive? (relative)
Different reasoning paths lead to the answer.
It does not matter which path we follow.
The Travelling Salesman Problem (absolute)
We have to try all paths to find the shortest one.
• Any-path problems can be solved using heuristics that suggest good paths to
explore.
• For best-path problems, much more exhaustive search will be performed.
Problem Characteristics
4.Is a good solution absolute or relative?
51
Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
5.Is the solution a state or a path?
Finding a consistent intepretation
“The bank president ate a dish of pasta salad with the fork”.
– “bank” refers to a financial situation or to a side of a river?
– “dish” or “pasta salad” was eaten?
– Does “pasta salad” contain pasta, as “dog food” does not
contain “dog”?
– Which part of the sentence does “with the fork” modify?
• A path-solution problem can be reformulated as a
state-solution problem by describing a state as a partial path to
a solution.
• The question is whether that is natural or not.
Problem Characteristics
52
Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
Problem Characteristics
6.What is the role of knowledge?
l Playing Chess
Knowledge is important only to constrain the search for
a solution.
l Reading Newspaper
Knowledge is required even to be able to recognize a
solution.
53
Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
7.Does the task require human-interaction?
l Solitary problem, in which there is no intermediate
communication and no demand for an explanation of
the reasoning process.
Eg: mathematical theorems
• Conversational problem, in which intermediate
communication is to provide either additional
assistance to the computer or additional information
to the user.
Eg: medical diagnosis
Problem Characteristics
54
Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
AGENTS
Agents
● An agent is anything that can be viewed as perceiving its environment
through sensors and acting upon that environment through actuators
• Human agent:
– eyes, ears, and other organs for sensors;
– hands, legs, mouth, and other body parts for actuators
• Robotic agent:
– cameras and infrared range finders for sensors
– various motors for actuators
56
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
● Intelligent Agent
● Rationality and Rational Agent
● Performance Measures
● Rationality and Performance
● Flexibility and Intelligent Agents
● Task environment and its properties
● Types of agents.
UNIT 1 SRMIST KTR_problem and agents.pdf
UNIT 1 SRMIST KTR_problem and agents.pdf
Rational Agent
• A rational agent is an agent which has clear preference, models
uncertainty, and acts in a way to maximize its performance measure
with all possible actions.
• A rational agent is said to perform the right things. AI is about creating
rational agents to use for game theory and decision theory for various
real-world scenarios.
• For an AI agent, the rational action is most important because in AI
reinforcement learning algorithm, for each best possible action, agent
gets the positive reward and for each wrong action, an agent gets a
negative reward.
Rational agents
• Rationality
– Performance measuring success
– Agents prior knowledge of environment
– Actions that agent can perform
– Agent’s percept sequence to date
• Ideal Rational Agent: For each possible percept sequence, an ideal 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.
61
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
SR
M
Rationality and Performance
►Rationality is with knowledge available with the agent
►Knowledge is derived from the percept sequence to date
►Learning agent which is part of rational agent that can succeed in variety
of environments
►Rational agent should possess the following properties
►Ability to gather information
►Ability to learn from the experience
►Perform knowledge augmentation
►Autonomy
Performance measure
•The criteria that determine how successful an agent is.
•One fixed measure is not suitable for all agents
• Performance measures: Safe, fast, legal, comfortable trip, maximize
profits
• Example:
• Agent: Interactive English tutor
• Performance measure: Maximize student's score on test
• Environment: Set of students
• Actuators: Screen display (exercises, suggestions, corrections)
• Sensors: Keyboard
63
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
Flexibility
• Autonomy means “Independence”
• A system without autonomy lacks flexibility
• Equips agent to negotiate with dynamic scenario, i.e., system
should be able to adapt with the changing scenario and should
exhibit rational behaviour in the changing scenario.
• A system is autonomous if its behavior is determined by its own
experience
• An alarm that goes off at a prespecified time is not autonomous
• An alarm that goes off when smoke is sensed is autonomous
64
Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
UNIT 1 SRMIST KTR_problem and agents.pdf
Intelligent Agents
• An intelligent agent is an autonomous entity which act upon an environment
using sensors and actuators for achieving goals.
• An intelligent agent may learn from the environment to achieve their goals.
• Following are the main four rules for an AI agent:
● Rule 1: An AI agent must have the ability to perceive the environment.
● Rule 2: The observation must be used to make decisions.
● Rule 3: Decision should result in an action.
● Rule 4: The action taken by an AI agent must be a rational action.
SR
M
Intelligent Agent
►Agent - Entity that can perceive the information and act on that information to achieve the
desired outcome
►Intelligent Agent - Capable of making decisions and act most logically
►Agent Interacts with environment through sensors and actuators
Examples
1. Consider an automatic attendance system. In the system, fingerprint sensor
senses the fingerprints, actuator gives the message and the attendance is marked
for the employee corresponding to sensed fingerprint.
2. Auto door opening and closing system, a camera is used as sensor for sensing the
existence of an object. When the camera senses that a person is standing in front
of the door or near the door, it gives this input to the agent program (percepts).
Agent gives command and then the actuator opens the door.
UNIT 1 SRMIST KTR_problem and agents.pdf
PEAS Representation
PEAS is a type of model on which an AI agent works upon. When we
define an AI agent or rational agent, then we can group its properties
under PEAS representation model. It is made up of four words:
● P: Performance measure
● E: Environment
● A: Actuators
● S: Sensors
Here performance measure is the objective for the success of an agent's
behavior.
UNIT 1 SRMIST KTR_problem and agents.pdf
PEAS for self-driving cars
Let's suppose a self-driving car then PEAS representation will be:
Performance: Safety, time, legal drive, comfort
Environment: Roads, other vehicles, road signs, pedestrian
Actuators: Steering, accelerator, brake, signal, horn
Sensors: Camera, GPS, speedometer, odometer, accelerometer,
sonar.
Agents with PEAS representation
Agent Performance measure Environment Actuators Sensors
1.Medical
Diagnose
● Healthy patient
● Minimized cost
● Patient
● Hospital
● Staff
● Tests
● Treatments
Keyboard
(Entry of symptoms)
2.Vacuum Cleaner ● Cleanness
● Efficiency
● Battery life
● Security
● Room
● Table
● Wood floor
● Carpet
● Various obstacles
● Wheels
● Brushes
● Vacuum Extractor
● Camera
● Dirt detection sensor
● Cliff sensor
● Bump Sensor
● Infrared Wall Sensor
3. Part -picking
Robot
● Percentage of parts in
correct bins.
● Conveyor belt with
parts,
● Bins
● Jointed Arms
● Hand
● Camera
● Joint angle sensors.
SR
M
Types of Agents
►Types based on Complexity and functionality (Expected Intelligence) of
agent
►Complexity of the environment contributes contributes to complexity of the
agent architecture
►Types of Agents are,
►Table-driven agents
►Simple Reflex Agents
►Model-based reflex Agents
►Goal-based Agents
►Utility-based Agents
UNIT 1 SRMIST KTR_problem and agents.pdf
UNIT 1 SRMIST KTR_problem and agents.pdf
UNIT 1 SRMIST KTR_problem and agents.pdf
Simple Reflex Agent
• Simplest agent which acts according to the current percept only,
pays no attention to the rest of the percept history.
• The agent function of this type relies on the condition-action rule –
"If condition, then action."
• It makes correct decisions only if the environment is fully
observable.
• Example: iDraw, a drawing robot which converts the typed characters
into writing without storing the past data.
Simple Reflex Agent
Model-based reflex agents
• These type of agents can handle partially observable environments by
maintaining some internal states. (Agents with memory)
• The internal state depends on the percept history, which reflects at least
some of the unobserved aspects of the current state.
• Therefore, as time passes, the internal state needs to be updated which
requires two types of knowledge or information to be encoded in an agent
program i.e., the evolution of the world on its own and the effects of the
agent's actions.
Model Based Reflex Agent
Example: When a person walks in a lane, he maps the pathway in his mind.
Goal-based agents
UNIT 1 SRMIST KTR_problem and agents.pdf
Utility Based Agent
UNIT 1 SRMIST KTR_problem and agents.pdf
UNIT 1 SRMIST KTR_problem and agents.pdf
UNIT 1 SRMIST KTR_problem and agents.pdf
UNIT 1 SRMIST KTR_problem and agents.pdf
THANK YOU

More Related Content

PDF
Intelligent agents.pdf
PPTX
A star algorithms
PPTX
Heuristic search
PPTX
Ant colony optimization (aco)
PPTX
Intro to Deep Reinforcement Learning
PPTX
Brute force method
PPT
Artificial Intelligence 1 Planning In The Real World
PPTX
A* algorithm
Intelligent agents.pdf
A star algorithms
Heuristic search
Ant colony optimization (aco)
Intro to Deep Reinforcement Learning
Brute force method
Artificial Intelligence 1 Planning In The Real World
A* algorithm

What's hot (20)

PDF
Ai 03 solving_problems_by_searching
PPTX
Simulated annealing
PPTX
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기
PDF
A brief overview of Reinforcement Learning applied to games
PPT
Uniformed tree searching
PDF
Uncertain knowledge and reasoning
PPTX
Ant Colony Optimization (ACO)
PPTX
Logic programming in python
PPTX
Statistical learning
PPTX
3. planning in situational calculas
PDF
파이콘 한국 2019 튜토리얼 - LRP (Part 2)
PPTX
AI-05 Search Algorithms.pptx
PPT
Ant Colony Optimization presentation
PDF
Presentation on the artificial intelligenc
PDF
Heuristic search-in-artificial-intelligence
PDF
Deep Reinforcement Learning
PDF
인공지능 방법론 - 딥러닝 이해하기
DOC
Multiple Choice:.doc
PPTX
AI_Session 9 Hill climbing algorithm.pptx
PPTX
Convolutional Neural Network (CNN)
Ai 03 solving_problems_by_searching
Simulated annealing
딥러닝과 강화 학습으로 나보다 잘하는 쿠키런 AI 구현하기
A brief overview of Reinforcement Learning applied to games
Uniformed tree searching
Uncertain knowledge and reasoning
Ant Colony Optimization (ACO)
Logic programming in python
Statistical learning
3. planning in situational calculas
파이콘 한국 2019 튜토리얼 - LRP (Part 2)
AI-05 Search Algorithms.pptx
Ant Colony Optimization presentation
Presentation on the artificial intelligenc
Heuristic search-in-artificial-intelligence
Deep Reinforcement Learning
인공지능 방법론 - 딥러닝 이해하기
Multiple Choice:.doc
AI_Session 9 Hill climbing algorithm.pptx
Convolutional Neural Network (CNN)
Ad

Similar to UNIT 1 SRMIST KTR_problem and agents.pdf (20)

PDF
UNIT 1.pdf
PDF
Intro AI.pdf
PPT
ai.ppt
PPT
ai.ppt
PPT
Introduction to Artificial Intelligences
PPT
computer science engineering spe ialized in artificial Intelligence
PPT
PPT
EELU AI lecture 1- fall 2022-2023 - Chapter 01- Introduction.ppt
PDF
Introduction to Artificial Intelligence.pdf
PDF
Ch 1 Introduction to AI Applications.pdf
PPTX
AIArtificial intelligence (AI) is a field of computer science a
PPTX
csc384-Lecture01-Introduction_abcdpdf_pdf_to_ppt.pptx
PPTX
Lec1 introduction
PDF
Sesi 1-1 Pengantar AI.pdf
PDF
ARTIFICIAL INTELLIGENCEr.pdf
PDF
ARTIFICIAL INTELLIGENCEr.pdf
PPTX
Artificial intelligence- The science of intelligent programs
PPTX
UNIT1-AI final.pptx
PPT
Artificial intelligence Ch1
UNIT 1.pdf
Intro AI.pdf
ai.ppt
ai.ppt
Introduction to Artificial Intelligences
computer science engineering spe ialized in artificial Intelligence
EELU AI lecture 1- fall 2022-2023 - Chapter 01- Introduction.ppt
Introduction to Artificial Intelligence.pdf
Ch 1 Introduction to AI Applications.pdf
AIArtificial intelligence (AI) is a field of computer science a
csc384-Lecture01-Introduction_abcdpdf_pdf_to_ppt.pptx
Lec1 introduction
Sesi 1-1 Pengantar AI.pdf
ARTIFICIAL INTELLIGENCEr.pdf
ARTIFICIAL INTELLIGENCEr.pdf
Artificial intelligence- The science of intelligent programs
UNIT1-AI final.pptx
Artificial intelligence Ch1
Ad

More from RishuRaj953240 (10)

PPTX
milankovitch cycle.pptx
PPTX
Unit 1 (2) (1).pptx
PPTX
Unit I_dany (1).pptx
PDF
ADE ALL UNITS.pdf
PDF
Unit 3.pdf
PDF
Important question.pdf
PDF
graph-theory-Slides.pdf
PPTX
PNP.pptx
PDF
BOD&COD.pdf
PDF
Object Oriented programming Using Python.pdf
milankovitch cycle.pptx
Unit 1 (2) (1).pptx
Unit I_dany (1).pptx
ADE ALL UNITS.pdf
Unit 3.pdf
Important question.pdf
graph-theory-Slides.pdf
PNP.pptx
BOD&COD.pdf
Object Oriented programming Using Python.pdf

Recently uploaded (20)

PPTX
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
PPTX
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
PDF
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
PPTX
Global journeys: estimating international migration
PDF
Launch Your Data Science Career in Kochi – 2025
PDF
Fluorescence-microscope_Botany_detailed content
PDF
Foundation of Data Science unit number two notes
PPTX
Introduction-to-Cloud-ComputingFinal.pptx
PPTX
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
PPTX
Data_Analytics_and_PowerBI_Presentation.pptx
PPTX
climate analysis of Dhaka ,Banglades.pptx
PPTX
Computer network topology notes for revision
PPT
Reliability_Chapter_ presentation 1221.5784
PPT
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
PDF
Mega Projects Data Mega Projects Data
PPT
Quality review (1)_presentation of this 21
PPTX
IBA_Chapter_11_Slides_Final_Accessible.pptx
PPTX
STUDY DESIGN details- Lt Col Maksud (21).pptx
PDF
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...
CEE 2 REPORT G7.pptxbdbshjdgsgjgsjfiuhsd
05. PRACTICAL GUIDE TO MICROSOFT EXCEL.pptx
“Getting Started with Data Analytics Using R – Concepts, Tools & Case Studies”
Global journeys: estimating international migration
Launch Your Data Science Career in Kochi – 2025
Fluorescence-microscope_Botany_detailed content
Foundation of Data Science unit number two notes
Introduction-to-Cloud-ComputingFinal.pptx
iec ppt-1 pptx icmr ppt on rehabilitation.pptx
Data_Analytics_and_PowerBI_Presentation.pptx
climate analysis of Dhaka ,Banglades.pptx
Computer network topology notes for revision
Reliability_Chapter_ presentation 1221.5784
Chapter 3 METAL JOINING.pptnnnnnnnnnnnnn
Mega Projects Data Mega Projects Data
Quality review (1)_presentation of this 21
IBA_Chapter_11_Slides_Final_Accessible.pptx
STUDY DESIGN details- Lt Col Maksud (21).pptx
22.Patil - Early prediction of Alzheimer’s disease using convolutional neural...

UNIT 1 SRMIST KTR_problem and agents.pdf

  • 2. ML and AI to build and optimize systems and also provide AI technology with new data inputs for interpretation. Artificial Intelligence
  • 3. • ML and AI to build and optimize systems and also provide AI technology with new data inputs for interpretation. • Machine learning is about extracting knowledge from data. • It is a research field at the intersection of statistics, artificial intelligence, and computer science and is also known as predictive analytics or statistical learning. • AI and ML has become ubiquitous in everyday life -commercial applications, data-driven research Artificial Intelligence
  • 6. Main reasons for AI advances • Computing power (GPU and Cloud computing) • Big data - Internet and sensors - Large datasets • Deep learning algorithms - Software - Improved techniques - Toolboxes
  • 8. What is AI? 8 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 9. Acting humanly: Turing Test • Turing (1950) "Computing machinery and intelligence": • "Can machines think?" à "Can machines behave intelligently?" • Operational test for intelligent behavior: the Imitation Game The computer would need to possess the following capabilities: • natural language processing to enable it to communicate successfully in English (or some other human language); • knowledge representation to store information provided before or during the interrogation; • automated reasoning to use the stored information to answer questions and to draw new conclusions; •machine learning to adapt to new circumstances and to detect and extrapolate patterns. To pass the total Turing Test, the computer will need • computer vision to perceive objects • robotics to move them about. 9 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 10. Thinking humanly: cognitive modeling Determining how humans think • through introspection—trying to catch our own thoughts as they go by • through psychological experiments Express the theory as a computer program • program's input/output and timing behavior matches human behavior 10 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 11. Thinking rationally: "laws of thought" • • • Aristotle: what are correct arguments/thought processes? • Several Greek schools developed various forms of logic: notation and rules of derivation for thoughts; may or may not have proceeded to the idea of mechanization Direct line through mathematics and philosophy to modern AI Problems: 1. Not all intelligent behavior is mediated by logical deliberation 2. What is the purpose of thinking? What thoughts should I have? 11 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 12. Acting rationally: rational agent • Rational behavior: doing the right thing • The right thing: that which is expected to maximize goal achievement, given the available information • An agent is just something that perceives and acts • Doesn't necessarily involve thinking – but thinking should be in the service of rational action 12 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 13. Rational agents • An agent is an entity that perceives and acts • Abstractly, an agent is a function from percept histories to actions: [f: P* à A] • For any given class of environments and tasks, we seek the agent (or class of agents) with the best performance • computational limitations make perfect rationality unachievable à design best program for given machine resources 13 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 14. History of AI • AI has roots in a number of scientific disciplines – computer science and engineering (hardware and software) – philosophy (rules of reasoning) – mathematics (logic, algorithms, optimization) – cognitive science and psychology (modeling high human/animal thinking) – neural science (model low level human/animal brain activity) – linguistics level • The birth ofAI (1943 – 1956) – McCulloch and Pitts (1943): simplified mathematical model of neurons (resting/firing states) can realize all propositional logic primitives (can compute all Turing computable functions) – Alan Turing: Turing machine and Turing test (1950) – Claude Shannon: information theory; possibility of chess playing computers – Boole, Aristotle, Euclid (logics, syllogisms) 14 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 15. • Early enthusiasm (1952 – 1969) – 1956 Dartmouth conference John McCarthy (Lisp); Marvin Minsky (first neural network machine); Alan Newell and Herbert Simon (GPS); – Emphasis on intelligent general problem solving GSP (means-ends analysis); Lisp (AI programming language); Resolution by John Robinson (basis for automatic theorem proving); heuristic search (A*, AO*, game tree search) • Emphasis on knowledge (1966 – 1974) – domain specific knowledge is the key to overcome existing difficulties – knowledge representation (KR) paradigms – declarative vs. procedural representation History of AI 15 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 16. • Knowledge-based systems (1969 – 1999) – DENDRAL: the first knowledge intensive system (determining 3D structures of complex chemical compounds) – MYCIN: first rule-based expert system (containing 450 rules for diagnosing blood infectious diseases) EMYCIN: an ES shell – PROSPECTOR: first knowledge-based system that made significant profit (geological ES for mineral deposits) • AI became an industry (1980 – 1989) – wide applications in various domains – commercially available tools – AI winter • Current trends (1990 – present) – more realistic goals – more practical (application oriented) – distributedAI and intelligent software agents – resurgence of natural computation - neural networks and emergence of genetic algorithms – many applications – dominance of machine learning (big apps) History of AI 16 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 17. State of the art • HITECH, becomes the first computer program to defeat a grandmaster in a game of chess (Arnold Denker) • A speech understanding program named PEGASUS results in a confirmed reservation that saves the traveller $894 over the regular coach fare. • MARVEL, a real-time expert system that monitors the massive stream of data transmitted by the spacecraft, handling routine tasks and alerting the analysts to more serious problems. 17 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 18. • more powerful and more useful computers • new and improved interfaces • solving new problems • better handling of information • relieves information overload • conversion of information into knowledge Advantages of Artificial Intelligence 18
  • 19. The Disadvantages • increased costs • difficulty with software development - slow and expensive • few experienced programmers • few practical products have reached the market as yet. 19
  • 20. • AI deals with a large spectrum of Problems • Applications spread across the domains, from medical to manufacturing with their own complexities • AI Deals with • Various Day-to-day Problem • Different identification and authentication problems (in security) • Classification problems in Decision-making systems • Interdependent and cross-domain problems (Such as Cyber-Physical • Systems) • The problems faced by AI is hard to resolve and also computationally AI Technique 14 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 21. AI Technique • Intelligence requires knowledge (less desirable properties) – voluminous – hard to characterize accurately – constantly changing – differ from data by being organized in a way that corresponds to the ways it will be used 21 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 22. Knowledge Representation • Generalizations-defines property • Understood by people -eg taking readings • Easily modified – correct errors and reflect changes • Used in a great many situations(even not accurate or complete) • Can be used to reduce the possibilities that must be considered(bulk to narrow) Categories of problems • Structured problems –goal state defined • Unstructured problems- goal state not known • Linear problems- based on dependent variable • Non linear problems- no dependency between variables 22 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 23. Problem • In AI, formally define a problem as • a space of all possible configurations where each configuration is called a state • The state-space is the configuration of the possible states and how they connect to each other e.g. the legal moves between states. • an initial state • one or more goal states • a set of rules/operators which move the problem from one state to the next • In some cases, we may enumerate all possible states • but usually, such an enumeration will be overwhelmingly large so we only generate a portion of the state space, the portion we are currently examining • we need to search the state-space to find an optimal path from a start state to a goal state. 17 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 24. State space: Tic-Tac-Toe Goal: Arrange in horizontal or vertical or diagonal to win 24
  • 25. State space: 8 Puzzle The 8 puzzle search space consists of 8! states (40320) 25
  • 26. Search • Search is a general algorithm that helps in finding the path in state space • The path may lead to the solution or dead end. • Control strategies- overall rules and approach towards searching i) forward search(data directed) Starts search from initial state towards goal state. Ex: locating a city from current location ii) backward search(goal directed) Search stars from goal state towards a solvable initial state. Ex: start from target city 26 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 27. Search • Strategies to explore the states • Informed search – No guarantee for solution but high probability of getting solution -heuristic approach is used to control the flow of solution path -heuristic approach is a technique based on common sense, rule of thumb, educated guesses or intuitive judgment • Uninformed search – generates all possible states in the state space and checks for the goal state. - time consuming due to large state space - used where error in the algorithm has severe consequences • Parameters for search evaluation i) completeness: Guaranteed to find a solution within finite time ii) space and time complexity: memory required and time factor needed iii) optimality and admissibility: correctness of the solution 27 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 28. Problem solving with AI Well structured problems- yield right answer or inference for an algorithm Ex: • Quadratic equation-find value of x • Speed of ball when reaches to batsman • Network flow analysis Ill structured problems-do not yield a particular answer Ex: • How to dispose wet waste safely • Security threats in big social gathering Unstructured problems- exact goal state not known(many goal states) Ex: improve life expectancy of human being Linear problems-have a solution or will not have Non Linear problems-relationship between input and output are not linear 28 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 29. 29 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 30. AI Applications • Credit granting • Information management and retrieval • AI and expert systems embedded in products • Plant layout • Help desk and assistance • Employee performance evaluation • Shipping • Marketing • Warehouse optimization • In space workstation maintainance • Satellite controls • Network developments • Nuclear management 30 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 31. AI Models Semiotic models- Based on sign process, signification or communication Statistical models- representation and formalization of relationships through statistical techniques. - History of data for decision making - uses probabilistic approaches 31 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 32. Data Acquisition and Learning Aspects in AI • Knowledge Discovery- data mining and machine learning: data-recorded facts information-pattern underlying the data data mining or knowledge discovery-extraction of meaning information. machine learning-algorithms that improve performance with experience • Computational Learning Theory(COLT)- formal mathematical models defined complexity-computation, prediction and feasibility analyze patterns-Probably Approximately Correct(PAC)-hypothesis mistake bound-target function • Neural and evolutionary computation- speed up mining of data evolutionary computing- biological properties decision making and optimization Neural computing-neural behavior of human being pattern recognition and classification 32 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 33. • Intelligent agents and multi agent systems- decision making in complex scenarios Intelligent agents –based on knowledge, available resources and perspectives multi agent systems- combination of more than one percept of intelligent agents • Multi-perspective integrated intelligence-utilizing and exploiting knowledge from different perspective Data Acquisition and Learning Aspects in AI 33 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 34. Problem Solving: Definition A problem exists when you want to get from “here” (a knowledge state) to “there” (another knowledge state) and the path is not immediately obvious. Makes optimal use of knowledge and information to select set of actions for reaching the goal. What are problems? nEveryday experiences nHow to get to the airport? nHow to study for a quiz, complete a paper, and finish a lab before recitation? nDomain specific problems nPhysics or math problems nPuzzles/games nCrossword, anagrams, chess Categories of problem solving • General purpose: means-end analysis present situation is compared with the goal to detect the difference select action that reduces the difference Ex:select the mode of transport • Special purpose-modelled for the specific problem, which have specific features Ex: classify legal document reference to particular case 34 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 35. Problem solving process • Problem solving-process of generating solutions for the given situation • Problem is defined, 1. in a context 2. has well defined objective 3. solution has set of activities 4. uses previous knowledge and domain knowledge Primary objective-problem identification 35 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 36. • Problem solving technique involves 1. problem definition 2. problem analysis and representation 3. planning 4. execution 5. evaluating solution 6. consolidating gains • A search algorithm takes a problem as input and returns a solution in the form of an action sequence. • execution phase-Once a solution is found, the actions it recommends can be carried out. Problem solving process 36 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 37. • Problem formulation is the process of deciding what actions and states to consider, and follows goal formulation. • Goal formulation-the agent may wish to decide on some other factors that affect the desirability of different ways of achieving the goal. 37 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach Formulating problems Problem types: Single-state problem-Agent knows exactly what each of its actions does and it can calculate exactly which state it will be in after any sequence of actions. Multiple-state problem-when the world is not fully accessible, the agent must reason about sets of states that it might get to, rather than single states. Contingency problem-the agent may be in need to now calculate a whole tree of actions, rather than a single action sequence in which each branch of the tree deals with a possible contingency that might arise. Exploration problem-the agent learns a "map" of the environment, which it can then use to solve subsequent problems.
  • 38. • Well-defined problems and solutions A problem is really a collection of information that the agent will use to decide what to do. Elements of a problem: 1. The initial state that the agent knows itself to be in. 2. The set of possible actions available to the agent. operator is used to denote the description of an action to reach a state. state space-the set of all states reachable from the initial state by any sequence of actions. A path in the state space is simply any sequence of actions leading from one state to another. 3. The goal test, which the agent can apply to a single state description to determine if it is a goal state. 4. A path cost function is a function that assigns a cost to a path. The output of a search algorithm is a solution, that is, a path from the initial state to a state that satisfies the goal test. 38 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach Formulating problems
  • 39. • Measuring problem-solving performance Solution is obtained or not Obtained solution is good solution or not(with a low path cost) Search cost-associated with the time and memory required to find a solution. total cost of the search is the sum of the path cost and the search cost • Choosing states and actions To decide a better solution, determine the measurement of path cost function The process of removing detail from a representation is called abstraction Formulating problems 39 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 40. • Example: Water jug problem-find out a way to empty 2 galloon jug and fill 5 galloon jug with 1 galloon of water states: Amount of water in the jugs actions: 1. empty the big jug 2. empty the small jug 3. pour water from small jug to big jug 4. . pour water from big jug to small jug Goal: 1 galloon of water in big jug and empty the small jug path cost: number of actions(minimum number of actions->better solution) Representation: jugs(b,s), where b-amount of water in bigger jug, s- b-amount of water in smaller jug initial state: (5,2) goal state: (1,0) operators: i) empty the jug ii) fill the jug Problem Formulation and Representation Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 41. • Solution: initial state: (5,2) goal state: (1,0) operators: i) empty big(remove water from big jug) ii) empty small(remove water from small jug) iii) big is empty(pour water from small jug to big jug) iv) small is empty(pour water from big jug to small jug) actions of sequence: 2,4,2,4,2 Problem Formulation and Representation 41 Parag Kulkarni, Prachi Joshi, Artificial Intelligence –Building Intelliegent Systems
  • 42. Toy problems Intended to illustrate or exercise various problem-solving methods The 8-puzzIe • 3x3 board with eight numbered tiles and a blank space. • A tile adjacent to the blank space can slide into the space. • objective-to reach the configuration shown on the right of the figure. Problem formulation: • States: a state description specifies the location of each of the eight tiles in one of the nine squares. For efficiency, it is useful to include the location of the blank. • Operators: blank moves left, right, up, or down. • Goal test: state matches the goal configuration shown in Figure. • Path cost: each step costs 1, so the path cost is just the length of the path. 36 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 43. The 8-queens problem • Place eight queens on a chessboard such that no queen attacks any other. • There are two main kinds of formulation The incremental formulation involves placing queens one by one the complete-state formulation starts with all 8 queens on the board and moves them around. • Goal test: 8 queens on board, none attacked. • Path cost: zero. There are also different possible states and operators. Consider the following for incremental formulation: • States: any arrangement of 0 to 8 queens on board. • Operators: add a queen to any square. Consider the following for complete state formulation: • States: arrangements of 8 queens, one in each column. • Operators: move any attacked queen to another square in the same column. Toy problems 43 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 44. The vacuum world • Assume that the agent knows its location and the locations of all the pieces of dirt, and the suction is still in good working order. • States: one of the eight states • Operators: move left, move right, suck. • Goal test: no dirt left in any square. • Path cost: each action costs 1. Toy problems 44 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 45. • Letters stand for digits • The aim is to find a substitution of digits for letters such that the resulting sum is arithmetically correct. • Each letter must stand for a different digit. Problem formulation: • States: a cryptarithmetic puzzle with some letters replaced by digits. • Operators: replace all occurrences of a letter with a digit not already appearing in the puzzle. • Goal test: puzzle contains only digits, and represents a correct sum. • Path cost: zero. All solutions equally valid. Toy problems Cryptarithmetic 45 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 46. Route finding • routing in computer network automated travel advisory systems airline travel planning systems. • the actions in the problem do not have completely known outcomes: flights can be late or overbooked connections can be missed fog or emergency maintenance can cause delays. • Other real world problems(refer Artificial Intelligence :A Modern Approach by Stuart J. Russell and Peter Norvig page 69) Touring and travelling salesman problem VLSI layout Robot navigation Assembly sequencing Real world problems More difficult and whose solutions people actually care about 46 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 47. Problem types and Characteristics Problem Characteristics: To choose an appropriate method for a particular Problem: • Is the problem decomposable? • Can solution steps be ignored or undone? • Is the universe predictable? • Is a good solution absolute or relative? • Is the solution a state or a path? • What is the role of knowledge? • Does the task require human-interaction? problem types single-state problem-Agent knows exactly what each of its actions does and it can calculate exactly which state it will be in after any sequence of actions. multiple-state problem-when the world is not fully accessible, the agent must reason about sets of states that it might get to, rather than single states. contingency problem-the agent may be in need to now calculate a whole tree of actions, rather than a single action sequence in which each branch of the tree deals with a possible contingency that might arise. exploration problem-the agent learns a "map" of the environment, which it can then use to solve subsequent problems. 47 Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
  • 48. 1.Is the problem decomposable? • Can the problem be broken down to smaller problems to be solved independently? • Decomposable problem can be solved easily. Ex 1:- ∫ x2 + 3x + sin2x cos 2x dx This can be done by breaking it into three smaller problems and solving each by applying specific rules. Adding the results the complete solution is obtained. Ex2: blocks world problem Problem Characteristics 48 Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
  • 49. 2. Can solution steps be ignored or undone? 1. Ignorable problems can be solved using a simple control structure that never backtracks. Ex:- theorem proving - In which solution steps can be ignored.(comment lines) 2. Recoverable problems can be solved using backtracking. Ex:- 8 puzzle- In which solution steps can be undone(backtracking and rollback) 3. Irrecoverable problems can be solved by recoverable style methods via planning Ex:- Chess- In which solution steps can’t be undone(Moves cannot be retracted.) Problem Characteristics 49 Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
  • 50. 3.Is the universe predictable? l Certain outcome-8-Puzzle Every time we make a move, we know exactly what will happen. l Uncertain outcome-Playing Bridge We cannot know exactly where all the cards are or what the other players will do on their turns. Problem Characteristics 50 Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
  • 51. Eg: Marcus was a man. Marcus was a Pompeian. Marcus was born in 40 A.D. All men are mortal. All Pompeians died when the volcano erupted in 79 A.D. No mortal lives longer than 150 years. It is now 2004 A.D. Is Marcus alive? (relative) Different reasoning paths lead to the answer. It does not matter which path we follow. The Travelling Salesman Problem (absolute) We have to try all paths to find the shortest one. • Any-path problems can be solved using heuristics that suggest good paths to explore. • For best-path problems, much more exhaustive search will be performed. Problem Characteristics 4.Is a good solution absolute or relative? 51 Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
  • 52. 5.Is the solution a state or a path? Finding a consistent intepretation “The bank president ate a dish of pasta salad with the fork”. – “bank” refers to a financial situation or to a side of a river? – “dish” or “pasta salad” was eaten? – Does “pasta salad” contain pasta, as “dog food” does not contain “dog”? – Which part of the sentence does “with the fork” modify? • A path-solution problem can be reformulated as a state-solution problem by describing a state as a partial path to a solution. • The question is whether that is natural or not. Problem Characteristics 52 Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
  • 53. Problem Characteristics 6.What is the role of knowledge? l Playing Chess Knowledge is important only to constrain the search for a solution. l Reading Newspaper Knowledge is required even to be able to recognize a solution. 53 Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
  • 54. 7.Does the task require human-interaction? l Solitary problem, in which there is no intermediate communication and no demand for an explanation of the reasoning process. Eg: mathematical theorems • Conversational problem, in which intermediate communication is to provide either additional assistance to the computer or additional information to the user. Eg: medical diagnosis Problem Characteristics 54 Kevin Night and Elaine Rich, Nair B., “Artificial Intelligence (SIE)”, Mc Graw Hill- 2008.
  • 56. Agents ● An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators • Human agent: – eyes, ears, and other organs for sensors; – hands, legs, mouth, and other body parts for actuators • Robotic agent: – cameras and infrared range finders for sensors – various motors for actuators 56 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 57. ● Intelligent Agent ● Rationality and Rational Agent ● Performance Measures ● Rationality and Performance ● Flexibility and Intelligent Agents ● Task environment and its properties ● Types of agents.
  • 60. Rational Agent • A rational agent is an agent which has clear preference, models uncertainty, and acts in a way to maximize its performance measure with all possible actions. • A rational agent is said to perform the right things. AI is about creating rational agents to use for game theory and decision theory for various real-world scenarios. • For an AI agent, the rational action is most important because in AI reinforcement learning algorithm, for each best possible action, agent gets the positive reward and for each wrong action, an agent gets a negative reward.
  • 61. Rational agents • Rationality – Performance measuring success – Agents prior knowledge of environment – Actions that agent can perform – Agent’s percept sequence to date • Ideal Rational Agent: For each possible percept sequence, an ideal 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. 61 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 62. SR M Rationality and Performance ►Rationality is with knowledge available with the agent ►Knowledge is derived from the percept sequence to date ►Learning agent which is part of rational agent that can succeed in variety of environments ►Rational agent should possess the following properties ►Ability to gather information ►Ability to learn from the experience ►Perform knowledge augmentation ►Autonomy
  • 63. Performance measure •The criteria that determine how successful an agent is. •One fixed measure is not suitable for all agents • Performance measures: Safe, fast, legal, comfortable trip, maximize profits • Example: • Agent: Interactive English tutor • Performance measure: Maximize student's score on test • Environment: Set of students • Actuators: Screen display (exercises, suggestions, corrections) • Sensors: Keyboard 63 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 64. Flexibility • Autonomy means “Independence” • A system without autonomy lacks flexibility • Equips agent to negotiate with dynamic scenario, i.e., system should be able to adapt with the changing scenario and should exhibit rational behaviour in the changing scenario. • A system is autonomous if its behavior is determined by its own experience • An alarm that goes off at a prespecified time is not autonomous • An alarm that goes off when smoke is sensed is autonomous 64 Stuart J. Russell, Peter Norwig , Artificial Intelligence –A Modern approach
  • 66. Intelligent Agents • An intelligent agent is an autonomous entity which act upon an environment using sensors and actuators for achieving goals. • An intelligent agent may learn from the environment to achieve their goals. • Following are the main four rules for an AI agent: ● Rule 1: An AI agent must have the ability to perceive the environment. ● Rule 2: The observation must be used to make decisions. ● Rule 3: Decision should result in an action. ● Rule 4: The action taken by an AI agent must be a rational action.
  • 67. SR M Intelligent Agent ►Agent - Entity that can perceive the information and act on that information to achieve the desired outcome ►Intelligent Agent - Capable of making decisions and act most logically ►Agent Interacts with environment through sensors and actuators
  • 68. Examples 1. Consider an automatic attendance system. In the system, fingerprint sensor senses the fingerprints, actuator gives the message and the attendance is marked for the employee corresponding to sensed fingerprint. 2. Auto door opening and closing system, a camera is used as sensor for sensing the existence of an object. When the camera senses that a person is standing in front of the door or near the door, it gives this input to the agent program (percepts). Agent gives command and then the actuator opens the door.
  • 70. PEAS Representation PEAS is a type of model on which an AI agent works upon. When we define an AI agent or rational agent, then we can group its properties under PEAS representation model. It is made up of four words: ● P: Performance measure ● E: Environment ● A: Actuators ● S: Sensors Here performance measure is the objective for the success of an agent's behavior.
  • 72. PEAS for self-driving cars Let's suppose a self-driving car then PEAS representation will be: Performance: Safety, time, legal drive, comfort Environment: Roads, other vehicles, road signs, pedestrian Actuators: Steering, accelerator, brake, signal, horn Sensors: Camera, GPS, speedometer, odometer, accelerometer, sonar.
  • 73. Agents with PEAS representation Agent Performance measure Environment Actuators Sensors 1.Medical Diagnose ● Healthy patient ● Minimized cost ● Patient ● Hospital ● Staff ● Tests ● Treatments Keyboard (Entry of symptoms) 2.Vacuum Cleaner ● Cleanness ● Efficiency ● Battery life ● Security ● Room ● Table ● Wood floor ● Carpet ● Various obstacles ● Wheels ● Brushes ● Vacuum Extractor ● Camera ● Dirt detection sensor ● Cliff sensor ● Bump Sensor ● Infrared Wall Sensor 3. Part -picking Robot ● Percentage of parts in correct bins. ● Conveyor belt with parts, ● Bins ● Jointed Arms ● Hand ● Camera ● Joint angle sensors.
  • 74. SR M Types of Agents ►Types based on Complexity and functionality (Expected Intelligence) of agent ►Complexity of the environment contributes contributes to complexity of the agent architecture ►Types of Agents are, ►Table-driven agents ►Simple Reflex Agents ►Model-based reflex Agents ►Goal-based Agents ►Utility-based Agents
  • 78. Simple Reflex Agent • Simplest agent which acts according to the current percept only, pays no attention to the rest of the percept history. • The agent function of this type relies on the condition-action rule – "If condition, then action." • It makes correct decisions only if the environment is fully observable. • Example: iDraw, a drawing robot which converts the typed characters into writing without storing the past data.
  • 80. Model-based reflex agents • These type of agents can handle partially observable environments by maintaining some internal states. (Agents with memory) • The internal state depends on the percept history, which reflects at least some of the unobserved aspects of the current state. • Therefore, as time passes, the internal state needs to be updated which requires two types of knowledge or information to be encoded in an agent program i.e., the evolution of the world on its own and the effects of the agent's actions.
  • 81. Model Based Reflex Agent Example: When a person walks in a lane, he maps the pathway in his mind.