Problem solving, search and control strategies

Similar documents
Problem solving and search

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig

Measuring the Performance of an Agent

Data Structure [Question Bank]

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

Informed search algorithms. Chapter 4, Sections 1 2 1

Smart Graphics: Methoden 3 Suche, Constraints

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Lecture 2 Introduction to Data Flow Analysis

CS MidTerm Exam 4/1/2004 Name: KEY. Page Max Score Total 139

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

1. The memory address of the first element of an array is called A. floor address B. foundation addressc. first address D.

Classifying Large Data Sets Using SVMs with Hierarchical Clusters. Presented by :Limou Wang

(Refer Slide Time: 2:03)

Computer Science 210: Data Structures. Searching

Algorithms and Data Structures

Integer Programming: Algorithms - 3

Common Approaches to Real-Time Scheduling

M. Sugumaran / (IJCSIT) International Journal of Computer Science and Information Technologies, Vol. 2 (3), 2011,

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

Graph Database Proof of Concept Report

Artificial Neural Networks and Support Vector Machines. CS 486/686: Introduction to Artificial Intelligence

Reliability Guarantees in Automata Based Scheduling for Embedded Control Software

Scheduling Task Parallelism" on Multi-Socket Multicore Systems"

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

10CS35: Data Structures Using C

Optimizations. Optimization Safety. Optimization Safety. Control Flow Graphs. Code transformations to improve program

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

Course Outline Department of Computing Science Faculty of Science. COMP Applied Artificial Intelligence (3,1,0) Fall 2015

Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Game playing. Chapter 6. Chapter 6 1

PLANET: Massively Parallel Learning of Tree Ensembles with MapReduce. Authors: B. Panda, J. S. Herbach, S. Basu, R. J. Bayardo.

DEVELOPMENT OF A VULNERABILITY ASSESSMENT CODE FOR A PHYSICAL PROTECTION SYSTEM: SYSTEMATIC ANALYSIS OF PHYSICAL PROTECTION EFFECTIVENESS (SAPE)

Graphs over Time Densification Laws, Shrinking Diameters and Possible Explanations

Algorithms and Data S tructures Structures Stack, Queues, and Applications Applications Ulf Leser

Binary Heap Algorithms

Discrete-Event Simulation

Laboratory work in AI: First steps in Poker Playing Agents and Opponent Modeling

Search methods motivation 1

Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R

Describe the process of parallelization as it relates to problem solving.

Hagit Attiya and Eshcar Hillel. Computer Science Department Technion

Big Data Optimization at SAS

Artificial Intelligence Exam DT2001 / DT2006 Ordinarie tentamen

Load balancing Static Load Balancing

Overview on Graph Datastores and Graph Computing Systems. -- Litao Deng (Cloud Computing Group)

Data Structures. Chapter 8

Concurrency Control. Chapter 17. Comp 521 Files and Databases Fall

MAX = 5 Current = 0 'This will declare an array with 5 elements. Inserting a Value onto the Stack (Push)

Datavetenskapligt Program (kandidat) Computer Science Programme (master)

Computer Science CS 4013/5013: Artificial Intelligence

USING BACKTRACKING TO SOLVE THE SCRAMBLE SQUARES PUZZLE

Lab 7: Operational Amplifiers Part I

CS104: Data Structures and Object-Oriented Design (Fall 2013) October 24, 2013: Priority Queues Scribes: CS 104 Teaching Team

2) Write in detail the issues in the design of code generator.

Big O and Limits Abstract Data Types Data Structure Grand Tour.

Parallelization: Binary Tree Traversal

Module: Software Instruction Scheduling Part I

Search Engines. Stephen Shaw 18th of February, Netsoc

SOLVING PROBLEMS BY SEARCHING

Heaps & Priority Queues in the C++ STL 2-3 Trees

Model Checking: An Introduction

Masters in Information Technology

TA: Matt Tong Tues EBU3b B225 - Office hour WLH Discussion Thurs EBU3b B250/B250A - Lab/Office hour

Analysis of Algorithms, I

University of Dayton Department of Computer Science Undergraduate Programs Assessment Plan DRAFT September 14, 2011

Eastern Washington University Department of Computer Science. Questionnaire for Prospective Masters in Computer Science Students

Chapter 11 Current Programmed Control

Techniques for Supporting Prediction of Security Breaches in. Critical Cloud Infrastructures Using Bayesian Network and. Markov Decision Process

Data Acquisition Using NI-DAQmx

Analysis of Micromouse Maze Solving Algorithms

Fabio Patrizi DIS Sapienza - University of Rome

Efficient Parallel Graph Exploration on Multi-Core CPU and GPU

Data Mining on Streams

CURRICULUM VITAE EDUCATION:

GameTime: A Toolkit for Timing Analysis of Software

CPSC 211 Data Structures & Implementations (c) Texas A&M University [ 313]

STUDY OF PROJECT SCHEDULING AND RESOURCE ALLOCATION USING ANT COLONY OPTIMIZATION 1

3 Abstract Data Types and Search

International Journal of Software and Web Sciences (IJSWS)

COURSE TITLE COURSE DESCRIPTION

Exam study sheet for CS2711. List of topics

Assessment Plan for CS and CIS Degree Programs Computer Science Dept. Texas A&M University - Commerce

Case study: d60 Raptor smartadvisor. Jan Neerbek Alexandra Institute

A Fast Algorithm For Finding Hamilton Cycles

Chapter 3: Restricted Structures Page 1

Quiz 4 Solutions EECS 211: FUNDAMENTALS OF COMPUTER PROGRAMMING II. 1 Q u i z 4 S o l u t i o n s

Load Balancing and Termination Detection

Binary Search Trees CMPSC 122

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

THE APPLICATION OF ARTIFICIAL INTELLIGENCE TO SOLVE A PHYSICAL PUZZLE. Dana Cremer

Fundamentals of Computer Science (FCPS) CTY Course Syllabus

Common Data Structures

Week_11: Network Models

Transcription:

Materials Ch 2 & 3 of Artificial Intelligence A Systems Approach by Tim Jones Chapters 3 and 4 of Artificial Intelligence a Modern Approach by Russell and Norvig

Problem solving, search and control strategies

GENERAL PROBLEM SOLVING

GENERAL PROBLEM SOLVING

GENERAL PROBLEM SOLVING

GENERAL PROBLEM SOLVING

AI: SEARCH AND CONTROL STRATEGIES

Tree search algorithms Basic idea: offline, simulated exploration of state space by generating successors of already-explored states (a.k.a.~expanding states) 14 Jan 2004 CS 3243 - Blind Search 11

Tree search example 14 Jan 2004 CS 3243 - Blind Search 12

Tree search example 14 Jan 2004 CS 3243 - Blind Search 13

Tree search example 14 Jan 2004 CS 3243 - Blind Search 14

Implementation: general tree search 14 Jan 2004 CS 3243 - Blind Search 15

Implementation: states vs. nodes A state is a (representation of) a physical configuration A node is a data structure constituting part of a search tree includes state, parent node, action, path cost g(x), depth The Expand function creates new nodes, filling in the various fields and using the SuccessorFn of the problem to create the corresponding states. 14 Jan 2004 CS 3243 - Blind Search 16

Search strategies A search strategy is defined by picking the order of node expansion Strategies are evaluated along the following dimensions: completeness: does it always find a solution if one exists? time complexity: number of nodes generated space complexity: maximum number of nodes in memory optimality: does it always find a least-cost solution? Time and space complexity are measured in terms of b: maximum branching factor of the search tree d: depth of the least-cost solution m: maximum depth of the state space (may be )

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

Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end

Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end 14 Jan 2004 CS 3243 - Blind Search 20

Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end 14 Jan 2004 CS 3243 - Blind Search 21

Breadth-first search Expand shallowest unexpanded node Implementation: fringe is a FIFO queue, i.e., new successors go at end 14 Jan 2004 CS 3243 - Blind Search 22

Properties of breadth-first search Complete? Yes (if b is finite) Time? 1+b+b 2 +b 3 + +b d + b(b d -1) = O(b d+1 ) Space? O(b d+1 ) (keeps every node in memory) Optimal? Yes (if cost = 1 per step) Space is the bigger problem (more than time) 14 Jan 2004 CS 3243 - Blind Search 23

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 24

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 25

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 26

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 27

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 28

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 29

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 30

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 31

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 32

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 33

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 34

Depth-first search Expand deepest unexpanded node Implementation: fringe = LIFO queue, i.e., put successors at front 14 Jan 2004 CS 3243 - Blind Search 35

Properties of depth-first search Complete? No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated states along path complete in finite spaces Time? O(b m ): terrible if m is much larger than d but if solutions are dense, may be much faster than breadth-first Space? O(bm), i.e., linear space! Optimal? No 14 Jan 2004 CS 3243 - Blind Search 36

Depth Limited search Alleviating the embarrassing failure of depth-first search in infinite state spaces by supplying depth-first search with a predetermined depth-limit of l. Nodes at depth l are treated as if they have no successors. Unfortunately, it also introduces an additional source of incompleteness if we choose l<d It will also be non-optimal if we choose l>d ts time complexity is O(b l )and its space complexity is O(bl). Depth-first search can be viewed as a special case of depthlimited search with l=. depth-limited search has two modes of failure: standard failure - no solution. cutoff failure - no solution within the depth limit

Depth-limited search = depth-first search with depth limit l, i.e., nodes at depth l have no successors Recursive implementation:

Iterative deepening search general strategy, often used in combination with depth-first tree search, that finds the best depth limit. It does this by gradually increasing the limit - first 0, then 1, then 2, and so on - until a goal is found. This will occure when the depth reaches d, the depth of the shallowest goal node. The algorithm is shown in Figure DFS-15: Combines the benefits of depth-first search and breadth-first search. Memory requirements are: O(bd) N(IterativeDeepeningSearch)=(d)b + (d-1)b 2 +... + (1)b 2 This gives a time complexity of O(b d )

Iterative deepening search l =0 14 Jan 2004 CS 3243 - Blind Search 40

Iterative deepening search l =1 14 Jan 2004 CS 3243 - Blind Search 41

Iterative deepening search l =2 14 Jan 2004 CS 3243 - Blind Search 42

Iterative deepening search l =3 14 Jan 2004 CS 3243 - Blind Search 43

Iterative deepening search Number of nodes generated in a depth-limited search to depth d with branching factor b: N DLS = b 0 + b 1 + b 2 + + b d-2 + b d-1 + b d Number of nodes generated in an iterative deepening search to depth d with branching factor b: N IDS = (d+1)b 0 + d b^1 + (d-1)b^2 + + 3b d-2 +2b d-1 + 1b d For b = 10, d = 5, N DLS = 1 + 10 + 100 + 1,000 + 10,000 + 100,000 = 111,111 N IDS = 6 + 50 + 400 + 3,000 + 20,000 + 100,000 = 123,456 Overhead = (123,456-111,111)/111,111 = 11% 14 Jan 2004 CS 3243 - Blind Search 44

Properties of iterative deepening search Complete? Yes Time? (d+1)b 0 + d b 1 + (d-1)b 2 + + b d = O(b d ) Space? O(bd) Optimal? Yes, if step cost = 1 14 Jan 2004 CS 3243 - Blind Search 45

Summary of algorithms 14 Jan 2004 CS 3243 - Blind Search 46

Graph search 14 Jan 2004 CS 3243 - Blind Search 47

Summary Problem formulation usually requires abstracting away realworld details to define a state space that can feasibly be explored Variety of uninformed search strategies Iterative deepening search uses only linear space and not much more time than other uninformed algorithms