SlideShare a Scribd company logo
1 of 21
AI3391 ARTIFICAL INTELLIGENCE
(II YEAR (III Sem))
Department of Artificial Intelligence and Data Science
Session 5
by
Asst.Prof.M.Gokilavani
NIET
11/14/2023 Department of AI & DS 1
TEXTBOOK:
• Artificial Intelligence A modern Approach, Third Edition, Stuart
Russell and Peter Norvig, Pearson Education.
REFERENCES:
• Artificial Intelligence, 3rd Edn, E. Rich and K.Knight (TMH).
• Artificial Intelligence, 3rd Edn, Patrick Henny Winston, Pearson
Education.
• Artificial Intelligence, Shivani Goel, Pearson Education.
• Artificial Intelligence and Expert Systems- Patterson, Pearson
Education.
11/14/2023 Department of CSE (AI/ML) 2
Topics covered in session 5
11/14/2023 Department of CSE (AI/ML) 3
Unit I: Intelligent Agent
• Introduction to AI
• Agents and Environments
• Concept of Rationality
• Nature of environment
• Structure of Agents
• Problem solving agents
• Search Algorithm
• Uniform search Algorithm
Problem-solving agent
• An important application of Artificial
Intelligence is Problem Solving.
• Define problem statement first.
• Generating the solution by keeping the
different condition in mind.
• Searching is the most commonly used
technique of problem solving in artificial
intelligence.
• Problem solving agent: A problem-
solving agent is a goal-driven agent and
focuses on satisfying the goal.
11/14/2023 Department of CSE (AI/ML) 4
Problem Solving by Searching
Why Reflex agent is not used in AI?
• Base their actions on
• A direct mapping from states to actions
• But cannot work well in environments
• which this mapping would be too large to store
• would take too long to learn
• Hence, goal-based agent is used.
Problem-solving agent
• A kind of goal-based agent
• It solves problem by
• finding sequences of actions that lead to desirable states (goals).
• To solve a problem,
• the first step is the goal formulation, based on the current situation.
11/14/2023 Department of CSE (AI/ML) 5
Step perform by problem solving agent
11/14/2023 Department of CSE (AI/ML) 6
Goal Formulation
• The goal is formulated
• as a set of world states, in which the goal is satisfied
• Reaching from initial state  goal state
• Actions are required
• Actions are the operators
• causing transitions between world states
• Actions should be abstract enough at a certain degree, instead of
very detailed.
• E.g., turn left VS turn left 30 degree, etc.
11/14/2023 Department of CSE (AI/ML) 7
Problem formulation
• The process of deciding
• what actions and states to consider
• E.g., driving Amman  Zarqa
• In-between states and actions defined
• States: Some places in Amman & Zarqa
• Actions: Turn left, Turn right, go straight, accelerate & brake, etc.
11/14/2023 Department of CSE (AI/ML) 8
Search Algorithm
• Because there are many ways to achieve the same goal
• Those ways are together expressed as a tree
• Multiple options of unknown value at a point,
• The agent can examine different possible sequences of actions, and
choose the best
• This process of looking for the best sequence is called search.
• The best sequence is then a list of actions, called solution.
• Defined as
• taking a problem
• and returns a solution
• Once a solution is found
• the agent follows the solution
• and carries out the list of actions – execution phase
• Design of an agent
• “Formulate, search, execute”
11/14/2023 Department of CSE (AI/ML) 9
Well defined problems and solutions
A problem can be defined formally by five components:
• The initial state that the agent starts in. State Space
• A description of the possible actions available to the agent.
• A description of what each action does; the formal name for this is the
transition model.
• The goal test, which determines whether a given state is a goal state.
Sometimes there is an explicit set of possible goal states, and the test
simply checks whether the given state is one of them.
• A path cost function that assigns a numeric cost to each path. The
problem-solving agent chooses a cost function that reflects its own
performance measure.
11/14/2023 Department of CSE (AI/ML) 10
11/14/2023 Department of CSE (AI/ML) 11
Example : Romania
11/14/2023 Department of CSE (AI/ML) 12
Example: Romania
• On holiday in Romania; currently in Arad.
• Flight leaves tomorrow from Bucharest
• Formulate goal:
• be in Bucharest
• Formulate problem:
• states: various cities
• actions: drive between cities
• Find solution:
• sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest
11/14/2023 Department of CSE (AI/ML) 13
Example Problems
• Toy problems
• those intended to illustrate or exercise various problem-solving methods
• E.g., puzzle, chess, etc.
• Real-world problems
• Tend to be more difficult and whose solutions people actually care about
• E.g., Design, planning, etc.
11/14/2023 Department of CSE (AI/ML) 14
Toy Problem
Number of states: 8
Initial state: Any
Number of actions: 4
left, right, suck,
noOperation
Goal: clean up all dirt
Goal states: {7, 8}
Path Cost:
Each step costs 1
11/14/2023 Department of CSE (AI/ML) 15
11/14/2023 Department of CSE (AI/ML) 16
8 Puzzle Problem
• State: A state description specifies the location of each of the eight
tiles and the blank in one of the nine squares.
• Initial state: Any state can be designated as the initial state.
• Actions: The simplest formulation defines the actions as movements
of the blank space Left, Right, Up, or Down. Different subsets of these
are possible depending on where the blank is. Goal State Initial State
11/14/2023 Department of CSE (AI/ML) 17
8 Puzzle Problem
• Transition model: Given a state and action, this returns the resulting
state.
• Goal test: This check whether the state matches the goal
configuration. (Other goal configurations are possible.)
• Path cost: Each step costs 1, so the path cost is the number of steps in
the path. Goal State Initial State.
Conclusion:
• the right formulation makes a big difference to the size of the
search space
11/14/2023 Department of CSE (AI/ML) 18
8 Puzzle Problem
The goal of the 8-queens problem is to place
eight queens on a chess-board such that no
queen attacks any other.
• States: Any arrangement of 0 to 8 queens
on the board is a state.
• Initial state: No queens on the board.
• Actions: Add a queen to any empty
square.
• Transition model: Returns the board with
a queen added to the specified square.
• Goal test: 8 queens are on the board, none
attacked.
11/14/2023 Department of CSE (AI/ML) 19
11/14/2023 Department of CSE (AI/ML) 20
Topics to be covered in next session 6
• Search algorithms
11/14/2023 Department of CSE (AI/ML) 21
Thank you!!!

More Related Content

Similar to AI3391 ARTIFICAL INTELLIGENCE Session 5 Problem Solving Agent and searching for solutions.pptx

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
 
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
 

Similar to AI3391 ARTIFICAL INTELLIGENCE Session 5 Problem Solving Agent and searching for solutions.pptx (20)

AI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptxAI_Session 10 Local search in continious space.pptx
AI_Session 10 Local search in continious space.pptx
 
Artificial intelligence(04)
Artificial intelligence(04)Artificial intelligence(04)
Artificial intelligence(04)
 
AI_Session 29 Graphplan algorithm.pptx
AI_Session 29 Graphplan algorithm.pptxAI_Session 29 Graphplan algorithm.pptx
AI_Session 29 Graphplan algorithm.pptx
 
AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...AI_Session 11: searching with Non-Deterministic Actions and partial observati...
AI_Session 11: searching with Non-Deterministic Actions and partial observati...
 
AI3391 ARTIFICIAL INTELLIGENCE Session 7 Uniformed search strategies.pptx
AI3391 ARTIFICIAL INTELLIGENCE Session 7 Uniformed search strategies.pptxAI3391 ARTIFICIAL INTELLIGENCE Session 7 Uniformed search strategies.pptx
AI3391 ARTIFICIAL INTELLIGENCE Session 7 Uniformed search strategies.pptx
 
3 probsolver edited.ppt
3 probsolver edited.ppt3 probsolver edited.ppt
3 probsolver edited.ppt
 
chapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdfchapter 2 Problem Solving.pdf
chapter 2 Problem Solving.pdf
 
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
 
Problem Solving
Problem Solving Problem Solving
Problem Solving
 
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
 
Lecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptxLecture 3 Problem Solving.pptx
Lecture 3 Problem Solving.pptx
 
AI3391 ARTIFICIAL INTELLIGENCE Session 8 Iterative deepening DFS and Bidirect...
AI3391 ARTIFICIAL INTELLIGENCE Session 8 Iterative deepening DFS and Bidirect...AI3391 ARTIFICIAL INTELLIGENCE Session 8 Iterative deepening DFS and Bidirect...
AI3391 ARTIFICIAL INTELLIGENCE Session 8 Iterative deepening DFS and Bidirect...
 
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
 
AI3391 ARTIFICIAL INTELLIGENCE Session 2 Types of Agent .pptx
AI3391 ARTIFICIAL INTELLIGENCE Session 2 Types of Agent .pptxAI3391 ARTIFICIAL INTELLIGENCE Session 2 Types of Agent .pptx
AI3391 ARTIFICIAL INTELLIGENCE Session 2 Types of Agent .pptx
 
Planning
Planning Planning
Planning
 
Final-AI-Problem Solving.pdf
Final-AI-Problem Solving.pdfFinal-AI-Problem Solving.pdf
Final-AI-Problem Solving.pdf
 
State Representation Learning for control: an overview
State Representation Learning for control: an overviewState Representation Learning for control: an overview
State Representation Learning for control: an overview
 
Lecture 3 problem solving
Lecture 3   problem solvingLecture 3   problem solving
Lecture 3 problem solving
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
AI_Session 2 Types of AI agent.pptx
AI_Session 2 Types of AI agent.pptxAI_Session 2 Types of AI agent.pptx
AI_Session 2 Types of AI agent.pptx
 

More from Asst.prof M.Gokilavani

More from Asst.prof M.Gokilavani (20)

CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
IT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdfIT8073_Information Security_UNIT I _.pdf
IT8073_Information Security_UNIT I _.pdf
 
IT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notesIT8073 _Information Security _UNIT I Full notes
IT8073 _Information Security _UNIT I Full notes
 
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdfGE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
GE3151 PSPP UNIT IV QUESTION BANK.docx.pdf
 
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdfGE3151 PSPP UNIT III QUESTION BANK.docx.pdf
GE3151 PSPP UNIT III QUESTION BANK.docx.pdf
 
GE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdfGE3151 UNIT II Study material .pdf
GE3151 UNIT II Study material .pdf
 
GE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdfGE3151 PSPP All unit question bank.pdf
GE3151 PSPP All unit question bank.pdf
 
GE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _NotesGE3151_PSPP_All unit _Notes
GE3151_PSPP_All unit _Notes
 
GE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_NotesGE3151_PSPP_UNIT_5_Notes
GE3151_PSPP_UNIT_5_Notes
 
GE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_NotesGE3151_PSPP_UNIT_4_Notes
GE3151_PSPP_UNIT_4_Notes
 
GE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_NotesGE3151_PSPP_UNIT_3_Notes
GE3151_PSPP_UNIT_3_Notes
 
GE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_NotesGE3151_PSPP_UNIT_2_Notes
GE3151_PSPP_UNIT_2_Notes
 
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdfAI3391 Artificial intelligence Unit IV Notes _ merged.pdf
AI3391 Artificial intelligence Unit IV Notes _ merged.pdf
 
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdfAI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
AI3391 Artificial intelligence Session 29 Forward and backward chaining.pdf
 
AI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptxAI3391 Artificial intelligence Session 28 Resolution.pptx
AI3391 Artificial intelligence Session 28 Resolution.pptx
 
AI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptxAI3391 Artificial intelligence session 27 inference and unification.pptx
AI3391 Artificial intelligence session 27 inference and unification.pptx
 
AI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptxAI3391 Artificial Intelligence Session 26 First order logic.pptx
AI3391 Artificial Intelligence Session 26 First order logic.pptx
 

Recently uploaded

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
Kamal Acharya
 
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
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
Epec Engineered Technologies
 
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)

Hospital management system project report.pdf
Hospital management system project report.pdfHospital management system project report.pdf
Hospital management system project report.pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...Basic Electronics for diploma students as per technical education Kerala Syll...
Basic Electronics for diploma students as per technical education Kerala Syll...
 
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
 
Employee leave management system project.
Employee leave management system project.Employee leave management system project.
Employee leave management system project.
 
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptxS1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
S1S2 B.Arch MGU - HOA1&2 Module 3 -Temple Architecture of Kerala.pptx
 
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...Max. shear stress theory-Maximum Shear Stress Theory ​  Maximum Distortional ...
Max. shear stress theory-Maximum Shear Stress Theory ​ Maximum Distortional ...
 
Signal Processing and Linear System Analysis
Signal Processing and Linear System AnalysisSignal Processing and Linear System Analysis
Signal Processing and Linear System Analysis
 
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
 
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
457503602-5-Gas-Well-Testing-and-Analysis-pptx.pptx
 
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
Online electricity billing project report..pdf
Online electricity billing project report..pdfOnline electricity billing project report..pdf
Online electricity billing project report..pdf
 
Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
Ground Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth ReinforcementGround Improvement Technique: Earth Reinforcement
Ground Improvement Technique: Earth Reinforcement
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
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
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 

AI3391 ARTIFICAL INTELLIGENCE Session 5 Problem Solving Agent and searching for solutions.pptx

  • 1. AI3391 ARTIFICAL INTELLIGENCE (II YEAR (III Sem)) Department of Artificial Intelligence and Data Science Session 5 by Asst.Prof.M.Gokilavani NIET 11/14/2023 Department of AI & DS 1
  • 2. TEXTBOOK: • Artificial Intelligence A modern Approach, Third Edition, Stuart Russell and Peter Norvig, Pearson Education. REFERENCES: • Artificial Intelligence, 3rd Edn, E. Rich and K.Knight (TMH). • Artificial Intelligence, 3rd Edn, Patrick Henny Winston, Pearson Education. • Artificial Intelligence, Shivani Goel, Pearson Education. • Artificial Intelligence and Expert Systems- Patterson, Pearson Education. 11/14/2023 Department of CSE (AI/ML) 2
  • 3. Topics covered in session 5 11/14/2023 Department of CSE (AI/ML) 3 Unit I: Intelligent Agent • Introduction to AI • Agents and Environments • Concept of Rationality • Nature of environment • Structure of Agents • Problem solving agents • Search Algorithm • Uniform search Algorithm
  • 4. Problem-solving agent • An important application of Artificial Intelligence is Problem Solving. • Define problem statement first. • Generating the solution by keeping the different condition in mind. • Searching is the most commonly used technique of problem solving in artificial intelligence. • Problem solving agent: A problem- solving agent is a goal-driven agent and focuses on satisfying the goal. 11/14/2023 Department of CSE (AI/ML) 4
  • 5. Problem Solving by Searching Why Reflex agent is not used in AI? • Base their actions on • A direct mapping from states to actions • But cannot work well in environments • which this mapping would be too large to store • would take too long to learn • Hence, goal-based agent is used. Problem-solving agent • A kind of goal-based agent • It solves problem by • finding sequences of actions that lead to desirable states (goals). • To solve a problem, • the first step is the goal formulation, based on the current situation. 11/14/2023 Department of CSE (AI/ML) 5
  • 6. Step perform by problem solving agent 11/14/2023 Department of CSE (AI/ML) 6
  • 7. Goal Formulation • The goal is formulated • as a set of world states, in which the goal is satisfied • Reaching from initial state  goal state • Actions are required • Actions are the operators • causing transitions between world states • Actions should be abstract enough at a certain degree, instead of very detailed. • E.g., turn left VS turn left 30 degree, etc. 11/14/2023 Department of CSE (AI/ML) 7
  • 8. Problem formulation • The process of deciding • what actions and states to consider • E.g., driving Amman  Zarqa • In-between states and actions defined • States: Some places in Amman & Zarqa • Actions: Turn left, Turn right, go straight, accelerate & brake, etc. 11/14/2023 Department of CSE (AI/ML) 8
  • 9. Search Algorithm • Because there are many ways to achieve the same goal • Those ways are together expressed as a tree • Multiple options of unknown value at a point, • The agent can examine different possible sequences of actions, and choose the best • This process of looking for the best sequence is called search. • The best sequence is then a list of actions, called solution. • Defined as • taking a problem • and returns a solution • Once a solution is found • the agent follows the solution • and carries out the list of actions – execution phase • Design of an agent • “Formulate, search, execute” 11/14/2023 Department of CSE (AI/ML) 9
  • 10. Well defined problems and solutions A problem can be defined formally by five components: • The initial state that the agent starts in. State Space • A description of the possible actions available to the agent. • A description of what each action does; the formal name for this is the transition model. • The goal test, which determines whether a given state is a goal state. Sometimes there is an explicit set of possible goal states, and the test simply checks whether the given state is one of them. • A path cost function that assigns a numeric cost to each path. The problem-solving agent chooses a cost function that reflects its own performance measure. 11/14/2023 Department of CSE (AI/ML) 10
  • 11. 11/14/2023 Department of CSE (AI/ML) 11
  • 12. Example : Romania 11/14/2023 Department of CSE (AI/ML) 12
  • 13. Example: Romania • On holiday in Romania; currently in Arad. • Flight leaves tomorrow from Bucharest • Formulate goal: • be in Bucharest • Formulate problem: • states: various cities • actions: drive between cities • Find solution: • sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest 11/14/2023 Department of CSE (AI/ML) 13
  • 14. Example Problems • Toy problems • those intended to illustrate or exercise various problem-solving methods • E.g., puzzle, chess, etc. • Real-world problems • Tend to be more difficult and whose solutions people actually care about • E.g., Design, planning, etc. 11/14/2023 Department of CSE (AI/ML) 14
  • 15. Toy Problem Number of states: 8 Initial state: Any Number of actions: 4 left, right, suck, noOperation Goal: clean up all dirt Goal states: {7, 8} Path Cost: Each step costs 1 11/14/2023 Department of CSE (AI/ML) 15
  • 16. 11/14/2023 Department of CSE (AI/ML) 16
  • 17. 8 Puzzle Problem • State: A state description specifies the location of each of the eight tiles and the blank in one of the nine squares. • Initial state: Any state can be designated as the initial state. • Actions: The simplest formulation defines the actions as movements of the blank space Left, Right, Up, or Down. Different subsets of these are possible depending on where the blank is. Goal State Initial State 11/14/2023 Department of CSE (AI/ML) 17
  • 18. 8 Puzzle Problem • Transition model: Given a state and action, this returns the resulting state. • Goal test: This check whether the state matches the goal configuration. (Other goal configurations are possible.) • Path cost: Each step costs 1, so the path cost is the number of steps in the path. Goal State Initial State. Conclusion: • the right formulation makes a big difference to the size of the search space 11/14/2023 Department of CSE (AI/ML) 18
  • 19. 8 Puzzle Problem The goal of the 8-queens problem is to place eight queens on a chess-board such that no queen attacks any other. • States: Any arrangement of 0 to 8 queens on the board is a state. • Initial state: No queens on the board. • Actions: Add a queen to any empty square. • Transition model: Returns the board with a queen added to the specified square. • Goal test: 8 queens are on the board, none attacked. 11/14/2023 Department of CSE (AI/ML) 19
  • 20. 11/14/2023 Department of CSE (AI/ML) 20
  • 21. Topics to be covered in next session 6 • Search algorithms 11/14/2023 Department of CSE (AI/ML) 21 Thank you!!!