Artificial Intelligence Problem solving by searching CSC 361

Slides:



Advertisements
Similar presentations
Cooperating Intelligent Systems
Advertisements

Formal Description of a Problem
Problem-solving as search. History Problem-solving as search – early insight of AI. Newell and Simon’s theory of human intelligence and problem-solving.
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.
1 Let’s begin with a story. 2 l Alan Turing, "Computing Machinery and Intelligence", Mind, Volume LIX, Number 236, l Because the paper is now in.
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
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.
Structures and Strategies for State Space Search
Introduction to Artificial Intelligence Problem Solving Ruth Bergman Fall 2002.
1 Solving Problems by Searching. 2 Terminology State State Space Initial State Goal Test Action Step Cost Path Cost State Change Function State-Space.
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.
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
Midterm II Solution Prof. Mohamed Batouche Department of Computer Science CCIS – King Saud University Saudi Arabia.
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
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.
CS344: Introduction to Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 13– Search.
For Friday Finish chapter 3 Homework: –Chapter 3, exercise 6 –May be done in groups. –Clarification on part d: an “action” must be running the program.
start 3 missionaries and 3 cannibals Cannibal & Cannibal Missionary & Missionary Cannibal & Missionary Which one we should move first You lose True.
Solving Problems by Searching
State-Space Searches.

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.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 3 Wednesday 27 August.
CMSC 471 Spring 2014 Class #3 Tue 2/4/14 Problem Solving as Search Professor Marie desJardins,
Problem solving.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
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.
CS344: Introduction to Artificial Intelligence (associated lab: CS386)
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 3 of 41 Wednesday 25.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
PROBLEM SOLVING – BASIC SEARCH METHODS 12/8/2015Dr. Sunil Kumar 1.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Problem Solving Agents
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Artificial Intelligence Lecture No. 6 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
CS621 : Artificial Intelligence Pushpak Bhattacharyya CSE Dept., IIT Bombay Lecture 2 - Search.
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Blind Searches - Introduction.
1 Fahiem Bacchus, University of Toronto CSC384: Intro to Artificial Intelligence Search I ● Required Readings: Chapter 3. We won’t cover the material in.
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.
Search as a problem solving technique. Consider an AI program that is capable of formulating a desired goal based on the analysis of the current world.
G5AIAI Introduction to AI
PART-2 CSC 450-AI by Asma Tabuk 1 CSC AI Informed Search Algorithms College of Computer and Information Technology Department of Computer.
1 How do you define AI? l You were supposed to write a paper for today? nAt your tables spend five minutes talking about what you wrote. nIdentify some.
Knowledge Representation
How do you define AI? You were supposed to write a paper for today?
Problem solving by Searching
David Kauchak CS30 – Spring 2016
Artificial Intelligence Lecture No. 6
CSE 4705 Artificial Intelligence
Artificial Intelligence Problem solving by searching CSC 361
Knowledge Representation
Artificial Intelligence
State-Space Searches.
State-Space Searches.
David Kauchak CS51A – Spring 2019
State-Space Searches.
Unit II Game Playing.
Presentation transcript:

Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi Arabia mbatouche@ccis.ksu.edu.sa

Problem Solving by Searching Why search ? Early works of AI was mainly towards proving theorems solving puzzles playing games All AI is search! Not totally true (obviously) but more true than you might think. All life is problem solving !! Finding a good/best solution to a problem amongst many possible solutions.

Classic AI Search Problems Map searching (navigation)

Classic AI Search Problems 3*3*3 Rubik’s Cube

Classic AI Search Problems 8-Puzzle 2 1 3 4 7 6 5 8 1 2 3 4 5 6 7 8

Classic AI Search Problems N-Queens:

Problem Solving by Searching Problem Formulation

Problem Solving by Searching 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 Solving by Searching 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 Solving by Searching 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 Solving by Searching Specifying operators: There are often many ways to specify the operators, some will be much easier to implement... Move 1 left Move 1 right Move 1 up Move 1 down Move 2 left Move 2 right Move 2 up Move 2 down Move 3 left Move 3 right Move 3 up Move 3 down Move 4 left … Move Blank left Move Blank right Move Blank up Move Blank down 5 6 7 8 4 3 1 2

Problem Solving by Searching A toy problem: Missionaries and Cannibals

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.

Missionaries and cannibals States: 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) Path Cost: Number of crossings.

Missionaries and Cannibals (3,3,1): Initial State

Missionaries and Cannibals A missionary and cannibal cross

Missionaries and Cannibals (2,2,0)

Missionaries and Cannibals One missionary returns

Missionaries and Cannibals (3,2,1)

Missionaries and Cannibals Two cannibals cross

Missionaries and Cannibals (3,0,0)

Missionaries and Cannibals A cannibal returns

Missionaries and Cannibals (3,1,1)

Missionaries and Cannibals Two missionaries cross

Missionaries and Cannibals (1,1,0)

Missionaries and Cannibals A missionary and cannibal return

Missionaries and Cannibals (2,2,1)

Missionaries and Cannibals Two Missionaries cross

Missionaries and Cannibals (0,2,0)

Missionaries and Cannibals A cannibal returns

Missionaries and Cannibals (0,3,1)

Missionaries and Cannibals Two cannibals cross

Missionaries and Cannibals (0,1,0)

Missionaries and Cannibals A cannibal returns

Missionaries and Cannibals (0,2,1)

Missionaries and Cannibals The last two cannibals cross

Missionaries and Cannibals (0,0,0) : Goal State

Missionaries and Cannibals Solution = the path : [ (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