Lecture overview. Knowledge-based systems in Bioinformatics, 1MB602, Goal based agents. Search terminology. Specifying a search problem

Similar documents
Uninformed Search. Models To Be Studied in CS 540. Chapter Search Example: Route Finding

Outline. Informed Search. Recall: Uninformed Search. An Idea. Heuristics Informed search techniques More on heuristics Iterative improvement

Lecture 14: March 9, 2015

mywbut.com Uninformed Search

1/19/2010. Usually for static, deterministic environment

Summary. Agenda. Search. Search is a common technique in problem solving. Search Formulation Tree Search Uniform cost search A* Search.

4 INFORMED SEARCH AND EXPLORATION. 4.1 Heuristic Search Strategies

Chapter 3: Solving Problems by Searching

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Artificial Intelligence. Sina Institute, University of Birzeit

Downloded from: CSITauthority.blogspot.com

CS 331: Artificial Intelligence Uninformed Search. Real World Search Problems

Search. Search Trees

CS 331: Artificial Intelligence Uninformed Search. Real World Search Problems

Outline. Informed Search. Recall: Uninformed Search. An Idea. Heuristics Informed search techniques More on heuristics Iterative improvement

CS 331: Artificial Intelligence Uninformed Search. Leftovers from last time

Search. Intelligent agents. Problem-solving. Problem-solving agents. Road map of Romania. The components of a problem. that will take me to the goal!

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science Artificial Intelligence Fall, 2010

Search Algorithms. Uninformed Blind search. Informed Heuristic search. Important concepts:

COMP 8620 Advanced Topics in AI

A2 Uninformed Search

CS 4700: Foundations of Artificial Intelligence. Bart Selman. Search Techniques R&N: Chapter 3

Example: The 8-puzzle. A2 Uninformed Search. It can be generalized to 15-puzzle, 24-puzzle, or. (n 2 1)-puzzle for n 6. Department of Computer Science

Artificial Intelligence p.1/49. n-queens. Artificial Intelligence p.2/49. Initial state: the empty board or a board with n random

Problem Solving and Search

Solving Problems by Searching

HW#1 due today. HW#2 due Monday, 9/09/13, in class Continue reading Chapter 3

DFS. Depth-limited Search

CS:4420 Artificial Intelligence

Problem Solving and Search in Artificial Intelligence

Artificial Intelligence

Computer Science and Software Engineering University of Wisconsin - Platteville. 3. Search (Part 1) CS 3030 Lecture Notes Yan Shi UW-Platteville

Problem Solving as Search. CMPSCI 383 September 15, 2011

Informed Search. CS 486/686 University of Waterloo May 10. cs486/686 Lecture Slides 2005 (c) K. Larson and P. Poupart

3 SOLVING PROBLEMS BY SEARCHING

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Sina Institute, University of Birzeit

Artificial Intelligence

Solving Problems by Searching

SRI VIDYA COLLEGE OF ENGINEERING & TECHNOLOGY REPRESENTATION OF KNOWLEDGE PART A

Wissensverarbeitung. - Search - Alexander Felfernig und Gerald Steinbauer Institut für Softwaretechnologie Inffeldgasse 16b/2 A-8010 Graz Austria

Uninformed Search. Problem-solving agents. Tree search algorithms. Single-State Problems

Solving Problems by Searching

INTRODUCTION TO HEURISTIC SEARCH

6.01: Introduction to EECS 1 Week 13 December 1, 2009

Artificial Intelligence

Expert Systems (Graz) Heuristic Search (Klagenfurt) - Search -

Outline. Best-first search

Artificial Intelligence

PROBLEM SOLVING AND SEARCH IN ARTIFICIAL INTELLIGENCE

State Spaces

Search. CS 3793/5233 Artificial Intelligence Search 1

Problem Solving and Search. Chapter 3

Informed Search Methods

Uninformed Search B. Navigating through a search tree. Navigating through a search tree. Navigating through a search tree

Uninformed Search B. Navigating through a search tree. Navigating through a search tree. Navigating through a search tree

Ar#ficial)Intelligence!!

Informed Search Algorithms

S A E RC R H C I H NG N G IN N S T S A T T A E E G R G A R PH P S

Lecture 4: Search 3. Victor R. Lesser. CMPSCI 683 Fall 2010

Uninformed search strategies (Section 3.4) Source: Fotolia

Artificial Intelligence

An Appropriate Search Algorithm for Finding Grid Resources

State-Space Search. Computer Science E-22 Harvard Extension School David G. Sullivan, Ph.D. Solving Problems by Searching

Solving problems by searching

Problem Solving as State Space Search. Assignments

Search : Lecture 2. September 9, 2003

A4B36ZUI - Introduction ARTIFICIAL INTELLIGENCE

mywbut.com Informed Search Strategies-II

Informed search strategies (Section ) Source: Fotolia

Outline. Best-first search

Outline. Solving problems by searching. Prologue. Example: Romania. Uninformed search

Solving problems by searching

Outline. Solving Problems by Searching. Introduction. Problem-solving agents

Intelligent Agents. Introduction to Heuristic Search. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University

AI: Week 2. Tom Henderson. Fall 2014 CS 5300

TDDC17. Intuitions behind heuristic search. Recall Uniform-Cost Search. Best-First Search. f(n) =... + h(n) g(n) = cost of path from root node to n

Solving problems by searching

Lecture 4: Informed/Heuristic Search

CS 331: Artificial Intelligence Local Search 1. Tough real-world problems

Informed search algorithms

Foundations of AI. 4. Informed Search Methods. Heuristics, Local Search Methods, Genetic Algorithms. Wolfram Burgard & Bernhard Nebel

Review Search. This material: Chapter 1 4 (3 rd ed.) Read Chapter 18 (Learning from Examples) for next week

Searching. Assume goal- or utilitybased. Next task to achieve is to determine the best path to the goal

Problem-solving agents. Solving Problems by Searching. Outline. Example: Romania. Chapter 3

Week 3: Path Search. COMP9414/ 9814/ 3411: Artificial Intelligence. Motivation. Example: Romania. Romania Street Map. Russell & Norvig, Chapter 3.

Chapters 3-5 Problem Solving using Search

Artificial Intelligence Informed search. Peter Antal

Artificial Intelligence

Artificial Intelligence

CIS 192: Artificial Intelligence. Search and Constraint Satisfaction Alex Frias Nov. 30 th

The wolf sheep cabbage problem. Search. Terminology. Solution. Finite state acceptor / state space

Uninformed Search Methods

Solving problems by searching

Today s s lecture. Lecture 3: Search - 2. Problem Solving by Search. Agent vs. Conventional AI View. Victor R. Lesser. CMPSCI 683 Fall 2004

CS 188: Artificial Intelligence. Recap Search I

4. Solving Problems by Searching

Uninformed Search Strategies AIMA

CS 4700: Artificial Intelligence

CS 8520: Artificial Intelligence

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 23 January, 2018

Downloaded from ioenotes.edu.np

Transcription:

Lecture overview Knowledge-based systems in ioinformatics, 1M602, 2006 Lecture 6: earch oal based agents earch terminology pecifying a search problem earch considerations Uninformed search euristic methods Iterative improvement algorithms oal based agents Intelligent agents act in such a way that the environment goes through a sequence of states that maximizes the performance measure The agent adopts a goal and aims to satisfy it The agent can decide what to do by first examining different possible sequences of actions that lead to states of known value, and then choosing the best one The process of looking for such a sequence is called search earch terminology tate situation the search can visit tate space The set of all states reachable from the initial state by any sequence of actions Path sequence of actions in the state space leading from one state to another olution state with a particular property, i.e. solves the problem (achieves the task) May be more than one solution to a problem trategy ow to choose the next step in the path at any given state pecifying a search problem Initial state The start state of the search which holds description about the current state of the world Operators Functions taking the search from one state to another pecify how the agent can move around the search space oal test as the search succeeded? Route planning example Initial state ity the journey starts in Operators Moving from one city to another oal test Located in a certain city? 1

2 folding example earch considerations Initial state non-folded chain of amino acids (hydrophobic or hydrophilic identifiers) Operators ifferent types of rotation oal test Protein completely folded? nergy of protein below a certain predefined threshold What are we looking for? What is interesting, the solution or the path to the solution? ompleteness Is the search guaranteed to find a solution when it exists? Pruning vs. exhaustive searches Time and space complexity Optimality oes the strategy find the highest-quality solution when there are several different solutions? oundness Is the path (and each step in the path) truth-preserving? Important for automated reasoning dditional information Uninformed search uses no additional information euristic search take advantages of various information raph analogy Formulizing search in a state space state space can be seen as a graph = (V,), where V is a set of vertices (nodes) and is a set of edges In a state space graph, V corresponds to the state space and corresponds to transitions in taking the search from one state (vertex) to another hoices that determines which vertex to expand and which edge to go down define the search strategy V = {,,,,, F,,, } = {{,}, {,}, {,}, {,}, {,}, {,}, {,F}, {,}, {,}, {F,}} The size of a problem is usually described in terms of the number of possible states Tic-tac-toe: 3 states Rubik s cube: 10 1 states hess: 10 123 states F Formulizing search in a state space cont. earch techniques ach vertex has a set of successor vertices The set of all legal actions for each vertex ach successor is determined by applying the edge s action to the predecessor vertex xpanding a vertex generates the successors of that vertex and adds them to the search graph The search algorithm maintains a list of successor vertices, a state list The first item in the state list corresponds to the next state to expand xpanding a vertex manipulates the state list by removing the visited vertex and adding the successor vertices to the state list ow to add depends on the search strategy Partial vs. complete search Partial search: only interested in a solution, i.e. only a subset of the search space may be considered omplete search: the best solution is desired, e.g. optimization problems Uninformed vs. informed search Uninformed search: only the information of the current state and possible one-step transitions to other states are considered when choosing the next state in the path Informed search: estimate path and/or action cost and use this information to choose the next vertex to expand 2

readth first search ssociating costs with actions The state list corresponds to a queue (first in first out) The algorithm visits the vertices one level at a time urrent tates visited: 7 tates expanded: 6 tate list {} {,,} {,,,} {,,,} {,,,F} {,,F,} {,F,,} {F,,} start goal F Often we are interested in the search path and the cost of that path instead of just the solution F again: urrent tates visited: 7 tates expanded: 6 tate list {} {,,} {,,,} {,,,} {,,,F} {,,F,} {,F,,} {F,,} 7 2 6 start 6 2 goal Path: ost: F epth first search The state list corresponds to a stack (last in first out) lways expands one of the nodes at the deepest level of the tree urrent tates visited: 6 tates expanded: tate list {} {,,} {,,,} {,,,} {,,} {,,} {,} 7 2 6 start goal Path: ost: 1 F vs. F F omplete Optimal when all actions, i.e. edges, have the same cost finds the shallowest goal state Time complexity: O(b d ) b: branching factor, d: solution depth pace complexity: O(b d ) Memory requirements are a bigger problem than the execution time F an get stuck going down the wrong path Not complete (may go down a path of infinite depth) Not optimal hould be avoided for search graphs with large or infinite maximum depths Time complexity: O(b m ) b: branching factor, m: maximum depth of the search graph pace complexity: O(bm) (need only store the nodes in one path) Other uninformed search strategies U: uniform cost search (branch and bound) Use priority queue for state list, sorted by path cost g(v) = cost of path from start vertex s to current vertex v ort vertices by increasing value of g omplete, optimal, time and space complexity: O(b d ) Note: the same as F if g(v) = PT(v)! I: iterative deepening search o F to depth 0, then depth 1, then dept 2, etc until a solution is found ombines the best of F and F omplete, optimal, space complexity: O(bd), time complexity: O(b d ) idirectional search imultanously search both forward from the initial state and backward from the inital state and backwards from the goal Informed search In informed search strategies we introduce an evaluation function that associates a value to each vertex describing the desire to expand that vertex The state list is order so that the vertex with the best evaluation is expanded first best first search valuation of a vertex = estimation of path cost from vertex to solution The evaluation function is often called a heuristic function h: h(v) = estimated cost of the cheapest path from the state at vertex v to goal state eureka ( I have found it, rchimedes) Problem specific 3

est first search strategies reedy search (est-first search) Minimize estimated cost to reach a goal valuation function: h(v) = estimated cost to the goal from v The vertex whose state is judged to be closest to the goal is always expanded first (best first) Neither optimal nor complete est first search strategies cont. * search valuation function f(v) = g(v) + h(v) = estimated cost of the cheapest solution through v h(v) = estimated cost to the goal from v g(v) = the cost of the path so far through v Important restriction: h must be admissible, i.e. never overestimate the cost to reach the goal optimistic thinking h(v) h * (v) always holds, where h * (v) is the actual cost omplete, optimal, and optimally efficient among all optimal search algorithms till exponential time (and memory) unless h(v)- h * (v) < O(log h * (v)) Unfortunatly, this is seldom the case Note: with h(v) = 0, this is a U etermining f(v) * search example 3 7 h= 1 h= h= h= h= g(v) = actual cost to get to vertex v from start h(v) = estimated cost to get to a goal from vertex v f(v) = g(v) + h(v) actual cost to get from start to v plus estimated cost from v to goal h=0 h=3 v g(v) h(v) f(v) h*(v) 0 1 10//13 3 0 11 10//13 0 Optimal path = ost = dmissible! f(v) = h(v) + g(v) urrent tate list {:0+} {:1+7,:+,:+3} {:,:1++0,:11, :1+3+,:1+7+} {:++0,:10,:11, :,:} {:11,:,:} 3 7 h= 1 h=7 h= Path:,, ost: h= h= h=0 h=3 euristics euristic methods rely on good heuristics hould give the best score to the state we are looking for, and good scores to similar states hould be easy and quick to compute etter heuristics (less optimistic) translate directly into higher efficiency in time and memory! ome examples of heuristics route planning: staight line distance protein folding: physical, free energy differences between observed and expected data cost, profit (economic applications) cost, production time, utilization of resources (industrial applications) variant of * search Reducing memory requirements by turning * into I*, Iterative eepening * Modify I to use an f-cost limit rather than a depth limit ach iteration expands all vertices inside the contour for the current f-cost Once the search inside a given contour has been completed, a new iteration is started using a new f- cost for the new contour omplete and optimal Memory requirments O(bm): depth first search In the worst case, every node in the state space has a different f-cost, thus if * examines k nodes then I* will examine O(k 2 ) nodes

Memory-efficient *: M* search Iterative improvements algorithms I * repeat states in and between iteration M* uses a queue to store visited nodes sorted by f-cost Prune the worst-case node from memory when space is needed for a better one Uses all available memory: specify a maximum number of nodes MX that can be stored uaranteed to be optimal if MX is at least as large as the number of nodes in the optimal solution In optimization problems the desired solution is the maximal (minimal) value of a function Problem example: maximize the number of hydrophobic neighbors by two dimensional folding pplicable if each state contain all the information required for a solution (i.e. the path is irrelevant) Iterative improvement strategy tart with a complete configuration and make modifications to improve its quality Two types of iterative improvement algorithms ill climbing hoose as the next state to expand the state with the highest value (if higher than the current) imulated annealing llow temporary changes that makes things worse, to avoid getting stuck in local maxima Local search optimization In optimization applications we want to find the best state, i.e. the state with the highest score. To be sure to find the best state, all states have to be examined. In many real-world applications the number of states is huge, so there is no way to do an exhaustive search. In these cases there are algorithms to find solutions that are reasonably good, although they might not be optimal. Local search optimization ssumption: tates that are close to each other have similar scores. asic idea: Look through states in the neighborhood and gradually move to better and better states. xample: s= s=1 s=6 s=2 local search optimization s=7 s=10 s=7 Local search optimization cont. Problems: Local search methods can get stuck in local optima no guarantee to find the optimal solution. Usually no way to know how much the obtained result differs from the global optimum. Obtained result depends on starting state. Ways to deal with this: a) Restart the search with different (random) start states b) Occasionally make sub-optimal moves (simulated annealing) c) Force the search to explore different parts of the search space (tabu search) ill climbing ill climbing is the basic form of local search (example shown before) imulated annealing asic idea: ometimes make random sub-optimal moves. ub-optimal moves are more common in the beginning of the search When should the function make random steps? epends on the temperature, which depends on the time. Temperature decreases throughout the search. This requires quite a few parameter settings

Tabu search lso based on hill climbing, but some moves become illegal (hence the name Tabu) We have to choose among the allowed neighbor (i.e. that are not on the Tabu list) If a neighbor is much better than the best state, we may still use it even if it is on the Tabu list (aspiration criterion) Which states are on the Tabu list llready visited states tates with certain properties... References. Russell, P. Norvig, rtificial intelligence: a modern approach, Prentice-all, Upper addle River, New Jersey, 1 Z. Michalewicz,.. Fogel, ow to olve It: Modern euristics, pringer, 2000. Russell, fficient memory-bounded search methods, I 2: 10th uropean onference on rtificial Intelligence Proceedings, 12. Keedwell,. Narayanan, Intelligent bioinformatics: the application of artificial intelligence techniques to bioinformatics problems. hichester : John Wiley, cop. 200 6