Problem Solving and Search in Artificial Intelligence

Similar documents
PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

Heuristic Optimisation

Expert Systems (Graz) Heuristic Search (Klagenfurt) - Search -

Uninformed search strategies (Section 3.4) Source: Fotolia

Solving problems by searching

Uninformed Search. Reading: Chapter 4 (Tuesday, 2/5) HW#1 due next Tuesday

Solving Problems by Searching

Wissensverarbeitung. - Search - Alexander Felfernig und Gerald Steinbauer Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria

Artificial Intelligence

Search EECS 395/495 Intro to Artificial Intelligence

Search EECS 348 Intro to Artificial Intelligence

Problem Solving and Search

CS 4700: Foundations of Artificial Intelligence. Bart Selman. Search Techniques R&N: Chapter 3

Problem Solving as Search. CMPSCI 383 September 15, 2011

Efficient memory-bounded search methods

CITS3001. Algorithms, Agents and Artificial Intelligence. Semester 1, 2015

Basic Search. Fall Xin Yao. Artificial Intelligence: Basic Search

Artificial Intelligence. Chapters Reviews. Readings: Chapters 3-8 of Russell & Norvig.

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE

KI-Programmierung. Basic Search Algorithms

CS 8520: Artificial Intelligence

Multiagent Systems Problem Solving and Uninformed Search

An Appropriate Search Algorithm for Finding Grid Resources

HW#1 due today. HW#2 due Monday, 9/09/13, in class Continue reading Chapter 3

Uninformed Search Strategies AIMA 3.4

Artificial Intelligence Problem Solving and Uninformed Search

ARTIFICIAL INTELLIGENCE (CSC9YE ) LECTURES 2 AND 3: PROBLEM SOLVING

Outline. Solving problems by searching. Problem-solving agents. Example: Romania

Problem solving Basic search. Example: Romania. Example: Romania. Problem types. Intelligent Systems and HCI D7023E. Single-state problem formulation

Solving problems by searching

Lecture 3. Uninformed Search

CS 380: Artificial Intelligence Lecture #3

Solving Problem by Searching. Chapter 3

Goal-Based Agents Problem solving as search. Outline

Informed search strategies (Section ) Source: Fotolia

Chapter 2. Blind Search 8/19/2017

Problem Solving Agents

COMP3702/7702 Artificial Intelligence Week2: Search (Russell & Norvig ch. 3)" Hanna Kurniawati"

Week 3: Path Search. COMP9414/ 9814/ 3411: Artificial Intelligence. Motivation. Example: Romania. Romania Street Map. Russell & Norvig, Chapter 3.

Uninformed Search strategies. AIMA sections 3.4,3.5

Solving problems by searching

4. Solving Problems by Searching

Chapter3. Problem-Solving Agents. Problem Solving Agents (cont.) Well-defined Problems and Solutions. Example Problems.

Problem Solving and Searching

Artificial Intelligence

Solving Problems by Searching

CS-171, Intro to A.I. Mid-term Exam Fall Quarter, 2013

Robot Programming with Lisp

Search Algorithms. Uninformed Blind search. Informed Heuristic search. Important concepts:

Uninformed Search Strategies AIMA

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Artificial Intelligence: Search Part 1: Uninformed graph search

Uninformed Search B. Navigating through a search tree. Navigating through a search tree. Navigating through a search tree

Informed Search CS457 David Kauchak Fall 2011

mywbut.com Uninformed Search

Set 2: State-spaces and Uninformed Search. ICS 271 Fall 2015 Kalev Kask

Uninformed Search Methods

ITCS 6150 Intelligent Systems. Lecture 3 Uninformed Searches

Search. CS 3793/5233 Artificial Intelligence Search 1

State-Space Search. Computer Science E-22 Harvard Extension School David G. Sullivan, Ph.D. Solving Problems by Searching

Chapter 3. A problem-solving agent is a kind of goal-based agent. It decide what to do by finding sequences of actions that lead to desirable states.

Blind (Uninformed) Search (Where we systematically explore alternatives)

CS 520: Introduction to Artificial Intelligence. Review

Uninformed Search. Problem-solving agents. Tree search algorithms. Single-State Problems

CAP 4630 Artificial Intelligence

A4B36ZUI - Introduction to ARTIFICIAL INTELLIGENCE

Solving problems by searching

Artificial Intelligence

Solving Problems by Searching

Topic 1 Uninformed Search

CS:4420 Artificial Intelligence

CS242 Uninformed Search

Today s s lecture. Lecture 2: Search - 1. Examples of toy problems. Searching for Solutions. Victor R. Lesser

Blind (Uninformed) Search (Where we systematically explore alternatives)

3 SOLVING PROBLEMS BY SEARCHING

AGENTS AND ENVIRONMENTS. What is AI in reality?

Chapter 3: Solving Problems by Searching

Search : Lecture 2. September 9, 2003

Uninformed Search B. Navigating through a search tree. Navigating through a search tree. Navigating through a search tree

Artificial Intelligence

Planning and search. Lecture 1: Introduction and Revision of Search. Lecture 1: Introduction and Revision of Search 1

Chapter 3 Solving problems by searching

Solving Problems by Searching (Blindly)

Problem solving and search

AGENTS AND ENVIRONMENTS. What is AI in reality?

Solving Problems: Blind Search

2. State Space Search

A2 Uninformed Search

Example: The 8-puzzle. A2 Uninformed Search. It can be generalized to 15-puzzle, 24-puzzle, or. (n 2 1)-puzzle for n 6. Department of Computer Science

Why Search. Things to consider. Example, a holiday in Jamaica. CSE 3401: Intro to Artificial Intelligence Uninformed Search

CS 771 Artificial Intelligence. Problem Solving by Searching Uninformed search

Artificial Intelligence

Informed search algorithms

COMP9414: Artificial Intelligence Informed Search

Lecture overview. Knowledge-based systems in Bioinformatics, 1MB602, Goal based agents. Search terminology. Specifying a search problem

CS540 Uninformed Search

Intelligent Agents. Foundations of Artificial Intelligence. Problem-Solving as Search. A Simple Reflex Agent. Agent with Model and Internal State

Problem Solving & Heuristic Search

Heuristic Search. CPSC 470/570 Artificial Intelligence Brian Scassellati

Computer Science and Software Engineering University of Wisconsin - Platteville. 3. Search (Part 1) CS 3030 Lecture Notes Yan Shi UW-Platteville

Transcription:

Problem Solving and Search in Artificial Intelligence Uninformed Search Strategies Nysret Musliu Database and Artificial Intelligence Group Institut für Informationssysteme, TU-Wien

Introduction Many classic algorithms are designed to search spaces for an optimum solution Broadly, classic methods fall into two classes: Algorithms that only evaluate complete solutions Exhaustive search, local search, Algorithms that require the evaluation of partially constructed or approximate solutions Branch and bound strategies,

Exhaustive Search Checks every solution in the search space until the best global solution has been found Can be used only for small instances of problems Exhaustive (enumerative) algorithms are simple Search space can be reduced by backtracking search Some optimization methods, e.g., branch and bound and A * are based on an exhaustive search

Exhaustive Search How can we generate a sequence of every possible solution to the problem? The order in which the solution are generated is irrelevant Depends from selected representation

Enumerating the SAT We have to generate every possible binary string of length n All solutions correspond to whole numbers in a one-to-one mapping Generate all non-negative integers from 0 to 2 n -1 and convert each of these integers into the matching binary string of length n 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9 1010 10 1011 11 1010 12 1101 13 1110 14 1111 15

Enumerating the SAT Tree representations of search space for SAT x 1 =F x 1 =T x 3 =F x 3 =T...

Enumerating TSP How to generate all possible permutations? If some cities are not connected, some permutation might not be feasible

Generation of Permutations Procedure gen1-permutation(i) Begin k=k+1 P[i]=k if k=n then for q=1 to n do print P[q] for q=1 to n do if P[q]=0 then gen1-permutation(q) k=k-1 P[i]=0 end

Uninformed search strategies Breadth first search Depth first search Depth limited search Iterative deepening search

Breadth First Search The shallowest unexpanded node is first expanded x 1 =F x 1 =T x 3 =F x 3 =T...

Breadth First Search The shallowest unexpanded node is first expanded x 1 =F x 1 =T x 3 =F x 3 =T...

Breadth First Search The shallowest unexpanded node is first expanded x 1 =F x 1 =T x 3 =F x 3 =T...

Breadth First Search The shallowest unexpanded node is first expanded x 1 =F x 1 =T x 3 =F x 3 =T...

Breadth First Search x 1 =F x 1 =T x 1 =F x 1 =T x 3 =F x 3 =T... x 3 =F x 3 =T...

Breadth First Search x 1 =F x 1 =T x 1 =F x 1 =T x 3 =F x 3 =T... x 3 =F x 3 =T...

Depth First Search Procedure depth-first(v) Begin visit v for each child w of v do depth-first(w) end x 1 =F x 1 =T x 3 =F x 3 =T...

Depth First Search Procedure depth-first(v) Begin visit v for each child w of v do depth-first(w) end x 1 =F x 1 =T x 3 =F x 3 =T...

Depth First Search Procedure depth-first(v) Begin visit v for each child w of v do depth-first(w) end x 1 =F x 1 =T x 3 =F x 3 =T...

Depth First Search Procedure depth-first(v) Begin visit v for each child w of v do depth-first(w) end x 1 =F x 1 =T x 3 =F x 3 =T...

Backtracking Suppose the SAT formula contains a clause:...(x 1 v x 2 )... x 1 =F x 1 =T x 3 =F x 3 =T...

Backtracking Suppose the SAT formula contains a clause:...(x 1 v x 2 )... x 1 =F x 1 =T x 3 =F x 3 =T...

Backtracking Suppose the SAT formula contains a clause:...(x 1 v x 2 )... x 1 =F x 1 =T x 3 =F x 3 =T... Remaining branches below this node can lead to nothing but a dead end

Backtracking Suppose the SAT formula contains a clause:...(x 1 v x 2 )... backtrack x 3 =F x 3 =T x 1 =F x 1 =T... Remaining branches below this node can lead to nothing but a dead end

Search algorithms performance Completeness Does the algorithm finds a solution if that exists Optimality Does the algorithm finds an optimal solution Time Complexity Number of expanded nodes Space Complexity Memory needed to perform the search

Search algorithms performance b : branching factor (maximum number of successors) d : the depth of the shallowest goal node in the search tree m : maximum depth of the tree

Breadth first search performance Complete if b is finite Optimal if the cost of each step is 1 Time: 1 + b + b 2 + + b d = (b d+1-1)/(b-1) = O(b d ) Space: O(b d )

Depth first search performance Complete if the search tree if finite Not optimal Time: 1 + b + b 2 + + b m = O(b m ) Space: O(bm)

Depth-limited search Depth first search with depth limit L Nodes at depth L are not expanded Eliminates problem with infinite path How to select L? Possible failures: No solution Cutoff no solution within the depth limit

Iterative deepening depth first search Repeat Depth-limited search with L=1,2,3,

Iterative deepening depth first search

Iterative deepening depth first search

Properties of Iterative deepening search Complete Time O(b d ): (d+1)(1) + db + (d-1)b 2 + + (1) b d Space: O(bd) Optimal if step cost is 1

Construct Search Tree for 8-Queens Problem?

Construct search tree for 8- Puzzle?

Exam question: 18.10.2007 (Artificial Intelligence, Russell and Norvig): The missionaries and cannibals problem is usually stated as follows. Three missionaries and three cannibals are on one side of the river, along with a boat that can hold one or two people. Find a way to get everyone to the other side, without ever leaving a group of missionaries in one place outnumbered by the cannibals in that place. This problem is famous in AI because it was the subject of the first paper that approached problem formulation from an analytical viewpoint (Amarel, 1968). (18 Points) Formulate the problem precisely, making only those distinctions necessary to ensure a valid solution. Draw a diagram of the complete state space. Solve this problem by using depth first search and breadth first search. (Check for the repeated states).

DEMO Rotating Workforce Scheduling Illustration of depth first search and backtracking

Literature Artificial Intelligence: A Modern Approach (Stuart Russell and Peter Norvig) Chapter 3 How to Solve It: Modern Heuristics (Z. Michalewicz and D. B. Fogel.) Chapter 3