Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian1 Search-Based Agents  Appropriate in Static Environments.

Slides:



Advertisements
Similar presentations
Lights Out Issues Questions? Comment from me.
Advertisements

1 Search Problems (read Chapters 3 and 4 of Russell and Norvig) Many (perhaps most) AI problems can be considered search problems. This can be modeled.
G5AIAI Introduction to AI
G5BAIM Artificial Intelligence Methods Graham Kendall Blind Searches.
CS 484 – Artificial Intelligence1 Announcements Department Picnic: today, after class Lab 0 due today Homework 2 due Tuesday, 9/18 Lab 1 due Thursday,
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Informed search.
Introduction to Artificial Intelligence A* Search Ruth Bergman Fall 2002.
CS 561, Session 7 1 Recall: breadth-first search, step by step.
A* Search Introduction to AI. What is an A* Search? A greedy search method minimizes the cost to the goal by using an heuristic function, h(n). It works.
Introduction to Artificial Intelligence Heuristic Search Ruth Bergman Fall 2004.
Artificial Intelligence
MAE 552 – Heuristic Optimization Lecture 27 April 3, 2002
Introduction to Artificial Intelligence Problem Solving Ruth Bergman Fall 2002.
Introduction to Artificial Intelligence A* Search Ruth Bergman Fall 2004.
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
Problem Solving and Search in AI Heuristic Search
Introduction to Artificial Intelligence Heuristic Search Ruth Bergman Fall 2002.
CSC344: AI for Games Lecture 4: Informed search
CS 561, Session 7 1 Recall: breadth-first search, step by step.
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Rutgers CS440, Fall 2003 Heuristic search Reading: AIMA 2 nd ed., Ch
Informed Search Next time: Search Application Reading: Machine Translation paper under Links Username and password will be mailed to class.
Artificial Intelligence Problem solving by searching CSC 361 Prof. Mohamed Batouche Computer Science Department CCIS – King Saud University Riyadh, Saudi.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
1 CS 2710, ISSP 2610 Chapter 4, Part 1 Heuristic Search.
Problem-Solving by Searching Uninformed (Blind) Search Algorithms.
2013/10/17 Informed search A* algorithm. Outline 2 Informed = use problem-specific knowledge Which search strategies? Best-first search and its variants.
Informed Search Include specific knowledge to efficiently conduct the search and find the solution.
1 Solving problems by searching 171, Class 2 Chapter 3.
CSC3203: AI for Games Informed search (1) Patrick Olivier
Local Search and Optimization Presented by Collin Kanaley.
CMSC 671 Fall 2010 Thu 9/9/10 Uninformed Search (summary) Informed Search Functional Programming (revisited) Prof. Laura Zavala,
Informed Search I (Beginning of AIMA Chapter 4.1)
Artificial Intelligence Problem solving by searching.
1 Kuliah 4 : Informed Search. 2 Outline Best-First Search Greedy Search A* Search.
Solving problems by searching 1. Outline Problem formulation Example problems Basic search algorithms 2.
1 CS 2710, ISSP 2160 Chapter 3, Part 2 Heuristic Search.
Heuristic Search Foundations of Artificial Intelligence.
Introduction to Artificial Intelligence (G51IAI)
Fahiem Bacchus © 2005 University of Toronto 1 CSC384: Intro to Artificial Intelligence Search II ● Announcements.
3.5 Informed (Heuristic) Searches This section show how an informed search strategy can find solution more efficiently than uninformed strategy. Best-first.
Informed Search 1.
Search Methodologies Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Romania with step costs in km
Romania. Romania Problem Initial state: Arad Goal state: Bucharest Operators: From any node, you can visit any connected node. Operator cost, the.
Uninformed Search ECE457 Applied Artificial Intelligence Spring 2008 Lecture #2.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Informed Search Methods
Recall: breadth-first search, step by step
State Space Representations and Search Algorithms
Last time: Problem-Solving
Artificial Intelligence (CS 370D)
Heuristic Search Introduction to Artificial Intelligence
ECE 448 Lecture 4: Search Intro
Introduction to Artificial Intelligence
Artificial Intelligence
A* Example Newly generated node s, but OLD on OPEN has the same state.
COMP 8620 Advanced Topics in AI
Informed search algorithms
Artificial Intelligence
More on Search: A* and Optimization
Solving problems by searching
The Rich/Knight Implementation
CS440/ECE 448 Lecture 4: Search Intro
The Rich/Knight Implementation
ECE457 Applied Artificial Intelligence Spring 2008 Lecture #3
Solving problems by searching
Presentation transcript:

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian1 Search-Based Agents  Appropriate in Static Environments where a model of the agent is known and the environment allows prediction of the effects of actions evaluation of goals or utilities of predicted states  Environment can be partially-observable, stochastic, sequential, continuous, and even multi-agent, but it must be static!  We will first study the deterministic, discrete, single-agent case.

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian2 Computing Driving Directions Arad Oradea Zerind Timisoara Lugoj Dobreta Sibiu Rimnicu Vilcea Fagaras Pitesti Mehadia Craiova Bucharest Giurgia Urzicenl Neamt Iasi Vasini Hirsova Eforie You are here You want to be here

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian3 Search Algorithms  Breadth-First  Depth-First  Uniform Cost  A*  Dijkstra’s Algorithm

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian4 Oradea (146) 71 Breadth-First Arad (0) 75 Zerind (75) 118 Timisoara (118) Lugoj (229) 111 Mehadia (299) Dobreta (486) Sibiu (140) 151 Rimnicu Vilcea (220) 80 Fagaras (239) 99 Craiova (366) 146 Pitesti (317) Bucharest (450) Detect duplicate path (291) Detect new shorter path (418) Detect duplicate path (455) Detect duplicate path (504) Detect new shorter path (374) Detect duplicate path (494) Detect duplicate path (197)

Breadth-First Oradea (146) 71 Arad (0) 75 Zerind (75) 118 Timisoara (118) Lugoj (229) 111 Mehadia (299) Dobreta (486) Sibiu (140) 151 Rimnicu Vilcea (220) 80 Fagaras (239) 99 Craiova (366) 146 Pitesti (317) Bucharest (450) Arad (0) Sibiu (140)Zerind (75) Timisoara (118) Arad (150) Oradea (146) Arad (280) Fagaras (239) Oradea (291) Arad (236) Lugoj (229) Sibiu (197)Sibiu (338)Bucharest (450) Rimnicu Vilcea (220) Timisoara (340) Mehadia (299) Sibiu (300) Pitesti (317)Craiova (366) Lugoj (369) Dobreta (374) Craiova (455)Rimnicu Vilcea (317)Bucharest (418) Rimnicu Vilcea (482) Dobreta (486)Pitesti (504)Medhadia (449)Craiova (494) Zerind (217)

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian6 Formal Statement of Search Problems  State Space: set of possible “mental” states cities in Romania  Initial State: state from which search begins Arad  Operators: simulated actions that take the agent from one mental state to another traverse highway between two cities  Goal Test: Is current state Bucharest?

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian7 General Search Algorithm  Strategy: first-in first-out queue (expand oldest leaf first)

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian8 Leaf Selection Strategies  Breadth-First Search: oldest leaf (FIFO)  Depth-First Search: youngest leaf (LIFO)  Uniform Cost Search: cheapest leaf (Priority Queue)  A* search: leaf with estimated shortest total path length g(x) + h(x) = f(x) where g(x) is length so far and h(x) is estimate of remaining length (Priority Queue)

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian9 A* Search  Let h(x) be a “heuristic function” that gives an underestimate of the true distance between x and the goal state Example: Euclidean distance  Let g(x) be the distance from the start to x, then g(x) + h(x) is an lower bound on the length of the optimal path

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian10 Euclidean Distance Table Arad 366 Mehadia 241 Bucharest 0 Neamt 234 Craiova 160 Oradea 380 Dobreta 242 Pitesti 100 Eforie 161 Rimnicu Vilcea 193 Fagaras 176 Sibiu 253 Giurgiu 77 Timisoara 329 Hirsova 151 Urziceni 80 Iasi 226 Vaslui 199 Lugoj 244 Zerind 374

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian11 A* Search Arad (0+366=366) Sibiu ( =393)Zerind (75+374=449) Timisoara ( =447) Fagaras ( =415)Oradea ( =671) Bucharest (450+0=450) Rimnicu Vilcea ( =413) Pitesti ( =417) Craiova ( =526) Craiova ( =615) Bucharest (418+0=418) All remaining leaves have f(x) ¸ 418, so we know they cannot have shorter paths to Bucharest

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian12 Dijkstra’s Algorithm  Works backwards from the goal  Each node keeps track of the shortest known path (and its length) to the goal  Equivalent to uniform cost search starting at the goal  No early stopping: finds shortest path from all nodes to the goal

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian13 Local Search Algorithms  Keep a single current state x  Repeat Apply one or more operators to x Evaluate the resulting states according to an Objective Function J(x) Choose one of them to replace x (or decide not to replace x at all)  Until time limit or stopping criterion

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian14 Hill Climbing  Simple hill climbing: apply a randomly-chosen operator to the current state  If resulting state is better, replace current state  Steepest-Ascent Hill Climbing:  Apply all operators to current state, keep state with the best value  Stop when no successors state is better than current state

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian15 Gradient Ascent  In continuous state spaces, x = (x 1, x 2, …, x n ) is a vector of real values  Continuous operator: x := x+  x for any arbitrary vector  x (infinitely many operators!)  Suppose J(x) is differentiable. Then we can compute the direction of steepest increase of J by the first derivative with respect to x, the gradient:

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian16 Gradient Descent Search  Repeat Compute Gradient rJ Update x := x +  rJ  Until rJ ¼ 0   is the “step size”, and it must be chosen carefully  Methods such as conjugate gradient and Newton’s method choose  automatically

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian17 Visualizing Gradient Ascent If  is too large, search may overshoot and miss the maximum or oscillate forever

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian18 Problems with Hill Climbing  Local optima  Flat regions  Random restarts can give good results

Oregon State University – CS430 Intro to AI (c) 2003 Thomas G. Dietterich and Devika Subramanian19 Simulated Annealing  T = 100 (or some large value)  Repeat Apply randomly-chosen operator to x to obtain x′. Let  E = J(x′) – J(x) If  E > 0, /* J(x′) is better */ switch to x′ Else /* J(x′) is worse */ switch to x′ with probability exp [  E/T] /* large negative steps are less likely */ T := 0.99 * T */ “cool” T */  Slowly decrease T (“anneal”) to zero  Stop when no changes have been accepted for many moves  Idea: Accept “down hill” steps with some probability to help escape from local minima. As T ! 0 this probability goes to zero.