Problem solving by Searching

Slides:



Advertisements
Similar presentations
Cooperating Intelligent Systems
Advertisements

Problem Solving Well-formed predicate calculus expressions provide a means of describing objects and relations in a problem domain and inference rule.
Algorithmic Software Verification II. Modeling using FSA.
Formal Description of a Problem
Feng Zhiyong Tianjin University Fall  datatype PROBLEM ◦ components: INITIAL-STATE, OPERATORS, GOAL- TEST, PATH-COST-FUNCTION  Measuring problem-solving.
SEARCH ALGORITHMS David Kauchak CS30 – Spring 2015.
SEARCH APPLICATIONS David Kauchak CS30 – Spring 2015.
A RTIFICIAL I NTELLIGENCE Problem-Solving Solving problems by searching.
Building Control Algorithms For State Space Search
State Spaces Introduction to Artificial Intelligence Dr. Robin Burke.
Artificial Intelligence Problem solving by searching CSC 361
CSC-470: ARTIFICIAL INTELLIGENCE
State-Space Searches. State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
Artificial Intelligence
Now would be a good time to kill your cell phone, and disconnect from the internet. For next time, print Heuristic Search.ppt slides.
Toy Problem: Missionaries and Cannibals
Artificial Intelligence Problem solving by searching CSC 361
Problem solving by Searching Problem Formulation.
Intelligent agents Intelligent agents are supposed to act in such a way that the environment goes through a sequence of states that maximizes the performance.
Introduction to Artificial Intelligence Problem Solving Ruth Bergman Fall 2002.
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Intelligent agents Intelligent agents are supposed to act in such a way that the environment goes through a sequence of states that maximizes the performance.
Dr Eleni Mangina – COURSE: LOGIC PROGRAMMING (during a joint degree with Fudan University in Software Engineering) DEPT. OF COMPUTER SCIENCE UCD Problem.
1 Chapter 3 Knowledge Representation. 2 Chapter 3 Contents l The need for a good representation l Semantic nets l Inheritance l Frames l Object oriented.
Artificial Intelligence Problem solving by searching CSC 361
ITCS 3153 Artificial Intelligence Lecture 4 Uninformed Searches (cont) Lecture 4 Uninformed Searches (cont)
Representation  A farmer wants to move himself, a hunrgry silver fox, a hungry, fat goose, and a sack of tasty grain across a river. Unfortunately, his.
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
State-Space Searches. 2 State spaces A state space consists of –A (possibly infinite) set of states The start state represents the initial problem Each.
1 Problem Solving We view many situations in life as problems we need to solve Also, much of human behavior can be considered problem solving, even if.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 13– Search.
Solving Problems by Searching
State-Space Searches.
Artificial Intelligence Problem solving by searching CSC 361
RELATIVE VELOCITY IN 2D. WARM UP A boat travels at a constant speed of 3 m/s on a river. The river’s current has a velocity of 2 m/s east. 1.If the boat.
Introduction to Programming Doman’s Lecture CSCI101.

1 State Space of a Problem Lecture 03 ITS033 – Programming & Algorithms Asst. Prof.
Introduction to Programming Initial Slides developed by Dr. Doman.
Formal Description of a Problem In AI, we will formally define a problem as –a space of all possible configurations where each configuration is called.
Problem solving.
Knowledge and search, page 1 CSI 4106, Winter 2005 Knowledge and search Points Properties of knowledge  Completeness  Objectivity  Certainty  Formalizability.
Unit 1: Basics // Metrics & Matter Aim: How can we apply the Scientific Method? Do Now: Solve the farmer’s dilemma. (5 minutes) Monday, September 8, 2014.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
CPSC 433 Artificial Intelligence Search Modeling Practice Problems M. Reza Zakerinasab Please include [CPSC433] in the subject line.
Assignment 2 (from last week) This is a pen-and-paper exercise, done in the same groups as for Practical 1 Your answer can be typeset or hand-written There.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Problem Solving Agents
Knowledge Representation Fall 2013 COMP3710 Artificial Intelligence Computing Science Thompson Rivers University.
Introduction to State Space Search
1/16 Problem solving by Searching Problem Formulation.
G5AIAI Introduction to AI
Knowledge Representation
Boat Problems.
The Decision-making Process
Uninformed (also called blind) search algorithms)
David Kauchak CS30 – Spring 2016
Some problems Cse-402 K3r20,k3r23.
CMSC 471 Fall 2011 Class #3 Thu 9/8/11 Problem Solving as Search
The Wolf, the Goat, and the Cabbage
Artificial Intelligence Problem solving by searching CSC 361
Some problems Cse-402 K3r20,k3r23.
Problem Solving by Searching Search Methods :
Knowledge Representation
Artificial Intelligence
State-Space Searches.
State-Space Searches.
David Kauchak CS51A – Spring 2019
State-Space Searches.
Problem Solving by Searching Search Methods :
Presentation transcript:

Problem solving by Searching Problem Formulation

8-Puzzle problem Solve the following 8-Puzzle problem by moving tiles left, down, up and right. 5 6 7 8 4 3 2 1 Initial State goal State

8-Puzzle Problem formulation State Representation: matrix of tiles Initial state Goal State Operators: slide-blank-up, slide-blank-down, slide-blank-left, slide-blank-right Path Cost: The number of steps to reach the goal state 5 6 7 4 8 2 3 1 5 6 7 8 4 3 2 1 8 7 6 5 4 3 2 1

Problem Formulation A Problem Space consists of The current state of the world (initial state) A description of the actions we can take to transform one state of the world into another (operators). A description of the desired state of the world (goal state), this could be implicit or explicit. A solution consists of the goal state, or a path to the goal state.

Problem Formulation :8-Puzzle Problem Initial State Operators Goal State 2 1 3 4 7 6 5 8 1 2 3 4 5 6 7 8 Slide blank square left. Slide blank square right. ….

Problem Formulation : 8-Puzzle Problem Representing states: For the 8-puzzle 3 by 3 array 5, 6, 7 8, 4, BLANK 3, 1, 2 A vector of length nine 5,6,7,8,4, BLANK,3,1,2 A list of facts Upper_left = 5 Upper_middle = 6 Upper_right = 7 Middle_left = 8 5 6 7 8 4 3 1 2

Problem Formulation: 8-Puzzle Problem Initial state 5 6 7 8 4 3 2 1 Goal state 8 7 6 5 4 3 2 1 Operators: slide blank up, slide blank down, slide blank left, slide blank right Solution: ? Path cost: ?

Problem Formulation: 8-Puzzle Problem Solution1: sb-down, sb-left, sb-up,sb-right, sb-down Operators: slide blank up, slide blank down, slide blank left, slide blank right 5 6 7 8 4 3 2 1 5 6 7 8 4 3 2 1 6 7 5 8 4 3 2 1 8 7 6 5 4 3 2 1 6 8 7 5 4 3 2 1 6 8 7 5 4 3 2 1 6 7 5 8 4 3 2 1 8 7 6 5 4 3 2 1 Initial state Goal state 5 6 7 8 4 3 2 1 6 7 5 8 4 3 2 1 6 7 5 8 4 3 2 1 6 8 7 5 4 3 2 1 6 8 7 5 4 3 2 1 8 7 6 5 4 3 2 1 Path cost: 5 steps to reach the goal

Problem Formulation: 8-Puzzle Problem Solution2: sb-left, sb-down, sb-right, sb-up, sb-left, sb-down, sb-right 5 7 8 6 4 3 2 1 5 7 8 6 4 3 2 1 8 5 7 6 4 3 2 1 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 5 6 7 8 4 3 2 1 8 5 7 6 4 3 2 1 5 6 7 8 4 3 2 1 5 6 7 8 4 3 2 1 8 7 6 5 4 3 2 1 5 6 7 8 4 3 2 1 5 6 7 8 4 3 2 1 5 7 8 6 4 3 2 1 5 7 8 6 4 3 2 1 8 5 7 6 4 3 2 1 8 5 7 6 4 3 2 1 8 7 6 5 4 3 2 1 8 7 6 5 4 3 2 1 Path cost: 6 steps to reach the goal

Problem Formulation: River problem consider the River Problem: A farmer wishes to carry a wolf, a duck and corn across a river, from the south to the north shore. The farmer is the proud owner of a small rowing boat called Bounty which he feels is easily up to the job. Unfortunately the boat is only large enough to carry at most the farmer and one other item. Worse again, if left unattended the wolf will eat the duck and the duck will eat the corn. Give a Formulation for this problem. Farmer, Wolf, Duck and Corn

Problem Formulation: River problem State representation: location of farmer and items in both sides of river [items in South shore / items in North shore] : (FWDC/-, FD/WC, C/FWD …) Initial State: farmer, wolf, duck and corn in the south shore FWDC/- Goal State: farmer, duck and corn in the north shore -/FWDC Operators: the farmer takes in the boat at most one item from one side to the other side (F-Takes-W, F-Takes-D, F-Takes-C, F-Takes-Self [himself only]) Path cost: the number of crossings

Problem Formulation: River problem Solution: F-Takes-D, F-Takes-Self, F-Takes-W, F-Takes-D, F-Takes-C, F-Takes-Self, F-Takes-D. path Cost = 7 (Problem solution) F W D C F-Takes-D Initial State WC/FD Goal State F-Takes-S FD/WC F-Takes-C D/FWC FDC/W F-Takes-W C/FWD FWC/D

Problem Formulation: River problem by search Method F-Takes-D, F-Takes-Self, F-Takes-W, F-Takes-D, F-Takes-C, F-Takes-Self, F-Takes-D.

Problem Formulation: Missionaries and cannibals Three missionaries and three cannibals are on the left bank of a river. There is one canoe which can hold one or two people. Find a way to get everyone to the right bank, without ever leaving a group of missionaries in one place outnumbered by cannibals in that place. Goal State: (0,0,0) Initial state: (3, 3, 1)

Problem Formulation: Missionaries and cannibals States Representation: three numbers (i, j, k) representing the number of missionaries, cannibals, and canoes on the left bank of the river. Initial state: (3, 3, 1) Operators: take one missionary, one cannibal, two missionaries, two cannibals, one missionary and one cannibal across the river in a given direction (I.e. ten operators). Goal Test: reached state (0, 0, 0) or Goal State: (0,0,0) Path Cost: Number of crossings.

Problem Formulation: Missionaries and cannibals Solution : [ (3,3,1)→ (2,2,0)→(3,2,1) →(3,0,0) →(3,1,1) →(1,1,0) →(2,2,1) →(0,2,0) →(0,3,1) →(0,1,0) → (0,2,1) →(0,0,0)]; Cost = 11 crossings Operations (i, j, k) Goal State: (0,0,0) Initial state: (3, 3, 1)