Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Problem Space and Search Tree

Similar documents
Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Blind Searches

Uninformed Search. Remember: Implementation of search algorithms

Artificial Intelligence p.1/49. n-queens. Artificial Intelligence p.2/49. Initial state: the empty board or a board with n random

Problem solving and search

Problem Solving. Russell and Norvig: Chapter 3

Uninformed Search strategies. AIMA sections 3.4,3.5

Clustering (Un-supervised Learning)

Artificial Intelligence

Problem solving and search

KI-Programmierung. Basic Search Algorithms

Artificial Intelligence

COMP219: Artificial Intelligence. Lecture 7: Search Strategies

Problem solving and search

Artificial Intelligence (part 4a) Problem Solving Using Search: Structures and Strategies for State Space Search

State Space Search. Many problems can be represented as a set of states and a set of rules of how one state is transformed to another.

Robot Programming with Lisp

Solving problems by searching. Chapter 3

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 2: Search 1.

Artificial Intelligence

Artificial Intelligence Uninformed search

Artificial Intelligence Search: summary&exercises. Peter Antal

Informed search algorithms

COSC343: Artificial Intelligence

HEURISTIC SEARCH. 4.3 Using Heuristics in Games 4.4 Complexity Issues 4.5 Epilogue and References 4.6 Exercises

Problem solving and search

Solving Problems by Searching. AIMA Sections , 3.6

Informed search methods

Monotonicity. Admissible Search: That finds the shortest path to the Goal. Monotonicity: local admissibility is called MONOTONICITY

Introduction HEURISTIC SEARCH. Introduction. Heuristics. Two main concerns of AI researchers. Two problems with the search process

Artificial Intelligence Problem Solving and Uninformed Search

Informed search algorithms

Artificial Intelligence Class 3: Search (Ch ) Some material adopted from notes by Charles R. Dyer, University of Wisconsin-Madison

Solving Problems by Searching

Algorithm Design Techniques (III)

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

Multiagent Systems Problem Solving and Uninformed Search

Solving Problems by Searching

CS:4420 Artificial Intelligence

Artificial Intelligence

Problem solving and search

Informed search algorithms

Uninformed Search Methods

AI: Week 2. Tom Henderson. Fall 2014 CS 5300

Informed search algorithms

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

Uninformed Search (Ch )

Introduction to Artificial Intelligence (G51IAI)

AI: problem solving and search

Binary Trees

Planning and search. Lecture 1: Introduction and Revision of Search. Lecture 1: Introduction and Revision of Search 1

looking ahead to see the optimum

Artificial Intelligence (part 4c) Strategies for State Space Search. (Informed..Heuristic search)

Mustafa Jarrar: Lecture Notes on Artificial Intelligence Birzeit University, Chapter 3 Informed Searching. Mustafa Jarrar. University of Birzeit

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

Informed search algorithms

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

CSE 530A. B+ Trees. Washington University Fall 2013

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

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Sina Institute, University of Birzeit

Uninformed Search Strategies AIMA

Programming II (CS300)

Blind (Uninformed) Search (Where we systematically explore alternatives)

3 SOLVING PROBLEMS BY SEARCHING

Informed search algorithms. Chapter 4, Sections 1 2 1

Motivation for B-Trees

Introduction to Artificial Intelligence Midterm 1. CS 188 Spring You have approximately 2 hours.

Garbage Collection: recycling unused memory

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE

CS:4420 Artificial Intelligence

CSCI 360 Introduc/on to Ar/ficial Intelligence Week 2: Problem Solving and Op/miza/on. Instructor: Wei-Min Shen

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1

Tree Structures. A hierarchical data structure whose point of entry is the root node

4. Solving Problems by Searching

Chapter 3 Solving problems by searching

Artificial Intelligence, CS, Nanjing University Spring, 2018, Yang Yu. Lecture 3: Search 2.

6. Algorithm Design Techniques

CS540 Uninformed Search

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

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

CS 771 Artificial Intelligence. Informed Search

Artificial Intelligence (part 4d)

Chapter 3: Solving Problems by Searching

Efficient memory-bounded search methods

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

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

Artificial Intelligence Prof. Deepak Khemani Department of Computer Science and Engineering Indian Institute of Technology, Madras

Lecture 14: March 9, 2015

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Artificial Intelligence. Sina Institute, University of Birzeit

Uninformed Search B. Navigating through a search tree. Navigating through a search tree. Navigating through a search tree

A2 Uninformed Search

Example: The 8-puzzle. A2 Uninformed Search. It can be generalized to 15-puzzle, 24-puzzle, or. (n 2 1)-puzzle for n 6. Department of Computer Science

Algorithm Design Techniques. Hwansoo Han

ITI Introduction to Computing II

ARTIFICIAL INTELLIGENCE SOLVING PROBLEMS BY SEARCHING. Chapter 3

ITI Introduction to Computing II

Trees and Tree Traversal

521495A: Artificial Intelligence

Informed State Space Search B4B36ZUI, LS 2018

CS 3410 Ch 7 Recursion

Constraint Satisfaction Problems

Transcription:

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu Problem Space and Search Tree

F Trees B J C Nodes H E G Root node Children/parent of nodes Leaves A I Branches D Average branching factor average number of branches of the nodes in the tree

Problem Space Many problems exhibit no detectable regular structure to be exploited, they appear chaotic, and do not yield to efficient algorithms

Problem Space

Problem Space The concept of search plays an important role in science and engineering In one way, any problem whatsoever can be seen as a search for the right answer

Problem Space Search space Set of all possible solutions to a problem Search algorithms Take a problem as input Return a solution to the problem

Problem Space Search algorithms Uninformed search algorithms (3 hours) Simplest naïve search Informed search algorithms (2 hours) Use of heuristics that apply domain knowledge Dr Hyde

Problem Space Often we can't simply write down and solve the equations for a problem Exhaustive search of large state spaces appears to be the only viable approach How?

F Trees B J C Depth of a node H E G Number of branches away from the root node A I Depth of a tree Depth of the deepest node in the tree D Examples: TSP vs. game

F Trees B J C Tree size H E G Branching factor b = 2 (binary tree) Depth d A I d nodes at d, 2 d total nodes 0 1 1 1 2 3 2 4 7 3 8 15 4 16 31 5 32 63 6 64 127 D Exponentially - Combinatorial explosion

F Trees B J C H E G A I D Exponentially - Combinatorial explosion

F Search Tree B J C Heart of search techniques H E G Managing the data structure Nodes: states of problem Root node: initial state of the problem Branches: moves by operator D A I Branching factor: number of neighborhoods

Search Tree Define a Problem Space

Search Tree Example I

Search Tree Example I Compared with TSP tree?

Search Tree Example II 1 st level: 1 root node (empty board) 2 nd level: 8 nodes 3 rd level: 6 nodes for each of the node on the 2 nd level (?)

Search Trees Issues Search trees grow very quickly The size of the search tree is governed by the branching factor Even the simple game with branching factor of 3 has a complete search tree of large number of potential nodes The search tree for chess has a branching factor of about 35

Search Trees Claude Shannon delivered a paper in 1949 at a New York conference on how a computer could play chess. Chess has 10 120 unique games (with an average of 40 moves - the average length of a master game). Working at 200 million positions per second, Deep Blue would require 10 100 years to evaluate all possible games. To put this is some sort of perspective, the universe is only about 10 10 years old and 10 120 is larger than the number of atoms in the universe.

Implementing a Search - What we need to store State This represents the state in the state space to which this node corresponds Parent-Node This points to the node that generated this node. In a data structure representing a tree it is usual to call this the parent node

Implementing a Search - What we need to store Operator The operator that was applied to generate this node Depth The number of branches from the root Path-Cost The path cost from the initial state to this node

Implementing a Search - Datatype Datatype node Components: STATE, PARENT-NODE, OPERATOR, DEPTH, PATH-COST

Using a Tree The Obvious Solution? It can be wasteful on space It can be difficult to implement, particularly if there are varying number of children (as in tic-tac-toe) It is not always obvious which node to expand next. We may have to search the tree looking for the best leaf node (sometimes called the fringe or frontier nodes). This can obviously be computationally expensive

Using a Tree Maybe not so obvious Therefore It would be nice to have a simpler data structure to represent our tree And it would be nice if the next node to be expanded was an O(1)* operation *Big O: Notation in complexity theory How the size of input affect the algorithms computational resource (time or memory) Complexity of algorithms

General Search Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL- STATE[problem])) Loop do If nodes is empty then return failure node = REMOVE-FRONT(nodes) If GOAL-TEST[problem] applied to STATE(node) succeeds then return node nodes = QUEUING- FN(nodes,EXPAND(node,OPERATORS[problem])) End End Function

General Search Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL- STATE[problem])) Loop do If nodes is empty then return failure node = REMOVE-FRONT(nodes) If GOAL-TEST[problem] applied to STATE(node) succeeds then return node nodes = QUEUING- FN(nodes,EXPAND(node,OPERATORS[problem])) End End Function

General Search Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL- STATE[problem])) Loop do If nodes is empty then return failure node = REMOVE-FRONT(nodes) If GOAL-TEST[problem] applied to STATE(node) succeeds then return node nodes = QUEUING- FN(nodes,EXPAND(node,OPERATORS[problem])) End End Function

General Search Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL- STATE[problem])) Loop do If nodes is empty then return failure node = REMOVE-FRONT(nodes) If GOAL-TEST[problem] applied to STATE(node) succeeds then return node nodes = QUEUING- FN(nodes,EXPAND(node,OPERATORS[problem])) End End Function

General Search Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL- STATE[problem])) Loop do If nodes is empty then return failure node = REMOVE-FRONT(nodes) If GOAL-TEST[problem] applied to STATE(node) succeeds then return node nodes = QUEUING- FN(nodes,EXPAND(node,OPERATORS[problem])) End End Function

General Search Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL- STATE[problem])) Loop do If nodes is empty then return failure node = REMOVE-FRONT(nodes) If GOAL-TEST[problem] applied to STATE(node) succeeds then return node nodes = QUEUING- FN(nodes,EXPAND(node,OPERATORS[problem])) End End Function

General Search Function GENERAL-SEARCH (problem, QUEUING-FN) returns a solution or failure nodes = MAKE-QUEUE(MAKE-NODE(INITIAL- STATE[problem])) Loop do If nodes is empty then return failure node = REMOVE-FRONT(nodes) If GOAL-TEST[problem] applied to STATE(node) succeeds then return node nodes = QUEUING- FN(nodes,EXPAND(node,OPERATORS[problem])) End End Function

Summary of Problem Space Search space Search tree (problem formulation) General search algorithm Read Chapter 3 AIMA