Trading optimality for speed…

Slides:



Advertisements
Similar presentations
Informed search algorithms
Advertisements

Informed search algorithms
Local Search Algorithms
Local Search Algorithms Chapter 4. Outline Hill-climbing search Simulated annealing search Local beam search Genetic algorithms Ant Colony Optimization.
LOCAL SEARCH AND CONTINUOUS SEARCH. Local search algorithms  In many optimization problems, the path to the goal is irrelevant ; the goal state itself.
Problem Solving by Searching
CSC344: AI for Games Lecture 5 Advanced heuristic search Patrick Olivier
Local search algorithms
Local search algorithms
Two types of search problems
Informed Search Methods Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 4 Spring 2005.
CS 460 Spring 2011 Lecture 3 Heuristic Search / Local Search.
Adapted by Doug Downey from Bryan Pardo Fall 2007 Machine Learning EECS 349 Machine Learning Lecture 4: Greedy Local Search (Hill Climbing)
Review Best-first search uses an evaluation function f(n) to select the next node for expansion. Greedy best-first search uses f(n) = h(n). Greedy best.
CSC344: AI for Games Lecture 4: Informed search
Informed Search Chapter 4 Adapted from materials by Tim Finin, Marie desJardins, and Charles R. Dyer CS 63.
Beyond Classical Search (Local Search) R&N III: Chapter 4
Informed Search Next time: Search Application Reading: Machine Translation paper under Links Username and password will be mailed to class.
Constraint Satisfaction Problems
Informed search algorithms
Local Search and Optimization
Search CSE When you can’t use A* Hill-climbing Simulated Annealing Other strategies 2 person- games.
INTRODUÇÃO AOS SISTEMAS INTELIGENTES Prof. Dr. Celso A.A. Kaestner PPGEE-CP / UTFPR Agosto de 2011.
An Introduction to Artificial Life Lecture 4b: Informed Search and Exploration Ramin Halavati In which we see how information.
Local Search Algorithms This lecture topic Chapter Next lecture topic Chapter 5 (Please read lecture topic material before and after each lecture.
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
Informed search algorithms
Informed search algorithms
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
1 Shanghai Jiao Tong University Informed Search and Exploration.
Chapter 4.1 Beyond “Classic” Search. What were the pieces necessary for “classic” search.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
ISC 4322/6300 – GAM 4322 Artificial Intelligence Lecture 3 Informed Search and Exploration Instructor: Alireza Tavakkoli September 10, 2009 University.
CS 380: Artificial Intelligence Lecture #4 William Regli.
Iterative Improvement Algorithm 2012/03/20. Outline Local Search Algorithms Hill-Climbing Search Simulated Annealing Search Local Beam Search Genetic.
Artificial Intelligence for Games Online and local search
Local Search Algorithms
Local Search Pat Riddle 2012 Semester 2 Patricia J Riddle Adapted from slides by Stuart Russell,
For Wednesday Read chapter 6, sections 1-3 Homework: –Chapter 4, exercise 1.
For Wednesday Read chapter 5, sections 1-4 Homework: –Chapter 3, exercise 23. Then do the exercise again, but use greedy heuristic search instead of A*
Princess Nora University Artificial Intelligence Chapter (4) Informed search algorithms 1.
Artificial Intelligence for Games Informed Search (2) Patrick Olivier
CSC3203: AI for Games Informed search (1) Patrick Olivier
Local Search and Optimization Presented by Collin Kanaley.
4/11/2005EE562 EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005.
A General Introduction to Artificial Intelligence.
Feng Zhiyong Tianjin University Fall  Best-first search  Greedy best-first search  A * search  Heuristics  Local search algorithms  Hill-climbing.
Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most desirable unexpanded node Implementation:
Local search algorithms In many optimization problems, the state space is the space of all possible complete solutions We have an objective function that.
Informed search algorithms Chapter 4 Slides derived in part from converted to powerpoint by Min-Yen.
Announcement "A note taker is being recruited for this class. No extra time outside of class is required. If you take clear, well-organized notes, this.
Local Search. Systematic versus local search u Systematic search  Breadth-first, depth-first, IDDFS, A*, IDA*, etc  Keep one or more paths in memory.
Chapter 4 (Section 4.3, …) 2 nd Edition or Chapter 4 (3 rd Edition) Local Search and Optimization.
Chapter 5. Advanced Search Fall 2011 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
Lecture 6 – Local Search Dr. Muhammad Adnan Hashmi 1 24 February 2016.
Local Search Algorithms and Optimization Problems
CPSC 420 – Artificial Intelligence Texas A & M University Lecture 5 Lecturer: Laurie webster II, M.S.S.E., M.S.E.e., M.S.BME, Ph.D., P.E.
Local Search and Optimization Chapter 4 Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld…) 1.
Local Search Algorithms CMPT 463. When: Tuesday, April 5 3:30PM Where: RLC 105 Team based: one, two or three people per team Languages: Python, C++ and.
Local Search Goal is to find the local maximum (or minimum) Example: – # seconds to spin wheels at 1.0 to move 2.0 meters.
Constraints Satisfaction Edmondo Trentin, DIISM. Constraint Satisfaction Problems: Local Search In many optimization problems, the path to the goal is.
Local search algorithms In many optimization problems, the path to the goal is irrelevant; the goal state itself is the solution State space = set of "complete"
Local Search Algorithms
Artificial Intelligence (CS 370D)
Artificial Intelligence
First Exam 18/10/2010.
Local Search Algorithms
CSC 380: Design and Analysis of Algorithms
Beyond Classical Search
Local Search Algorithms
Presentation transcript:

Trading optimality for speed… The admissibility condition guarantees that an optimal path is found In path planning a near-optimal path can be satisfactory Try to minimise search instead of minimising cost: i.e. find a near-optimal path (quickly)

CSC344: AI for Games Lecture 6 Online and local search Patrick Olivier p.l.olivier@ncl.ac.uk

) ( 1 n wh g w f + - = Weighting… trading safety/optimality for speed w = 0.0 (breadth-first) w = 0.5 (A*) w = 1.0 (best-first, with f = h) trading safety/optimality for speed weight towards h when confident in the estimate of h

Local search algorithms In many optimisation problems, paths are irrelevant; goal state the solution State space = set of "complete" configurations Find configuration satisfying constraints, e.g., n-queens: n queens on an n ×n board with no two queens on the same row, column, or diagonal Use local search algorithms which keep a single "current" state and try to improve it

Hill-climbing search "climbing Everest in thick fog with amnesia” we can set up an objective function to be “best” when large (perform hill climbing) …or we can use the previous formulation of heuristic and minimise the objective function (perform gradient descent)

Local maxima/minina Problem: depending on initial state, can get stuck in local maxima/minina 1/(1+H(n)) = 1/17 1/(1+H(n)) = 1/2 Local minima

Local beam search Keep track of k states rather than just one Start with k randomly generated states At each iteration, all the successors of all k states are generated If any one is a goal state, stop; else select the k best successors from the complete list and repeat.

Simulated annealing search Idea: escape local maxima by allowing some "bad" moves but gradually decrease their frequency and range (VSLI layout, scheduling)

Simulated annealing example Point feature labelling

Genetic algorithm search A successor state is generated by combining two parent states Start with k randomly generated states (population) A state is represented as a string over a finite alphabet (often a string of 0s and 1s) Evaluation function (fitness function). Higher values for better states. Produce the next generation of states by selection, crossover, and mutation

Genetic algorithms in games Computationally expensive so primarily offline form of learning Cloak, Dagger & DNA (Oidian Systems) 4 DNA strands defining opponent behaviour between battles, opponents play each other Creatures (Millennium Interactive) Genetic algorithms to learning the weights in a neural network that defines behaviour

“Real-time” search concepts In A* the whole path is computed off-line, before the agent walks through the path This solution is only valid for static worlds If the world changes in the meantime, the initial path is no longer valid: new obstacles appear position of goal changes (e.g. moving target)

“Real-time” definitions Off-line (non real-time): the solution is computed in a given amount of time before being executed Real-time: One move is computed at a time, and that move executed before computing the next Anytime: the algorithm constantly improves its solution through time capable of providing “current best” at any time

Agent-based (online) search For example: mobile robot NPC without perfect knowledge agent that must act now with limited information Planning and execution are interleaved Could apply standard search techniques: Best-first (but we know it is poor) Depth-first (has to physically back-track) A* (but nodes in the fringe are not accessible)

LRTA*: Learning Real-time A* Augment hill-climbing with memory Store “current best estimate” Follow path based on neighbours’ estimates Update estimates based on experience Experience  Learning Flatten out local maxima…

LRTA*: example 8 9 2 4 1 8 9 3 2 4 1 8 9 3 4 1 8 9 5 4 1 8 9 5 4 1

Learning real-time A*