Better Search Improved Uninformed Search CIS 32

Similar documents
Overview. Depth Limited Search. Depth Limited Search. COMP219: Artificial Intelligence. Lecture 8: Combining Search Strategies and Speeding Up

COMP219: Artificial Intelligence. Lecture 8: Combining Search Strategies and Speeding Up

Problem Solving Agents

Problem Solving as Search - I

Princess Nora University Faculty of Computer & Information Systems ARTIFICIAL INTELLIGENCE (CS 370D) Computer Science Department

Uninformed Search Strategies

Uninformed search methods II.

CENG 466 Artificial Intelligence. Lecture 4 Solving Problems by Searching (II)

Search I. Tuomas Sandholm Carnegie Mellon University Computer Science Department. [Read Russell & Norvig Chapter 3]

SEARCH TREE. Generating the children of a node

Uninformed search methods

SEARCH SEARCH TREE. Node: State in state tree. Root node: Top of state tree

Uninformed search methods

Solving Problems by Searching chap3 1. Problem-Solving Agents

CSE 3401: Intro to AI & LP Uninformed Search II

Real World Search Problems. CS 331: Artificial Intelligence Uninformed Search. Simpler Search Problems. Example: Oregon. Search Problem Formulation

Uninformed search methods II.

Uninformed Search (Ch )

Uninformed search strategies

Uninformed Search (Ch )

CSE 3402: Intro to Artificial Intelligence Uninformed Search II

COMP9414: Artificial Intelligence Uninformed Search

Introduction. AI and Searching. Simple Example. Simple Example. Now a Bit Harder. From Hammersmith to King s Cross

Artificial Intelligence. Uninformed Search Strategies

CSC384: Introduction to Artificial Intelligence. Search

CS 4649/7649 Robot Intelligence: Planning

Representation. Representation. Representation. Representation. 8 puzzle.

/435 Artificial Intelligence Fall 2015

Depth-bounded Discrepancy Search

G53CLP Constraint Logic Programming

6.034 Artificial Intelligence

Transposition Table, History Heuristic, and other Search Enhancements

CS Lecture 5. Vidroha debroy. Material adapted courtesy of Prof. Xiangnan Kong and Prof. Carolina Ruiz at Worcester Polytechnic Institute

CS 4649/7649 Robot Intelligence: Planning

Spider Search: An Efficient and Non-Frontier-Based Real-Time Search Algorithm

CS 4649/7649 Robot Intelligence: Planning

Pedestrian Dynamics: Models of Pedestrian Behaviour

DESIGN AND ANALYSIS OF ALGORITHMS (DAA 2017)

DECISION-MAKING ON IMPLEMENTATION OF IPO UNDER TOPOLOGICAL UNCERTAINTY

CS472 Foundations of Artificial Intelligence. Final Exam December 19, :30pm

CS 4649/7649 Robot Intelligence: Planning

Robust Task Execution: Procedural and Model-based. Outline. Desiderata: Robust Task-level Execution

Tokyo: Simulating Hyperpath-Based Vehicle Navigations and its Impact on Travel Time Reliability

Ocean Fishing Fleet Scheduling Path Optimization Model Research. Based On Improved Ant Colony Algorithm

Optimization and Search. Jim Tørresen Optimization and Search

CMSC131. Introduction to Computational Thinking. (with links to some external Scratch exercises) How do you accomplish a task?

4. Please Do Break the Crystal

Decision Trees. Nicholas Ruozzi University of Texas at Dallas. Based on the slides of Vibhav Gogate and David Sontag

A new Decomposition Algorithm for Multistage Stochastic Programs with Endogenous Uncertainties

Aryeh Rappaport Avinoam Meir. Schedule automation

Three New Methods to Find Initial Basic Feasible. Solution of Transportation Problems

Addressing DDR5 design challenges with IBIS-AMI modeling techniques

1.1 The size of the search space Modeling the problem Change over time Constraints... 21

Planning and Acting in Partially Observable Stochastic Domains

Advanced Search Hill climbing

Lecture 5. Optimisation. Regularisation

Dealing with Dependent Failures in Distributed Systems

Application of Dijkstra s Algorithm in the Evacuation System Utilizing Exit Signs

Chapter 4 (sort of): How Universal Are Turing Machines? CS105: Great Insights in Computer Science

CT PET-2018 Part - B Phd COMPUTER APPLICATION Sample Question Paper

Agent Based Urban Models The Notting Hill Carnival Model

COLREGS Based Collision Avoidance of Unmanned Surface Vehicles

The system design must obey these constraints. The system is to have the minimum cost (capital plus operating) while meeting the constraints.

CSC242: Intro to AI. Lecture 21

Novice 1 Novice 2 Intermediate Advanced

Robocup 2010 Version 1 Storyboard Prototype 13 th October 2009 Bernhard Hengst

Application of Bayesian Networks to Shopping Assistance

The Evolution of Transport Planning

Algorithms and Data Structures

Belarusian Olympiad in Informatics

Basketball Agent 101 Syllabus

MONOLITHIC ISOLATING JOINTS: The Sealing Systems

Sail Through Engineering Post-Workshop Activity

Game Theory. 1. Introduction. Bernhard Nebel and Robert Mattmüller. Summer semester Albert-Ludwigs-Universität Freiburg

Lecture 04 ( ) Hazard Analysis. Systeme hoher Qualität und Sicherheit Universität Bremen WS 2015/2016

Neural Nets Using Backpropagation. Chris Marriott Ryan Shirley CJ Baker Thomas Tannahill

IAC-06-D4.1.2 CORRELATIONS BETWEEN CEV AND PLANETARY SURFACE SYSTEMS ARCHITECTURE PLANNING Larry Bell

Shot-by-shot directional source deghosting and directional designature using near-gun measurements

Epidemics and zombies

Bulgarian Olympiad in Informatics: Excellence over a Long Period of Time

Solving MINLPs with BARON. Mustafa Kılınç & Nick Sahinidis Department of Chemical Engineering Carnegie Mellon University

Paper for Consideration by NIPWG. Data Quality Indicators for bathymetric data on ECDIS chart display

A Proof-Producing CSP Solver 1

Applying Bi-objective Shortest Path Methods to Model Cycle Route-choice

Module 3 Developing Timing Plans for Efficient Intersection Operations During Moderate Traffic Volume Conditions

Efficient Gait Generation using Reinforcement Learning

SIMULATING KNOWLEDGE AND INFORMATION IN PEDESTRIAN EGRESS

Math Spring Operational Geometry PBA Item #18 Classmates in the Pool VH003506

Mathematics of Pari-Mutuel Wagering

If you need to reinstall FastBreak Pro you will need to do a complete reinstallation and then install the update.

SIMULATION OF ENTRAPMENTS IN LCM PROCESSES

Tower Rescue Lesson Three Tower Rescue: Operations

COMP 406 Lecture 05. Artificial. Fiona Yan Liu Department of Computing The Hong Kong Polytechnic University

Heap Sort. Lecture 35. Robb T. Koether. Hampden-Sydney College. Mon, Apr 25, 2016

Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up Warm up

Extensive Games with Perfect Information

MIKE NET AND RELNET: WHICH APPROACH TO RELIABILITY ANALYSIS IS BETTER?

On the Impact of Garbage Collection on flash-based SSD endurance

Maximum CPU utilization is obtained by multiprogramming. CPU I/O Burst Cycle Process execution consists of a cycle of CPU execution and I/O wait

Evaluating and Classifying NBA Free Agents

Transcription:

Better Search Improved Uninformed Search CIS 32

Functionally PROJECT 1: Lunar Lander Game - Demo + Concept - Open-Ended: No One Solution - Menu of Point Options - Get Started NOW!!! - Demo After Spring Break Today: Wrap up Basic Search Improvements on Uninformed Search

Re-Cap on Problem Solving Through Search Agents that solve problems through Search (as opposed to Behavior- Based Agents) Goal is given in the agent specification Actions/Operations are abstracted State-Space is formalized (i.e. modeled for the agent to search) State-Space Modeled as a Tree Structure Uninformed Search: Breath First Search Uniform Search Depth First Search

Breadth First Search Start by expanding initial state gives tree of depth 1. Then expand all nodes that resulted from previous step gives tree of depth 2. Then expand all nodes that resulted from previous step, and so on. Expand nodes at depth n before level n + 1.

Breadth First Search Start by expanding initial state gives tree of depth 1. Then expand all nodes that resulted from previous step gives tree of depth 2. Then expand all nodes that resulted from previous step, and so on. Expand nodes at depth n before level n + 1.

Breadth First Search Start by expanding initial state gives tree of depth 1. Then expand all nodes that resulted from previous step gives tree of depth 2. Then expand all nodes that resulted from previous step, and so on. Expand nodes at depth n before level n + 1.

Breadth First Search Start by expanding initial state gives tree of depth 1. Then expand all nodes that resulted from previous step gives tree of depth 2. Then expand all nodes that resulted from previous step, and so on. Expand nodes at depth n before level n + 1.

Breadth-first Search Advantage: guaranteed to reach a solution if one exists. If all solutions occur at depth n, then this is good approach. Disadvantage: time taken to reach solution! Let b be branching factor average number of operations that may be performed from any level. If solution occurs at depth d, then we will look at nodes before reaching solution exponential. How else can we search the State-Space?

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Start by expanding initial state. Depth First Search Pick one of nodes resulting from first step, and expand it. Pick one of nodes resulting from second step, and expand it, and so on. Always expand deepest node. Follow one branch of search tree.

Depth First Search /* Depth first search */ agenda = initial state; while agenda not empty do { pick node from front of agenda; new nodes = apply operations to state; if goal state in new nodes then { return solution; } put new nodes on FRONT of agenda; } (Agenda = OPEN List = the Fringe = Frontier)

Depth-First Search Disadvantages: Depth first search is not guaranteed to find a solution if one exists. Solution found is not guaranteed to be the best. Advantages: However, if it does find one, amount of time taken is much less than breadth first search. Memory requirement is much less than breadth first search. (Linear space requirement)

Performance Measures for Search Completeness: Is the search technique guaranteed to find a solution if one exists? Time complexity: How many computations are required to find solution? Space complexity: How much memory space is required? Optimality: How good is a solution going to be w.r.t. the path cost function. An Optimal Solution is called admissible.

Improvements on Depth-First and Breadth-First Breadth-first search is complete but expensive. Depth-first search is cheap but incomplete Can t we do better than this? Basic search (depth 1st, breadth 1st) can be improved: Improvements: depth limited search; iterative deepening. But we will see that even with such improvements, search is hopelessly unrealistic for real problems.

Algorithmic Improvements Are then any algorithmic improvements we can make to basic search algorithms that will improve overall performance? Try to get optimality and completeness of breadth 1st search with space efficiency of depth 1st. Not too much to be done about time complexity :-(

Depth Limited Search Depth first search has some desirable properties space complexity. But if wrong branch expanded (with no solution on it), then it won t terminate. Introduce a depth limit on branches to be expanded. Don t expand a branch below this depth.

Depth Limited Algorithm depth limit = max depth to search to; agenda = initial state; while agenda not empty do take node from front of agenda; new nodes = apply operations to node; // Expanding the node if goal state in new nodes then { return solution; } if depth(node) < depth limit then { add new nodes to front of agenda; } } (Agenda = OPEN List = the Fringe = Frontier)

8-Puzzle Example For the 8-puzzle set up: 2 8 3 1 6 4 7 5 1 2 3 8 4 7 6 5 Search tree (with State Symbolizing the Nodes)

8-Puzzle Search (Depth Limited at Level 5)

Chronological Backtracking Hit the depth bound of level 5, we don t add any more nodes to the agenda. Then we pick the next node off the agenda. (Node 7 in this case) This has the effect of moving the search back to the last node above depth limit that that is partially expanded. This is known as chronological backtracking. The effect of the depth limit is to force the search of the whole state space down to the limit. We get the completeness of breadth-first (down to the limit), with the space cost of depth first.

Iterative Deepening Depth-limited search is not complete: If we choose a max-depth such that the shortest-path solution is longer. We choose a max-depth deeper than the shortest goal node, and then suffer the consequences of depth-first search and hit a less optimal goal first. Complete Solution: Iterative deepening Basic idea repeat depth-limited-search for all depths until solution: depth-limited-search (depth = 1) ; if solution found, return it; otherwise depth-limited-search (depth = 2); if solution found, return it; otherwise depth-limited-search (depth = n); if solution found, return it; otherwise,...

Iterative Deepening Search (Algorithm) depth limit = 1; repeat { // depth_limited_search is a sub-routine result = depth_limited_search( max depth = depth limit; agenda = initial node; ); if result contains goal then { return result; } depth limit = depth limit + 1; } until false; /* i.e., forever */

Depth-Limited Search

Efficiency of Iterative Deepening Note that in iterative deepening, we re-generate nodes on the fly. Each time we do call on depth limited search for depth d, we need to regenerate the tree to depth d 1. Isn t this inefficient? Tradeoff time for memory. In general we might take a little more time, but we save a lot of memory. Number of Nodes Generated for breadth-first search to level d:...

Iterative Deepening In contrast a complete depth-limited search to level j: (This is just a breadth-first search to depth j.) In the worst case, then we have to do this to depth d, so expanding:

For large d: So for high branching and relatively deep goals we do a small amount more work. Example: Suppose b = 10 and d = 5. Breadth first search would require examining 111, 111 nodes, with memory requirement of 100, 000 nodes. Iterative deepening for same problem: 123, 456 nodes to be searched, with memory requirement only 50 nodes. Takes 11% longer in this case.

8-puzzle Example (with Iterative Deepening) For the 8-puzzle setup as: 2 8 3 1 6 4 7 5 1 2 3 8 4 7 6 5 What would iterative deepening search look like? Well, it would explore the search space, (draw it on the board!)

Expanded Search Space

States would be expanded in the order: 1. 1 2. 1, 2, 3, 4 3. 1, 2, 5, 3, 6, 7, 8, 4, 9. 4. 1, 2, 5, 10, 11, 3, 6, 13, 13, 7, 14, 15, 8, 16, 17, 4, 9, 18, 19. 5.... Note that these are the states visited, not the nodes on the agenda (remember depth-first search has at most bd nodes on the agenda).

Bi-directional Search Suppose we search from the goal state backwards as well as from initial state forwards. Start Goal Involves determining predecessor nodes to goal, which works well in navigation problems (i.e. driving from Boston to New York). More difficult to use in problems with implicit goals (i.e. Checkmate(X)) Rather than doing one search of, we do two searches. Much more efficient.

Bi-Directional Search Example: Suppose b = 10, d = 6. Breadth first search will examine nodes. Bi-directional search will examine nodes. Can combine different search strategies in different directions. For large d, is still impractical!

Bi-Directional Search Example: Suppose b = 10, d = 6. Breadth first search will examine = 1,000,000 nodes. Bi-directional search will examine + =1,000 + 1,000 nodes. Can combine different search strategies in different directions. For large d, is still impractical!

Summary This lecture has looked at some more efficient techniques than breadth first and depth first search. depth-limited search; iterative-deepening search; and bidirectional search. These all improve on depth-first and breadth-first search. However, all fail for big enough problems (too large state space). Next lecture, we will look at approaches that cut down the size of the state-space that is searched.