Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Lecture 3 of 42 Monday, 28 August 2006.

Slides:



Advertisements
Similar presentations
Review: Search problem formulation
Advertisements

Artificial Intelligence Presentation
Artificial Intelligence Chapter 9 Heuristic Search Biointelligence Lab School of Computer Sci. & Eng. Seoul National University.
Artificial Intelligence Problem Solving Eriq Muhammad Adams
Problem Solving and Search Andrea Danyluk September 9, 2013.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
CMSC 471 Spring 2014 Class #4 Thu 2/6/14 Uninformed Search Professor Marie desJardins,
Blind Search1 Solving problems by searching Chapter 3.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.4) January, 14, 2009.
Search Strategies Reading: Russell’s Chapter 3 1.
1 Blind (Uninformed) Search (Where we systematically explore alternatives) R&N: Chap. 3, Sect. 3.3–5.
Lets remember about Goal formulation, Problem formulation and Types of Problem. OBJECTIVE OF TODAY’S LECTURE Today we will discus how to find a solution.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
CSC 423 ARTIFICIAL INTELLIGENCE
Artificial Intelligence (CS 461D)
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
Computing & Information Sciences Kansas State University Lecture 4 of 42 CIS 530 / 730 Artificial Intelligence Lecture 4 of 42 William H. Hsu Department.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CS 380: Artificial Intelligence Lecture #3 William Regli.
SE Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Review: Search problem formulation
Search I Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Russell & Norvig Chapter 3]
Artificial Intelligence Chapter 3: Solving Problems by Searching
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
CS 188: Artificial Intelligence Spring 2006 Lecture 2: Queue-Based Search 8/31/2006 Dan Klein – UC Berkeley Many slides over the course adapted from either.
CS 561, Session 6 1 Last time: Problem-Solving Problem solving: Goal formulation Problem formulation (states, operators) Search for solution Problem formulation:
Solving Problems by Searching
Computing & Information Sciences Kansas State University Lecture 3 of 42 CIS 530 / 730 Artificial Intelligence Lecture 3 of 42 William H. Hsu Department.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
1 Problem Solving and Searching CS 171/271 (Chapter 3) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Problem Solving and Search Andrea Danyluk September 11, 2013.
Vilalta&Eick: Informed Search Informed Search and Exploration Search Strategies Heuristic Functions Local Search Algorithms Vilalta&Eick: Informed Search.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 3 Wednesday 27 August.
Computing & Information Sciences Kansas State University Lecture 2 of 42 CIS 530 / 730 Artificial Intelligence Lecture 2 of 42 William H. Hsu Department.
CS 440 / ECE 448 Introduction to Artificial Intelligence Spring 2010 Lecture #3 Instructor: Eyal Amir Grad TAs: Wen Pu, Yonatan Bisk Undergrad TAs: Sam.
Search Tamara Berg CS 560 Artificial Intelligence Many slides throughout the course adapted from Dan Klein, Stuart Russell, Andrew Moore, Svetlana Lazebnik,
Artificial Intelligence
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
For Friday Finish reading chapter 4 Homework: –Lisp handout 4.
For Monday Read chapter 4, section 1 No homework..
Lecture 2 of 42 Problem Solving by 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.
Lecture 3: Uninformed Search
Computing & Information Sciences Kansas State University Wednesday, 30 Aug 2006CIS 490 / 730: Artificial Intelligence Lecture 4 of 42 Wednesday, 30 August.
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Advanced Artificial Intelligence Lecture 2: Search.
A General Introduction to Artificial Intelligence.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Uninformed Search ECE457 Applied Artificial Intelligence Spring 2007 Lecture #2.
Goal-based Problem Solving Goal formation Based upon the current situation and performance measures. Result is moving into a desirable state (goal state).
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Slides by: Eric Ringger, adapted from slides by Stuart Russell of UC Berkeley. CS 312: Algorithm Design & Analysis Lecture #36: Best-first State- space.
Computing & Information Sciences Kansas State University Friday, 20 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 24 of 42 Friday, 20 October.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 5 of 41 Wednesday 03.
Computing & Information Sciences Kansas State University Friday, 08 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 7 of 42 Friday, 08 September.
Solving problems by searching A I C h a p t e r 3.
Computing & Information Sciences Kansas State University Friday, 05 Sep 2008CIS 490 / 730: Artificial Intelligence Lecture 4 of 42 Friday, 05 September.
CPSC 322, Lecture 5Slide 1 Uninformed Search Computer Science cpsc322, Lecture 5 (Textbook Chpt 3.5) Sept, 13, 2013.
Blind Search Russell and Norvig: Chapter 3, Sections 3.4 – 3.6 CS121 – Winter 2003.
Computing & Information Sciences Kansas State University Wednesday, 04 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 17 of 42 Wednesday, 04 October.
Computing & Information Sciences Kansas State University Friday, 13 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 21 of 42 Friday, 13 October.
For Monday Read chapter 4 exercise 1 No homework.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
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.
Lecture 3: Uninformed Search
Artificial Intelligence (CS 370D)
Artificial Intelligence Problem solving by searching CSC 361
Searching for Solutions
CMSC 471 Fall 2011 Class #4 Tue 9/13/11 Uninformed Search
Presentation transcript:

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Lecture 3 of 42 Monday, 28 August 2006 William H. Hsu Department of Computing and Information Sciences, KSU KSOL course page: Course web site: Instructor home page: Reading for Next Class: Sections 3.2 – 3.4, p , Russell & Norvig 2 nd edition Search Problems Discussion: Problem Set 1, Term Projects 3 of 3

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Lecture Outline Reading for Next Class: Sections 3.2 – 3.4, R&N 2 e This Week: Search, Chapters  State spaces  Graph search examples  Basic search frameworks: discrete and continuous Uninformed (“Blind”) and Informed (“Heuristic”) Search  Cost functions: online vs. offline  Time and space complexity  Heuristics: examples from graph search, constraint satisfaction Relation to Intelligent Systems Concepts  Knowledge representation: evaluation functions, macros  Planning, reasoning, learning Next Week: Heuristic Search, Chapter 4; Constraints, Chapter 5

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Term Project Topics, Fall 2006 (review) 1. Game-playing Expert System  “Borg” for Angband computer role-playing game (CRPG)  Trading Agent Competition (TAC)  Supply Chain Management (TAC-SCM) scenario  Knowledge Base for Bioinformatics  Evidence ontology for genomics or proteomics 

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Search and Problem-Solving Agents: Review Problem Solving in Agent Frameworks  Recall: intelligent agent (IA) scenario from Chapter 2, R&N  Last week: design, spec, implementation of IA “skeleton” Cost Measures in Search  Actual vs. Heuristic (estimated)  Offline (computational) vs. Online (path) Kinds of Search  Costs used  Actual, actual + heuristic  Offline + online  Uninformed (blind) search: today and Wednesday  Sometimes cost-based  Often exhaustive  Informed (heuristic): Friday and next week  Minimize actual + heuristic cost  Can still guarantee optimal online cost? Offline cost?

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence General Search [1]: Overview Generating Action Sequences  Initialization: start (initial) state  Test for goal condition  Membership in goal state set (explicitly enumerated)  Constraints met (implicit)  Applying operators (when goal state not achieved)  Implementation: generate new set of successor (child) states  Conceptual process: expand state  Result: multiple branches (e.g., Figure 3.8 R&N) Intuitive Idea  Select one option  Ordering (prioritizing / scheduling) others for later consideration  Iteration: choose, test, expand  Termination: solution is found or no states remain to be expanded Search Strategy: Selection of State to Be Expanded

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence General Search [2]: Algorithm function General-Search (problem, strategy) returns a solution or failure  initialize search tree using initial state of problem  loop do  if there are no candidates for expansion then return failure  choose leaf node for expansion according to strategy  If node contains a goal state then return corresponding solution  else expand node and add resulting nodes to search tree  end Note: Downward Function Argument (Funarg) strategy Implementation of General-Search  Rest of Chapter 3, Chapter 4, R&N  See also:  Ginsberg (handout in CIS library today)  Rich and Knight  Nilsson: Principles of Artificial Intelligence

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Search Strategies: Criteria Completeness  Is strategy guaranteed to find solution when one exists?  Typical requirements/assumptions for guaranteed solution  Finite depth solution  Finite branch factor  Minimum unit cost (if paths can be infinite) – discussion: why? Time Complexity  How long does it take to find solution in worst case?  Asymptotic analysis Space Complexity  How much memory does it take to perform search in worst case?  Analysis based on data structure used to maintain frontier Optimality  Finds highest-quality solution when more than one exists?  Quality: defined in terms of node depth, path cost

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Uninformed (Blind) Search Strategies Breadth-First Search (BFS)  Basic algorithm: breadth-first traversal of search tree  Intuitive idea: expand whole frontier first  Advantages: finds optimal (minimum-depth) solution for finite search spaces  Disadvantages: intractable (exponential complexity, high constants) Depth-First Search (DFS)  Basic algorithm: depth-first traversal of search tree  Intuitive idea: expand one path first and backtrack  Advantages: narrow frontier  Disadvantages: lot of backtracking in worst case; suboptimal and incomplete Search Issues  Criteria: completeness (convergence); optimality; time, space complexity  “Blind”  No information about number of steps or path cost from state to goal  i.e., no path cost estimator function (heuristic) Uniform-Cost, Depth-Limited, Iterative Deepening, Bidirectional

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Breadth-First Search [1]: Algorithm function Breadth-First-Search (problem) returns a solution or failure  return General-Search (problem, Enqueue-At-End) function Enqueue-At-End (e: Element-Set) returns void  // Queue: priority queue data structure  while not (e.Is-Empty())  if not queue.Is-Empty() then queue.last.next  e.head();  queue.last  e.head();  e.Pop-Element();  return Implementation Details  Recall: Enqueue-At-End downward funarg for Insert argument of General- Search  Methods of Queue (priority queue)  Make-Queue (Element-Set) – constructor  Is-Empty() – boolean-valued method  Remove-Front() – element-valued method  Insert(Element-Set) – procedure, aka Queuing-Fn

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Breadth-First Search [2]: Analysis Asymptotic Analysis: Worst-Case Time Complexity  Branching factor: b (max number of children per expanded node)  Solution depth (in levels from root, i.e., edge depth): d  Analysis  b i nodes generated at level i  At least this many nodes to test  Total:  I b i = 1 + b + b 2 + … + b d =  (b d ) Worst-Case Space Complexity:  (b d ) Properties  Convergence: suppose b, d finite  Complete: guaranteed to find a solution  Optimal: guaranteed to find minimum-depth solution (why?)  Very poor worst-case time complexity (see Figure 3.12, R&N)

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Uniform-Cost Search [1]: A Generalization of BFS Generalizing to Blind, Cost-Based Search Justification  BFS: finds shallowest (min-depth) goal state  Not necessarily min-cost goal state for general g(n)  Want: ability to find least-cost solution Modification to BFS  Expand lowest-cost node on fringe  Requires Insert function to insert into increasing order  Alternative conceptualization: Remove-Front as Select-Next  See: Winston, Nilsson BFS: Specific Case of Uniform-Cost Search  g(n) = depth(n)  In BFS case, optimality guaranteed (discussion: why?)

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Uniform-Cost Search [2]: Example R&N 2e Requirement for Uniform-Cost Search to Find Min-Cost Solution  Monotone restriction: g(Successor(n))  g(n) + cost (n, Successor(n))  g(n)  Intuitive idea  Cost increases monotonically with search depth (distance from root)  i.e., nonnegative edge costs  Discussion  Always realistic, i.e., can always be expected in real-world situations?  What happens if monotone restriction is violated?

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Depth-First Search [1]: Algorithm function Depth-First-Search (problem) returns a solution or failure  return General-Search (problem, Enqueue-At-Front) function Enqueue-At-Front (e: Element-Set) returns void  // Queue: priority queue data structure  while not (e.Is-Empty())  temp  queue.first;  queue.first  e.head();  queue.first.next  temp;  e.Pop-Element();  return Implementation Details  Enqueue-At-Front downward funarg for Insert argument of General-Search  Otherwise similar in implementation to BFS  Exercise (easy)  Recursive implementation  See Cormen, Leiserson, Rivest, & Stein (2002)

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Depth-First Search [2]: Analysis Asymptotic Analysis: Worst-Case Time Complexity  Branching factor: b (maximum number of children per expanded node)  Max depth (in levels from root, i.e., edge depth): m  Analysis  b i nodes generated at level i  At least this many nodes to test  Total:  I b i = 1 + b + b 2 + … + b m =  (b m ) Worst-Case Space Complexity:  (bm) – Why? Example: Figure 3.14, R&N Properties  Convergence: suppose b, m finite  Not complete: not guaranteed to find a solution (discussion – why?)  Not optimal: not guaranteed to find minimum-depth solution  Poor worst-case time complexity

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Depth-Limited Search: A Bounded Specialization of DFS Intuitive Idea  Impose cutoff on maximum depth of path  Search no further in tree Analysis  Max search depth (in levels from root, i.e., edge depth): l  Analysis  b i nodes generated at level i  At least this many nodes to test  Total:  I b i = 1 + b + b 2 + … + b l =  (b l ) Worst-Case Space Complexity:  (bl) Properties  Convergence: suppose b, l finite and l  d  Complete: guaranteed to find a solution  Not optimal: not guaranteed to find minimum-depth solution  Worst-case time complexity depends on l, actual solution depth d

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Iterative Deepening Search: An Incremental Specialization of DFS Intuitive Idea  Search incrementally  Anytime algorithm: return value on demand Analysis  Solution depth (in levels from root, i.e., edge depth): d  Analysis  b i nodes generated at level i  At least this many nodes to test  Total:  I b i = 1 + b + b 2 + … + b d =  (b d ) Worst-Case Space Complexity:  (bd) Properties  Convergence: suppose b, l finite and l  d  Complete: guaranteed to find a solution  Optimal: guaranteed to find minimum-depth solution (why?)

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Bidirectional Search: A Concurrent Variant of BFS Intuitive Idea  Search “from both ends”  Caveat: what does it mean to “search backwards from solution”? Analysis  Solution depth (in levels from root, i.e., edge depth): d  Analysis  b i nodes generated at level i  At least this many nodes to test  Total:  I b i = 1 + b + b 2 + … + b d/2 =  (b d/2 ) Worst-Case Space Complexity:  (b d/2 ) Properties  Convergence: suppose b, l finite and l  d  Complete: guaranteed to find a solution  Optimal: guaranteed to find minimum-depth solution  Worst-case time complexity is square root of that of BFS

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Comparison of Search Strategies

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Previously: Uninformed (Blind) Search  No heuristics: only g(n) used  Breadth-first search (BFS) and variants: uniform-cost, bidirectional  Depth-first search (DFS) and variants: depth-limited, iterative deepening Heuristic Search  Based on h(n) – estimated cost of path to goal (“remaining path cost”)  h – heuristic function  g: node  R; h: node  R; f: node  R  Using h  h only: greedy (aka myopic) informed search  f = g + h: (some) hill-climbing, A/A* Branch and Bound Search  Originates from operations research (OR)  Special case of heuristic search: treat as h(n) = 0  Sort candidates by g(n) Informed (Heuristic) Search: Overview

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Branch-and-Bound Search Heuristics for General-Search Function of Problem-Solving-Agent  Informed (heuristic) search: heuristic definition, development process  Best-First Search  Greedy  A/A*  Admissibility property  Developing good heuristics  Humans  Intelligent systems (automatic derivation): case studies and principles Constraint Satisfaction Heuristics This Week: More Search Basics  Memory bounded, iterative improvement (gradient, Monte Carlo search)  Introduction to game tree search Next Topic: Informed (Heuristic) Search

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Example: Bioinformatics KB [1] Project Topic 3 of 3 © 2005 Adam Shlien © 2002 Gene Ontology Consortium

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Knowledge Base for Bioinformatics  Evidence ontology for genomics or proteomics  Problem Specification  Use ontology development tools  PowerLoom:  Semantic Web:  Study and convert existing bioinformatics knowledge bases  Build an ontology for query answering (QA)  Goal: improve QA capability using available knowledge  Technical requirements: interface to ontology reasoner, new ontology  Test with other ontology reasoners  TAMBIS (Stevens et al.)  Semantic web-based (OWL)  Export to / interconvert among languages: Ontolingua, etc. Example: Bioinformatics KB [2] Problem Specification

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Terminology State Space Search Goal-Directed Reasoning, Planning Search Types: Uninformed (“Blind”) vs. Informed (“Heuristic”) Basic Search Algorithms  British Museum (depth-first aka DFS), iterative-deepening DFS  Breadth-First aka BFS, depth-limited, uniform-cost  Bidirectional  Branch-and-Bound Properties of Search  Soundness: returned candidate path satisfies specification  Completeness: finds path if one exists  Optimality: (usually means) achieves maximal online path cost  Optimal efficiency: (usually means) maximal offline cost

Computing & Information Sciences Kansas State University Monday, 28 Aug 2006CIS 490 / 730: Artificial Intelligence Summary Points Reading for Next Class: Sections 3.2 – 3.4, R&N 2 e This Week: Search, Chapters  State spaces  Graph search examples  Basic search frameworks: discrete and continuous Uninformed (“Blind”) and Informed (“Heuristic”) Search  Cost functions: online vs. offline  Time and space complexity  Heuristics: examples from graph search, constraint satisfaction Relation to Intelligent Systems Concepts  Knowledge representation: evaluation functions, macros  Planning, reasoning, learning Next Week: Heuristic Search, Chapter 4; Constraints, Chapter 5 Later: Goal-Directed Reasoning, Planning (Chapter 11)