SlideShare a Scribd company logo
1 of 31
Problem Solving
K. HariNath
Assistant Professor,
Department of IT,
MGIT
Problem Solving Agent
• Type of Goal Based Agent
• Uses Atomic Representation
• Planning Agents
• Problem solving begins with
– Precise Definitions of Problems and their
Solutions
– Give several examples to illustrate these
Definitions
2/20/2021 2
MGIT-HARINATH
Problem Solving Agents
• Intelligent agents are supposed to
maximize their performance measure.
• Problem-Solving Agents: find sequence of
actions that achieve goals.
• In this section we will use a map as an
example, if you take fast look you can
deduce that each node represents a city,
and the cost to travel from a city to
another is denoted by the number over
the edge connecting the nodes of those 2
cities.
• In order for an agent to solve a problem it
should pass by 2 phases of formulation:
2/20/2021 3
MGIT-HARINATH
Continued..
Goal Formulation:
• Problem solving is about having a goal we want to reach, (i.e:
I want to travel from ‘A’ to ‘E’).
• Goals have the advantage of limiting the objectives the agent
is trying to achieve.
• Goal is a set of environment states in which our goal is
satisfied.
Problem Formulation:
• A problem formulation is about deciding what actions and
states to consider given a Goal.
• Describe our states as “in(CITYNAME)”
• Where CITYNAME is the name of the city in which we are
currently in.
2/20/2021 4
MGIT-HARINATH
Continued..
• Once our agent has found the sequence of cities it should
pass by to reach its goal it should start following this
sequence.
• The process of finding such sequence is called Search.
• A Search Algorithm is like a black box which takes
problem as input returns a solution.
• Once the solution is found the sequence of actions it
recommends is carried out and this is what is called the
execution phase.
• Simple Design (formulate, search, execute) for the
Problem Solving Agent.
2/20/2021 5
MGIT-HARINATH
2/20/2021 6
MGIT-HARINATH
Formulate the Problem
• A problem can be defined formally by 5
components:
–Initial State
–Description of Possible Actions
–Transition Model
–Goal Test
–Path Cost
2/20/2021 7
MGIT-HARINATH
Continued...
• Initial State:
– The state from which our agents start solving the
Problem.
• Description of Possible Actions:
– Given State S, ACTION(S) returns set of actions that
can be executed in S.
• Transition Model:
– Description of what each action does
– RESULT(S,a)-returns the state that results from doing
action a on State S.
2/20/2021 8
MGIT-HARINATH
Continued...
• State Space
– Initial State
– Actions
– Transition Model
• State Space forms a Directed Network or
Graph.
• Path in State Space.
2/20/2021 9
MGIT-HARINATH
Continued...
• Goal Test:
– Determines whether a given state is a Goal State.
• Path Cost:
– Path Cost function that assigns numeric cost to
each path.
– Problem Solving Agent chooses a cost function
that reflects its own Performance Measure.
– Optimal Solution
2/20/2021 10
MGIT-HARINATH
Example Problems
• Vaccum Agent:
2/20/2021 11
MGIT-HARINATH
Vaccum Agent
2/20/2021 12
MGIT-HARINATH
8 Puzzle Problem
2/20/2021 13
MGIT-HARINATH
2/20/2021 14
MGIT-HARINATH
Continued...
2/20/2021 15
MGIT-HARINATH
8-Queens Problem
■ States: ???
■ Initial State: ???
■ Successor Function: ???
■ Goal Test: ???
2/20/2021 16
MGIT-HARINATH
8 Queens Problem & N Queens Problem
2/20/2021 17
MGIT-HARINATH
Touring Problems
2/20/2021 18
MGIT-HARINATH
Formulate Problem(Travelling)
2/20/2021 19
MGIT-HARINATH
Searching for Solutions
• After formulating our problem it must be solved.
• Searching through the state space for a solution, this
search will be applied on a search tree or generally a
graph that is generated using the initial state and the
Successor Function.
• Searching is applied to a search tree which is generated
through state expansion.
• Applying the Successor Function to the current state.
• Generally, search is about selecting an option and putting
the others aside for later in case the first option does not
lead to a solution.
• The choice of which option to expand first is determined
by the Search Strategy used.
2/20/2021 20
MGIT-HARINATH
Continued...
• Root Node- Initial State
• Branches- Actions
• Nodes-States in State Space of the Problem
• Steps
– Test Whether this is a Goal State.
– Expand Current State by applying legal action to
current state.
• Frontier- Set of all Leaf Nodes available for
expansion.
2/20/2021 21
MGIT-HARINATH
Tree- Search & Graph-Search Algorithms
2/20/2021 22
MGIT-HARINATH
Infrastructure for Search Algorithms
• For each Node n, four components
– n.STATE: State in State Space to which node
corresponds.
– n.PARENT: Node in search tree that generated this
node.
– n.ACTION: Action applied to Parent to generate
the node.
– n.PATH-COST: Cost(g(n)) of path from initial state
to the node.
2/20/2021 23
MGIT-HARINATH
Example Node
2/20/2021 MGIT-HARINATH 24
Measuring Problem-Solving Performance
• Search as a black box will result in an output that is
either failure or a solution.
• Search algorithm’s performance is evaluated in four
ways:
– Completeness:is it guaranteed that our algorithm always finds a
solution when there is one?
– Optimality: Does our algorithm always find the optimal solution?
– Timecomplexity: How much time our search algorithm takes to find a
solution?
– Space complexity: How much memory required to run the search
algorithm?
• Time and Space in complexity analysis are measured
with respect to the number of nodes the problem
graph has in terms of asymptotic notations.
2/20/2021 MGIT-HARINATH 25
Continued...
• In AI, complexity is expressed by
three factors b, d and m:
– b the branching factor is the maximum
number of successors of any node.
– d the depth of the deepest goal.
– m the maximum length of any path in the
state space.
2/20/2021 MGIT-HARINATH 26
RECAP
2/20/2021 27
MGIT-HARINATH
Recap
• Before an agent can start searching for
solutions, a goal must be identified and a well
defined problem must be formulated.
• A problem consists of five parts: the initial
state, a set of actions, a transition model
describing the results of those actions, a goal
test function, and a path cost function.
• The environment of the problem is
represented by a state space. A path through
the state space from the initial state to a goal
state is a solution.
• Search algorithms are judged on the basis of
completeness, optimality, time complexity,
and space complexity. Complexity depends on
b, the branching factor in the state space, and
d, the depth of the shallowest solution.
2/20/2021 28
MGIT-HARINATH
Problem solving
• We want:
• To automatically solve a problem
• We need:
• A representation of the problem
• Algorithms that use some strategy
to solve the problem defined in
that representation
2/20/2021 29
MGIT-HARINATH
Problem representation
• General:
• State space: a problem is divided into a set
of resolution steps from the initial state to
the goal state
• Reduction to sub-problems: a problem is
arranged into a hierarchy of sub-problems
• Specific:
• Game resolution
• Constraints satisfaction
2/20/2021 MGIT-HARINATH 30
Thank You
2/20/2021 MGIT-HARINATH 31

More Related Content

Similar to Final-AI-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...
KrishnaVeni451953
 
02 problem solving_search_control
02 problem solving_search_control02 problem solving_search_control
02 problem solving_search_control
Praveen Kumar
 
Final Presentation - Edan&Itzik
Final Presentation - Edan&ItzikFinal Presentation - Edan&Itzik
Final Presentation - Edan&Itzik
itzik cohen
 
gis project planning and management
gis project planning and managementgis project planning and management
gis project planning and management
Abhiram Kanigolla
 
CTM - 04 - Development of Network - Copy.pptx
CTM - 04 - Development of Network  - Copy.pptxCTM - 04 - Development of Network  - Copy.pptx
CTM - 04 - Development of Network - Copy.pptx
RaoAnkitYadav1
 
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
PalGov
 

Similar to Final-AI-Problem Solving.pdf (20)

Using PySpark to Scale Markov Decision Problems for Policy Exploration
Using PySpark to Scale Markov Decision Problems for Policy ExplorationUsing PySpark to Scale Markov Decision Problems for Policy Exploration
Using PySpark to Scale Markov Decision Problems for Policy Exploration
 
Head First Reinforcement Learning
Head First Reinforcement LearningHead First Reinforcement Learning
Head First Reinforcement Learning
 
An efficient use of temporal difference technique in Computer Game Learning
An efficient use of temporal difference technique in Computer Game LearningAn efficient use of temporal difference technique in Computer Game Learning
An efficient use of temporal difference technique in Computer Game Learning
 
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...
 
Popular search algorithms
Popular search algorithmsPopular search algorithms
Popular search algorithms
 
Artificial intelligence(04)
Artificial intelligence(04)Artificial intelligence(04)
Artificial intelligence(04)
 
02 problem solving_search_control
02 problem solving_search_control02 problem solving_search_control
02 problem solving_search_control
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
A brief study on linear programming solving methods
A brief study on linear programming solving methodsA brief study on linear programming solving methods
A brief study on linear programming solving methods
 
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
3.AILec5nkjnkjnkjnkjnkjnjhuhgvkjhbkhj-6.ppt
 
Final Presentation - Edan&Itzik
Final Presentation - Edan&ItzikFinal Presentation - Edan&Itzik
Final Presentation - Edan&Itzik
 
Lecture 07 search techniques
Lecture 07 search techniquesLecture 07 search techniques
Lecture 07 search techniques
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
 
gis project planning and management
gis project planning and managementgis project planning and management
gis project planning and management
 
AI-03 Problems State Space.pptx
AI-03 Problems State Space.pptxAI-03 Problems State Space.pptx
AI-03 Problems State Space.pptx
 
CTM - 04 - Development of Network - Copy.pptx
CTM - 04 - Development of Network  - Copy.pptxCTM - 04 - Development of Network  - Copy.pptx
CTM - 04 - Development of Network - Copy.pptx
 
CH4_AI_Lecture.ppt
CH4_AI_Lecture.pptCH4_AI_Lecture.ppt
CH4_AI_Lecture.ppt
 
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
 
Lesson 22
Lesson 22Lesson 22
Lesson 22
 
AI Lesson 22
AI Lesson 22AI Lesson 22
AI Lesson 22
 

Recently uploaded

Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Kandungan 087776558899
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
ssuser89054b
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
pritamlangde
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
HenryBriggs2
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Introduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdfIntroduction to Data Visualization,Matplotlib.pdf
Introduction to Data Visualization,Matplotlib.pdf
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptxHOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
HOA1&2 - Module 3 - PREHISTORCI ARCHITECTURE OF KERALA.pptx
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
NO1 Top No1 Amil Baba In Azad Kashmir, Kashmir Black Magic Specialist Expert ...
 
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best ServiceTamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
Tamil Call Girls Bhayandar WhatsApp +91-9930687706, Best Service
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Digital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptxDigital Communication Essentials: DPCM, DM, and ADM .pptx
Digital Communication Essentials: DPCM, DM, and ADM .pptx
 
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
scipt v1.pptxcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
 
Moment Distribution Method For Btech Civil
Moment Distribution Method For Btech CivilMoment Distribution Method For Btech Civil
Moment Distribution Method For Btech Civil
 
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
Call Girls in South Ex (delhi) call me [🔝9953056974🔝] escort service 24X7
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 

Final-AI-Problem Solving.pdf

  • 1. Problem Solving K. HariNath Assistant Professor, Department of IT, MGIT
  • 2. Problem Solving Agent • Type of Goal Based Agent • Uses Atomic Representation • Planning Agents • Problem solving begins with – Precise Definitions of Problems and their Solutions – Give several examples to illustrate these Definitions 2/20/2021 2 MGIT-HARINATH
  • 3. Problem Solving Agents • Intelligent agents are supposed to maximize their performance measure. • Problem-Solving Agents: find sequence of actions that achieve goals. • In this section we will use a map as an example, if you take fast look you can deduce that each node represents a city, and the cost to travel from a city to another is denoted by the number over the edge connecting the nodes of those 2 cities. • In order for an agent to solve a problem it should pass by 2 phases of formulation: 2/20/2021 3 MGIT-HARINATH
  • 4. Continued.. Goal Formulation: • Problem solving is about having a goal we want to reach, (i.e: I want to travel from ‘A’ to ‘E’). • Goals have the advantage of limiting the objectives the agent is trying to achieve. • Goal is a set of environment states in which our goal is satisfied. Problem Formulation: • A problem formulation is about deciding what actions and states to consider given a Goal. • Describe our states as “in(CITYNAME)” • Where CITYNAME is the name of the city in which we are currently in. 2/20/2021 4 MGIT-HARINATH
  • 5. Continued.. • Once our agent has found the sequence of cities it should pass by to reach its goal it should start following this sequence. • The process of finding such sequence is called Search. • A Search Algorithm is like a black box which takes problem as input returns a solution. • Once the solution is found the sequence of actions it recommends is carried out and this is what is called the execution phase. • Simple Design (formulate, search, execute) for the Problem Solving Agent. 2/20/2021 5 MGIT-HARINATH
  • 7. Formulate the Problem • A problem can be defined formally by 5 components: –Initial State –Description of Possible Actions –Transition Model –Goal Test –Path Cost 2/20/2021 7 MGIT-HARINATH
  • 8. Continued... • Initial State: – The state from which our agents start solving the Problem. • Description of Possible Actions: – Given State S, ACTION(S) returns set of actions that can be executed in S. • Transition Model: – Description of what each action does – RESULT(S,a)-returns the state that results from doing action a on State S. 2/20/2021 8 MGIT-HARINATH
  • 9. Continued... • State Space – Initial State – Actions – Transition Model • State Space forms a Directed Network or Graph. • Path in State Space. 2/20/2021 9 MGIT-HARINATH
  • 10. Continued... • Goal Test: – Determines whether a given state is a Goal State. • Path Cost: – Path Cost function that assigns numeric cost to each path. – Problem Solving Agent chooses a cost function that reflects its own Performance Measure. – Optimal Solution 2/20/2021 10 MGIT-HARINATH
  • 11. Example Problems • Vaccum Agent: 2/20/2021 11 MGIT-HARINATH
  • 13. 8 Puzzle Problem 2/20/2021 13 MGIT-HARINATH
  • 16. 8-Queens Problem ■ States: ??? ■ Initial State: ??? ■ Successor Function: ??? ■ Goal Test: ??? 2/20/2021 16 MGIT-HARINATH
  • 17. 8 Queens Problem & N Queens Problem 2/20/2021 17 MGIT-HARINATH
  • 20. Searching for Solutions • After formulating our problem it must be solved. • Searching through the state space for a solution, this search will be applied on a search tree or generally a graph that is generated using the initial state and the Successor Function. • Searching is applied to a search tree which is generated through state expansion. • Applying the Successor Function to the current state. • Generally, search is about selecting an option and putting the others aside for later in case the first option does not lead to a solution. • The choice of which option to expand first is determined by the Search Strategy used. 2/20/2021 20 MGIT-HARINATH
  • 21. Continued... • Root Node- Initial State • Branches- Actions • Nodes-States in State Space of the Problem • Steps – Test Whether this is a Goal State. – Expand Current State by applying legal action to current state. • Frontier- Set of all Leaf Nodes available for expansion. 2/20/2021 21 MGIT-HARINATH
  • 22. Tree- Search & Graph-Search Algorithms 2/20/2021 22 MGIT-HARINATH
  • 23. Infrastructure for Search Algorithms • For each Node n, four components – n.STATE: State in State Space to which node corresponds. – n.PARENT: Node in search tree that generated this node. – n.ACTION: Action applied to Parent to generate the node. – n.PATH-COST: Cost(g(n)) of path from initial state to the node. 2/20/2021 23 MGIT-HARINATH
  • 25. Measuring Problem-Solving Performance • Search as a black box will result in an output that is either failure or a solution. • Search algorithm’s performance is evaluated in four ways: – Completeness:is it guaranteed that our algorithm always finds a solution when there is one? – Optimality: Does our algorithm always find the optimal solution? – Timecomplexity: How much time our search algorithm takes to find a solution? – Space complexity: How much memory required to run the search algorithm? • Time and Space in complexity analysis are measured with respect to the number of nodes the problem graph has in terms of asymptotic notations. 2/20/2021 MGIT-HARINATH 25
  • 26. Continued... • In AI, complexity is expressed by three factors b, d and m: – b the branching factor is the maximum number of successors of any node. – d the depth of the deepest goal. – m the maximum length of any path in the state space. 2/20/2021 MGIT-HARINATH 26
  • 28. Recap • Before an agent can start searching for solutions, a goal must be identified and a well defined problem must be formulated. • A problem consists of five parts: the initial state, a set of actions, a transition model describing the results of those actions, a goal test function, and a path cost function. • The environment of the problem is represented by a state space. A path through the state space from the initial state to a goal state is a solution. • Search algorithms are judged on the basis of completeness, optimality, time complexity, and space complexity. Complexity depends on b, the branching factor in the state space, and d, the depth of the shallowest solution. 2/20/2021 28 MGIT-HARINATH
  • 29. Problem solving • We want: • To automatically solve a problem • We need: • A representation of the problem • Algorithms that use some strategy to solve the problem defined in that representation 2/20/2021 29 MGIT-HARINATH
  • 30. Problem representation • General: • State space: a problem is divided into a set of resolution steps from the initial state to the goal state • Reduction to sub-problems: a problem is arranged into a hierarchy of sub-problems • Specific: • Game resolution • Constraints satisfaction 2/20/2021 MGIT-HARINATH 30