1 / 9

CIT 856 – Artificial Intelligence

CIT 856 – Artificial Intelligence. State Space Search: Water Jug Problem. State Space Search: Water Jug Problem. “You are given two jugs, a 4-litre one and a 3-litre one. Neither has any measuring markers on it. There is a pump that can be used to fill the jugs with water. How

jessie
Download Presentation

CIT 856 – Artificial Intelligence

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CIT 856 – Artificial Intelligence State Space Search: Water Jug Problem Powered by DeSiaMore

  2. State Space Search: Water Jug Problem “You are given two jugs, a 4-litre one and a 3-litre one. Neither has any measuring markers on it. There is a pump that can be used to fill the jugs with water. How can you get exactly 2 litres of water into 4-litre jug.” Powered by DeSiaMore

  3. State Space Search: Water Jug Problem • State: (x, y) x = 0, 1, 2, 3, or 4 y = 0, 1, 2, 3 • Start state: (0, 0). • Goal state: (2, n) for any n. • Attempting to end up in a goal state. Powered by DeSiaMore

  4. State Space Search: Water Jug Problem • (x, y) (4, y) if x  4 2. (x, y) (x, 3) if y  3 3. (x, y) (x  d, y) if x  0 4. (x, y) (x, y  d) if y  0 Powered by DeSiaMore

  5. State Space Search: Water Jug Problem 5. (x, y) (0, y) if x  0 6. (x, y) (x, 0) if y  0 7. (x, y) (4, y  (4  x)) if x  y  4, y  0 8. (x, y) (x  (3  y), 3) if x  y  3, x  0 Powered by DeSiaMore

  6. State Space Search: Water Jug Problem 9. (x, y) (x  y, 0) if x  y  4, y  0 10. (x, y) (0, x  y) if x  y  3, x  0 11. (0, 2) (2, 0) 12. (2, y) (0, y) Powered by DeSiaMore

  7. State Space Search: Water Jug Problem • current state = (0, 0) 2.Loop until reaching the goal state (2, 0) -Apply a rule whose left side matches the current state - Set the new current state to be the resulting state (0, 0) (0, 3) (3, 0) (3, 3) (4, 2) (0, 2) (2, 0) Powered by DeSiaMore

  8. State Space Search: Water Jug Problem The role of the condition in the left side of a rule restrict the application of the rule  more efficient 1. (x, y) (4, y) if x  4 2. (x, y) (x, 3) if y  3 Powered by DeSiaMore

  9. State Space Search: Water Jug Problem Special-purpose rules to capture special-case knowledge that can be used at some stage in solving a problem 11. (0, 2) (2, 0) 12. (2, y) (0, y) Powered by DeSiaMore

More Related