Problem Solving and Search

Similar documents
Solving problems by searching

Solving problems by searching

CS 380: Artificial Intelligence Lecture #3

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

Solving problems by searching

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

Chapter 2. Blind Search 8/19/2017

Artificial Intelligence

Problem solving and search

CS 8520: Artificial Intelligence

Solving Problem by Searching. Chapter 3

Problem solving and search

DFS. Depth-limited Search

Problem solving and search

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

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

Artificial Intelligence Problem Solving and Uninformed Search

Solving problems by searching

Artificial Intelligence

Multiagent Systems Problem Solving and Uninformed Search

CS 771 Artificial Intelligence. Problem Solving by Searching Uninformed search

Robot Programming with Lisp

Informed Search CS457 David Kauchak Fall 2011

Search EECS 395/495 Intro to Artificial Intelligence

Search EECS 348 Intro to Artificial Intelligence

Problem solving and search

Informed search strategies (Section ) Source: Fotolia

ITCS 6150 Intelligent Systems. Lecture 3 Uninformed Searches

A.I.: Informed Search Algorithms. Chapter III: Part Deux

Chapter 3: Informed Search and Exploration. Dr. Daisy Tang

Solving problems by searching

Solving problems by searching

Artificial Intelligence

Informed Search and Exploration for Agents

Lecture 4: Search 3. Victor R. Lesser. CMPSCI 683 Fall 2010

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

S A E RC R H C I H NG N G IN N S T S A T T A E E G R G A R PH P S

AI: problem solving and search

Solving problems by searching. Chapter 3

Informed/Heuristic Search

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

Uninformed Search. Chapter 3. (Based on slides by Stuart Russell, Subbarao Kambhampati, Dan Weld, Oren Etzioni, Henry Kautz, and other UW-AI faculty)

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

KI-Programmierung. Basic Search Algorithms

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

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

Informed (Heuristic) Search. Idea: be smart about what paths to try.

CSE 473. Chapter 4 Informed Search. CSE AI Faculty. Last Time. Blind Search BFS UC-BFS DFS DLS Iterative Deepening Bidirectional Search

Uninformed Search. Chapter 3

Problem solving and search: Chapter 3, Sections 1 5

Problem solving and search: Chapter 3, Sections 1 5

Outline. Best-first search

Informed search algorithms. Chapter 4

Introduction to Artificial Intelligence. Informed Search

Solving Problems: Blind Search

ARTIFICIAL INTELLIGENCE. Informed search

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.

Informed Search Methods

Artificial Intelligence

ARTIFICIAL INTELLIGENCE SOLVING PROBLEMS BY SEARCHING. Chapter 3

Chapter 3 Solving problems by searching

Problem solving and search

Solving Problems by Searching (Blindly)

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

Outline. Best-first search

521495A: Artificial Intelligence

4. Solving Problems by Searching

COMP9414/ 9814/ 3411: Artificial Intelligence. 5. Informed Search. Russell & Norvig, Chapter 3. UNSW c Alan Blair,

Informed Search Algorithms

Graphs vs trees up front; use grid too; discuss for BFS, DFS, IDS, UCS Cut back on A* optimality detail; a bit more on importance of heuristics,

Informed Search. CS 486/686 University of Waterloo May 10. cs486/686 Lecture Slides 2005 (c) K. Larson and P. Poupart

Problem solving and search

CS 771 Artificial Intelligence. Informed Search

Informed search methods

Informed search. Soleymani. CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2016

CS:4420 Artificial Intelligence

Informed Search and Exploration

Class Overview. Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 2. Problem Solving Agents. Problem Solving Agents: Assumptions

CS 151: Intelligent Agents, Problem Formulation and Search

Artificial Intelligence

Informed Search and Exploration

Outline. Informed search algorithms. Best-first search. Review: Tree search. A search Heuristics. Chapter 4, Sections 1 2 4

Problem Solving & Heuristic Search

Informed search algorithms. (Based on slides by Oren Etzioni, Stuart Russell)

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

Lecture 2: Fun with Search. Rachel Greenstadt CS 510, October 5, 2017

Informed search algorithms

Informed search algorithms

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

CS 5522: Artificial Intelligence II

ARTIFICIAL INTELLIGENCE. Pathfinding and search

Artificial Intelligence

Artificial Intelligence Uninformed search

Informed search algorithms. Chapter 4, Sections 1 2 1

Solving Problems by Searching

Informed search algorithms. Chapter 3 (Based on Slides by Stuart Russell, Dan Klein, Richard Korf, Subbarao Kambhampati, and UW-AI faculty)

Class Overview. Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 2: Search. Problem Solving Agents

CAP 4630 Artificial Intelligence

Uninformed search strategies (Section 3.4) Source: Fotolia

CS 331: Artificial Intelligence Informed Search. Informed Search

Transcription:

Artificial Intelligence Problem Solving and Search Dae-Won Kim School of Computer Science & Engineering Chung-Ang University

Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms

Problem-Solving Agents

On holiday In Romania; currently in Arad. Flight leaves tomorrow for Bucharest.

Goal: be in Bucharest

Solution: sequence of cities

Solution:??? Performance measure:???

Problem formulation: states various cities actions drive between cities

Problem Formulation: How To vs. Problem Modeling

A problem is defined by four items: Initial state Successor function: set of action-state pairs Goal test Path cost

A solution is a sequence of actions leading from the initial state to a goal state. Consider a solution in algorithm

Problem Formulation: Romania

Initial state: Successor function: Goal test: Path cost:

Initial state: x = at Arad Successor function: S = {<Arad Zerind,Zerind>, } Goal test: x = at Bucharest Path cost: sum of distances

Problem Formulation: Vacuum Cleaner

States: Actions: Goal test: Path cost:

States: integer dirt and robot locations Actions: left, right, suck, stay Goal test: no dirt Path cost: 1 per action (0 for stay)

Problem Formulation: Robot Assembly

States: real-valued coordinates of joint angles Actions: continuous motions of robot joints Goal test: complete assembly Path cost: time to execute

Problem Formulation: The 8-Puzzle

States? Actions? Goal test? Path cost?

How to achieve the goal state through the complex state space from the initial state?

Answer: Tree Search Algorithms

Idea: exploration of state space by generating successors of alreadyexplored states (expanding states)

Implementation: States vs. Nodes

A state is (a representation of) a physical configuration

A node is data structure constituting part of a search tree includes parents, children, depth, path cost.

A search strategy is defined by picking the order of node expansion.

Strategies are evaluated along the following dimensions: Completeness Time complexity Space complexity Optimality

Uninformed Search Strategies

Uninformed search strategies use only the information available in the problem definition. Breadth-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening search

Breath-First Search

Expand shallowest unexpanded node. Implementation: FIFO queue

Complete? Time complexity? Space complexity? Optimal?

Complete? Yes (if b is finite) Time complexity? O(b d+1 ) Space complexity? O(b d+1 ) Optimal? Yes (if cost = 1 per step)

Uniform-Cost Search Expand least-cost unexpanded node using queue ordered by path cost Equivalent to BFS if step costs equal.

Depth-First Search

Expand deepest unexpanded node. Implementation: LIFO queue

Complete? Time complexity? Space complexity? Optimal?

Complete? No (infinite-depth, loops) Time complexity? O(b m ) Space complexity? O(bm) Optimal? No

Depth-Limited Search = DFS with depth limit (L). i.e., nodes at depth (L) have no successors

Iterative Deepening Search

Complete? Time complexity? Space complexity? Optimal?

Complete? Yes Time complexity? O(b d ) Space complexity? O(bd) Optimal? Yes (if step cost = 1)

Artificial Intelligence Informed Search Methods : The Basics Dae-Won Kim School of Computer Science & Engineering Chung-Ang University

Outline Best-first search Greedy search A* search Brach and Bound

A strategy is defined by picking the order of node expansion.

Informed search strategy can find solutions more efficiently than an uninformed search.

It uses problem-specific knowledge beyond the definition of the problem itself.

Best-First Search

Idea: use an evaluation function for each node.

Estimate the desirability of each node Expand most desirable unexpanded node

Special cases: Greedy search A* search Branch and Bound

Romania Example with Step Costs

Greedy Search

We need an evaluation function : heuristic function h(n)

h(n) = estimate of cost from n to the closest goal

h(n) = straight-line distance from n to Bucharest

Greedy search expands the node that appears to be closest to goal.

Properties of greedy search

Complete? Time complexity? Space complexity? Optimal?

Complete? No (can get stuck in loops) Yes (in finite space with repeated-state checking) Time complexity? O(b m ), A good heuristic is needed. Space complexity? O(b m ), Keeps all nodes in memory. Optimal? No

What is A* Search?

Idea: avoid expanding paths that are already expensive.

Evaluation function: f(n) = g(n) + h(n)

g(n) = cost so far to reach n h(n) = estimated cost to goal from n f(n) = estimated total cost through n to goal

A* search uses an admissible heuristic. Thus, it is optimal.

h(n) h*(n) where h*(n) is the true cost from n. h(n) 0, so h(goal) = 0.

e.g., h straight (n) never overestimates the actual distance.

Romania Example with A* Search

Properties of A* Search

Complete? Time complexity? Space complexity? Optimal?

Complete? Yes Time complexity? Exponential in [relative error in h x length of sol.] Space complexity? Keeps all nodes in memory. Optimal? Yes

Q: Explain why A* is optimal?

Admissible Heuristics for the 8-puzzle

Guess a h-function : f = g + h

h1(n) = number of misplaced tiles h1(n) = 6

h2(n) = total Manhattan distance h2(n) = 4 + 0 + 3 + 3 + 1 + 0 + 2 + 1 = 14

Admissible Heuristics & Dominance

If h2(n) > h1(n) for all n, then h2 dominates h1 and is better for search.

IDS = 50,000,000,000 nodes A*(h1) = 39,135 nodes A*(h2) = 1,641 nodes

Q: How to find good heuristics?

Admissible heuristics can be derived from the exact solution cost of a relaxed version of the problem.

The optimal solution cost of a relaxed problem is no greater than the optimal solution cost of the real problem.