Dept. Computer Science, Korea Univ. Intelligent Information System Lab A I (Artificial Intelligence) Professor I. J. Chung.

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

Heuristic Search techniques
CSC 423 ARTIFICIAL INTELLIGENCE
Artificial Intelligence Lecture
Mahgul Gulzai Moomal Umer Rabail Hafeez
All rights reservedL. Manevitz Lecture 31 Artificial Intelligence A/O* and Minimax L. Manevitz.
Review: Search problem formulation
Adversarial Search: Game Playing Reading: Chess paper.
Informed Search Idea: be smart about what paths to try.
Heuristic Search In addition to depth-first search, breadth-first search, bound depth-first search, and iterative deepening, we can also use informed or.
Informed State Space Search Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Informed (Heuristic) Search
Problem Solving by Searching Search Methods : informed (Heuristic) search.
A RTIFICIAL I NTELLIGENCE UNIT : 2 Search Techniques.
Game Playing. Introduction One of the earliest areas in artificial intelligence is game playing. Two-person zero-sum game. Games for which the state space.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
GAME PLAYING 1. There were two reasons that games appeared to be a good domain in which to explore machine intelligence: 1.They provide a structured task.
Intelligent Control Methods Lecture 4: Searching in State Space Slovak University of Technology Faculty of Material Science and Technology in Trnava.
Artificial Intelligence University Politehnica of Bucharest Adina Magda Florea
Search (continued) CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
Knowledge Search CPTR 314.
Search Techniques CS480/580 Fall Introduction Trees: – Root, parent, child, sibling, leaf node, node, edge – Single path from root to any node Graphs:
Searching for Solutions
Adversarial Search 2 (Game Playing)
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.
Chapter 3.5 Heuristic Search. Learning Objectives Heuristic search strategies –Best-first search –A* algorithm Heuristic functions.
Lecture 3: Uninformed Search
Review: Tree search Initialize the frontier using the starting state
School of Computer Science & Engineering
Traveling Salesperson Problem
Last time: Problem-Solving
Artificial Intelligence (CS 370D)
Heuristic Search A heuristic is a rule for choosing a branch in a state space search that will most likely lead to a problem solution Heuristics are used.
For Monday Chapter 6 Homework: Chapter 3, exercise 7.
Informed Search and Exploration
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.
CAP 5636 – Advanced Artificial Intelligence
CS 4100 Artificial Intelligence
EA C461 – Artificial Intelligence
Searching for Solutions
Informed search algorithms
Lecture 8 Heuristic search Motivational video Assignment 2
Introduction to Artificial Intelligence Lecture 9: Two-Player Games I
BEST FIRST SEARCH -OR Graph -A* Search -Agenda Search CSE 402
CSE (c) S. Tanimoto, 2001 Search-Introduction
Blay Whitby 2003 Search Blay Whitby 2003
Artificial Intelligence Chapter 9 Heuristic Search
CPSC 322 Introduction to Artificial Intelligence
Chap 4: Searching Techniques
HW 1: Warmup Missionaries and Cannibals
Informed Search Idea: be smart about what paths to try.
State-Space Searches.
Heuristic Search Generate and Test Hill Climbing Best First Search
State-Space Searches.
Search.
The Rich/Knight Implementation
HW 1: Warmup Missionaries and Cannibals
Search.
Reading: Chapter 4.5 HW#2 out today, due Oct 5th
State-Space Searches.
Informed Search Idea: be smart about what paths to try.
The Rich/Knight Implementation
Presentation transcript:

Dept. Computer Science, Korea Univ. Intelligent Information System Lab A I (Artificial Intelligence) Professor I. J. Chung

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence2 AI (Artificial Intelligence) Heuristic function Estimate of distance of a path from the given node to the goal node. Nearest neighbor heuristic Select the locally superior alternative at each step n! → n 2 : number of different paths among the n cities=(n-1)! ① Select a starting city ② To select the next city. Check the all cities not yet visited, and select the one close-set to the current city. Go to it next ③ Repeat ② until all cities have been visited.

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence3 AI (Artificial Intelligence) AND/OR Graph Problem decomposition : problem reduction HTP (Hanoi Tower Problem) Split the original problem into sub-problems until the original problem is reduced to a set of trivial primitive problems.

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence4 AI (Artificial Intelligence) AND/OR graph : structure to model the problem reduction

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence5 AI (Artificial Intelligence) Objective of problem reduction Produce eventually primitive problems whose solutions are obvious. To solve the problem A, we have 3 alternative paths : (B&C) or (D&E) or (F)

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence6 AI (Artificial Intelligence) e.g

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence7 AI (Artificial Intelligence) AND/OR graph with problem reduction Objective of problem reduction Produce eventually primitive problem whose solutions are obvious

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence8 AI (Artificial Intelligence) AND/OR graph Structure modeling of the problem reduction One of the nodes in the graph, called the s.n., corresponding to the original problem Those nodes in the graph corresponding to the primitive description Algorithm of AND/OR graph shows that the structure node is solved

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence9 AI (Artificial Intelligence) The nonterminal node which has no successors in an AND/OR graph: unsolvable node If a nonterminal has OR successor, it ’ s unsolvable if and only if all of its successors are unsolvable. If a nonterminal has AND successor, it ’ s unsolvable if and only if at least one of its successors is unsolvable. e.g. : AND/OR graph & problem reduction

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence10 AI (Artificial Intelligence) Algorithm for Heuristic Search Best First Search Simplest way to implement heuristic search : hill climbing H/C : expand the current node & evaluate its children. : the best child is selected for further expansion. : neither its siblings nor its parent are retained. : search halts when it reaches a state that is better than any of its children. : 1) erroneous heuristic -> ∞ paths that fail ( ∵ it keeps no history,  recovery) 2) local minima Combination of DFS and BFS (follow a single path at a time with switching paths whenever some alternative path looks more promising than the current one.)

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence11 AI (Artificial Intelligence) algorithm 1)OPEN ← {initial state} 2)Until (a goal is found |OPEN = ) 2.1) pick a best node E in OPEN 2.2) generate the children & E 2.3) for ∀ children do : a)if it is the first node never generated before, add it to OPEN and record its parent. b)if it has been generated before, change the parent if this new path is better than the previous one

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence12 AI (Artificial Intelligence) Evaluation function f(n) = g(n) + h(n) g(n) : length of the path from the initial state to the state(node) n. h(n) : heuristic estimate of the distance from state n to a goal.

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence13 AI (Artificial Intelligence) A * -algorithm. A search algorithm is admissible if it ’ s guaranteed to find a optimal path whenever such a path exist . e.g BFS: admissible search strategy. (but too inefficient) f(n) = g(n) + h(n) f : evaluation function g : cost of node n from the initial state h : heuristic estimate of the cost from n to goal If this evaluation function f is used with the best first search, the result is called algorithm A. ^ ^ f = g + h ^ : estimator actual cost

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence14 AI (Artificial Intelligence) algorithm A * If algorithm A is used with an evaluation function where h(n) ≤ cost of the minimal path from n to the goal. Note : 1)BFS is A * algorithm. Where f(n) = g(n) + O ie. h(n) = O. 2)set of nodes in A * ⊆ states examined in BFS. 3)if g=h=O ; random search For 2 A * algorithm h 1 & h 2 if h 1 (n) ≤ h 2 (n) for n ∈ S.S. heuristic h 2 is more informed than h 1

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence15 AI (Artificial Intelligence) Best First Search Combination of DFS & BFS. DFS : without all competing branches having to be expanded BFS : no dead-end path Follow a path at a time, but switch paths whenever some competing path looks more promising than the current one. e.g step 1 step2 A A B C D 3 5 1

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence16 AI (Artificial Intelligence) e.g step 3 step4 A A B C D B C D Step A E F G H E F B C D 5 G H E F I J 2 1

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence17 AI (Artificial Intelligence) BFS algorithm. 1)OPEN ← {initial state} 2)loop until (goal state is formed or OPEN == ) 2.1) Select the most promising node from OPEN 2.2) Generate its successors 2.3) for ∀ success s do: 2.3.1) If s has not been generated before, add to OPEN ← OPEN ∪ {s}, and record its parent ) If s has been generated before, change the parent if this new path is more promising than before. Best FS : special case of A * algorithm

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence18 AI (Artificial Intelligence) Game playing (search 의 연장 ) Chess, go, TTT, … Structured task to measure Success / Failure Not necessary for large amount of knowledge

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence19 AI (Artificial Intelligence) Maxmin search Depth – first /depth – limited search procedure Start at the current position → apply the plausible – move generator one goal : max. the value of E.F. opponent goal : min the value of E.F. One path is explored as far as time allows The static evaluation function is applied to the game position at the last step of the path, and the value be passed up the path.

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence20 AI (Artificial Intelligence) A -2 max -6 B C -2 D -4 min E F G H I J K

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence21 AI (Artificial Intelligence) / pruning Partial solution can be abandoned early. : lower bound on max. node : upper bound on min. node A 3 (>3) max 3 B C -5 (<-5) min D E F G max 3 5 – 5 G 의 값에 관계없이 C 노드의 e.f. 의 값은 – 5 따라서 we don ’ t have to generate the node G.

Dept. Computer Science, Korea Univ. Intelligent Information System Lab Artificial Intelligence22 AI (Artificial Intelligence) A >3 max 3 B C 4 min 3 D 5 E F 5 G 8 H 4 max 0 I J M N min K L max 0 7