Representation. Representation. Representation. Representation. 8 puzzle.

Similar documents
Problem Solving as Search - I

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

Problem Solving Agents

Uninformed Search (Ch )

Uninformed search methods II.

Artificial Intelligence. Uninformed Search Strategies

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

Solving Problems by Searching chap3 1. Problem-Solving Agents

Uninformed Search Strategies

Uninformed Search (Ch )

Uninformed search methods

CSE 3401: Intro to AI & LP Uninformed Search II

Uninformed search methods

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

Uninformed search methods II.

Uninformed search strategies

COMP9414: Artificial Intelligence Uninformed Search

CS 4649/7649 Robot Intelligence: Planning

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

CSE 3402: Intro to Artificial Intelligence Uninformed Search II

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

SEARCH TREE. Generating the children of a node

Better Search Improved Uninformed Search CIS 32

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

CSC384: Introduction to Artificial Intelligence. Search

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

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

SIDDHARTH INSTITUTE OF ENGINEERING & TECHNOLOGY :: PUTTUR (AUTONOMOUS) Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

Depth-bounded Discrepancy Search

Aryeh Rappaport Avinoam Meir. Schedule automation

/435 Artificial Intelligence Fall 2015

CS 4649/7649 Robot Intelligence: Planning

Transposition Table, History Heuristic, and other Search Enhancements

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

Advanced Search Hill climbing

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

Problem-Solving: A* and Beyond. CSCI 3202, Fall 2010

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

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

CMPUT680 - Winter 2001

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

Urban OR: Quiz 2 Solutions (2003) ( 1 ρ 1 )( 1 ρ 1 ρ 2 ) ( 1 12 )( ) σ S ] 24 [ 2 = 60, 2 2 ] ( 2 ) 3

6.034 Artificial Intelligence

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

G53CLP Constraint Logic Programming

Poseidon Team Description Paper RoboCup 2016, Leipzig, Germany

Algorithms and Data Structures

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

Dispatching Universität Karlsruhe, System Architecture Group

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

Optimization and Search. Jim Tørresen Optimization and Search

CS 351 Design of Large Programs Zombie House

The 19 th hole - 18 Card Micro Golf game. # Of Players: 1 or 2 players. Game time: min per game if a 2 player game.

The Rule of Right-Angles: Exploring the term Angle before Depth

Scrum Basics. Prof. Casper Lassenius Aalto University

Incremental ARA*: An Anytime Incremental Search Algorithm For Moving Target Search. University of Southern California Singapore Management University

Planning and Acting in Partially Observable Stochastic Domains

CS 4649/7649 Robot Intelligence: Planning

Introduction to Algorithms

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

The Incremental Evolution of Gaits for Hexapod Robots

CS 4649/7649 Robot Intelligence: Planning

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

Optimizing Cyclist Parking in a Closed System

Analysis of Professional Cycling Results as a Predictor for Future Success

Torpedoes on Target: EAs on Track

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

A new Decomposition Algorithm for Multistage Stochastic Programs with Endogenous Uncertainties

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

PREDICTING the outcomes of sporting events

Phoenix Soccer 2D Simulation Team Description Paper 2015

Cyrus Soccer 2D Simulation

Lesson 5.3 Interpreting and Sketching Graphs Exercises (pages )

CS 4649/7649 Robot Intelligence: Planning

Traveling Salesperson Problem and. its Applications for the Optimum Scheduling

MA PM: Memetic algorithms with population management

A Game-Theoretic Intelligent Agent for the Board Game Football Strategy

Efficient Globally Op5mal Consensus Maximisa5on with Tree Search

EE582 Physical Design Automation of VLSI Circuits and Systems

Decision Trees. an Introduction

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

Subsea Wellhead and Conductor Fatigue

LegenDary 2012 Soccer 2D Simulation Team Description Paper

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

Lesson 6: Water, Water Everywhere

Improving the Bus Network through Traffic Signalling. Henry Axon Transport for London

Efficient Minimization of Routing Cost in Delay Tolerant Networks

ENG. An Implementation Study of Flow Algorithms in. Unit Capacity, Undirected Networks. Dennis S. Ruhl

Summary of Most Common Rules of GOLF (check with USGA for current and complete rules)

OD plug gauge. for bores and internal profiles from dia. 2,5 mm. OD plug gauge in open design. Special designs Accessories. OD plug gauge for various

3D Inversion in GM-SYS 3D Modelling

Improving the bass response of Schroeder diffusers

COLREGS Based Collision Avoidance of Unmanned Surface Vehicles

Identifying and Developing the High School Triple Jumper

ACCESS TO CONFINED SPACES

On Underwater Vehicle Routing Problem

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

m v = 1.04 x 10-4 m 2 /kn, C v = 1.29 x 10-2 cm 2 /min

V-shaped recovery kicks off the Mother of all Rallies

Two Special Right Triangles

Transcription:

You have a 3-liter jug and a 4-liter jug, and need to measure out exactly two liters of water. the jugs do not have any measurement lines you don't have any additional containers 8 puzzle. Measuring water. CPSC 444: Artificial Intelligence Spring 2019 12 CPSC 444: Artificial Intelligence Spring 2019 14 (# liters in 3-liter jug, # of liters in 4-liter jug) initial state (0,0) goal states (2,*) (*,2) and successor function fill jug fill 3-liter jug: (m,n) (3,n) [m < 3] fill 4-liter jug: (m,n) (m,4) [n < 4] empty jug empty 3-liter jug: (m,n) (0,n) [m > 0] empty 4-liter jug: (m,n) (m,0) [n > 0] pour from one jug into another, until source jug is empty or target jug is full from 3-liter to 4-liter: (m,n) (m-min(m,4-n),n+min(m,4-n)) [m > 0, n < 4] from 4-liter to 3-liter: (m,n) (m+min(3-m,n),n-min(3-m,n)) [m < 3, n > 0] number of steps permutation of tiles how the blank tile moves left, right, up, down number of moves made CPSC 444: Artificial Intelligence Spring 2019 13 CPSC 444: Artificial Intelligence Spring 2019 15

Geometric analogy problems. Considerations. running time of search depends on branching factor - number of rules applicable to a given state length of solution path - shorter is better CPSC 444: Artificial Intelligence Spring 2019 16 CPSC 444: Artificial Intelligence Spring 2019 18 Search Techniques a set of statements about the shapes in a particular picture e.g. inside(a,b), left(a,b), above(a,b) allowed transformations e.g. scale(a,factor), delete(a), insertleft(a,b), insertabove(a,b), rotate(a,angle) number of transformations can also weight transformations to give priority to certain operations over others The state space forms a tree or graph. graph may be directed (some moves not reversible) or undirected (all moves reversible) uninformed (blind) search know only if a state is goal or not informed (heuristic) search can determine if one non-goal state is more promising than another adversarial search finding a good solution against an opponent who is trying to do the same CPSC 444: Artificial Intelligence Spring 2019 17 CPSC 444: Artificial Intelligence Spring 2019 19

Evaluating Search Techniques Implementation Details Four properties: completeness are we guaranteed to find a solution if there is one? optimality does the algorithm find the best solution? time complexity how long does it take to find a solution? space complexity how much memory is needed to perform the search How do you determine the solution path once you've found a solution? search state includes the current problem state + the previous state and the rule applied to get to this state CPSC 444: Artificial Intelligence Spring 2019 20 CPSC 444: Artificial Intelligence Spring 2019 22 Implementation Details depth-first search (DFS) use stack for S If generate new state is implemented as a mutator, be sure to copy the current state first. breadth-first search (BFS) use queue for S CPSC 444: Artificial Intelligence Spring 2019 21 CPSC 444: Artificial Intelligence Spring 2019 23

Recursive DFS solution dfs ( state, move ) { if state is the goal state return new solution containing only move } for each applicable rule generate new state if dfs(new state,rule) is successful add move to the solution found return solution return null // failure does not require an explicit stack call stack size may be limited by the runtime environment can generate new state without copying (though must then restore) CPSC 444: Artificial Intelligence Spring 2019 24 Time and space. b is average branching factor, m is tree depth, d is depth of solution max tree depth is length of the longest path DFS time is O(b m ), space is O(bm) time can be O(mb m ) if path is checked to avoid cycles marking states as explored instead means O(1) cycle check but O(b m ) space BFS time is O(b d ), space is O(b d ) CPSC 444: Artificial Intelligence Spring 2019 26 Uninformed Search DLS and IDS DFS is not optimal or complete. not guaranteed to find shortest path, unless all paths are explored and the best chosen may get stuck if there are cycles can prevent by checking current state against previous states on path may be desirable to avoid re-discovering states if there are alternate paths BFS is optimal and complete. always finds a solution always finds the shortest path may need to avoid re-discovering states if there are cycles or alternate paths Goal: DFS space requirements, with optimality and completeness. depth-limited search (DLS) DFS with a maximum depth search does not consider states deeper than that prevents infinite cycling (can omit cycle check) not optimal or complete not guaranteed to find shortest path, unless all paths are explored and the best chosen may not find a solution if the depth limit is too shallow time O(b l ), space O(bl) b = average branching factor l = depth limit of search CPSC 444: Artificial Intelligence Spring 2019 25 CPSC 444: Artificial Intelligence Spring 2019 27

Uninformed Search DLS and IDS Goal: DFS space requirements, with optimality and completeness. iterative deepening (IDS) DLS with progressively-increasing depths until solution is found complete and optimal always finds a solution not trapped by cycles (no need for cycle check) finds shallowest solution time O(b d ), space O(bd) b = average branching factor d = depth of solution lots of repeated work (lower depths are searched over and over) but search time is dominated by the last level CPSC 444: Artificial Intelligence Spring 2019 28