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

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

Measuring the Performance of an Agent

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

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

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

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

Data Structures and Algorithms Written Examination

Binary Search Trees CMPSC 122

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

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

INTERNATIONAL JOURNAL OF COMPUTER ENGINEERING & TECHNOLOGY (IJCET)

Informed search algorithms. Chapter 4, Sections 1 2 1

An Introduction to The A* Algorithm

Web Data Extraction: 1 o Semestre 2007/2008

Determine If An Equation Represents a Function

CMPSCI611: Approximating MAX-CUT Lecture 20

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

Problem solving and search

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

Introduction to MATLAB IAP 2008

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

Tessellations. Practice 1 Identifying Tessellations. In each tessellation, color the repeated shape. Example

CSE 326: Data Structures B-Trees and B+ Trees

(Refer Slide Time: 2:03)

Efficient Data Structures for Decision Diagrams

BIRCH: An Efficient Data Clustering Method For Very Large Databases

Instruction scheduling

Data Structures. Level 6 C Module Descriptor

Roulette Wheel Selection Game Player

Fractions as Numbers INTENSIVE INTERVENTION. National Center on. at American Institutes for Research

Introduction Solvability Rules Computer Solution Implementation. Connect Four. March 9, Connect Four

CSE 135: Introduction to Theory of Computation Decidability and Recognizability

CAs and Turing Machines. The Basis for Universal Computation

A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property

Session 6 Number Theory

Decision Making under Uncertainty

INTERNATIONAL JOURNAL OF PURE AND APPLIED RESEARCH IN ENGINEERING AND TECHNOLOGY

Algorithm & Flowchart & Pseudo code. Staff Incharge: S.Sasirekha

Guessing Game: NP-Complete?

International Journal of Software and Web Sciences (IJSWS)

ARTIFICIAL INTELLIGENCE (CSCU9YE) LECTURE 6: MACHINE LEARNING 2: UNSUPERVISED LEARNING (CLUSTERING)

TDWI strives to provide course books that are content-rich and that serve as useful reference documents after a class has ended.

Turing Machines: An Introduction

Formal Languages and Automata Theory - Regular Expressions and Finite Automata -

Digital Business Platform for SAP

Algorithms and Data Structures

Why have SSA? Birth Points (cont) Birth Points (a notion due to Tarjan)

E XPLORING QUADRILATERALS

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

Greatest Common Factor and Least Common Multiple

Integrated System Modeling for Handling Big Data in Electric Utility Systems

So today we shall continue our discussion on the search engines and web crawlers. (Refer Slide Time: 01:02)

IAI : Expert Systems

SOLVING PROBLEMS BY SEARCHING

one Managing your PBX Administrator ACCESSING YOUR PBX ACCOUNT CHECKING ACCOUNT ACTIVITY

Lecture 2 Introduction to Data Flow Analysis

NetBeans Profiler is an

Object Oriented Design

Search methods motivation 1

Ordered Lists and Binary Trees

Network Flow I. Lecture Overview The Network Flow Problem

A Working Knowledge of Computational Complexity for an Optimizer

Checking for Dimensional Correctness in Physics Equations

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

Artificial Intelligence Exam DT2001 / DT2006 Ordinarie tentamen

Strong and Weak Ties

Binary Risk Analysis

SCAN: A Structural Clustering Algorithm for Networks

Analysis of Algorithms I: Binary Search Trees

Question 1. [7 points] Consider the following scenario and assume host H s routing table is the one given below:

The PageRank Citation Ranking: Bring Order to the Web

EE602 Algorithms GEOMETRIC INTERSECTION CHAPTER 27

3 Some Integer Functions

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

Binary Heaps. CSE 373 Data Structures

Social Media Mining. Graph Essentials

SQL Sentry Essentials

A binary search tree is a binary tree with a special property called the BST-property, which is given as follows:

BCS HIGHER EDUCATION QUALIFICATIONS Level 6 Professional Graduate Diploma in IT. March 2013 EXAMINERS REPORT. Knowledge Based Systems

Regular Expressions and Automata using Haskell

Project and Production Management Prof. Arun Kanda Department of Mechanical Engineering Indian Institute of Technology, Delhi

Genetic programming with regular expressions

Algorithms are the threads that tie together most of the subfields of computer science.

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.

Load Balancing. Load Balancing 1 / 24

Evaluation of Test Cases Using ACO and TSP Gulwatanpreet Singh, Sarabjit Kaur, Geetika Mannan CTITR&PTU India

Chess Algorithms Theory and Practice. Rune Djurhuus Chess Grandmaster / October 3, 2012

Discrete Mathematics and Probability Theory Fall 2009 Satish Rao, David Tse Note 10

Visual Analysis Tool for Bipartite Networks

Bitrix Site Manager 4.1. User Guide

CSE 504: Compiler Design. Data Flow Analysis

2.2 Derivative as a Function

Which shapes make floor tilings?

Transcription:

Introduction to Artificial Intelligence (G51IAI) Dr Rong u Blind Searches - Introduction

Aim of This Section (2 hours) Introduce the blind searches on search tree Specifically, the general search pseudo-code in AIMA and in the course notes Understanding these notions is crucial for this section on search The pseudo-code might be difficult to follow without first having a high-level understanding of what the algorithm is trying to do

AI Techniques Use the relevant knowledge that people have to solve problem Problem solving techniques Uninformed algorithms (blind search) Informed algorithms (heuristic search) Techniques in this module Mainly based on tree search B F C H E G A I

Problem Definition - 1 Initial State The initial state of the problem, defined in some suitable manner Operator A set of actions that moves the problem from one state to another F B C H E G A I

Problem Definition - 1 Neighbourhood (by Successor Function) The set of all possible states reachable from a given state State Space The set of all states reachable from the initial state F B C H E G A I

Problem Definition - 2 Goal Test A test applied to a state which returns if we have reached a state that solves the problem Path Cost How much it costs to take a particular path Examples: TSP, nueen F B C H E G A I

Problem Definition - Example 5 4 6 1 8 7 3 2 1 24 37 84 2 5 46 8 73 86 5 Initial State Goal State

Problem Definition - Example States A description of each of the eight tiles in each location that it can occupy. It is also useful to include the blank Operators The blank moves left, right, up or down

Problem Definition - Example Goal Test The current state matches a certain state (e.g. one of the goal states shown on previous slide) Path Cost Each move of the blank costs 1

Exercise state space of 8-queen problem Initial state Operator States Goal state

Exercise state space of 8-queen problem

Exercise state space of 8-queen problem

Search Trees A tree is a graph that: is connected but becomes disconnected on removing any edge (branch) has precisely one path between any two nodes Unique path makes them much easier to search F so we will start with search on trees B C H E G A I

Search Trees Does the following tree contain a node I? A B D I F C H E G J Yes. How did you know that? so why the big deal about search?

Search Trees Because the graph is not given in a nice picture on a piece of paper Instead the graph/tree is usually Explicitly known, but hidden. You need to discover it on the fly i.e. as you do the search Implicitly known only. You are given a set of rules with which to create the graph on the fly

Search Trees Does the tree under the following root contain a node G? F All you get to see at first is the root and a guarantee that it is a tree The rest is up to you to discover during the process of search

Evaluating a Search Does our search method actually find a solution? Is it a good solution? Path Cost Search Cost (Time and Memory) Does it find the optimal solution? But what is optimal?

Evaluating a Search We ll evaluate all the later search techniques w.r.t the below 4 criteria 1. Completeness Is the strategy guaranteed to find a solution if one exist? 2. Time Complexity How long does it take to find a solution?

Evaluating a Search We ll evaluate all the later search techniques w.r.t the below 4 criteria 3. Space Complexity How much memory does it take to perform the search? 4. Optimality Does the strategy find the optimal solution where there are several solutions?

Blind Searches F B C H E G A I

Blind Searches - Characteristics Simply searches the State Space Can only distinguish between a goal state and a non-goal state Sometimes called an uninformed search as it has no knowledge about its domain

Blind Searches - Characteristics Blind Searches have no preference as to which state (node) that is expanded next The different types of blind searches are characterised by the order in which they expand the nodes This can have a dramatic effect on how well the search performs when measured against the four criteria we defined earlier

Blind Searches - implementation Fundamental actions (operators): 1. Expand Ask a node for its children 2. Test Test a node to see whether it is a goal F B C H E G A I

Blind Searches - implementation Does the tree under the following root contain a node G? Allowed: Expand Test F

Blind Searches - implementation We ll have 3 types of nodes during the search Fringe nodes have been discovered have not yet been processed : 1. have not yet discovered their children 2. (have not yet tested if they are a goal) Also called F open nodes B C H E G A I

Blind Searches - implementation We ll have 3 types of nodes during the search Visited nodes have been discovered have been processed: 1. have discovered all their children 2. (have tested whether are a goal) Also called F closed nodes B C H E G A I

Blind Searches - implementation We ll have 3 types of nodes during the search Undiscovered nodes The set of nodes that have not yet been discovered as being reachable from the root F B C H E G A I

Blind Searches - implementation Fundamental Search Ideas Maintain the list of fringe nodes ueue A method to expand the node to discover its children A method to pick a fringe node to be expanded Move node To fringe: once it s been discovered insert Out of fringe and into visited: after they have been processed remove

Blind Searches - implementation Need a data structure to store the fringe AIMA uses a generic notion of ueue A list of nodes - general memory Need methods to add nodes : INSERT remove nodes : REMOVE-FIRST

Blind Searches ordering of nodes Does the ordering of nodes matter? does the completeness depend on the way in which we implement INSERT? Each node is expanded only once, and then removed from the fringe Independently of the ordering, all nodes will be expanded, and expanded only once We assumed (implicitly) that the tree is finite

Blind Searches ordering of nodes If search is complete, why ordering of nodes? different node orderings affect the shape of the fringe different shapes of the fringe can lead to very different memory usages

Blind Searches ordering of nodes If search is complete, why ordering of nodes? The difference between searches lies in the order in which nodes are selected for expansion The search always visits the first node in the fringe queue The only way to control the ordering is to control the INSERT

Blind Searches Breadth first Uniform cost Depth first Depth limited Iterative deepening