EA C461 – Artificial Intelligence

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

Additional Topics ARTIFICIAL INTELLIGENCE
Review: Search problem formulation
Informed Search Algorithms
Informed search algorithms
An Introduction to Artificial Intelligence
A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
Problem Solving: Informed Search Algorithms Edmondo Trentin, DIISM.
Solving Problem by Searching
1 Heuristic Search Chapter 4. 2 Outline Heuristic function Greedy Best-first search Admissible heuristic and A* Properties of A* Algorithm IDA*
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
EIE426-AICV 1 Blind and Informed Search Methods Filename: eie426-search-methods-0809.ppt.
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
Informed search.
Review: Search problem formulation
CSC344: AI for Games Lecture 4: Informed search
Informed search algorithms Chapter 4. Outline Best-first search Greedy best-first search A * search Heuristics.
CHAPTER 4: INFORMED SEARCH & EXPLORATION Prepared by: Ece UYKUR.
1 Shanghai Jiao Tong University Informed Search and Exploration.
Informed search algorithms Chapter 4. Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most.
Informed search strategies Idea: give the algorithm “hints” about the desirability of different states – Use an evaluation function to rank nodes and select.
Informed searching. Informed search Blind search algorithms do not consider any information about the states and the goals Often there is extra knowledge.
Chapter 4 Informed/Heuristic Search
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
Advanced Artificial Intelligence Lecture 2: Search.
CSC3203: AI for Games Informed search (1) Patrick Olivier
Informed Search and Heuristics Chapter 3.5~7. Outline Best-first search Greedy best-first search A * search Heuristics.
A General Introduction to Artificial Intelligence.
Best-first search Idea: use an evaluation function f(n) for each node –estimate of "desirability"  Expand most desirable unexpanded node Implementation:
Informed Search CSE 473 University of Washington.
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.
Romania. Romania Problem Initial state: Arad Goal state: Bucharest Operators: From any node, you can visit any connected node. Operator cost, the.
Reading Material Sections 3.3 – 3.5 Sections 4.1 – 4.2 “Optimal Rectangle Packing: New Results” By R. Korf (optional) “Optimal Rectangle Packing: A Meta-CSP.
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.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Lecture 3 Problem Solving through search Uninformed Search
Lecture 3: Uninformed Search
Review: Tree search Initialize the frontier using the starting state
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Last time: Problem-Solving
Artificial Intelligence (CS 370D)
Uninformed Search Chapter 3.4.
Uninformed Search Strategies
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.
Discussion on Greedy Search and A*
Discussion on Greedy Search and A*
Solving problems by searching
Lecture 1B: Search.
CS 4100 Artificial Intelligence
Artificial Intelligence Informed Search Algorithms
COMP 8620 Advanced Topics in AI
Artificial Intelligence
Searching for Solutions
Informed search algorithms
Informed search algorithms
Artificial Intelligence
CSE 473 University of Washington
Chap 4: Searching Techniques
HW 1: Warmup Missionaries and Cannibals
HW 1: Warmup Missionaries and Cannibals
Artificial Intelligence
CS 416 Artificial Intelligence
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
Solving Problems by Searching
Informed Search.
Presentation transcript:

EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence To Discuss Uninformed Search Strategies ( Breadth First Search, Uniform Cost Search, Depth First Search, Depth Limited Search, Iterative Deepening Search, Bidirectional Search ) Handling Partial Information Informed Search Strategies (Best First Search, Greedy Best First Search, A* Search, Memory Bounded Heuristic Search ) EA C461 – Artificial Intelligence

Iterative deepening search EA C461 – Artificial Intelligence

Iterative deepening search l =0 EA C461 – Artificial Intelligence

Iterative deepening search l =1 EA C461 – Artificial Intelligence

Iterative deepening search l =2 EA C461 – Artificial Intelligence

Iterative deepening search l =3 EA C461 – Artificial Intelligence

Iterative deepening search N(IDS) = (d) (b) + (d-1) (b2) + (d-2) (b3) + (d-3) (b4) + (d-4) (b5) + …+(bd) N(BFS) = b + b2 + b3 + b4 + …+ bd + (bd+1 b) For b=10, d=5 N(IDS) = 50 + 400 + 3000 + 20,000 + 100,00 = 123,450 N(BFS) = 10 + 100 + 1000 + 10,000 + 100,000 + 999,990 = 1,111,100 IDS is the preferred uninformed search method when there is a large search space, and the depth is unknown EA C461 – Artificial Intelligence

Iterative deepening search For b = 10, d = 5, NDLS = 1 + 10 + 100 + 1,000 + 10,000 + 100,000 = 111,111 NIDS = 6 + 50 + 400 + 3,000 + 20,000 + 100,000 = 123,456 Overhead = (123,456 - 111,111)/111,111 = 11% EA C461 – Artificial Intelligence

Properties of iterative deepening search Complete? Yes Time? (d+1)b0 + d b1 + (d-1)b2 + … + bd = O(bd) Space? O(bd) Optimal? Yes, if step cost = 1 EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Summary of algorithms EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence bidirectional search d d/2 d/2 Time ~ bd/2 + bd/2 < bd EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Repeated states Failure to detect repeated states can turn a linear problem into an exponential one! EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Graph search EA C461 – Artificial Intelligence

Searching with Partial Information Sensorless Problems (Conformant problems) Contingency Problems Exploration Problems EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Summary Problem formulation usually requires abstracting away real-world details to define a state space that can feasibly be explored Variety of uninformed search strategies Iterative deepening search uses only linear space and not much more time than other uninformed algorithms EA C461 – Artificial Intelligence

Informed Search Techniques Heuristic / Informed Uses additional information about nodes (heuristics) that have not yet been explored to decide which nodes to examine next Blind / Uninformed Assumes no additional information about the problem Heuristic function h (n) used in search provides an estimate of the distance from any given node to a goal node EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Best First Search A node is selected for expansion based on an evaluation function f(n) Choose the node which appears to be best while expanding Best First Search algorithms differs in the evaluation function Evaluation function incorporate the problem specific knowledge in the form of h(n) h(n)  heuristic function , a component of f(n)  Estimated cost of cheapest path to the goal node h(n) = 0, if n is the goal node Greedy Best First Search, A* Search EA C461 – Artificial Intelligence

Greedy best-first search Expands the node that is closest to the goal Consider route finding problem in Romania Use of hSLD, Straight Line Distance Heuristic Evaluation function f(n) = h(n) (heuristic), estimate of cost from n to goal For the problem of finding route from Arad to Burcharest… EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Optimal Distance 140+80+97+101 = 418 EA C461 – Artificial Intelligence

Greedy best-first search EA C461 – Artificial Intelligence

Greedy best-first search EA C461 – Artificial Intelligence

Greedy best-first search EA C461 – Artificial Intelligence

Greedy best-first search EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Optimal Distance 140+80+97+101 = 418 EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Critics Minimizing f(n) is susceptible to false start Same issues with DFS Not optimal, Incomplete (may search an infinite path) Performance depends problem and heuristic O(bm)  Worst case space needed EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence A* Search A better form of best-first search f(n)=g(n) + h(n) g(n) the cost to reach the node h(n) the estimated cost of the cheapest path from n to the goal f(n)  the estimated cost of the cheapest solution through the node n h(n)  Admissible Heuristic / Consistent (in case of graph search) EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence A* search EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence A* search EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence A* search EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence A* search EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence A* search EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence A* search EA C461 – Artificial Intelligence

A* Search : Admissible heuristics A heuristic h(n) is admissible if for every node n, h(n) ≤ h*(n), where h*(n) is the true cost to reach the goal state from n An admissible heuristic never overestimates the cost to reach the goal, i.e., it is optimistic Example: hSLD(n) (never overestimates the actual road distance) Theorem: If h(n) is admissible, A* using TREE-SEARCH is optimal EA C461 – Artificial Intelligence

A* Search : Optimality of A* (proof) Suppose some suboptimal goal G2 has been generated and is in the fringe. Let n be an unexpanded node in the fringe such that n is on a shortest path to an optimal goal G. f(G2) = g(G2), since h(G2) = 0 g(G2) > g(G), since G2 is suboptimal f(G) = g(G), since h(G) = 0 f(G2) > f(G), from above Hence f(G2) > f(n), and A* will never select G2 for expansion EA C461 – Artificial Intelligence

A* Search: Repeated states Sub optimal solutions can be returned, if we discard the optimal path to a repeated node Can be handled by keeping all nodes expanded in memory, and when repeated make a decision based on their costs Make Sure, repeated nodes are costlier Requires the heuristic to be consistent EA C461 – Artificial Intelligence

A* Search : Consistent heuristics A heuristic is consistent if for every node n, every successor n' of n generated by any action a, h(n) ≤ c(n,a,n') + h(n') If h is consistent, we have f(n') = g(n') + h(n') = g(n) + c(n,a,n') + h(n') ≥ g(n) + h(n) = f(n) i.e., f(n) is non-decreasing along any path. Theorem: If h(n) is consistent, A* using GRAPH-SEARCH is optimal EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence A* Characteristics A* expands no nodes with f(n)>C* These nodes are said to be pruned This pruning still guarantees optimality Expands nodes in the increasing order of costs A* is optimally efficient For a given heuristic, A* finds optimal solution with the fewest number of nodes expansion Any algorithm that doesn’t expand nodes with f(n)<C* has the risk of missing an optimal solution For most problems the number of nodes with costs lesser than C* is exponential EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Memory Bounded Heuristic Search Iterative-deepening A* (IDA*) uses f-value (g + h) as the cutoff Keep increase the cutoff for each iteration by the smallest amount, in excess of the current cutoff EA C461 – Artificial Intelligence

Recursive best-first search Keeps track of the f-value of the best-alternative path available. If current f-values exceeds this alternative f-value than backtrack to alternative path. Upon backtracking change f-value to best f-value of its children. Re-expansion of this result is thus still possible. EA C461 – Artificial Intelligence

Recursive best-first search, ex. EA C461 – Artificial Intelligence

Recursive best-first search, ex. EA C461 – Artificial Intelligence

Recursive best-first search, ex. EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence RBFS evaluation RBFS is a bit more efficient than IDA* Still excessive node generation (mind changes) Like A*, optimal if h(n) is admissible Space complexity is O(bd). IDA* retains only one single number (the current f-cost limit) Time complexity difficult to characterize Depends on accuracy if h(n) and how often best path changes. IDA* en RBFS suffer from too little memory. EA C461 – Artificial Intelligence

EA C461 – Artificial Intelligence Consider a state space in which start state is numbered 1 and the successor function for state n returns two states, numbered 2n and 2n+1. Draw the portion of the state space for states 1 to 15. Suppose the goal state is 11. List the order in which nodes will be visited for BFS, DFS, IDS. Explain how do you apply Bidirectional search to this problem In that case, what is the branching factor in each direction EA C461 – Artificial Intelligence