State Spaces Graph Search Searching. Graph Search. CPSC 322 Search 2. Textbook 3.4. Graph Search CPSC 322 Search 2, Slide 1

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "State Spaces Graph Search Searching. Graph Search. CPSC 322 Search 2. Textbook 3.4. Graph Search CPSC 322 Search 2, Slide 1"

Transcription

1 Graph Search CPSC 322 Search 2 Textbook 3.4 Graph Search CPSC 322 Search 2, Slide 1

2 Lecture Overview 1 State Spaces 2 Graph Search 3 Searching Graph Search CPSC 322 Search 2, Slide 2

3 State Spaces Idea: sometimes it doesn t matter what sequence of observations brought the world to a particular configuration; it just matters how the world is arranged now. called the Markov assumption Represent the different configurations in which the world can be arranged as different states which numbers are written in cells of the Sudoku and which are blank? which numbers appear in which slots of the 8-puzzle? where is the delivery robot? States are assignments of values to one or more variables a single variable called state x and y coordinates; etc... From each state, one or more actions may be available, which would move the world into a new state write a new number in a blank cell of the Sudoku slide a tile in the 8-puzzle move the delivery robot to an adjacent location Graph Search CPSC 322 Search 2, Slide 3

4 Agent Design An agent can be thought of as a mapping from the given state to the new action that the agent will take However, there s a problem... often, we don t understand the domain well enough to build the mapping we d need to be able to tell the agent how it should behave in every state that s why we want intelligent agents: they should decide how to act for themselves in order for them to do so, we need to give them goals Graph Search CPSC 322 Search 2, Slide 4

5 State Spaces Represent the different configurations in which the world can be arranged as different states which numbers are written in cells of the Sudoku and which are blank? which numbers appear in which slots of the 8-puzzle? where is the delivery robot? States are assignments of values to one or more variables From each state, one or more actions may be available, which would move the world into a new state write a new number in a blank cell of the Sudoku slide a tile in the 8-puzzle move the delivery robot to an adjacent location Some states are goal states A Sudoku state in which all numbers are different in each box, row and column The single 8-puzzle state pictured earlier The state in which the delivery robot is located in room 123 Graph Search CPSC 322 Search 2, Slide 5

6 Lecture Overview 1 State Spaces 2 Graph Search 3 Searching Graph Search CPSC 322 Search 2, Slide 6

7 Search What we want to be able to do: find a solution when we are not given an algorithm to solve a problem, but only a specification of what a solution looks like idea: search for a solution Definition (search problem) A search problem is defined by A set of states A start state A goal state or goal test a boolean function which tells us whether a given state is a goal state A successor function a mapping from a state to a set of new states Graph Search CPSC 322 Search 2, Slide 7

8 Abstract Definition How to search Start at the start state Consider the different states that could be encountered by moving from a state that has been previously expanded Stop when a goal state is encountered To make this more formal, we ll need to talk about graphs... Graph Search CPSC 322 Search 2, Slide 8

9 Search Graphs Definition (graph) A graph consists of a set N of nodes; a set A of ordered pairs of nodes, called arcs or edges. Node n 2 is a neighbor of n 1 if there is an arc from n 1 to n 2. i.e., if n 1, n 2 A Definition (path) A path is a sequence of nodes n 0, n 1,..., n k such that n i 1, n i A. Definition (solution) Given a start node and a set of goal nodes, a solution is a path from the start node to a goal node. Graph Search CPSC 322 Search 2, Slide 9

10 Example Domain for the Delivery Robot The agent starts outside room 103, and wants to end up inside room 123. r131 r129 r127 r125 r123 r121 r119 storage o131 o129 o127 o125 o123 o121 o119 l4d1 l4d2 l3d1 o117 r117 l4d3 l3d2 l3d3 o115 r115 l1d1 l2d1 l2d2 l1d2 l1d3 l2d3 l2d4 o113 r113 mail ts o101 o103 o105 o107 o109 o111 stairs r101 r103 r105 r107 r109 r111 Graph Search CPSC 322 Search 2, Slide 10

11 Example Graph for the Delivery Robot r123 storage o125 o123 o119 l3d1 l3d2 l3d3 l2d1 l2d2 l2d3 l2d4 mail ts o103 o109 o111 Graph Search CPSC 322 Search 2, Slide 11

12 Example Sudoku Problem Fives Alive Sudoku Grid.jpg (JPEG Image, 981x980 pixels) - Scaled (97%) Let s define this as a search problem. What are: the set of states? 1 of 1 9/16/09 3:22 PM Graph Search CPSC 322 Search 2, Slide 12

13 Example Sudoku Problem Fives Alive Sudoku Grid.jpg (JPEG Image, 981x980 pixels) - Scaled (97%) Let s define this as a search problem. What are: the set of states? the start state? 1 of 1 9/16/09 3:22 PM Graph Search CPSC 322 Search 2, Slide 12

14 Example Sudoku Problem Fives Alive Sudoku Grid.jpg (JPEG Image, 981x980 pixels) - Scaled (97%) Let s define this as a search problem. What are: the set of states? the start state? the goal state or goal test? 1 of 1 9/16/09 3:22 PM Graph Search CPSC 322 Search 2, Slide 12

15 Example Sudoku Problem Fives Alive Sudoku Grid.jpg (JPEG Image, 981x980 pixels) - Scaled (97%) Let s define this as a search problem. What are: the set of states? the start state? the goal state or goal test? the successor function? 1 of 1 9/16/09 3:22 PM Graph Search CPSC 322 Search 2, Slide 12

16 Example Sudoku Problem Fives Alive Sudoku Grid.jpg (JPEG Image, 981x980 pixels) - Scaled (97%) Let s define this as a search problem. What are: the set of states? 1 of 1 9/16/09 3:22 PM the start state? the goal state or goal test? the successor function? Note: here only the goal matters, not the path to it. Graph Search CPSC 322 Search 2, Slide 12

17 Graph Searching Generic search algorithm: given a graph, start nodes, and goal nodes, incrementally explore paths from the start nodes. Maintain a frontier of paths from the start node that have been explored. As search proceeds, the frontier expands into the unexplored nodes until a goal node is encountered. Graph Search CPSC 322 Search 2, Slide 13

18 Problem Solving by Graph Searching start node frontier explored nodes unexplored nodes Graph Search CPSC 322 Search 2, Slide 14

19 Graph Searching Generic search algorithm: given a graph, start nodes, and goal nodes, incrementally explore paths from the start nodes. Maintain a frontier of paths from the start node that have been explored. As search proceeds, the frontier expands into the unexplored nodes until a goal node is encountered. The way in which the frontier is expanded defines the search strategy. Graph Search CPSC 322 Search 2, Slide 15

20 Lecture Overview 1 State Spaces 2 Graph Search 3 Searching Graph Search CPSC 322 Search 2, Slide 16

21 Graph Search Algorithm Input: a graph, a set of start nodes, Boolean procedure goal(n) that tests if n is a goal node. frontier := { s : s is a start node}; while frontier is not empty: select and remove path n 0,..., n k from frontier; if goal(n k ) return n 0,..., n k ; for every neighbor n of n k add n 0,..., n k, n to frontier; end while After the algorithm returns, it can be asked for more answers and the procedure continues. Which value is selected from the frontier defines the search strategy. The neighbor relationship defines the graph. The goal function defines what is a solution. Graph Search CPSC 322 Search 2, Slide 17

22 Branching Factor Definition (forward branching factor) The forward branching factor of a node is the number of arcs going out of that node. If the forward branching factor of every node is b and the graph is a tree, how many nodes are exactly n steps away from the start node? Graph Search CPSC 322 Search 2, Slide 18

23 Branching Factor Definition (forward branching factor) The forward branching factor of a node is the number of arcs going out of that node. If the forward branching factor of every node is b and the graph is a tree, how many nodes are exactly n steps away from the start node? b n nodes. We ll assume that all branching factors are finite. Graph Search CPSC 322 Search 2, Slide 18

24 Comparing Algorithms Definition (complete) A search algorithm is complete if, whenever at least one solution exists, the algorithm is guaranteed to find a solution within a finite amount of time Definition (time complexity) The time complexity of a search algorithm is an expression for the worst-case amount of time it will take to run, expressed in terms of the maximum path length m and the maximum branching factor b. Definition (space complexity) The space complexity of a search algorithm is an expression for the worst-case amount of memory that the algorithm will use, expressed in terms of m and b. Graph Search CPSC 322 Search 2, Slide 19

CSPs: Arc Consistency

CSPs: Arc Consistency CSPs: Arc Consistency CPSC 322 CSPs 3 Textbook 4.5 CSPs: Arc Consistency CPSC 322 CSPs 3, Slide 1 Lecture Overview 1 Recap 2 Consistency 3 Arc Consistency CSPs: Arc Consistency CPSC 322 CSPs 3, Slide 2

More information

CPSC 322 Midterm Practice Questions

CPSC 322 Midterm Practice Questions CPSC 322 Midterm Practice Questions The midterm will contain some questions similar to the ones in the list below. Some of these questions may actually come verbatim from the list below. Unless otherwise

More information

Topic Objectives 11/29/2014. Basic Notion of State Space Search. Basic Notion of State Space Search. Goal Directed Agent. Goal Directed Agent

Topic Objectives 11/29/2014. Basic Notion of State Space Search. Basic Notion of State Space Search. Goal Directed Agent. Goal Directed Agent Topic Objectives CMPSC 162: Artificial Intelligence Lesson 2 State Space Search (Part 1) understand the state space representation; and gain familiarity with some common problems formulated as state space

More information

Module 2. Problem Solving using Search- (Single agent search) Version 2 CSE IIT, Kharagpur

Module 2. Problem Solving using Search- (Single agent search) Version 2 CSE IIT, Kharagpur Module 2 Problem Solving using Search- (Single agent search) 2.1 Instructional Objective The students should understand the state space representation, and gain familiarity with some common problems formulated

More information

Searching for Solutions

Searching for Solutions CS4700 (Summer 2014!) Foundations of Artificial Intelligence Searching for Solutions Jon Park DEPARTMENT OF COMPUTER SCIENCE CORNELL UNIVERSITY Agenda Review Search Problem Formulation Searching for Solutions

More information

573 Intelligent Systems

573 Intelligent Systems Sri Lanka Institute of Information Technology 3ed July, 2005 Course Outline Course Information Course Outline Reading Material Course Setup Intelligent agents. Agent types, agent environments and characteristics.

More information

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

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Blind Searches - Introduction 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

More information

The scenario: Initial state Target (Goal) states A set of intermediate states A set of operations that move the agent from one state to another.

The scenario: Initial state Target (Goal) states A set of intermediate states A set of operations that move the agent from one state to another. CmSc310 Artificial Intelligence Solving Problems by Searching - Uninformed Search 1. Introduction All AI tasks involve searching. General idea: You know where you are (initial state) and where you want

More information

(Refer Slide Time: 01:35)

(Refer Slide Time: 01:35) Artificial Intelligence Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 6 Informed Search -2 Today we start our 6 th lecture. This

More information

Measuring the Performance of an Agent

Measuring the Performance of an Agent 25 Measuring the Performance of an Agent The rational agent that we are aiming at should be successful in the task it is performing To assess the success we need to have a performance measure What is rational

More information

Problem Solving using State Space Representations

Problem Solving using State Space Representations Problem Solving using State Space Representations Overview Characteristics of agents and environments Problem-solving agents where search consists of state space operators start state goal states Abstraction

More information

(Refer Slide Time: 01:04)

(Refer Slide Time: 01:04) Artificial Intelligence Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 3 State Space Search Today we will start the third lecture

More information

10 th POLISH SUDOKU CHAMPIONSHIP INSTRUCTION BOOKLET. February 22, 2015 IMPORTANT INFORMATION:

10 th POLISH SUDOKU CHAMPIONSHIP INSTRUCTION BOOKLET. February 22, 2015 IMPORTANT INFORMATION: 10 th POLISH SUDOKU CHAMPIONSHIP February 22, 2015 INSTRUCTION BOOKLET IMPORTANT INFORMATION: 1. Answer form can be sent many times, but only the last version will be considered. 2. In case of a tie, the

More information

Solutions. 1) Is the following Boolean function linearly separable? Explain.

Solutions. 1) Is the following Boolean function linearly separable? Explain. CS/ES 480, CES 510 Mid-term # 1 Practice Problems Solutions 1) Is the following Boolean function linearly separable? Explain. f ( x, y,z ) ( x y z ) ( x y z ) ( x y z ) Solution: Geometric representation

More information

Solutions to Exercises 8

Solutions to Exercises 8 Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 8 (1) Suppose that G is a graph in which every vertex has degree at least k, where k 1, and in which every cycle contains at least 4 vertices.

More information

CMSC 451: Graph Properties, DFS, BFS, etc.

CMSC 451: Graph Properties, DFS, BFS, etc. CMSC 451: Graph Properties, DFS, BFS, etc. Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Chapter 3 of Algorithm Design by Kleinberg & Tardos. Graphs

More information

Lecture 2. Uninformed search

Lecture 2. Uninformed search Lecture 2 Uninformed search " Reference: Preparing for week 1 Reading: Chapters 1 and 2.1, 2.2, 2.5, 3.1, 3.2, 3.3, 3.4, 3.5 Assignment 1 has now been posted on the course LEARN site Uses MATLAB (a tutorial

More information

Homework #1 (Search Problems) Out: 1/14/03 Due: 1/21/03

Homework #1 (Search Problems) Out: 1/14/03 Due: 1/21/03 CS121 Introduction to Artificial Intelligence Winter 2004 Homework #1 (Search Problems) Out: 1/14/03 Due: 1/21/03 How to complete this HW: First copy this file; then insert your answers in the file immediately

More information

Heuristics and A* Search

Heuristics and A* Search 1 Hal Daumé III (me@hal3.name) Heuristics and A* Search Hal Daumé III Computer Science University of Maryland me@hal3.name CS 421: Introduction to Artificial Intelligence 2 Feb 2012 Many slides courtesy

More information

Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as:

Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as: Graph A graph G consist of 1. Set of vertices V (called nodes), (V = {v1, v2, v3, v4...}) and 2. Set of edges E (i.e., E {e1, e2, e3...cm} A graph can be represents as G = (V, E), where V is a finite and

More information

Representing Actions Planning. Learning Objectives

Representing Actions Planning. Learning Objectives Learning Objectives At the end of the class you should be able to: state the assumptions of deterministic planning represent a problem using both STRIPs and the feature-based representation of actions.

More information

CMPT 301 Artificial Intelligence Fall 2014 Homework #4

CMPT 301 Artificial Intelligence Fall 2014 Homework #4 CMPT 301 Artificial Intelligence Fall 2014 Homework #4 75 Total Points Due Date: No Later than 5:30 PM on Monday, October 6, 2014. You may either hand-in this homework written or submit it to the drop

More information

AIMA Chapter 3: Solving problems by searching

AIMA Chapter 3: Solving problems by searching AIMA Chapter 3: Solving problems by searching Ana Huaman January 13, 2011 1. Define in your own words the following terms: state, state space, search tree, search node, goal, action, transition model and

More information

Multi-Way Search Trees (B Trees)

Multi-Way Search Trees (B Trees) Multi-Way Search Trees (B Trees) Multiway Search Trees An m-way search tree is a tree in which, for some integer m called the order of the tree, each node has at most m children. If n

More information

Definition. E.g. : Attempting to represent a transport link data with a tree structure:

Definition. E.g. : Attempting to represent a transport link data with a tree structure: The ADT Graph Recall the ADT binary tree: a tree structure used mainly to represent 1 to 2 relations, i.e. each item has at most two immediate successors. Limitations of tree structures: an item in a tree

More information

CS 520: Introduction to Artificial Intelligence. Reading:

CS 520: Introduction to Artificial Intelligence. Reading: CS 520: Introduction to Artificial Intelligence Prof. Louis Steinberg Lecture 4: Constraint satisfaction 1 Reading: For next lecture: Russell & Norvig Chapter 5 For next week: Graham Read Ch 1-3 and 6

More information

Uninformed Search. Chapter 3. (Based on slides by Stuart Russell, Dan Weld, Oren Etzioni, Henry Kautz, and other UW-AI faculty)

Uninformed Search. Chapter 3. (Based on slides by Stuart Russell, Dan Weld, Oren Etzioni, Henry Kautz, and other UW-AI faculty) Uninformed Search Chapter 3 (Based on slides by Stuart Russell, Dan Weld, Oren Etzioni, Henry Kautz, and other UW-AI faculty) What is Search? Search is a class of techniques for systematically finding

More information

Chapter 4. Trees. 4.1 Basics

Chapter 4. Trees. 4.1 Basics Chapter 4 Trees 4.1 Basics A tree is a connected graph with no cycles. A forest is a collection of trees. A vertex of degree one, particularly in a tree, is called a leaf. Trees arise in a variety of applications.

More information

Informed search algorithms

Informed search algorithms CmpE 540 Principles of Artificial Intelligence Informed search algorithms Pınar Yolum pinar.yolum@boun.edu.tr Department of Computer Engineering Boğaziçi University Chapter 4 (Sections 1 3) (Based mostly

More information

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. CS 188 Fall 2015 Introduction to rtificial Intelligence Midterm You have approximately 80 minutes. The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. Mark your

More information

Outline. Informed search algorithms. Greedy best-first search. Best-first search. Greedy best-first search example. Greedy best-first search example

Outline. Informed search algorithms. Greedy best-first search. Best-first search. Greedy best-first search example. Greedy best-first search example Outline Informed search algorithms Chapter 4 Best-first search A * search Heuristics Local search algorithms Hill-climbing search Simulated annealing search Local beam search Genetic algorithms Best-first

More information

Uninformed Search. Chapter 3. Some material adopted from notes and slides by Marie desjardins and Charles R. Dyer

Uninformed Search. Chapter 3. Some material adopted from notes and slides by Marie desjardins and Charles R. Dyer Uninformed Search Chapter 3 Some material adopted from notes and slides by Marie desjardins and Charles R. Dyer Today s class Goal-based agents Representing states and operators Example problems Generic

More information

A problem consists of. Artificial Intelligence. Example: 8-puzzle. Example: 8-puzzle. Example: 8-puzzle. Expanding 8-puzzle

A problem consists of. Artificial Intelligence. Example: 8-puzzle. Example: 8-puzzle. Example: 8-puzzle. Expanding 8-puzzle A problem consists of Artificial Intelligence Uninformed search Chapter 3, AIMA An initial state, θ(0) A list of possible actions, α, for the agent A goal test (there can be many goal states) A path cost

More information

A Sudoku Solver. CSC 242: Artificial Intelligence. Mike Schermerhorn

A Sudoku Solver. CSC 242: Artificial Intelligence. Mike Schermerhorn A Sudoku Solver CSC 242: Artificial Intelligence Mike Schermerhorn Introduction The standard Sudoku puzzle consists of a nine by nine grid, broken into nine three by three boxes. Each of the eighty one

More information

Problem Solving Through AI

Problem Solving Through AI 2 Problem Solving Through AI 2.1 INTRODUCTION In the last chapter, we have tried to explain that Artificial Intelligence is the science and technology applied to make machines intelligent. The ultimate

More information

COT5405 Analysis of Algorithms Homework 3 Solutions

COT5405 Analysis of Algorithms Homework 3 Solutions COT0 Analysis of Algorithms Homework 3 Solutions. Prove or give a counter example: (a) In the textbook, we have two routines for graph traversal - DFS(G) and BFS(G,s) - where G is a graph and s is any

More information

Course: CS40002 Instructor: Dr. Pallab Dasgupta Department of Computer Science & Engineering Indian Institute of Technology Kharagpur

Course: CS40002 Instructor: Dr. Pallab Dasgupta Department of Computer Science & Engineering Indian Institute of Technology Kharagpur Problem Solving by Search Course: CS40002 Instructor: Dr. Pallab Dasgupta Department of Computer Science & Engineering Indian Institute of Technology Kharagpur Search Frameworks State space search Uninformed

More information

PART II Algorithms for Message- Passing Systems. Section 7 Introduction Model Basic Graph Algorithms

PART II Algorithms for Message- Passing Systems. Section 7 Introduction Model Basic Graph Algorithms PART II Algorithms for Message- Passing Systems Section 7 Introduction Model Basic Graph Algorithms 1 Formal Model for Message-Passing Systems There are n processes in the system: p 0,.., p n-1 Each process

More information

Graph Algorithms using Map-Reduce

Graph Algorithms using Map-Reduce Graph Algorithms using Map-Reduce Graphs are ubiquitous in modern society. Some examples: The hyperlink structure of the web 1/7 Graph Algorithms using Map-Reduce Graphs are ubiquitous in modern society.

More information

Graphs and Network Flows IE411 Lecture 1

Graphs and Network Flows IE411 Lecture 1 Graphs and Network Flows IE411 Lecture 1 Dr. Ted Ralphs IE411 Lecture 1 1 References for Today s Lecture Required reading Sections 17.1, 19.1 References AMO Chapter 1 and Section 2.1 and 2.2 IE411 Lecture

More information

CS 151: Intelligent Agents, Problem Formulation and Search

CS 151: Intelligent Agents, Problem Formulation and Search CS 151: Intelligent Agents, Problem Formulation and Search How do we make a vacuum "smart?" Vacuum, clean the house! Um OK?? This one's got no chance How do we represent this task? Hmmm where to begin?

More information

Lecture Notes on Spanning Trees

Lecture Notes on Spanning Trees Lecture Notes on Spanning Trees 15-122: Principles of Imperative Computation Frank Pfenning Lecture 26 April 26, 2011 1 Introduction In this lecture we introduce graphs. Graphs provide a uniform model

More information

Mathematical induction. Niloufar Shafiei

Mathematical induction. Niloufar Shafiei Mathematical induction Niloufar Shafiei Mathematical induction Mathematical induction is an extremely important proof technique. Mathematical induction can be used to prove results about complexity of

More information

5. Binary objects labeling

5. Binary objects labeling Image Processing - Laboratory 5: Binary objects labeling 1 5. Binary objects labeling 5.1. Introduction In this laboratory an object labeling algorithm which allows you to label distinct objects from a

More information

Sudoku puzzles and how to solve them

Sudoku puzzles and how to solve them Sudoku puzzles and how to solve them Andries E. Brouwer 2006-05-31 1 Sudoku Figure 1: Two puzzles the second one is difficult A Sudoku puzzle (of classical type ) consists of a 9-by-9 matrix partitioned

More information

Introduction & Overview

Introduction & Overview ID2204: Constraint Programming Introduction & Overview Lecture 01, Christian Schulte cschulte@kth.se Software and Computer Systems School of Information and Communication Technology KTH Royal Institute

More information

CS188 Spring 2011 Section 3: Game Trees

CS188 Spring 2011 Section 3: Game Trees CS188 Spring 2011 Section 3: Game Trees 1 Warm-Up: Column-Row You have a 3x3 matrix of values like the one below. In a somewhat boring game, player A first selects a row, and then player B selects a column.

More information

State Space Problem Definition

State Space Problem Definition Blind Search State Space Problem Definition One widely used way to describe problems is by listing or describing all possible states. Solving a problem means moving through the state space from a start

More information

Constraint Satisfaction Problems (CSP)

Constraint Satisfaction Problems (CSP) Example: Map-Coloring c: Artificial Intelligence Constraint Satisfaction Problems (CSP) Chapter, Textbook ariables WA, NT, Q,,,, T Domains D i = {red,green,blue} Constraints: adjacent regions must have

More information

UNIVERSITI MALAYSIA SARAWAK KOTA SAMARAHAN SARAWAK PSD2023 ALGORITHM & DATA STRUCTURE

UNIVERSITI MALAYSIA SARAWAK KOTA SAMARAHAN SARAWAK PSD2023 ALGORITHM & DATA STRUCTURE STUDENT IDENTIFICATION NO UNIVERSITI MALAYSIA SARAWAK 94300 KOTA SAMARAHAN SARAWAK FAKULTI SAINS KOMPUTER & TEKNOLOGI MAKLUMAT (Faculty of Computer Science & Information Technology) Diploma in Multimedia

More information

6.852: Distributed Algorithms Fall, 2009. Class 2

6.852: Distributed Algorithms Fall, 2009. Class 2 .8: Distributed Algorithms Fall, 009 Class Today s plan Leader election in a synchronous ring: Lower bound for comparison-based algorithms. Basic computation in general synchronous networks: Leader election

More information

Minimum Spanning Trees

Minimum Spanning Trees Minimum Spanning Trees Algorithms and 18.304 Presentation Outline 1 Graph Terminology Minimum Spanning Trees 2 3 Outline Graph Terminology Minimum Spanning Trees 1 Graph Terminology Minimum Spanning Trees

More information

Algorithm Design and Analysis Homework #6 Due: 1pm, Monday, January 9, === Homework submission instructions ===

Algorithm Design and Analysis Homework #6 Due: 1pm, Monday, January 9, === Homework submission instructions === Algorithm Design and Analysis Homework #6 Due: 1pm, Monday, January 9, 2012 === Homework submission instructions === Submit the answers for writing problems (including your programming report) through

More information

State Space Representation and Search

State Space Representation and Search 1. Introduction In this section we examine the concept of a state space and the different searches that can be used to explore the search space in order to find a solution. Before an AI problem can be

More information

Principles of Artificial Intelligence Fall 2005 Handout #2 Goal-Based Agents

Principles of Artificial Intelligence Fall 2005 Handout #2 Goal-Based Agents Principles of Artificial Intelligence Fall 2005 Handout #2 Goal-Based Agents Vasant Honavar Artificial Intelligence Research Laboratory Department of Computer Science 226 Atanasoff Hall Iowa State University

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 4. Informed Search Methods Heuristics, Local Search Methods, Genetic Algorithms Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg

More information

An Optical Sudoku Solver

An Optical Sudoku Solver An Optical Sudoku Solver Martin Byröd February 12, 07 Abstract In this report, a vision-based sudoku solver is described. The solver is capable of solving a sudoku directly from a photograph taken with

More information

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

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig AI: A Modern Approach, Chpts. 3-4 Russell and Norvig Sequential Decision Making in Robotics CS 599 Geoffrey Hollinger and Gaurav Sukhatme (Some slide content from Stuart Russell and HweeTou Ng) Spring,

More information

Midterm Examination CS540: Introduction to Artificial Intelligence

Midterm Examination CS540: Introduction to Artificial Intelligence Midterm Examination CS540: Introduction to Artificial Intelligence October 27, 2010 LAST NAME: SOLUTION FIRST NAME: SECTION (1=Zhu, 2=Dyer): Problem Score Max Score 1 15 2 16 3 7 4 15 5 12 6 10 7 15 8

More information

Data Structures and Algorithms Written Examination

Data Structures and Algorithms Written Examination Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where

More information

BEYOND CLASSICAL SEARCH: SEARCHING WITH NON-DETERMINISTIC ACTIONS SEARCHING WITH PARTIAL OBSERVATIONS ONLINE SEARCH & UNKNOWN ENVIRONMENTS

BEYOND CLASSICAL SEARCH: SEARCHING WITH NON-DETERMINISTIC ACTIONS SEARCHING WITH PARTIAL OBSERVATIONS ONLINE SEARCH & UNKNOWN ENVIRONMENTS BEYOND CLASSICAL SEARCH: SEARCHING WITH NON-DETERMINISTIC ACTIONS SEARCHING WITH PARTIAL OBSERVATIONS ONLINE SEARCH & UNKNOWN ENVIRONMENTS Chapter 4, Sections 4.3-4.5 Machines will be capable, within twenty

More information

Union-Find Algorithms. network connectivity quick find quick union improvements applications

Union-Find Algorithms. network connectivity quick find quick union improvements applications Union-Find Algorithms network connectivity quick find quick union improvements applications 1 Subtext of today s lecture (and this course) Steps to developing a usable algorithm. Define the problem. Find

More information

Constraint Satisfaction Problems. Chapter 5 Section 1 3

Constraint Satisfaction Problems. Chapter 5 Section 1 3 Constraint Satisfaction Problems Chapter 5 Section 1 3 1 Constraint satisfaction problems (CSPs) CSP: state is defined by variables X i with values from domain D i goal test is a set of constraints specifying

More information

Data Structures Fibonacci Heaps, Amortized Analysis

Data Structures Fibonacci Heaps, Amortized Analysis Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:

More information

An Introduction to The A* Algorithm

An Introduction to The A* Algorithm An Introduction to The A* Algorithm Introduction The A* (A-Star) algorithm depicts one of the most popular AI methods used to identify the shortest path between 2 locations in a mapped area. The A* algorithm

More information

Artificial Intelligence

Artificial Intelligence COMP224 Artificial Intelligence The Meaning of earch in AI The terms search, search space, search problem, search algorithm are widely used in computer science and especially in AI. In this context the

More information

3. Markov property. Markov property for MRFs. Hammersley-Clifford theorem. Markov property for Bayesian networks. I-map, P-map, and chordal graphs

3. Markov property. Markov property for MRFs. Hammersley-Clifford theorem. Markov property for Bayesian networks. I-map, P-map, and chordal graphs Markov property 3-3. Markov property Markov property for MRFs Hammersley-Clifford theorem Markov property for ayesian networks I-map, P-map, and chordal graphs Markov Chain X Y Z X = Z Y µ(x, Y, Z) = f(x,

More information

Heuristic (Informed) Search (Where we try to choose smartly)

Heuristic (Informed) Search (Where we try to choose smartly) Heuristic (Informed) Search (Where we try to choose smartly) R&: Chap., Sect.. Recall that the ordering of FRIGE defines the search strategy Search Algorithm # SEARCH#. ISERT(initial-node,FRIGE). Repeat:

More information

Lecture 2 Introduction to Data Flow Analysis

Lecture 2 Introduction to Data Flow Analysis Lecture 2 Introduction to Data Flow Analysis I. Introduction II. Example: Reaching definition analysis III. Example: Liveness analysis IV. A General Framework (Theory in next lecture) Reading: Chapter

More information

Automata and Languages

Automata and Languages Automata and Languages Computational Models: An idealized mathematical model of a computer. A computational model may be accurate in some ways but not in others. We shall be defining increasingly powerful

More information

Artificial Intelligence Search I

Artificial Intelligence Search I Content: Search I Artificial Intelligence Search I Lecture 3 Introduction Knowledge, Problem Types and Problem Formulation Search Strategies General Search Problem 4 Criteria for Evaluating Search Strategies

More information

Programming Assignment 4 Sliding Tile Puzzle

Programming Assignment 4 Sliding Tile Puzzle Department of Computer Science University of San Francisco 1 Sliding Tile Puzzles Computer Science 245 Spring 2008 Programming Assignment 4 Sliding Tile Puzzle Due Wednesday, May 7 2008 This assignment

More information

Informatics 2D Reasoning and Agents Semester 2, 2015-16

Informatics 2D Reasoning and Agents Semester 2, 2015-16 Informatics 2D Reasoning and Agents Semester 2, 2015-16 Alex Lascarides alex@inf.ed.ac.uk Lecture 30 Markov Decision Processes 25th March 2016 Informatics UoE Informatics 2D 1 Sequential decision problems

More information

Midterm Practice Problems

Midterm Practice Problems 6.042/8.062J Mathematics for Computer Science October 2, 200 Tom Leighton, Marten van Dijk, and Brooke Cowan Midterm Practice Problems Problem. [0 points] In problem set you showed that the nand operator

More information

Search. Announcements. Clarifications from Last Time. Recap of Last Time. Goal-Based Agents. Goal-Based Agents

Search. Announcements. Clarifications from Last Time. Recap of Last Time. Goal-Based Agents. Goal-Based Agents Burr H. Settles CS-540, UW-adison www.cs.wisc.edu/~cs540-1 Summer 23 Announcements Homework #1 is out today (6/18) and will be due next Friday (6/27) Please hand in Homework #0 (the info card/sheet about

More information

The A* Search Algorithm. Siyang Chen

The A* Search Algorithm. Siyang Chen The A* Search Algorithm Siyang Chen Introduction A* (pronounced A-star ) is a search algorithm that finds the shortest path between some nodes S and T in a graph. Heuristic Functions Suppose we want to

More information

PROBLEM SET 10: GAMES

PROBLEM SET 10: GAMES PROBLEM SET 10: GAMES 1. Weighing Problems There are many popular problems involving weighing with either a balance scale or a numerical scale. A balance scale has two sides. With one weighing there are

More information

Algorithms and Data Structures

Algorithms and Data Structures Algorithms and Data Structures Part 2: Data Structures PD Dr. rer. nat. habil. Ralf-Peter Mundani Computation in Engineering (CiE) Summer Term 2016 Overview general linked lists stacks queues trees 2 2

More information

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* Rakesh Nagi Department of Industrial Engineering University at Buffalo (SUNY) *Lecture notes from Network Flows by Ahuja, Magnanti

More information

Lecture 7: Approximation via Randomized Rounding

Lecture 7: Approximation via Randomized Rounding Lecture 7: Approximation via Randomized Rounding Often LPs return a fractional solution where the solution x, which is supposed to be in {0, } n, is in [0, ] n instead. There is a generic way of obtaining

More information

West Virginia University College of Engineering and Mineral Resources. Computer Engineering 313 Spring 2010

West Virginia University College of Engineering and Mineral Resources. Computer Engineering 313 Spring 2010 College of Engineering and Mineral Resources Computer Engineering 313 Spring 2010 Laboratory #4-A (Micromouse Algorithms) Goals This lab introduces the modified flood fill algorithm and teaches how to

More information

Solving the 8 Puzzle in a Minimum Number of Moves: An Application of the A* Algorithm

Solving the 8 Puzzle in a Minimum Number of Moves: An Application of the A* Algorithm Solving the 8 Puzzle in a Minimum Number of Moves: An Application of the A* Algorithm Daniel R. Kunkle Computer Science Dept. College of Computing and Information Sciences Rochester Institute of Technology

More information

5.1 Bipartite Matching

5.1 Bipartite Matching CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

More information

Today. Admin. Problem-solving agent. Tutorials start this week; See information from ITO; tutorial groups linked to FAI web page.

Today. Admin. Problem-solving agent. Tutorials start this week; See information from ITO; tutorial groups linked to FAI web page. Tutorials start this week; ee information from ITO; tutorial groups linked to FAI web page. Admin Problem solving agents tate spaces and search trees Today Components of general state space search algorithm

More information

Markov chains (cont d)

Markov chains (cont d) 6.867 Machine learning, lecture 19 (Jaaola) 1 Lecture topics: Marov chains (cont d) Hidden Marov Models Marov chains (cont d) In the contet of spectral clustering (last lecture) we discussed a random wal

More information

Graph Theory for Articulated Bodies

Graph Theory for Articulated Bodies Graph Theory for Articulated Bodies Alba Perez-Gracia Department of Mechanical Engineering, Idaho State University Articulated Bodies A set of rigid bodies (links) joined by joints that allow relative

More information

Smart Graphics: Methoden 3 Suche, Constraints

Smart Graphics: Methoden 3 Suche, Constraints Smart Graphics: Methoden 3 Suche, Constraints Vorlesung Smart Graphics LMU München Medieninformatik Butz/Boring Smart Graphics SS2007 Methoden: Suche 2 Folie 1 Themen heute Suchverfahren Hillclimbing Simulated

More information

Introduction to Machine Intelligence. Problem solving by searching

Introduction to Machine Intelligence. Problem solving by searching Introduction to Machine Intelligence Problem solving by searching In which we see how an agent can find a sequence of actions that achieves its goals, when no single action will do. Dr. Igor Trajkovski

More information

CPS331 Lecture: Search last revised January 29, Objectives:

CPS331 Lecture: Search last revised January 29, Objectives: CPS331 Lecture: Search last revised January 29, 2014 Objectives: 1. To introduce the concept of a state space 2. To discuss uninformed search strategies 3. To introduce the use of heuristics in searches

More information

Recursive Data Structures

Recursive Data Structures Recursive Data Structures Computer scientists often encounter data structures that are defined recursively Trees (Chapter 8) are defined recursively Linked list can be described as a recursive data structure

More information

Graphical Models. CS 343: Artificial Intelligence Bayesian Networks. Raymond J. Mooney. Conditional Probability Tables.

Graphical Models. CS 343: Artificial Intelligence Bayesian Networks. Raymond J. Mooney. Conditional Probability Tables. Graphical Models CS 343: Artificial Intelligence Bayesian Networks Raymond J. Mooney University of Texas at Austin 1 If no assumption of independence is made, then an exponential number of parameters must

More information

Principles of AI Planning

Principles of AI Planning Principles of Dr. Jussi Rintanen Albert-Ludwigs-Universität Freiburg Summer term 2005 Course: Principles of Lecturer Dr Jussi Rintanen (rintanen@informatik.uni-freiburg.de) Lecture Monday 2-4pm, Wednesday

More information

Priority Queues. Client, Implementation, Interface. Priority Queues. Abstract Data Types

Priority Queues. Client, Implementation, Interface. Priority Queues. Abstract Data Types Client, Implementation, Interface Priority Queues Priority Queue ADT Binary heaps Heapsort Reference: Chapter 6, Algorithms in Java, 3 rd Edition, Robert Sedgewick. Separate interface and implementation

More information

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

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

More information

1 eg. Given the digits in black, we know that digit 1 must be at Row 2 Column 9. X stands for any digit other than 1.

1 eg. Given the digits in black, we know that digit 1 must be at Row 2 Column 9. X stands for any digit other than 1. Sudoku Solving: Dot method and more. David A Paterson (aka mollwollfumble) 2 Apr 204 This is a quick summary giving examples of how I solve Sudokus of all difficulties. It contains useful mental and written

More information

Sudoku as an Expression in Propositional Logic

Sudoku as an Expression in Propositional Logic Sudoku as an Expression in Propositional Logic Peter Cappello Department of Computer Science University of California, Santa Barbara INTRODUCTION Sudoku is a kind of puzzle that involves a 9 9 array of

More information

ARTIFICIAL INTELLIGENCE

ARTIFICIAL INTELLIGENCE Ho Chi Minh City University of Technology Faculty of Computer Science and Engineering ARTIFICIAL INTELLIGENCE Huỳnh Tấn Đạt Email: htdat@cse.hcmut.edu.vn Home Page: http://www.cse.hcmut.edu.vn/~htdat/

More information

COS513 LECTURE 5 JUNCTION TREE ALGORITHM

COS513 LECTURE 5 JUNCTION TREE ALGORITHM COS513 LECTURE 5 JUNCTION TREE ALGORITHM D. EIS AND V. KOSTINA The junction tree algorithm is the culmination of the way graph theory and probability combine to form graphical models. After we discuss

More information

The Shapley Value and the Core

The Shapley Value and the Core The Shapley Value and the Core Lecture 23 The Shapley Value and the Core Lecture 23, Slide 1 Lecture Overview 1 Recap 2 Analyzing Coalitional Games 3 The Shapley Value 4 The Core The Shapley Value and

More information

LECTURE 10: GAMES IN EXTENSIVE FORM

LECTURE 10: GAMES IN EXTENSIVE FORM LECTURE 10: GAMES IN EXTENSIVE FORM Sequential Move Games 2 so far, we have only dealt with simultaneous games (players make the decisions at the same time, or simply without knowing what the action of

More information