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

Slides:



Advertisements
Similar presentations
Cooperating Intelligent Systems
Advertisements

Review: Search problem formulation
Heuristic Search techniques
Announcements Course TA: Danny Kumar
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
Artificial Intelligence Solving problems by searching
Greedy best-first search Use the heuristic function to rank the nodes Search strategy –Expand node with lowest h-value Greedily trying to find the least-cost.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
G5AIAI Introduction to AI
Comp 307 Problem Solving and Search Formalize a problem as State Space Search Blind search strategies Heuristic search.
Problem Solving and Search Andrea Danyluk September 9, 2013.
Problem Solving Agents A problem solving agent is one which decides what actions and states to consider in completing a goal Examples: Finding the shortest.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
G5BAIM Artificial Intelligence Methods Graham Kendall Blind Searches.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
Lets remember about Goal formulation, Problem formulation and Types of Problem. OBJECTIVE OF TODAY’S LECTURE Today we will discus how to find a solution.
Artificial Intelligence (CS 461D)
Feng Zhiyong Tianjin University Fall  datatype PROBLEM ◦ components: INITIAL-STATE, OPERATORS, GOAL- TEST, PATH-COST-FUNCTION  Measuring problem-solving.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2004.
Artificial Intelligence
Artificial Intelligence Chapter 3: Solving Problems by Searching
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
Using Search in Problem Solving
Artificial Intelligence Methods Rao Vemuri Searching - 2.
Solving problems by searching
Problem-solving agents
For Friday Finish chapter 3 Homework: –Chapter 3, exercise 6 –May be done in groups. –Clarification on part d: an “action” must be running the program.
Artificial Intelligence Course outline Introduction Problem solving Generic algorithms Knowledge Representation and Reasoning Expert Systems Uncertainty.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Solving Problems by Searching CPS Outline Problem-solving agents Example problems Basic search algorithms.
Do you drive? Have you thought about how the route plan is created for you in the GPS system? How would you implement a cross-and- nought computer program?
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
1 Solving problems by searching 171, Class 2 Chapter 3.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
G5BAIM Artificial Intelligence Methods Graham Kendall Searching.
Problem solving by search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
Implementation: General Tree Search
Solving problems by searching A I C h a p t e r 3.
G5AIAI Introduction to AI
Lecture 2: Problem Solving using State Space Representation CS 271: Fall, 2008.
For Monday Read chapter 4 exercise 1 No homework.
Chap 4: Searching Techniques Artificial Intelligence Dr.Hassan Al-Tarawneh.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Lecture 3: Uninformed Search
Introduction to Artificial Intelligence
Artificial Intelligence Lecture No. 6
Problem Solving by Searching
Artificial Intelligence (CS 370D)
Artificial Intelligence Problem solving by searching CSC 361
Chap 4: Searching Techniques Artificial Intelligence Dr.Hassan Al-Tarawneh.
HW #1 Due 29/9/2008 Write Java Applet to solve Goats and Cabbage “Missionaries and cannibals” problem with the following search algorithms: Breadth first.
Problem Solving and Searching
Searching for Solutions
Problem Solving and Searching
G5BAIM Artificial Intelligence Methods
A General Backtracking Algorithm
Chap 4: Searching Techniques
Solving Problems by Searching
Presentation transcript:

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

G51IAI – Blind Searches Aim of This Section Introduce the blind searches on search tree Specifically, the “general search pseudo-code” in Russell/Norvig (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

G51IAI – Blind Searches 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 C E F G A H I

G51IAI – Blind Searches 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 B C E F G A H I

G51IAI – Blind Searches 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 B C E F G A H I

G51IAI – Blind Searches 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, nQueen B C E F G A H I

G51IAI – Blind Searches Problem Definition - Example Initial StateGoal State

G51IAI – Blind Searches 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

G51IAI – Blind Searches 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

G51IAI – Blind Searches Exercise – state space of 8-queen problem Initial state an empty board Operator add a queen into a square on the board States any arrangement of 0 to 8 queens on the board Goal state an arrangement of 8 queens on board without any 2 attacking others Q QQ Q Q Q Q Q

G51IAI – Blind Searches Exercise – state space of 8-queen problem Q QQ Q Q Q Q Q

G51IAI – Blind Searches Exercise – state space of 8-queen problem Q Q Q Q Q Q Q Q Q Q Q Q Q Q Q

G51IAI – Blind Searches 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 so we will start with search on trees B C E F G A H I

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

G51IAI – Blind Searches 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”

G51IAI – Blind Searches Search Trees Does the tree under the following root contain a node “G”? 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 F

G51IAI – Blind Searches 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?

G51IAI – Blind Searches Evaluating a Search 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? We’ll evaluate all the later search techniques w.r.t the below 4 criteria

G51IAI – Blind Searches Evaluating a Search 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? We’ll evaluate all the later search techniques w.r.t the below 4 criteria

G51IAI – Blind Searches Blind Searches B C E F G A H I

G51IAI – Blind Searches 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

G51IAI – Blind Searches 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

G51IAI – Blind Searches 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 B C E F G A H I

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

G51IAI – Blind Searches 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 open nodes B C E F G A H I

G51IAI – Blind Searches 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 closed nodes B C E F G A H I

G51IAI – Blind Searches 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 B C E F G A H I

G51IAI – Blind Searches Blind Searches - implementation Fundamental Search Ideas Maintain the list of fringe nodes Queue 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

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

G51IAI – Blind Searches 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

G51IAI – Blind Searches 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

G51IAI – Blind Searches 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

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