39 views

Uploaded by Ravish Mehta

notes for ai

save

- 09
- math mmicroteach 1 pdf
- Command
- Heurstic
- Richard D. Tomko (A/K/A Richard Tomko) et al.//// School Ethics Commission, 6-9-11,Part 1
- Overview of Tesseract OCR Engine
- Cryptarithmetic
- Polya Model (strategic problem solving)
- 05509685
- Artificial Neural Networks in the Simulation of a Real Scene
- Power system stabilizers
- 09 Informed Search (1)
- Output2_hard Soft Skilling-charting Your Career Path_optional Course Syllabus
- _RbfZc3xaFow
- Pathfinding Concepts
- Leadership Skills
- Self Made U Preview
- sbst referral form 2014-2015
- Assignment Brief Employability and Professional Development (1)
- design of p and pi controllers for quasi linear systems
- OLPCMEMO4
- EC6405-Control Systems Engineering_2.pdf
- Problem Solving
- ATL Operation Manual Handbook
- 5th
- sdarticle4.pdf
- kes technology education 6-8
- Classroom Assessment Techniques
- Coaching Model: Melinda Stettler Genius In You
- How to Read a CS-EE Research Paper Folleto
- The Unwinding: An Inner History of the New America
- Yes Please
- Sapiens: A Brief History of Humankind
- The Innovators: How a Group of Hackers, Geniuses, and Geeks Created the Digital Revolution
- Dispatches from Pluto: Lost and Found in the Mississippi Delta
- Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future
- Devil in the Grove: Thurgood Marshall, the Groveland Boys, and the Dawn of a New America
- John Adams
- The Prize: The Epic Quest for Oil, Money & Power
- The Emperor of All Maladies: A Biography of Cancer
- A Heartbreaking Work Of Staggering Genius: A Memoir Based on a True Story
- Grand Pursuit: The Story of Economic Genius
- This Changes Everything: Capitalism vs. The Climate
- The New Confessions of an Economic Hit Man
- Team of Rivals: The Political Genius of Abraham Lincoln
- Smart People Should Build Things: How to Restore Our Culture of Achievement, Build a Path for Entrepreneurs, and Create New Jobs in America
- The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers
- Rise of ISIS: A Threat We Can't Ignore
- The World Is Flat 3.0: A Brief History of the Twenty-first Century
- Bad Feminist: Essays
- Angela's Ashes: A Memoir
- Steve Jobs
- How To Win Friends and Influence People
- Extremely Loud and Incredibly Close: A Novel
- The Sympathizer: A Novel (Pulitzer Prize for Fiction)
- The Silver Linings Playbook: A Novel
- Leaving Berlin: A Novel
- The Light Between Oceans: A Novel
- The Incarnations: A Novel
- You Too Can Have a Body Like Mine: A Novel
- The Love Affairs of Nathaniel P.: A Novel
- Life of Pi
- Brooklyn: A Novel
- The Flamethrowers: A Novel
- The Rosie Project: A Novel
- The Blazing World: A Novel
- We Are Not Ourselves: A Novel
- The First Bad Man: A Novel
- Bel Canto
- The Master
- A Man Called Ove: A Novel
- Beautiful Ruins: A Novel
- The Kitchen House: A Novel
- Interpreter of Maladies
- The Wallcreeper
- The Art of Racing in the Rain: A Novel
- Wolf Hall: A Novel
- The Cider House Rules
- A Prayer for Owen Meany: A Novel
- The Perks of Being a Wallflower
- The Bonfire of the Vanities: A Novel
- Lovers at the Chameleon Club, Paris 1932: A Novel
- Little Bee: A Novel

You are on page 1of 26

)

Problem Solving: State-Space Search and Control Strategies

Objectives

• Identify problem-solving methods for AI problems. • Solve given problems by using the appropriate general purpose and search methods.

2

Types of Problem Solving Methods • General purpose • Special purpose 3 .

General Problem Solving • Production system – Start (initial) state(s) – Goal (final) state(s) – Databases with knowledge representation schemes – Production rules – Control strategies 4 .

0) – Goal state: (4. – Start state: (0. where X is the gallons of water in the 5-g jug and Y is the gallons in the 3-gallon (3-g) jug.State-Space Problems: Water Jug • Problem: – Two jugs.N) for any value of N ≤ 3 5 . with no measuring marker – Unlimited water supply through a tap – Need 4 gallons of water in the 5-gallon (5-g) jug • Solution: – Describe state space as a set of ordered pairs of integers (X.Y). of 5 gallons and 3 gallons.

State-Space Problems: Water Jug • Discuss: – Possible operations that can be used in the water jug problem – Production rules corresponding to these operations – Possible solution paths for the problem 6 .

– If the cannibals outnumber the missionaries on the same side. 7 .State-Space Problems: Missionaries and Cannibals • Problem: – Three cannibals and three missionaries want to cross a river. – A boat for one or two persons exists on one side of the river. the missionaries will be eaten. – How should they use the boat to cross the river without anyone being eaten? The cannibals should not outnumber the missionaries.

1B].n1+n2 = 3. mC. 0B]. -]. m1C.[n2M.State-Space Problems: Missionaries and Cannibals • Solution: – State space can be described as a set of ordered pairs of the left and right banks (L. m is the number of cannibals C and B represents the boat. 3C.n2 (≠0) ≥ m2. m2C. 1B means that the boat is present and 0B means it is absent – Any state: ([n1M.R) of the river.[0M.0C.[3M. B]. – Start state: ([3M. 0B]). 3C. 1B]) 8 . where n is the number of missionaries M. with constraints/conditions at any state as n1 (≠0) ≥ m1. 0C. boat can be either side – Goal state: ([0M. m1+m2 = 3. – Each bank can be represented as a list [nM.-]).

9 .State-Space Problems: Missionaries and Cannibals • Discuss: – Possible production rules that can be used for the problem. – Possible solution paths.

10 . • Approach: Apply the appropriate operator to transfer one state of a problem to another state.State-Space Search • Components of state space – A set S containing the start states of the problem – A set G containing goal states of the problem – Set of nodes in a graph/tree representing the states in a problem-solving process – Set of arcs connecting the nodes • Solution path: Path through the graph from a node in S to a node in G.

respectively.State-Space Search • Determine the possible search space algorithm and tree of nodes in a graph for the missionaries and cannibals problem: – Assume that: • State (L : R). or (331:000) • Goal state: (0M0C0B : 3M3C1B). or (000:331) 11 . • Start state: (3M3C1B : 0M0C0B). where L = n1M m1C1B and R = n2Mm2C0B • B represents the boat with 1 or 0 indicating its presence or absence.

Exercise: Eight-Puzzle Problem • Problem: – A 3x3 grid has 8 randomly numbered (1 to 8) tiles with one empty cell. – At any point. an adjacent tiles can move to this cell and create a new empty cell. as per the following figure. 3 5 7 1 Start State 6 2 5 3 6 7 4 1 Goal State 2 8 4 8 12 . – Arrange the tiles to arrive at the goal state from the start state. by using the state-space search method.

Control Strategies • Systematic control strategies: – Depth-first – Breadth-first • Types of search strategies: – Forward chaining – Data-driven search from the start date – Backward chaining – Goal-driven search from the goal state 13 .

– Requirement for absolute or relative solution. – Consistency of the knowledge base to be used to solve the problem.Characteristics of Problems • Characteristics of problems to be considered to determine the search strategy and solution path for a given problem: – Type of problem – Ignorable. recoverable or irrecoverable. – Decomposability of problem. 14 . – Role of knowledge.

Exhaustive Searches • • • • Breadth-first search Depth-first search Depth-first iterative deepening Bidirectional search 15 .

– Time required to find a solution by using the algorithm.Choosing Effective Search Methods • Measure the effectiveness of a search strategy in terms of: – Completeness of search algorithm for a solution. – Space required by the algorithm to find a solution. 16 . – Optimality of the algorithm.

17 .Choosing Effective Search Methods (Cont’d) • Analyze the effectiveness of the exhaustive search methods discussed earlier.

– Prepare a graph to depict the problem and determine possible solution paths. Take hypothetical values for the number of cities and the distance between the cities. 18 .Exercise: Choosing Effective Search Methods • Solve the traveling salesman problem by using the appropriate search method: – Find the shortest route that a salesman should take to visit all cities once and return to the starting point.

Heuristic Search Techniques • General-purpose heuristics. • Best-first search. • Hill climbing. • Beam search. 19 . • A* algorithm. • Branch and bound search (uniform cost search).

Iterative-Deepening A* (IDA*) 5 1st iteration (Threshold = 5) 6 x 8 xx 5 2nd iteration (Threshold = 6) 6 4 4 8 xx 9 xx 7 x 3rd iteration (Threshold = 7) 5 9 xx 5 6 5 8 xx 4 7 x 4 4 8 9 4 Goal 4 8 xx xx 20 xx Sample Working of IDA* .

for each i. – A set of constraints between the values of the variables. x2. 1 ≤ i ≤ n. • Represent the problem as a unidirectional graph – the Constraint graph – in which the nodes are the variables and the edges are binary constraints. a value of xi € Di where all constraints are satisfied.Constraint Satisfaction • Constraint satisfaction (CS) problems are aimed at satisfying a given set of constraints. • You need to find. …. • Such problems have: – A set of variables {x1. 21 . xn} with each xi € Di with possible values.

Constraint Satisfaction Problems : Examples • Examples of constraint satisfaction problems: – Cryptography: A number puzzle where a group of arithmetic operations has some or all digits replaced by letters and the original digits must be found – for example: B + G B A A A M S L E E L S – N-Queen: Given the condition that no two queens on the same row/column/diagonal attack each other. red and black. 22 . colour three regions in blue. such that no two neighbouring regions have the same colour. – Map colouring: Given a map.

23 .Solved Example: Crypt-Arithmetic Puzzle • Solve the solution for the following crypt-arithmetic puzzle with your faculty: B + G B A A A M S L E E L S • Assign a unique number from 0-9 to each letter that satisfies the above addition.

Initial problem state: G = ?. several choices for rules may apply. A useful heuristics can help to select the best rule to apply first. At each cycle. which will in turn generate new constraints at the next cycle. A = >?. L = ? Apply constraint inference rules to generate new constraints. M = ?. choose another rule to generate another assignment. Apply the letter assignment rules to perform all assignments required by the current set of constraints. E = ?. Then. S = ?. • • 24 . B = ?.Solved Example: Crypt-Arithmetic Puzzle (Cont’d) • • • • Constraints: No two letters should have the same values.

25 .Summary • Discuss your key learning from this session.

based on your learning in this session. 26 .Exercises • Attempt the given exercises for Chapter 2 of the Artificial Intelligence book.

- 09Uploaded byVarun Bhan
- math mmicroteach 1 pdfUploaded byapi-300244603
- CommandUploaded bydawadhali
- HeursticUploaded byChirag Vaja
- Richard D. Tomko (A/K/A Richard Tomko) et al.//// School Ethics Commission, 6-9-11,Part 1Uploaded bytpuran
- Overview of Tesseract OCR EngineUploaded byrrs_1988
- CryptarithmeticUploaded bymenonharsh
- Polya Model (strategic problem solving)Uploaded bysiti nurdiyana
- 05509685Uploaded byTales Marques
- Artificial Neural Networks in the Simulation of a Real SceneUploaded byMaciek Gorywoda
- Power system stabilizersUploaded byPavan Kumar
- 09 Informed Search (1)Uploaded byhariprasathk
- Output2_hard Soft Skilling-charting Your Career Path_optional Course SyllabusUploaded byNicolae Olivia
- _RbfZc3xaFowUploaded bydavibrasil123
- Pathfinding ConceptsUploaded bykingtrue11
- Leadership SkillsUploaded bynishasaiyed2304
- Self Made U PreviewUploaded byMg Win
- sbst referral form 2014-2015Uploaded byapi-202232251
- Assignment Brief Employability and Professional Development (1)Uploaded bychandni0810
- design of p and pi controllers for quasi linear systemsUploaded byAhmad Rahan
- OLPCMEMO4Uploaded byCynthia Solomon
- EC6405-Control Systems Engineering_2.pdfUploaded bySaravanan Pazapughal
- Problem SolvingUploaded bymashhood
- ATL Operation Manual HandbookUploaded byvivektonapi
- 5thUploaded bySunayana Gali
- sdarticle4.pdfUploaded byrs0004
- kes technology education 6-8Uploaded byapi-293974193
- Classroom Assessment TechniquesUploaded byGina Ramsay
- Coaching Model: Melinda Stettler Genius In YouUploaded byCoach Campus
- How to Read a CS-EE Research Paper FolletoUploaded byMatthew Addison