Structures and Strategies for State Space Search

Slides:



Advertisements
Similar presentations
State Space Representation and Search
Advertisements

Problem Solving Well-formed predicate calculus expressions provide a means of describing objects and relations in a problem domain and inference rule.
CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using.
Introduction to Graph Theory Instructor: Dr. Chaudhary Department of Computer Science Millersville University Reading Assignment Chapter 1.
Problem Solving and Search Andrea Danyluk September 9, 2013.
Part2 AI as Representation and Search
KU NLP Artificial Intelligence1 Ch 3. Structures and Strategies for State Space Search q Introduction q Graph Theory  Structures for state space search.
Structures and Strategies For Space State Search
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Carrano and Henry, © 2013.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 27 Graph Applications.
Introduction This chapter explores graphs and their applications in computer science This chapter explores graphs and their applications in computer science.
Koenigsberg bridge problem It is the Pregel River divided Koenigsberg into four distinct sections. Seven bridges connected the four portions of Koenigsberg.
Search: Representation and General Search Procedure Jim Little UBC CS 322 – Search 1 September 10, 2014 Textbook § 3.0 –
C++ Programming: Program Design Including Data Structures, Third Edition Chapter 21: Graphs.
Lists A list is a finite, ordered sequence of data items. Two Implementations –Arrays –Linked Lists.
Structures and Strategies for State Space Search
Artificial Intelligence Chapter 3: Solving Problems by Searching
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Dr Eleni Mangina – COURSE: LOGIC PROGRAMMING (during a joint degree with Fudan University in Software Engineering) DEPT. OF COMPUTER SCIENCE UCD Problem.
Using Search in Problem Solving
Graphs. Graph A “graph” is a collection of “nodes” that are connected to each other Graph Theory: This novel way of solving problems was invented by a.
Structures and Strategies For Space State Search
Graphs Chapter 20 Data Structures and Problem Solving with C++: Walls and Mirrors, Frank Carrano, © 2012.
1 Heuristic Search 4 4.0Introduction 4.1An Algorithm for Heuristic Search 4.2Admissibility, Monotonicity, and Informedness 4.3Using Heuristics in Games.
Solving problems by searching
1 Structures and Strategies for State Space Search 3 3.0Introduction 3.1Graph Theory 3.2Strategies for State Space Search 3.3Using the State Space to Represent.
Chapter 11 Graphs and Trees This handout: Terminology of Graphs Eulerian Cycles.
CSC 2300 Data Structures & Algorithms February 6, 2007 Chapter 4. Trees.
Discrete Mathematics Lecture 9 Alexander Bukharovich New York University.
C o n f i d e n t i a l HOME NEXT Subject Name: Data Structure Using C Unit Title: Graphs.
GRAPH Learning Outcomes Students should be able to:
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
3.0 State Space Representation of Problems 3.1 Graphs 3.2 Formulating Search Problems 3.3 The 8-Puzzle as an example 3.4 State Space Representation using.
Introduction Of Tree. Introduction A tree is a non-linear data structure in which items are arranged in sequence. It is used to represent hierarchical.
Foundations of Discrete Mathematics
Structures 7 Decision Maths: Graph Theory, Networks and Algorithms.
1 CS 385 Fall 2006 Chapter 3 Structures and Strategies for State Space Search.
CS 415 – A.I. Slide Set 5. Chapter 3 Structures and Strategies for State Space Search – Predicate Calculus: provides a means of describing objects and.
Structures and Strategies For Space State Search
Connected Components Fun with graphs, searching, and queues.
Lecture 3: Uninformed Search
1 Solving problems by searching 171, Class 2 Chapter 3.
Artificial Intelligence and Knowledge Based Systems Fall 2009 Frank Hadlock.
Trees : Part 1 Section 4.1 (1) Theory and Terminology (2) Preorder, Postorder and Levelorder Traversals.
Algorithms April-May 2013 Dr. Youn-Hee Han The Project for the Establishing the Korea ㅡ Vietnam College of Technology in Bac Giang.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley. Ver Chapter 13: Graphs Data Abstraction & Problem Solving with C++
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
Search Techniques CS480/580 Fall Introduction Trees: – Root, parent, child, sibling, leaf node, node, edge – Single path from root to any node Graphs:
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
Introduction to Graph Theory Lecture 17: Graph Searching Algorithms.
George F Luger ARTIFICIAL INTELLIGENCE 5th edition Structures and Strategies for Complex Problem Solving Structures and Strategies For Space State Search.
Data Structures Lakshmish Ramaswamy. Tree Hierarchical data structure Several real-world systems have hierarchical concepts –Physical and biological systems.
Union By Rank Ackermann’s Function Graph Algorithms Rajee S Ramanikanthan Kavya Reddy Musani.
STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH 3 3.0Introduction 3.1Graph Theory 3.2Strategies for State Space Search 3.3Using the State Space to Represent.
STRUCTURES AND STRATEGIES FOR STATE SPACE SEARCH 3 3.0Introduction 3.1Graph Theory 3.2Strategies for State Space Search 3.3Using the State Space to Represent.
State space search Represented by a four-tuple [N,A,S,GD], where: N is the problem space A is the set of arcs (or links) between nodes. These correspond.
Chapter 20: Graphs. Objectives In this chapter, you will: – Learn about graphs – Become familiar with the basic terminology of graph theory – Discover.
Chapter 05 Introduction to Graph And Search Algorithms.
G5AIAI Introduction to AI
1 Trees : Part 1 Reading: Section 4.1 Theory and Terminology Preorder, Postorder and Levelorder Traversals.
Chapter 14 Section 3 - Slide 1 Copyright © 2009 Pearson Education, Inc. AND.
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
Breadth First and Depth First
Binary Trees "A tree may grow a thousand feet tall, but its leaves will return to its roots." -Chinese Proverb.
CS223 Advanced Data Structures and Algorithms
This unit is all about Puzzles Games Strategy.
Graphs Chapter 13.
Chap 4: Searching Techniques
Presentation transcript:

Structures and Strategies for State Space Search 3 Structures and Strategies for State Space Search 3.0 Introduction 3.1 Graph Theory 3.2 Strategies for State Space Search 3.3 Using the State Space to Represent Reasoning with the Predicate Calculus 3.4 Epilogue and References 3.5 Exercises Additional references for the slides: Russell and Norvig’s AI book. Robert Wilensky’s CS188 slides: www.cs.berkeley.edu/%7wilensky/cs188/lectures/index.html

Chapter Objectives Learn the basics of state space representation Learn the basics of search in state space The agent model: Has a problem, searches for a solution.

The city of Königsberg The city is divided by a river. There are two islands at the river. The first island is connected by two bridges to both riverbanks and is also connected by a bridge to the other island. The second island two bridges each connecting to one riverbank. Question: Is there a walk around the city that crosses each city exactly once? Swiss mathematician Leonhard Euler invented graph theory to solve this problem.

The city of Königsberg

Graph of the Königsberg bridge system

A labeled directed graph

A rooted tree, exemplifying family relationships

Definition of a graph A graph consists of A set of nodes (can be infinite) A set of arcs that connect pairs of nodes. An arc is an ordered pair, e.g., (a, b). If a directed arc connects N and M, N is called the parent, and M is called the child. If N is also connected to K, M and K are siblings. A rooted tree has a unique node which has no parents. The edges in a rooted tree are directed away from the root. Each node in a rooted tree has a unique parent. Notes: People often draw trees without directed arcs. It is implicit in the problem definition. In search, it is directed.

Definition of a graph (cont’d) A leaf or tip node is a node that has no children (sometimes also called a dead end). A path of length n is an ordered sequence of n+1 nodes such that the graph contains arcs from each node to the following ones. E.g., [a b e] is a path of length 2. On a path in a rooted graph, a node is said to be an ancestor of all the nodes positioned after it (to its right), as well as a descendant of all nodes before it (to its left).

Definition of a graph (cont’d) A path that contains any node more than once is said to contain a cycle or loop. A tree is a graph in which there is a unique path between every pair of nodes. Two nodes are said to be connected if a path exists that includes them both.

A unifying view (Newell and Simon) The problem space consists of: a state space which is a set of states representing the possible configurations of the world a set of operators which can change one state into another

State space search Represented by a four-tuple [N,A,S,GD], where: N is the problem space A is the set of arcs (or links) between nodes. These correspond to the operators. S is a nonempty subset of N. It represents the start state(s) of the problem. GD is a nonempty subset of N. It represents the goal state(s) of the problem. The states in GD are described using either: a measurable property of the states a property of the path developed in the search (a solution path is a path from node S to a node in GD )

The 8-puzzle problem as state space search states: possible board position operators: one for sliding each square in each of four directions, or, better, one for moving the blank square in each of four directions initial state: some given board position goal state: some given board position Note: the “solution” is not interesting here, we need the path.

State space of the 8-puzzle generated by “move blank” operations

Traveling salesperson problem as state space search The salesperson has n cities to visit and must then return home. Find the shortest path to travel. state space operators: initial state: goal state: Note: this is a “two-player” game

An instance of the traveling salesperson problem

Search of the traveling salesperson problem Search of the traveling salesperson problem. (arc label = cost from root)

Nearest neighbor path Nearest neighbor path = AEDBCA (550) Minimal cost path = ABCDEA (375)

Tic-tac-toe as state space search operators: initial state: goal state: Note: this is a “two-player” game

Goal-directed search

Data-directed search

Trace of backtracking search (Fig. 3.12)

A trace of backtrack on the graph of Fig. 3.12

Graph for BFS and DFS (Fig. 3.13)

Breadth_first search algorithm

Trace of BFS on the graph of Fig. 3.13

Graph of Fig. 3.13 at iteration 6 of BFS

Depth_first_search algorithm

Trace of DFS on the graph of Fig. 3.13

Graph of Fig. 3.13 at iteration 6 of DFS

BFS, label = order state was removed from OPEN

DFS with a depth bound of 5, label = order state was removed from OPEN