SlideShare a Scribd company logo
Artificial Intelligence
Problem-Solving Agent
• In which we look at how an agent can decide
what to do by systematically considering the
outcomes of various sequences of actions that
it might take.
- Stuart Russell & Peter Norvig
3
Problem solving agent
• A kind of Goal-based agent.
• Decide what to do by searching sequences of
actions that lead to desirable states.
Problem Definition
• Initial state : starting point
• Operator: description of an action
• State space: all states reachable from the initial state
by any sequence action
• Path: sequence of actions leading from one state to
another
• Goal test: which the agent can apply to a single state
description to determine if it is a goal state
• Path cost function: assign a cost to a path which the
sum of the costs of the individual actions along the
path.
What is Search?
• Search is the systematic examination of states to find
path from the start/root state to the goal state.
• The set of possible states, together
with operators defining their connectivity the search
space.
• 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.
• In real life search usually results from a lack of
knowledge. In AI too search is merely a offensive
instrument with which to attack problems that we can't
seem to solve any better way.
Search groups
Search techniques fall into three groups:
1. Methods which find any start - goal path,
2. Methods which find the best path,
3. Search methods in the face of opponent.
Search
• An agent with several immediate options of
unknown value can decide what to do by first
examining different possible sequences of
actions that lead to states of known value, and
then choosing the best one. This process is
called search.
• A search-algorithm takes a problem as input
and returns a solution in the form of an action
sequence.
Problem formulation
• What are the possible states of the world
relevant for solving the problem?
• What information is accessible to the agent?
• How can the agent progress from state to
state?
• Follows goal-formulation.
Well-defined problems and solutions
• A problem is a collection of information that the agent will use
to decide what to do.
• Information needed to define a problem:
– The initial state that the agent knows itself to be in.
– The set of possible actions available to the agent.
• Operator denotes the description of an action in terms
of which state will be reached by carrying out the
action in a particular state.
• Also called Successor function S. Given a particular
state x, S (x) returns the set of states reachable from x by
any single action.
State space and
a path
• State space is the set of all states reachable
from the initial state by any sequence of
actions.
• Path in the state space is simply any sequence
of actions leading from one state to another.
Search Space Definitions
• Problem formulation
– Describe a general problem as a search problem
• Solution
– Sequence of actions that transitions the world from the initial
state to a goal state
• Solution cost (additive)
– Sum of the cost of operators
– Alternative: sum of distances, number of steps, etc.
• Search
– Process of looking for a solution
– Search algorithm takes problem as input and returns solution
– We are searching through a space of possible states
• Execution
– Process of executing sequence of actions (solution)
Goal-formulation
• What is the goal state?
• What are important characteristics of the goal
state?
• How does the agent know that it has reached
the goal?
• Are there several possible goal states?
– Are they equal or are some more preferable?
Goal
• We will consider a goal to be a set of world
states – just those states in which the goal is
satisfied.
• Actions can be viewed as causing transitions
between world states.
Looking for Parking
• Going home; need to find street parking
• Formulate Goal:
Car is parked
• Formulate Problem:
States: street with parking and car at that street
Actions: drive between street segments
• Find solution:
Sequence of street segments, ending with a street
with parking
Example Problem
Start Street
Street with
Parking
Search Example
Formulate goal: Be in
Bucharest.
Formulate problem: states
are cities, operators drive
between pairs of cities
Find solution: Find a
sequence of cities (e.g., Arad,
Sibiu, Fagaras, Bucharest)
that leads from the current
state to a state meeting the
goal condition
Problem Formulation
A search problem is defined by the
1.Initial state (e.g., Arad)
2.Operators (e.g., Arad -> Zerind, Arad -> Sibiu, etc.)
3.Goal test (e.g., at Bucharest)
4.Solution cost (e.g., path cost)
Examples (2) Vacuum World
• 8 possible world states
• 3 possible actions:
Left/Right/ Suck
• Goal: clean up all the
dirt= state(7) or
state(8)
Vacuum World
•States: S1 , S2 , S3 , S4 , S5 , S6 , S7 , S8
• Operators: Go Left , Go Right , Suck
• Goal test: no dirt left in both squares
• Path Cost: each action costs 1.
S1 S2
S3 S6 S5 S4
S7 S8
Example Problems – Eight Puzzle
States: tile locations
Initial state: one specific tile configuration
Operators: move blank tile left, right, up, or
down
Goal: tiles are numbered from one to eight
around the square
Path cost: cost of 1 per move (solution cost
same as number of most or path length)
Eight Puzzle
http://mypuzzle.org/sliding
Single-State problem and
Multiple-States problem
• World is accessible  agent’s sensors give
enough information about which state it is in
(so, it knows what each of its action does),
then it calculate exactly which state it will be
after any sequence of actions. Single-State
problem
• world is inaccessible  agent has limited
access to the world state, so it may have no
sensors at all. It knows only that initial state is
one of the set {1,2,3,4,5,6,7,8}. Multiple-
States problem
Think of the graph defined as follows:
– the nodes denote descriptions of a state of the world, e.g.,
which blocks are on top of what in a blocks scene, and
where the links represent actions that change from one
state to the other.
– A path through such a graph (from a start node to a goal
node) is a "plan of action" to achieve some desired goal
state from some known starting state. It is this type of
graph that is of more general interest in AI.
Searching for Solutions
Visualize Search Space as a Tree
• States are nodes
• Actions are edges
• Initial state is root
• Solution is path
from root to goal
node
• Edges sometimes
have associated
costs
• States resulting
from operator are
children
Directed graphs
• A graph is also a set of nodes connected
by links but where loops are allowed and
a node can have multiple parents.
• We have two kinds of graphs to deal with:
directed graphs, where the links have
direction (one-way streets).
Undirected graphs
• undirected graphs where the links go
both ways. You can think of an undirected
graph as shorthand for a graph with
directed links going each way between
connected nodes.
Searching for solutions:
Graphs or trees
• The map of all paths within a state-space is
a graph of nodes which are connected by links.
• Now if we trace out all possible paths through the graph,
and terminate paths before they return to nodes already
visited on that path, we produce a search tree.
• Like graphs, trees have nodes, but they are linked
by branches.
• The start node is called the root and nodes at the other
ends are leaves.
• Nodes have generations of descendents.
• The aim of search is not to produce complete physical trees
in memory, but rather explore as little of the virtual tree
looking for root-goal paths.
Search Problem Example (as a tree)
(start: Arad, goal: Bucharest.)

More Related Content

What's hot

Adversarial search
Adversarial searchAdversarial search
Adversarial search
Dheerendra k
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
lordmwesh
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
Tekendra Nath Yogi
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptx
Asst.prof M.Gokilavani
 
Informed search
Informed searchInformed search
Informed search
Amit Kumar Rathi
 
Adversarial search
Adversarial searchAdversarial search
Adversarial searchNilu Desai
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
Kapil Dahal
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
Amey Kerkar
 
Truth management system
Truth  management systemTruth  management system
Truth management system
Mohammad Kamrul Hasan
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
Sajan Sahu
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
JenishaR1
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
Kirti Verma
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
Jismy .K.Jose
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
Bablu Shofi
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learning
Subrat Panda, PhD
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
grinu
 
Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithm
Hema Kashyap
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
vikas dhakane
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
vikas dhakane
 

What's hot (20)

Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
Game Playing in Artificial Intelligence
Game Playing in Artificial IntelligenceGame Playing in Artificial Intelligence
Game Playing in Artificial Intelligence
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
AI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptxAI_Session 7 Greedy Best first search algorithm.pptx
AI_Session 7 Greedy Best first search algorithm.pptx
 
Informed search
Informed searchInformed search
Informed search
 
Adversarial search
Adversarial searchAdversarial search
Adversarial search
 
Uninformed Search technique
Uninformed Search techniqueUninformed Search technique
Uninformed Search technique
 
Informed and Uninformed search Strategies
Informed and Uninformed search StrategiesInformed and Uninformed search Strategies
Informed and Uninformed search Strategies
 
Truth management system
Truth  management systemTruth  management system
Truth management system
 
Artificial intelligence and knowledge representation
Artificial intelligence and knowledge representationArtificial intelligence and knowledge representation
Artificial intelligence and knowledge representation
 
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdfUNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
UNIT - I PROBLEM SOLVING AGENTS and EXAMPLES.pptx.pdf
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
 
Heuristc Search Techniques
Heuristc Search TechniquesHeuristc Search Techniques
Heuristc Search Techniques
 
Uninformed search
Uninformed searchUninformed search
Uninformed search
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learning
 
Heuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligenceHeuristic search-in-artificial-intelligence
Heuristic search-in-artificial-intelligence
 
Lecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithmLecture 17 Iterative Deepening a star algorithm
Lecture 17 Iterative Deepening a star algorithm
 
I. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithmI. Hill climbing algorithm II. Steepest hill climbing algorithm
I. Hill climbing algorithm II. Steepest hill climbing algorithm
 
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
I.INFORMED SEARCH IN ARTIFICIAL INTELLIGENCE II. HEURISTIC FUNCTION IN AI III...
 

Similar to Artificial intelligence(04)

Popular search algorithms
Popular search algorithmsPopular search algorithms
Popular search algorithms
Minakshi Atre
 
3 probsolver edited.ppt
3 probsolver edited.ppt3 probsolver edited.ppt
3 probsolver edited.ppt
HenokGetachew15
 
CH2_AI_Lecture1.ppt
CH2_AI_Lecture1.pptCH2_AI_Lecture1.ppt
CH2_AI_Lecture1.ppt
AhmedNURHUSIEN
 
Problem solving in Artificial Intelligence.pptx
Problem solving in Artificial Intelligence.pptxProblem solving in Artificial Intelligence.pptx
Problem solving in Artificial Intelligence.pptx
kitsenthilkumarcse
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
AndrewKuziwakwasheMu
 
Lecture 3 problem solving
Lecture 3   problem solvingLecture 3   problem solving
Lecture 3 problem solving
Vajira Thambawita
 
chapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfchapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdf
MeghaGupta952452
 
Problem Solving Agents decide what to do by finding a sequence of actions tha...
Problem Solving Agents decide what to do by finding a sequence of actions tha...Problem Solving Agents decide what to do by finding a sequence of actions tha...
Problem Solving Agents decide what to do by finding a sequence of actions tha...
KrishnaVeni451953
 
chapterThree.pptx
chapterThree.pptxchapterThree.pptx
chapterThree.pptx
chalachew5
 
Search-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdfSearch-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdf
MrRRThirrunavukkaras
 
ProblemSolving(L-2).pdf
ProblemSolving(L-2).pdfProblemSolving(L-2).pdf
ProblemSolving(L-2).pdf
AQSA SHAHID
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptx
Yousef Aburawi
 
Search problems in Artificial Intelligence
Search problems in Artificial IntelligenceSearch problems in Artificial Intelligence
Search problems in Artificial Intelligence
ananth
 
AI-03 Problems State Space.pptx
AI-03 Problems State Space.pptxAI-03 Problems State Space.pptx
AI-03 Problems State Space.pptx
Pankaj Debbarma
 
Lecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligenceLecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligence
mohsinwaseer1
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchPalGov
 
Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed search
HamzaJaved64
 
Lecture 07 search techniques
Lecture 07 search techniquesLecture 07 search techniques
Lecture 07 search techniques
Hema Kashyap
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
NivethaS35
 
artificial intelligence document final.pptx
artificial intelligence document final.pptxartificial intelligence document final.pptx
artificial intelligence document final.pptx
thahaxaina025
 

Similar to Artificial intelligence(04) (20)

Popular search algorithms
Popular search algorithmsPopular search algorithms
Popular search algorithms
 
3 probsolver edited.ppt
3 probsolver edited.ppt3 probsolver edited.ppt
3 probsolver edited.ppt
 
CH2_AI_Lecture1.ppt
CH2_AI_Lecture1.pptCH2_AI_Lecture1.ppt
CH2_AI_Lecture1.ppt
 
Problem solving in Artificial Intelligence.pptx
Problem solving in Artificial Intelligence.pptxProblem solving in Artificial Intelligence.pptx
Problem solving in Artificial Intelligence.pptx
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
 
Lecture 3 problem solving
Lecture 3   problem solvingLecture 3   problem solving
Lecture 3 problem solving
 
chapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfchapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdf
 
Problem Solving Agents decide what to do by finding a sequence of actions tha...
Problem Solving Agents decide what to do by finding a sequence of actions tha...Problem Solving Agents decide what to do by finding a sequence of actions tha...
Problem Solving Agents decide what to do by finding a sequence of actions tha...
 
chapterThree.pptx
chapterThree.pptxchapterThree.pptx
chapterThree.pptx
 
Search-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdfSearch-Beyond-Classical-no-exercise-answers.pdf
Search-Beyond-Classical-no-exercise-answers.pdf
 
ProblemSolving(L-2).pdf
ProblemSolving(L-2).pdfProblemSolving(L-2).pdf
ProblemSolving(L-2).pdf
 
AI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptxAI_03_Solving Problems by Searching.pptx
AI_03_Solving Problems by Searching.pptx
 
Search problems in Artificial Intelligence
Search problems in Artificial IntelligenceSearch problems in Artificial Intelligence
Search problems in Artificial Intelligence
 
AI-03 Problems State Space.pptx
AI-03 Problems State Space.pptxAI-03 Problems State Space.pptx
AI-03 Problems State Space.pptx
 
Lecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligenceLecture is related to the topic of Artificial intelligence
Lecture is related to the topic of Artificial intelligence
 
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearchJarrar.lecture notes.aai.2011s.ch3.uniformedsearch
Jarrar.lecture notes.aai.2011s.ch3.uniformedsearch
 
Heuristic or informed search
Heuristic or informed searchHeuristic or informed search
Heuristic or informed search
 
Lecture 07 search techniques
Lecture 07 search techniquesLecture 07 search techniques
Lecture 07 search techniques
 
Heuristic search
Heuristic searchHeuristic search
Heuristic search
 
artificial intelligence document final.pptx
artificial intelligence document final.pptxartificial intelligence document final.pptx
artificial intelligence document final.pptx
 

More from Nazir Ahmed

Data structures final lecture 1
Data structures final  lecture 1Data structures final  lecture 1
Data structures final lecture 1
Nazir Ahmed
 
Data structures lecture 04
Data structures  lecture 04Data structures  lecture 04
Data structures lecture 04
Nazir Ahmed
 
Data structure
Data structureData structure
Data structure
Nazir Ahmed
 
Cover letter
Cover letterCover letter
Cover letter
Nazir Ahmed
 
Control unit design(1)
Control unit design(1)Control unit design(1)
Control unit design(1)
Nazir Ahmed
 
Computer architecture mcq (2)
Computer architecture mcq (2)Computer architecture mcq (2)
Computer architecture mcq (2)
Nazir Ahmed
 
Complete binary tree and heap
Complete binary tree and heapComplete binary tree and heap
Complete binary tree and heap
Nazir Ahmed
 
Clamper clipper(10)
Clamper clipper(10)Clamper clipper(10)
Clamper clipper(10)
Nazir Ahmed
 
Cisc mc68000
Cisc mc68000Cisc mc68000
Cisc mc68000
Nazir Ahmed
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
Nazir Ahmed
 
Chapter 07 ddl_sql
Chapter 07 ddl_sqlChapter 07 ddl_sql
Chapter 07 ddl_sql
Nazir Ahmed
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
Nazir Ahmed
 
Chapter 03
Chapter 03Chapter 03
Chapter 03
Nazir Ahmed
 
Chapter # 12 er modeling
Chapter # 12 er modelingChapter # 12 er modeling
Chapter # 12 er modeling
Nazir Ahmed
 
Chapeter 2
Chapeter 2Chapeter 2
Chapeter 2
Nazir Ahmed
 
Ch7 1 v1
Ch7 1 v1Ch7 1 v1
Ch7 1 v1
Nazir Ahmed
 
Ch07 deadlocks
Ch07 deadlocksCh07 deadlocks
Ch07 deadlocks
Nazir Ahmed
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
Nazir Ahmed
 
Ch04 threads
Ch04 threadsCh04 threads
Ch04 threads
Nazir Ahmed
 
Ch03 processes
Ch03 processesCh03 processes
Ch03 processes
Nazir Ahmed
 

More from Nazir Ahmed (20)

Data structures final lecture 1
Data structures final  lecture 1Data structures final  lecture 1
Data structures final lecture 1
 
Data structures lecture 04
Data structures  lecture 04Data structures  lecture 04
Data structures lecture 04
 
Data structure
Data structureData structure
Data structure
 
Cover letter
Cover letterCover letter
Cover letter
 
Control unit design(1)
Control unit design(1)Control unit design(1)
Control unit design(1)
 
Computer architecture mcq (2)
Computer architecture mcq (2)Computer architecture mcq (2)
Computer architecture mcq (2)
 
Complete binary tree and heap
Complete binary tree and heapComplete binary tree and heap
Complete binary tree and heap
 
Clamper clipper(10)
Clamper clipper(10)Clamper clipper(10)
Clamper clipper(10)
 
Cisc mc68000
Cisc mc68000Cisc mc68000
Cisc mc68000
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Chapter 07 ddl_sql
Chapter 07 ddl_sqlChapter 07 ddl_sql
Chapter 07 ddl_sql
 
Chapter 4
Chapter 4Chapter 4
Chapter 4
 
Chapter 03
Chapter 03Chapter 03
Chapter 03
 
Chapter # 12 er modeling
Chapter # 12 er modelingChapter # 12 er modeling
Chapter # 12 er modeling
 
Chapeter 2
Chapeter 2Chapeter 2
Chapeter 2
 
Ch7 1 v1
Ch7 1 v1Ch7 1 v1
Ch7 1 v1
 
Ch07 deadlocks
Ch07 deadlocksCh07 deadlocks
Ch07 deadlocks
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
 
Ch04 threads
Ch04 threadsCh04 threads
Ch04 threads
 
Ch03 processes
Ch03 processesCh03 processes
Ch03 processes
 

Recently uploaded

Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
AG2 Design
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
chanes7
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
amberjdewit93
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Reflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdfReflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdf
amberjdewit93
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Ashish Kohli
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
Priyankaranawat4
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 

Recently uploaded (20)

Delivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and TrainingDelivering Micro-Credentials in Technical and Vocational Education and Training
Delivering Micro-Credentials in Technical and Vocational Education and Training
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
Digital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments UnitDigital Artifact 1 - 10VCD Environments Unit
Digital Artifact 1 - 10VCD Environments Unit
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Reflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPointReflective and Evaluative Practice PowerPoint
Reflective and Evaluative Practice PowerPoint
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Reflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdfReflective and Evaluative Practice...pdf
Reflective and Evaluative Practice...pdf
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
Aficamten in HCM (SEQUOIA HCM TRIAL 2024)
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdfANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
ANATOMY AND BIOMECHANICS OF HIP JOINT.pdf
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 

Artificial intelligence(04)

  • 2. Problem-Solving Agent • In which we look at how an agent can decide what to do by systematically considering the outcomes of various sequences of actions that it might take. - Stuart Russell & Peter Norvig
  • 3. 3 Problem solving agent • A kind of Goal-based agent. • Decide what to do by searching sequences of actions that lead to desirable states.
  • 4. Problem Definition • Initial state : starting point • Operator: description of an action • State space: all states reachable from the initial state by any sequence action • Path: sequence of actions leading from one state to another • Goal test: which the agent can apply to a single state description to determine if it is a goal state • Path cost function: assign a cost to a path which the sum of the costs of the individual actions along the path.
  • 5. What is Search? • Search is the systematic examination of states to find path from the start/root state to the goal state. • The set of possible states, together with operators defining their connectivity the search space. • 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. • In real life search usually results from a lack of knowledge. In AI too search is merely a offensive instrument with which to attack problems that we can't seem to solve any better way.
  • 6. Search groups Search techniques fall into three groups: 1. Methods which find any start - goal path, 2. Methods which find the best path, 3. Search methods in the face of opponent.
  • 7. Search • An agent with several immediate options of unknown value can decide what to do by first examining different possible sequences of actions that lead to states of known value, and then choosing the best one. This process is called search. • A search-algorithm takes a problem as input and returns a solution in the form of an action sequence.
  • 8. Problem formulation • What are the possible states of the world relevant for solving the problem? • What information is accessible to the agent? • How can the agent progress from state to state? • Follows goal-formulation.
  • 9. Well-defined problems and solutions • A problem is a collection of information that the agent will use to decide what to do. • Information needed to define a problem: – The initial state that the agent knows itself to be in. – The set of possible actions available to the agent. • Operator denotes the description of an action in terms of which state will be reached by carrying out the action in a particular state. • Also called Successor function S. Given a particular state x, S (x) returns the set of states reachable from x by any single action.
  • 10. State space and a path • State space is the set of all states reachable from the initial state by any sequence of actions. • Path in the state space is simply any sequence of actions leading from one state to another.
  • 11. Search Space Definitions • Problem formulation – Describe a general problem as a search problem • Solution – Sequence of actions that transitions the world from the initial state to a goal state • Solution cost (additive) – Sum of the cost of operators – Alternative: sum of distances, number of steps, etc. • Search – Process of looking for a solution – Search algorithm takes problem as input and returns solution – We are searching through a space of possible states • Execution – Process of executing sequence of actions (solution)
  • 12. Goal-formulation • What is the goal state? • What are important characteristics of the goal state? • How does the agent know that it has reached the goal? • Are there several possible goal states? – Are they equal or are some more preferable?
  • 13. Goal • We will consider a goal to be a set of world states – just those states in which the goal is satisfied. • Actions can be viewed as causing transitions between world states.
  • 14. Looking for Parking • Going home; need to find street parking • Formulate Goal: Car is parked • Formulate Problem: States: street with parking and car at that street Actions: drive between street segments • Find solution: Sequence of street segments, ending with a street with parking
  • 16. Search Example Formulate goal: Be in Bucharest. Formulate problem: states are cities, operators drive between pairs of cities Find solution: Find a sequence of cities (e.g., Arad, Sibiu, Fagaras, Bucharest) that leads from the current state to a state meeting the goal condition
  • 17. Problem Formulation A search problem is defined by the 1.Initial state (e.g., Arad) 2.Operators (e.g., Arad -> Zerind, Arad -> Sibiu, etc.) 3.Goal test (e.g., at Bucharest) 4.Solution cost (e.g., path cost)
  • 18. Examples (2) Vacuum World • 8 possible world states • 3 possible actions: Left/Right/ Suck • Goal: clean up all the dirt= state(7) or state(8)
  • 19. Vacuum World •States: S1 , S2 , S3 , S4 , S5 , S6 , S7 , S8 • Operators: Go Left , Go Right , Suck • Goal test: no dirt left in both squares • Path Cost: each action costs 1. S1 S2 S3 S6 S5 S4 S7 S8
  • 20. Example Problems – Eight Puzzle States: tile locations Initial state: one specific tile configuration Operators: move blank tile left, right, up, or down Goal: tiles are numbered from one to eight around the square Path cost: cost of 1 per move (solution cost same as number of most or path length) Eight Puzzle http://mypuzzle.org/sliding
  • 21. Single-State problem and Multiple-States problem • World is accessible  agent’s sensors give enough information about which state it is in (so, it knows what each of its action does), then it calculate exactly which state it will be after any sequence of actions. Single-State problem • world is inaccessible  agent has limited access to the world state, so it may have no sensors at all. It knows only that initial state is one of the set {1,2,3,4,5,6,7,8}. Multiple- States problem
  • 22. Think of the graph defined as follows: – the nodes denote descriptions of a state of the world, e.g., which blocks are on top of what in a blocks scene, and where the links represent actions that change from one state to the other. – A path through such a graph (from a start node to a goal node) is a "plan of action" to achieve some desired goal state from some known starting state. It is this type of graph that is of more general interest in AI.
  • 23. Searching for Solutions Visualize Search Space as a Tree • States are nodes • Actions are edges • Initial state is root • Solution is path from root to goal node • Edges sometimes have associated costs • States resulting from operator are children
  • 24. Directed graphs • A graph is also a set of nodes connected by links but where loops are allowed and a node can have multiple parents. • We have two kinds of graphs to deal with: directed graphs, where the links have direction (one-way streets).
  • 25. Undirected graphs • undirected graphs where the links go both ways. You can think of an undirected graph as shorthand for a graph with directed links going each way between connected nodes.
  • 26. Searching for solutions: Graphs or trees • The map of all paths within a state-space is a graph of nodes which are connected by links. • Now if we trace out all possible paths through the graph, and terminate paths before they return to nodes already visited on that path, we produce a search tree. • Like graphs, trees have nodes, but they are linked by branches. • The start node is called the root and nodes at the other ends are leaves. • Nodes have generations of descendents. • The aim of search is not to produce complete physical trees in memory, but rather explore as little of the virtual tree looking for root-goal paths.
  • 27. Search Problem Example (as a tree) (start: Arad, goal: Bucharest.)