Artificial Intelligence. Some Problems. 15-Puzzle. Search and Constraint Satisfaction. 8/15-Puzzle n-queens Puzzle

Size: px
Start display at page:

Download "Artificial Intelligence. Some Problems. 15-Puzzle. Search and Constraint Satisfaction. 8/15-Puzzle n-queens Puzzle"

Transcription

1 Artificial Intelligence Search and Constraint Satisfaction 1 8/15-Puzzle n-queens Puzzle Some Problems 2 15-Puzzle

2 15-Puzzle Puzzle Goal N-Queens 6 2

3 N-Queens 7 N-Queens 8 N-Queens 9 3

4 N-Queens 10 Formalizing State-Space Search A state-space is a graph, G = (V,E) Each node is a state description Each edge is a transition resulting from application of an operator Edges have fixed costs associated with them One or more nodes is designated start One or more nodes is designated goal 11 State-Space Problems What is the initial state? What are the applicable operators? What is the goal test? What is the cost function? 12 4

5 State-Space Search A goal predicate determines if a goal node has been reached A solution is a sequence of operations associated with a path from start to goal The cost of the solution is the sum of the costs on the traversed edges State space search is the process of exploring the graph to find a solution 13 State-Space Search Algorithm GENERAL-SEARCH(problem,queuing-fn); nodes := := MAKE-QUEUE( MAKE-NODE(problem,init-state)); loop if ifempty(nodes) then return failure ; node = REMOVE-FRONT(nodes); if ifproblem.goaltest(node.state) then return node; nodes := := queuing-fn(nodes, EXPAND(node,problem.operator)); 14 Evaluating Search Strategies Completeness Guarantees finding a solution when one exists Time Complexity How long does it take to find a solution? Space Complexity How much space is required? Optimality/Admissibility If a solution is found, is it optimal? 15 5

6 Breadth-First Search Nodes placed on queue in FIFO order. Algorithm is complete Optimal? Yes if uniform cost on operators No if variable cost on operators Time and space complexity = O(b d ) b = branching factor d = depth of solution 16 Breadth-First Search GENERAL-SEARCH(problem,queuing-fn=ENQUEUE); nodes := := MAKE-QUEUE( MAKE-NODE(problem,init-state)); loop if ifempty(nodes) then return failure ; node = REMOVE-FRONT(nodes); if ifproblem.goaltest(node.state) then return node; nodes := := queuing-fn(nodes, EXPAND(node,problem.operator)); 17 BFS Search Tree

7 Depth-First Search Nodes placed on queue in LIFO order Not complete unless search space is finite May not terminate without a depth bound Complexity Time = O(b d ) Space = O(bd) Backtracking is chronological (one level at a time) 19 Depth-First Search GENERAL-SEARCH(problem,queuing-fn=PUSH-STACK); nodes := := MAKE-QUEUE( MAKE-NODE(problem,init-state)); loop if ifempty(nodes) then return failure ; node = REMOVE-FRONT(nodes); if ifproblem.goaltest(node.state) then return node; nodes := := queuing-fn(nodes, EXPAND(node,problem.operator)); 20 DFS Search Tree 21 7

8 Graph Search A 1 S 5 8 B C D E G 22 Search Order (BFS) A 1 S 5 8 B C D E G S-A-G 23 Search Order (DFS) A 1 S 5 8 B C D E G S-A-G 24 8

9 Informed Search Adds domain-specific knowledge to identify best path Defines a heuristic function, h(n), to estimate node goodness h(n) = estimated cost from n to goal Characteristics of heuristics h(n) = 0, goal h(n) =, dead-end h(n) 0, n 25 Heuristic Function Let f(n) be an estimate of the cost from the start to the goal. Let h(n) be an estimate of the cost from the current node to the goal. Let g(n) be the known cost from the start to the current node. 26 Best-First Search Nodes queued in order of evaluation function f that includes the heuristic Greedy Search Uniform Cost Search A* Search 27 9

10 Greedy Search f(n) = h(n) Nodes sorted in increasing order of f (upon expansion) Not complete (if starts on infinite path) Not admissible G 1 1 G 28 Uniform Cost Search f(n) = g(n) Nodes sorted in increasing order of f (upon expansion) Complete if all costs positive Admissible Basically makes BFS optimal 29 Beam Search f(n) = h(n) Maximum size of node list is k (called the beam size). More efficient than greedy but may miss solution path Not complete Not admissible 30 10

11 A* Search f(n) = g(n) + h(n) g(n) = minimal cost from start to n h*(n) = minimal cost from n to goal h(n) = estimate of h*(n) If h(n) h*(n), h is admissible A* is complete A* is admissible If h(n) = h*(n), only solution path expanded 31 Admissibility of A* Theorem: If h(n) is admissible, then A* is guaranteed to find the optimal path. 32 Admissibility of A* Proof: Let G be an optimal goal state with path cost f*. Let G 2 be a suboptimal goal state, that is g(g 2 ) > f* = g(g). Suppose A* selects G 2 from the queue prior to selecting G. We will show this cannot occur

12 Admissibility of A* Consider node n that is currently a leaf node on the optimal path to G. Because h is admissible (i.e., h h*), we must have f* f(n) since the heuristic function is also monotonic (i.e., it is non-decreasing on a path from the start to the goal). Furthermore, if n is not chosen for expansion over G 2, then f(n) f(g 2 ). 34 Admissibility of A* Combining, we find then that f* f(g 2 ). But because G 2 is a goal state, the heuristic, h(g 2 ) = 0, so f(g 2 ) = g(g 2 ). This means f* g(g 2 ) which contradicts the original assumption. Q.E.D. 35 Search Order (Greedy) 1 S 5 8 {C/3, B/4, A/8} A 8 B 4 C 3 D E G 0 {G/0, B/4, A/8} Suboptimal!! S-C-G 36 12

13 Search Order (A*) S 1. {A/9, B/9, C/11} 1 2. {B/9, G/10, C/11, 5 8 D/, E/ } A 8 B 4 C 3 D E G 0 3. {G/9, G/10, C/11, D/, E/ } Optimal!! S-B-G 37 Local Search Construct complete candidate solution Consider modifications to solution that still yield candidate solutions Navigate through modifications until best solution is found Most common form of iterative improvement is called hill climbing 38 Hillclimbing 39 13

14 Global Maximum Hillclimbing Stuck 40 Characteristics of Hill Climbing Not admissible Can get caught in local optima Can be limited to always yield a feasible solution Requires ability to construct candidate solutions from the outset This may, itself, require search, especially if require all candidates be feasible 41 Drawbacks of Hillclimbing Local optima termination criterion for hillclimbing always halts when a optimum value is reached (relative to neighborhood). Plateaus An area of the search space where the evaluation function is flat. Hillclimbing resorts to a random walk. Ridges Very gentle slope to peak, potentially leading to stalls, oscillation, and generally slow progress

15 Problems with Gradient Search The most significant problem is that local optimization leads to search getting trapped in local optima. Additional problem is long search times Arises from small step sizes to avoid oscillations. Randomized search methods attempt to escape local optima without degrading search performance (if possible) 43 Randomized Search Hillclimbing with Multiple Random Restarts Simulated Annealing Genetic Algorithms 44 Multiple Random Restarts Simplest randomized approach Requires multiple hill climbs in fitness space Each hill climb begins from different location Select starting location Uniform random pick Systematic coverage of space (ala factorial study) 45 15

16 Simulated Annealing Minor variation on hill climbing Permits transition to point of lesser value with some probability Probability of accepting poor positions changes with time 46 Simulated Annealing function SIMULATED-ANNEALING(problem, schedule); /* /* Maximization Problem Problem */ */ input: input: problem, schedule schedule local: local: current, current, next, next, T current current MAKE-NODE(INIT-STATE(problem)); for fort t 1 to to do do T schedule(t); if ift == == 0 then then return return current; current; end_if; end_if; next next RAND(NEIGHBOR(current); E E VALUE(next) VALUE(current); if if E > 0 then thencurrent current next; next; else else current current next nextwith probability EXP( E/kT); end_if; end_if; end_for; end; end; 47 Annealing Randomness driven by Boltzman distribution and T parameter T corresponds to temperature When temperature is high, likelihood of accepting poor transition is high When temperature is low, search reduces to hill climbing Gradually reduce temperature over time 48 16

17 Boltzman Distribution y = e E kt E < 0 49 Annealing Schedule Consider the annealing schedule as a time series. Common criteria for schedule satisfies following: One schedule satisfying these constraints is: t t= 1 t= 1 T = T 2 t < T τ T 0 is initial temperature Tt = 0 τ is user defined parameter τ + nt n t is number of updates 50 Genetic Algorithms Based on biological principle of survival of the fittest. Encodes solution as a chromosome. Maintains population of potential solutions. Allows individuals in population to reproduce and generate new individuals. Search driven by fitness function, selection mechanism, and reproduction operators

18 Prototypical Genetic Algorithm genetic-algorithm tt 0; 0; initialize(p(t)); evaluate-fitness(p(t),f(t)); while not(terminatep()) do do tt t t + 1; 1; select(p(t 1),C(t)); recombine(c (t),c(t)); mutate(c (t),c(t)); evaluate-fitness(c (t),f(t)); replace(p(t 1),C (t),p(t)); enddo 52 Representation Fitness Function Selection Replacement Recombination Issues for GAs 53 Representation gene alleles chromosome 54 18

19 Other Representations Real-valued strings Symbolic strings Trees Graphs Programs Linear Tree 55 Fitness Function Determines the relative worth of an individual Analogous to fitness as in traditional iterative improvement search Exogenous or endogenous Exogenous fitness is assigned by outside agent Endogenous fitness arises from mutual competition for resources 56 Fitness Proportionate Selection Selecting an individual is probabilistic. Selection is with replacement (thus individuals can be picked more than once). Probabilities are determined in proportion to fitness. f ( xi ) Psel ( = xi ) = P f ( x ) j= 1 j 57 19

20 Tournament selection Selecting an individual is probabilistic but not with replacement. Define a tournament size of q and select q individuals using uniform distribution. Select the individual from tournament with maximum fitness. 58 Rank-Order Selection Selecting an individual is probabilistic and with replacement. Probabilities based solely on rank (based on fitness) of individual in ordered list. Let η + = max(f(x i )) and η = min(f(x i )) i 1 Psel ( = xi ) = η ( η η ) P P η 2, and η = 2 η 59 Replacement Generational: Construct whole new population and replace previous in next generation. Steady-state: Select small number of replacements (e.g., 2) for next generation. Elitist: Retain n best members of population. Endogenous: Let resource availability determine survival

21 Mutation Selected bit Crossover Crossover point Schema Theorem Theorem: Short, low-order, above-average schemata receive exponentially increasing trials in subsequent generations of a genetic algorithm. Formally, f (H) δ (H) m (H, t + 1) m(h, t) 1 pc o(h) pm f l

22 Schema Theorem Note that for H δ (H) 1 p c o(h) pm l 1 is a constant. Note further that reproduction alone over t time steps yields the geometric progression f (H) f m t m f (H, ) = (H,0) 1+ t 64 Building Block Hypothesis Hypothesis: A genetic algorithm seeks nearoptimal performance through the juxtaposition of short, low-order, high-performance schemata, called building blocks. 65 Problems Suited to GAs Several problems are ideally suited for solution by genetic algorithms: Combinatorial optimization problems (e.g., traveling salesperson problem, VLSI design) Control problems (e.g., elevator control, flight control, process control) Automatic programming (e.g., function generation, filter design, classification) Biological/ecological simulation (e.g., mating behavior, foraging behavior, predator/prey) Constraint satisfaction problems 66 22

23 Constraint Satisfaction A constraint satisfaction problem is defined by the following: A set of variable: X 1, X 2,, X n A set of constraints: C 1, C 2,,C m. Each variable has a nonempty domain D i of possible values. Each constraint C i involves some subset of variables and specifies the set of allowable combinations of values for that subset. 67 What is a CSP? A state of a CSP is defined by an assignment of values to some (or all) of the variables {X i = v i ; X j = v j, }. We say that a particular assignment is consistent if it does not violate any of the constraints. A solution corresponds to a complete assignment covering all of the variables that is also consistent. Note that some CSPs require finding a solution that maximizes (minimizes) some objective function. 68 Example: 4 Queens Assume one queen in each column. Variables: Q 1, Q 2, Q 3, Q 4 Domains: D i = {1, 2, 3, 4} Constraints: Q i Q j (can t be same row) Q i Q j i j (can t be same diagonal) Where should Q 3 go? 69 23

24 Constraint Graph Q 1 Q 2 Q 3 Q 4 70 Example: Map Coloring D i = {red,green,blue} 71 Constraint Graph WA NT Q SA NSW V T 72 24

25 Colored Constraint Graph WA NT Q SA NSW V T 73 CSPs as Search Problems Initial State: The empty assignment {}, in which all variables are unassigned. Successor Function: A value is assigned to any unassigned variable, provided it does not conflict with previously assigned variables. Goal Test: The current assignment is complete. Path Cost: A constant cost (e.g., 1) for each step. 74 Types of CSPs Discrete variables with finite domains. Boolean CSPs are a special subclass. Discrete variables with infinite domains. Continuous variables. Linear constraints Linear programming is most famous example. Nonlinear constraints 75 25

26 Types of Constraints Unary constraints: Constraints on a single variable. Note that every unary constraint can be eliminated through preprocessing remove values that violate the constraint. Binary constraints: Constraints relating two variables (e.g., SA NSW). Note that binary CSPs only have binary constraints. These should not be confused with Boolean CSPs. Higher-order constraints: Constraints involving three or more variables. Note that all higher-order constraints can be re-written as a set of binary constraints with auxiliary variables. 76 Cryptarithms Constraints: T W O + T W O F O U R C 1 : O + O = R + 10 X 1 C 2 : X 1 + W + W = U + 10 X 2 C 3 : X 2 + T + T = O + 10 X 3 C 4 : X 3 = F 77 Cryptarithms Alldiff T W O + T W O F O U R F T U W R O C 4 C 3 C 2 C 1 X 3 X 2 X

27 Backtracking Search A depth-first search that chooses values for one variable at a time. If a variable is being instantiated but has no legal values, backtracking occurs. function BACKTRACKING-SEARCH(csp) return RECURSIVE-BACKTRACKING({},csp) function RECURSIVE-BACKTRACKING(asg,csp) if asg is complete, then return asg var := SELECT-UNASSIGNED-VARIABLE(VARIABLS(csp),asg,csp) for each value in ORDER-DOMAIN-VALUES(var,asg,csp) do if value is consistent with asg using CONSTRAINTS(csp) then add {var = value} to asg result := RECURSIVE-BACKTRACKING(asg,csp) if result failure then return result remove {var = value} from asg return failure 79 Complexity Search algorithm used: Depth first search Maximum depth of space: n (no. variables) Number of assignments = d n. Branching factor: Σ i D i (at top of tree) Full tree has n!d n leaves. Some observations: The order of assignment is irrelevant to correctness, so many paths are equivalent. Adding assignments cannot correct a violated constraint. 80 General-Purpose Improvements We already know that DFS is not necessarily very efficient. We can improve on simple backtracking (DFS) by addressing the following: Which variables should be assigned next, and in what order should the values be tried? What are the implications of the current variable assignments for the other unassigned variables? When a path fails, can the search avoid repeating this failure in subsequent paths? 81 27

28 Variable Assignment Recall the line in simple backtracking: var := SELECT-UNASSIGNED-VARIABLE(VARIABLES[csp],asg,csp) Careful selection of which variables to assign can improve the performance of backtracking search. Heuristics: Minimum remaining values: choose the variable with the fewest legal values. Degree heuristic: choose the variable involved in the largest number of constraints on other unassigned variables. Least constraining value: prefer the value that rules out the fewest choices for neighboring unassigned variables. 82 Forward Checking Whenever a variable X is assigned, Look at each unassigned variable Y connected to X by a constraint. Delete from Y s domain any value that is inconsistent with the value chosen for X. Initial domains After WA = red After Q = green After V = blue WA NT Q NSW V SA T X X X X X X X Must backtrack 83 Constraint Propagation Constraint propagation is the general process of propagating the implications of a constraint on variable forward onto other variables. The goal is to perform this propagation efficiently. We will apply the concept of k-consistency to do this

29 K-Consistency A CSP is said to be k-consistent if, for any set of k 1 variables, and for any consistent assignment to those variables, a consistent value can be assigned to any k th variable. 1-consistency: Also called node consistency, refers to each individual variable being self-consistent. 2-consistency: Also called arc consistency, refers to the case when for every value of some variable, there exists a consistent value for each of the neighboring variables. 3-consistency: Also called path consistency, refers to the case when any pair of adjacent consistent variables can be extended to a third neighboring variable. A graph is strongly k-consistent if it is j-consistent for j = 1,, k. 85 Arc Consistency We will use arc consistency to detect the problem in our Australia map-coloring problem. Consider just SA and NSW after assigning WA and Q. If SA = blue, then we can set NSW = red. However, if NSW = blue, SA is inconsistent. We can make NSW SA arc-consistent by deleting blue from the domain of NSW. Doing the same with SA NT shows an inconsistency. WA NT Q NSW V SA T Initial domains After WA = red X X After Q = green X X X X! 86 Arc Consistency function AC3(csp) inputs: csp local variables: queue, initially all arcs in csp while queue is not empty do (X i, X j ) := REMOVE-FIRST(queue) if REMOVE-INCONSISTENT-VALUES(X i,x j ) then for each X k in NEIGHBORS[X i ] do add (X k, X i ) to queue function REMOVE-INCONSISTENT-VALUES(X i,x j ) removed := false for each x in DOMAIN[X i ] do if no value y in DOMAIN[X j ] allows (x,y) to satisfy C(X i,x j ) then delete x from DOMAIN[X i ]; removed := true return removed 87 29

30 Intelligent Backtracking As pointed out, DFS just backtracks one level at a time (called chronological backtracking). It is possible (in fact likely) that what led to the dead end occurred higher up the tree than the previous level. This means that we could, potentially, exhaust the subtree below the point where the conflict occurred before we discover the problem. Several approaches exist for skipping levels in the tree to improve backtracking performance. 88 Backjumping Define the conflict set to be the set of variables preceding a point requiring backtracking that is responsible for causing the failure. Generally, the conflict set for variable X consists of the set of previously assigned variables connected to X. Backjumping consists of backtracking to the most recent variable in the conflict set. 89 Backjumping NT Q Q NSW WA SA NSW V V T SA T 90 30

31 Backjumping Modify BACKTRACKING-SEARCH to accumulate conflict sets while checking for legal values to assign. Note that Forward Checking can provide the conflict set with no additional work. Whenever Forward Checking deletes a value from Y s domain as a result of assigning a value to X, just add X to Y s conflict set. Every time the last value is deleted from Y s domain, the variables in Y s conflict set are added to the conflict set of X. 91 Conflict-Directed Backjumping Suppose we have the partial assignment {WA = red, NSW = red}. This is inconsistent because of the combination of {NT, Q, SA}. Suppose we fill out Q and SA before NT. NT will fail, but there will be no conflict set to jump to. We need to focus on the combination. WA NT Q SA NSW V 92 Computing the Conflict Set Observe that the terminal failure of a branch must always occur because a variable s domain becomes empty. That variable will have a standard conflict set. Now when we backjump, we have the variable jumped to absorb the terminal variable s conflict set (minus itself, of course). More formally, let X j be the current variable, and let conf(x j ) be its conflict set. If every possible value for X j fails, backjump to the most recent variable X i in conf(x j ). Then set conf(x i ) = conf(x i ) conf(x j ) {X i } 93 31

32 Local Search and CSPs So far, we have focused on incremental search for CSPs. CSPs, in fact, are well-suited to local search methods. Local search begins by assigning values to all variables whether the resulting assignment is consistent or not. Then variable assignments are varied until a solution is found. 94 Min-Conflicts Local search depends upon selecting and changing variable assignments. In choosing a new value for a variable, the most obvious heuristic is to select the value that results in the minimum number of conflicts with other variables. function MIN-CONFLICTS(csp,max-steps) inputs: csp, max-steps current := an initial complete assignment for csp for i := 1 to max-steps do if current is a solution then return current var := a randomly chosen conflicted variable value := the value v minimizing CONFLICTS(var,v,current,csp) set var to value in current return failure 95 Tree-Structured CSPs In general, solving CSPs is NP-hard. A tree-structured CSP is one in which the constraint graph is a tree. Any tree-structured CSP can be solved in time linear in the number of variables. Choose any variable as the root of the tree, and order the variables from the root to the leaves such that every node s parent precedes it in the ordering. Label the variables X 1,,X n in order. Every variable (except the root) will have only one parent. For j from n downto 2, apply arc-consistency to the arc (X i,x j ), where X i is the parent of X j, removing values from DOMAIN[X i ] as necessary. For j from 1 to n, assign any value for X j consistent with the value assigned for X i

33 Ordering the Nodes A E B D C F A B C D E F 97 Complexity Observations After the second step, the CSP is directionally arcconsistent, so no backtracking will be required. Applying the arc-consistency checks in reverse order ensures that deleted values cannot endanger consistency of already-processed arcs. The entire algorithm requires O(nd 2 ) time. Note, d is the dimension of the variables and is, technically, a constant. Thus the linear complexity. 98 Reduction Cutset Conditioning Most real-world problems are not tree-structured. It would be nice if we could reduce more complex problems to tree-structured problems (given reduction in complexity). One approach is to condition on some variable assignment, and consider the remaining CSP. Choose a subset S from VARIABLES[csp] such that the constraint graph becomes a tree once S is removed. For each possible variable assignment in S that satisfies all constraints on S do Remove from the domains of remaining variables any values inconsistent with assignment for S. If sub-csp has a solution, return it with assignment for S

34 Example WA NT Q SA NSW V T 100 Example WA NT Q SA NSW V T 101 Example WA NT Q NSW V T

35 Example WA NT Q NSW V T 103 Example WA NT Q SA NSW V T 104 Reduction Tree Decomposition Decompose constraint graph into a set of connected subproblems. Make sure the structure of the connected subproblems is a tree. Each subproblem is then solved independently. The resulting solutions are then combined. Thus, this is a classic form of divide-and-conquer

36 Requirements To apply tree decomposition, the following must apply: Every variable in the original problem must appear in at least one subproblem. If two variables are connected by a constraint in the original problem, they must appear together (along with the constraint) in at least one subproblem. If a variable appears in two subproblems in a tree, it must appear in every subproblem along the path connecting the subproblems. 106 Approach As mentioned, solve each subproblem independently. After solving all of the subproblems, construct a global solution: View each subproblem as a mega-variable. The domain of the mega-variable is the set of all solutions for the subproblems. Solve the constraints connecting the subproblems using the tree-structured approach. 107 Complexity Define the tree width of a tree decomposition of a graph to be one less than the size of the largest subproblem. Define the tree width of the graph to be the minimum tree width among all decompositions. Let w denote the tree width of the graph. Given the decompositions, the CSP can be solved in O(nd w+1 ) time. Thus a CSP with bounded tree width is solvable in polynomial time

Constraint Satisfaction Problems

Constraint Satisfaction Problems Last update: February 25, 2010 Constraint Satisfaction Problems CMSC 421, Chapter 5 CMSC 421, Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local

More information

Constraint Satisfaction

Constraint Satisfaction Constraint Satisfaction Philipp Koehn 1 October 2015 Outline 1 Constraint satisfaction problems (CSP) examples Backtracking search for CSPs Problem structure and problem decomposition Local search for

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

More information

Constraint Satisfaction Problems. Chapter 6

Constraint Satisfaction Problems. Chapter 6 Constraint Satisfaction Problems Chapter 6 Office hours Office hours for Assignment 1 (ASB9810 in CSIL): Sep 29th(Fri) 12:00 to 13:30 Oct 3rd(Tue) 11:30 to 13:00 Late homework policy You get four late

More information

Lecture 6: Constraint Satisfaction Problems (CSPs)

Lecture 6: Constraint Satisfaction Problems (CSPs) Lecture 6: Constraint Satisfaction Problems (CSPs) CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA February 28, 2018 Amarda Shehu (580)

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Revised by Hankui Zhuo, March 14, 2018 Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search

More information

Spezielle Themen der Künstlichen Intelligenz

Spezielle Themen der Künstlichen Intelligenz Spezielle Themen der Künstlichen Intelligenz 2. Termin: Constraint Satisfaction Dr. Stefan Kopp Center of Excellence Cognitive Interaction Technology AG A Recall: Best-first search Best-first search =

More information

Constraint Satisfaction Problems. A Quick Overview (based on AIMA book slides)

Constraint Satisfaction Problems. A Quick Overview (based on AIMA book slides) Constraint Satisfaction Problems A Quick Overview (based on AIMA book slides) Constraint satisfaction problems What is a CSP? Finite set of variables V, V 2,, V n Nonempty domain of possible values for

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition,

More information

Reading: Chapter 6 (3 rd ed.); Chapter 5 (2 nd ed.) For next week: Thursday: Chapter 8

Reading: Chapter 6 (3 rd ed.); Chapter 5 (2 nd ed.) For next week: Thursday: Chapter 8 Constraint t Satisfaction Problems Reading: Chapter 6 (3 rd ed.); Chapter 5 (2 nd ed.) For next week: Tuesday: Chapter 7 Thursday: Chapter 8 Outline What is a CSP Backtracking for CSP Local search for

More information

Example: Map-Coloring. Constraint Satisfaction Problems Western Australia. Example: Map-Coloring contd. Outline. Constraint graph

Example: Map-Coloring. Constraint Satisfaction Problems Western Australia. Example: Map-Coloring contd. Outline. Constraint graph Example: Map-Coloring Constraint Satisfaction Problems Western Northern erritory ueensland Chapter 5 South New South Wales asmania Variables, N,,, V, SA, Domains D i = {red,green,blue} Constraints: adjacent

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems In which we see how treating states as more than just little black boxes leads to the invention of a range of powerful new search methods and a deeper understanding of

More information

Constraint Satisfaction Problems. Chapter 6

Constraint Satisfaction Problems. Chapter 6 Constraint Satisfaction Problems Chapter 6 Constraint Satisfaction Problems A constraint satisfaction problem consists of three components, X, D, and C: X is a set of variables, {X 1,..., X n }. D is a

More information

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

Artificial Intelligence p.1/49. n-queens. Artificial Intelligence p.2/49. Initial state: the empty board or a board with n random Example: n-queens Put n queens on an n n board with no two queens on the same row, column, or diagonal A search problem! State space: the board with 0 to n queens Initial state: the empty board or a board

More information

Constraint Satisfaction. AI Slides (5e) c Lin

Constraint Satisfaction. AI Slides (5e) c Lin Constraint Satisfaction 4 AI Slides (5e) c Lin Zuoquan@PKU 2003-2018 4 1 4 Constraint Satisfaction 4.1 Constraint satisfaction problems 4.2 Backtracking search 4.3 Constraint propagation 4.4 Local search

More information

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17

What is Search For? CSE 473: Artificial Intelligence. Example: N-Queens. Example: N-Queens. Example: Map-Coloring 4/7/17 CSE 473: Artificial Intelligence Constraint Satisfaction Dieter Fox What is Search For? Models of the world: single agent, deterministic actions, fully observed state, discrete state space Planning: sequences

More information

Outline. Best-first search

Outline. Best-first search Outline Best-first search Greedy best-first search A* search Heuristics Local search algorithms Hill-climbing search Beam search Simulated annealing search Genetic algorithms Constraint Satisfaction Problems

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Chapter 5 1 Outline CSP examples Backtracking search for CSPs Problem structure and problem decomposition Local search for CSPs Chapter 5 2 Constraint satisfaction

More information

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable

10/11/2017. Constraint Satisfaction Problems II. Review: CSP Representations. Heuristic 1: Most constrained variable //7 Review: Constraint Satisfaction Problems Constraint Satisfaction Problems II AIMA: Chapter 6 A CSP consists of: Finite set of X, X,, X n Nonempty domain of possible values for each variable D, D, D

More information

Lecture 18. Questions? Monday, February 20 CS 430 Artificial Intelligence - Lecture 18 1

Lecture 18. Questions? Monday, February 20 CS 430 Artificial Intelligence - Lecture 18 1 Lecture 18 Questions? Monday, February 20 CS 430 Artificial Intelligence - Lecture 18 1 Outline Chapter 6 - Constraint Satisfaction Problems Path Consistency & Global Constraints Sudoku Example Backtracking

More information

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe

Constraint Satisfaction Problems. slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe Constraint Satisfaction Problems slides from: Padhraic Smyth, Bryan Low, S. Russell and P. Norvig, Jean-Claude Latombe Standard search problems: State is a black box : arbitrary data structure Goal test

More information

Constraint Satisfaction Problems (CSPs)

Constraint Satisfaction Problems (CSPs) 1 Hal Daumé III (me@hal3.name) Constraint Satisfaction Problems (CSPs) Hal Daumé III Computer Science University of Maryland me@hal3.name CS 421: Introduction to Artificial Intelligence 7 Feb 2012 Many

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Bernhard Nebel, and Martin Riedmiller Albert-Ludwigs-Universität

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Chapter 5 Section 1 3 Constraint Satisfaction 1 Outline Constraint Satisfaction Problems (CSP) Backtracking search for CSPs Local search for CSPs Constraint Satisfaction

More information

Australia Western Australia Western Territory Northern Territory Northern Australia South Australia South Tasmania Queensland Tasmania Victoria

Australia Western Australia Western Territory Northern Territory Northern Australia South Australia South Tasmania Queensland Tasmania Victoria Constraint Satisfaction Problems Chapter 5 Example: Map-Coloring Western Northern Territory South Queensland New South Wales Tasmania Variables WA, NT, Q, NSW, V, SA, T Domains D i = {red,green,blue} Constraints:

More information

CS 188: Artificial Intelligence. Recap: Search

CS 188: Artificial Intelligence. Recap: Search CS 188: Artificial Intelligence Lecture 4 and 5: Constraint Satisfaction Problems (CSPs) Pieter Abbeel UC Berkeley Many slides from Dan Klein Recap: Search Search problem: States (configurations of the

More information

CSE 473: Artificial Intelligence

CSE 473: Artificial Intelligence CSE 473: Artificial Intelligence Constraint Satisfaction Luke Zettlemoyer Multiple slides adapted from Dan Klein, Stuart Russell or Andrew Moore What is Search For? Models of the world: single agent, deterministic

More information

Iterative improvement algorithms. Today. Example: Travelling Salesperson Problem. Example: n-queens

Iterative improvement algorithms. Today. Example: Travelling Salesperson Problem. Example: n-queens Today See Russell and Norvig, chapters 4 & 5 Local search and optimisation Constraint satisfaction problems (CSPs) CSP examples Backtracking search for CSPs 1 Iterative improvement algorithms In many optimization

More information

Announcements. CS 188: Artificial Intelligence Spring Today. A* Review. Consistency. A* Graph Search Gone Wrong

Announcements. CS 188: Artificial Intelligence Spring Today. A* Review. Consistency. A* Graph Search Gone Wrong CS 88: Artificial Intelligence Spring 2009 Lecture 4: Constraint Satisfaction /29/2009 John DeNero UC Berkeley Slides adapted from Dan Klein, Stuart Russell or Andrew Moore Announcements The Python tutorial

More information

Announcements. CS 188: Artificial Intelligence Fall Reminder: CSPs. Today. Example: 3-SAT. Example: Boolean Satisfiability.

Announcements. CS 188: Artificial Intelligence Fall Reminder: CSPs. Today. Example: 3-SAT. Example: Boolean Satisfiability. CS 188: Artificial Intelligence Fall 2008 Lecture 5: CSPs II 9/11/2008 Announcements Assignments: DUE W1: NOW P1: Due 9/12 at 11:59pm Assignments: UP W2: Up now P2: Up by weekend Dan Klein UC Berkeley

More information

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2008 CS 188: Artificial Intelligence Fall 2008 Lecture 5: CSPs II 9/11/2008 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore 1 1 Assignments: DUE Announcements

More information

CS 188: Artificial Intelligence Fall 2008

CS 188: Artificial Intelligence Fall 2008 CS 188: Artificial Intelligence Fall 2008 Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore 1 1 Announcements Grading questions:

More information

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens

Announcements. CS 188: Artificial Intelligence Fall Large Scale: Problems with A* What is Search For? Example: N-Queens CS 188: Artificial Intelligence Fall 2008 Announcements Grading questions: don t panic, talk to us Newsgroup: check it out Lecture 4: CSPs 9/9/2008 Dan Klein UC Berkeley Many slides over the course adapted

More information

Space of Search Strategies. CSE 573: Artificial Intelligence. Constraint Satisfaction. Recap: Search Problem. Example: Map-Coloring 11/30/2012

Space of Search Strategies. CSE 573: Artificial Intelligence. Constraint Satisfaction. Recap: Search Problem. Example: Map-Coloring 11/30/2012 /0/0 CSE 57: Artificial Intelligence Constraint Satisfaction Daniel Weld Slides adapted from Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer Space of Search Strategies Blind Search DFS, BFS,

More information

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements CS 188: Artificial Intelligence Spring 2006 Lecture 4: CSPs 9/7/2006 Dan Klein UC Berkeley Many slides over the course adapted from either Stuart Russell or Andrew Moore Announcements Reminder: Project

More information

Informed search algorithms. Chapter 4

Informed search algorithms. Chapter 4 Informed search algorithms Chapter 4 Material Chapter 4 Section 1 - Exclude memory-bounded heuristic search 3 Outline Best-first search Greedy best-first search A * search Heuristics Local search algorithms

More information

Chapter 6 Constraint Satisfaction Problems

Chapter 6 Constraint Satisfaction Problems Chapter 6 Constraint Satisfaction Problems CS5811 - Artificial Intelligence Nilufer Onder Department of Computer Science Michigan Technological University Outline CSP problem definition Backtracking search

More information

Artificial Intelligence Constraint Satisfaction Problems

Artificial Intelligence Constraint Satisfaction Problems Artificial Intelligence Constraint Satisfaction Problems Recall Search problems: Find the sequence of actions that leads to the goal. Sequence of actions means a path in the search space. Paths come with

More information

Solving Problems: Intelligent Search

Solving Problems: Intelligent Search Solving Problems: Intelligent Search Instructor: B. John Oommen Chancellor s Professor Fellow: IEEE; Fellow: IAPR School of Computer Science, Carleton University, Canada The primary source of these notes

More information

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements CS 188: Artificial Intelligence Spring 2010 Lecture 4: A* wrap-up + Constraint Satisfaction 1/28/2010 Pieter Abbeel UC Berkeley Many slides from Dan Klein Announcements Project 0 (Python tutorial) is due

More information

Informed Search and Exploration

Informed Search and Exploration Informed Search and Exploration Berlin Chen 2005 Reference: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach, Chapter 4 2. S. Russell s teaching materials AI - Berlin Chen 1 Introduction

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Information Systems and Machine Learning Lab (ISMLL) Tomáš Horváth 10 rd November, 2010 Informed Search and Exploration Example (again) Informed strategy we use a problem-specific

More information

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld )

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld ) Local Search and Optimization Chapter 4 Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld ) 1 Outline Local search techniques and optimization Hill-climbing

More information

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld )

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld ) Local Search and Optimization Chapter 4 Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld ) 1 2 Outline Local search techniques and optimization Hill-climbing

More information

What is Search For? CS 188: Artificial Intelligence. Example: Map Coloring. Example: N-Queens. Example: N-Queens. Constraint Satisfaction Problems

What is Search For? CS 188: Artificial Intelligence. Example: Map Coloring. Example: N-Queens. Example: N-Queens. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems What is Search For? Assumptions about the world: a single agent, deterministic actions, fully observed state, discrete state space Planning:

More information

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

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 Intuitions behind heuristic search The separation property of GRAPH-SEARCH TDDC17 Seminar III Search II Informed or Heuristic Search Beyond Classical Search Find a heuristic measure h(n) which estimates

More information

Today. CS 188: Artificial Intelligence Fall Example: Boolean Satisfiability. Reminder: CSPs. Example: 3-SAT. CSPs: Queries.

Today. CS 188: Artificial Intelligence Fall Example: Boolean Satisfiability. Reminder: CSPs. Example: 3-SAT. CSPs: Queries. CS 188: Artificial Intelligence Fall 2007 Lecture 5: CSPs II 9/11/2007 More CSPs Applications Tree Algorithms Cutset Conditioning Today Dan Klein UC Berkeley Many slides over the course adapted from either

More information

Artificial Intelligence

Artificial Intelligence Contents Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller What

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence 5. Constraint Satisfaction Problems CSPs as Search Problems, Solving CSPs, Problem Structure Wolfram Burgard, Andreas Karwath, Bernhard Nebel, and Martin Riedmiller SA-1 Contents

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Tuomas Sandholm Carnegie Mellon University Computer Science Department [Read Chapter 6 of Russell & Norvig] Constraint satisfaction problems (CSPs) Standard search problem:

More information

TDT4136 Logic and Reasoning Systems

TDT4136 Logic and Reasoning Systems TDT4136 Logic and Reasoning Systems Chapter 3 & 4.1 - Informed Search and Exploration Lester Solbakken solbakke@idi.ntnu.no Norwegian University of Science and Technology 18.10.2011 1 Lester Solbakken

More information

Week 8: Constraint Satisfaction Problems

Week 8: Constraint Satisfaction Problems COMP3411/ 9414/ 9814: Artificial Intelligence Week 8: Constraint Satisfaction Problems [Russell & Norvig: 6.1,6.2,6.3,6.4,4.1] COMP3411/9414/9814 18s1 Constraint Satisfaction Problems 1 Outline Constraint

More information

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld )

Local Search and Optimization Chapter 4. Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld ) Local Search and Optimization Chapter 4 Mausam (Based on slides of Padhraic Smyth, Stuart Russell, Rao Kambhampati, Raj Rao, Dan Weld ) 1 2 Outline Local search techniques and optimization Hill-climbing

More information

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

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 23 January, 2018 DIT411/TIN175, Artificial Intelligence Chapters 3 4: More search algorithms CHAPTERS 3 4: MORE SEARCH ALGORITHMS DIT411/TIN175, Artificial Intelligence Peter Ljunglöf 23 January, 2018 1 TABLE OF CONTENTS

More information

Example: Map coloring

Example: Map coloring Today s s lecture Local Search Lecture 7: Search - 6 Heuristic Repair CSP and 3-SAT Solving CSPs using Systematic Search. Victor Lesser CMPSCI 683 Fall 2004 The relationship between problem structure and

More information

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence,

Lars Schmidt-Thieme, Information Systems and Machine Learning Lab (ISMLL), University of Hildesheim, Germany, Course on Artificial Intelligence, Course on Artificial Intelligence, winter term 2012/2013 0/35 Artificial Intelligence Artificial Intelligence 3. Constraint Satisfaction Problems Lars Schmidt-Thieme Information Systems and Machine Learning

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Information Systems and Machine Learning Lab (ISMLL) Tomáš Horváth 16 rd November, 2011 Informed Search and Exploration Example (again) Informed strategy we use a problem-specific

More information

Announcements. CS 188: Artificial Intelligence Fall 2010

Announcements. CS 188: Artificial Intelligence Fall 2010 Announcements Project 1: Search is due Monday Looking for partners? After class or newsgroup Written 1: Search and CSPs out soon Newsgroup: check it out CS 188: Artificial Intelligence Fall 2010 Lecture

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Constraint Satisfaction Problems Marc Toussaint University of Stuttgart Winter 2015/16 (slides based on Stuart Russell s AI course) Inference The core topic of the following lectures

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Local Search Vibhav Gogate The University of Texas at Dallas Some material courtesy of Luke Zettlemoyer, Dan Klein, Dan Weld, Alex Ihler, Stuart Russell, Mausam Systematic Search:

More information

Constraint Satisfaction Problems

Constraint Satisfaction Problems Constraint Satisfaction Problems Constraint satisfaction problems Backtracking algorithms for CSP Heuristics Local search for CSP Problem structure and difficulty of solving Search Problems The formalism

More information

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

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Artificial Intelligence. Sina Institute, University of Birzeit Lecture Notes on Informed Searching University of Birzeit, Palestine 1 st Semester, 2014 Artificial Intelligence Chapter 4 Informed Searching Dr. Mustafa Jarrar Sina Institute, University of Birzeit mjarrar@birzeit.edu

More information

CS 188: Artificial Intelligence Spring Today

CS 188: Artificial Intelligence Spring Today CS 188: Artificial Intelligence Spring 2006 Lecture 7: CSPs II 2/7/2006 Dan Klein UC Berkeley Many slides from either Stuart Russell or Andrew Moore Today More CSPs Applications Tree Algorithms Cutset

More information

CS 771 Artificial Intelligence. Constraint Satisfaction Problem

CS 771 Artificial Intelligence. Constraint Satisfaction Problem CS 771 Artificial Intelligence Constraint Satisfaction Problem Constraint Satisfaction Problems So far we have seen a problem can be solved by searching in space of states These states can be evaluated

More information

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence CSPs II + Local Search Prof. Scott Niekum The University of Texas at Austin [These slides based on those of Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley.

More information

CS 4100 // artificial intelligence

CS 4100 // artificial intelligence CS 4100 // artificial intelligence instructor: byron wallace Constraint Satisfaction Problems Attribution: many of these slides are modified versions of those distributed with the UC Berkeley CS188 materials

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence hapter 1 hapter 1 1 Iterative deepening search function Iterative-Deepening-Search( problem) returns a solution inputs: problem, a problem for depth 0 to do result Depth-Limited-Search(

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Informed Search and Exploration Chapter 4 (4.3 4.6) Searching: So Far We ve discussed how to build goal-based and utility-based agents that search to solve problems We ve also presented

More information

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

TDDC17. Intuitions behind heuristic search. Best-First Search. Recall Uniform-Cost Search. f(n) =... + h(n) g(n) = cost of path from root node to n Intuitions behind heuristic search The separation property of GRAPH-SEARCH TDDC17 Seminar III Search II Informed or Heuristic Search Beyond Classical Search Find a heuristic measure h(n) which estimates

More information

Informed Search. Best-first search. Greedy best-first search. Intelligent Systems and HCI D7023E. Romania with step costs in km

Informed Search. Best-first search. Greedy best-first search. Intelligent Systems and HCI D7023E. Romania with step costs in km Informed Search Intelligent Systems and HCI D7023E Lecture 5: Informed Search (heuristics) Paweł Pietrzak [Sec 3.5-3.6,Ch.4] A search strategy which searches the most promising branches of the state-space

More information

Informed search algorithms. Chapter 4

Informed search algorithms. Chapter 4 Informed search algorithms Chapter 4 Outline Best-first search Greedy best-first search A * search Heuristics Memory Bounded A* Search Best-first search Idea: use an evaluation function f(n) for each node

More information

Informed search algorithms

Informed search algorithms CS 580 1 Informed search algorithms Chapter 4, Sections 1 2, 4 CS 580 2 Outline Best-first search A search Heuristics Hill-climbing Simulated annealing CS 580 3 Review: General search function General-Search(

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 4, 4/11/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Today: Informed search algorithms

More information

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

DIT411/TIN175, Artificial Intelligence. Peter Ljunglöf. 30 January, 2018 DIT411/TIN175, Artificial Intelligence Chapter 7: Constraint satisfaction problems CHAPTER 7: CONSTRAINT SATISFACTION PROBLEMS DIT411/TIN175, Artificial Intelligence Peter Ljunglöf 30 January, 2018 1 TABLE

More information

Informed Search and Exploration

Informed Search and Exploration Artificial Intelligence Informed Search and Exploration Readings: Chapter 4 of Russell & Norvig. Best-First Search Idea: use a function f for each node n to estimate of desirability Strategy: Alwasy expand

More information

Robot Programming with Lisp

Robot Programming with Lisp 6. Search Algorithms Gayane Kazhoyan (Stuart Russell, Peter Norvig) Institute for University of Bremen Contents Problem Definition Uninformed search strategies BFS Uniform-Cost DFS Depth-Limited Iterative

More information

Heuristic (Informed) Search

Heuristic (Informed) Search Heuristic (Informed) Search (Where we try to choose smartly) R&N: Chap., Sect..1 3 1 Search Algorithm #2 SEARCH#2 1. INSERT(initial-node,Open-List) 2. Repeat: a. If empty(open-list) then return failure

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence CS:4420 Artificial Intelligence Spring 2018 Beyond Classical Search Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed

More information

Constraint Satisfaction Problems Part 2

Constraint Satisfaction Problems Part 2 Constraint Satisfaction Problems Part 2 Deepak Kumar October 2017 CSP Formulation (as a special case of search) State is defined by n variables x 1, x 2,, x n Variables can take on values from a domain

More information

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems

CS 188: Artificial Intelligence. What is Search For? Constraint Satisfaction Problems. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems Constraint Satisfaction Problems N variables domain D constraints x 1 x 2 Instructor: Marco Alvarez University of Rhode Island (These slides

More information

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

Dr. Mustafa Jarrar. Chapter 4 Informed Searching. Sina Institute, University of Birzeit Lecture Notes, Advanced Artificial Intelligence (SCOM7341) Sina Institute, University of Birzeit 2 nd Semester, 2012 Advanced Artificial Intelligence (SCOM7341) Chapter 4 Informed Searching Dr. Mustafa

More information

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1

Informed Search. Dr. Richard J. Povinelli. Copyright Richard J. Povinelli Page 1 Informed Search Dr. Richard J. Povinelli Copyright Richard J. Povinelli Page 1 rev 1.1, 9/25/2001 Objectives You should be able to explain and contrast uniformed and informed searches. be able to compare,

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 CS 188: Artificial Intelligence Fall 2011 Lecture 5: CSPs II 9/8/2011 Dan Klein UC Berkeley Multiple slides over the course adapted from either Stuart Russell or Andrew Moore 1 Today Efficient Solution

More information

CS 343: Artificial Intelligence

CS 343: Artificial Intelligence CS 343: Artificial Intelligence Constraint Satisfaction Problems Prof. Scott Niekum The University of Texas at Austin [These slides are based on those of Dan Klein and Pieter Abbeel for CS188 Intro to

More information

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set:

Announcements. Homework 1: Search. Project 1: Search. Midterm date and time has been set: Announcements Homework 1: Search Has been released! Due Monday, 2/1, at 11:59pm. On edx online, instant grading, submit as often as you like. Project 1: Search Has been released! Due Friday 2/5 at 5pm.

More information

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm

Announcements. Homework 4. Project 3. Due tonight at 11:59pm. Due 3/8 at 4:00pm Announcements Homework 4 Due tonight at 11:59pm Project 3 Due 3/8 at 4:00pm CS 188: Artificial Intelligence Constraint Satisfaction Problems Instructor: Stuart Russell & Sergey Levine, University of California,

More information

Constraints. CSC 411: AI Fall NC State University 1 / 53. Constraints

Constraints. CSC 411: AI Fall NC State University 1 / 53. Constraints CSC 411: AI Fall 2013 NC State University 1 / 53 Constraint satisfaction problems (CSPs) Standard search: state is a black box that supports goal testing, application of an evaluation function, production

More information

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems

What is Search For? CS 188: Artificial Intelligence. Constraint Satisfaction Problems CS 188: Artificial Intelligence Constraint Satisfaction Problems What is Search For? Assumptions about the world: a single agent, deterministic actions, fully observed state, discrete state space Planning:

More information

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence Constraint Satisfaction Problems II and Local Search Instructors: Sergey Levine and Stuart Russell University of California, Berkeley [These slides were created by Dan Klein

More information

CS W4701 Artificial Intelligence

CS W4701 Artificial Intelligence CS W4701 Artificial Intelligence Fall 2013 Chapter 6: Constraint Satisfaction Problems Jonathan Voris (based on slides by Sal Stolfo) Assignment 3 Go Encircling Game Ancient Chinese game Dates back At

More information

ARTIFICIAL INTELLIGENCE. Informed search

ARTIFICIAL INTELLIGENCE. Informed search INFOB2KI 2017-2018 Utrecht University The Netherlands ARTIFICIAL INTELLIGENCE Informed search Lecturer: Silja Renooij These slides are part of the INFOB2KI Course Notes available from www.cs.uu.nl/docs/vakken/b2ki/schema.html

More information

Artificial Intelligence

Artificial Intelligence Artificial Intelligence Dr Ahmed Rafat Abas Computer Science Dept, Faculty of Computers and Informatics, Zagazig University arabas@zu.edu.eg http://www.arsaliem.faculty.zu.edu.eg/ Informed search algorithms

More information

CS 188: Artificial Intelligence

CS 188: Artificial Intelligence CS 188: Artificial Intelligence Constraint Satisfaction Problems II Instructors: Dan Klein and Pieter Abbeel University of California, Berkeley [These slides were created by Dan Klein and Pieter Abbeel

More information

Lecture Plan. Best-first search Greedy search A* search Designing heuristics. Hill-climbing. 1 Informed search strategies. Informed strategies

Lecture Plan. Best-first search Greedy search A* search Designing heuristics. Hill-climbing. 1 Informed search strategies. Informed strategies Lecture Plan 1 Informed search strategies (KA AGH) 1 czerwca 2010 1 / 28 Blind vs. informed search strategies Blind search methods You already know them: BFS, DFS, UCS et al. They don t analyse the nodes

More information

CS 188: Artificial Intelligence Fall 2011

CS 188: Artificial Intelligence Fall 2011 Announcements Project 1: Search is due next week Written 1: Search and CSPs out soon Piazza: check it out if you haven t CS 188: Artificial Intelligence Fall 2011 Lecture 4: Constraint Satisfaction 9/6/2011

More information

CS 380: Artificial Intelligence Lecture #4

CS 380: Artificial Intelligence Lecture #4 CS 380: Artificial Intelligence Lecture #4 William Regli Material Chapter 4 Section 1-3 1 Outline Best-first search Greedy best-first search A * search Heuristics Local search algorithms Hill-climbing

More information

4 INFORMED SEARCH AND EXPLORATION. 4.1 Heuristic Search Strategies

4 INFORMED SEARCH AND EXPLORATION. 4.1 Heuristic Search Strategies 55 4 INFORMED SEARCH AND EXPLORATION We now consider informed search that uses problem-specific knowledge beyond the definition of the problem itself This information helps to find solutions more efficiently

More information

AI Fundamentals: Constraints Satisfaction Problems. Maria Simi

AI Fundamentals: Constraints Satisfaction Problems. Maria Simi AI Fundamentals: Constraints Satisfaction Problems Maria Simi Constraints satisfaction LESSON 3 SEARCHING FOR SOLUTIONS Searching for solutions Most problems cannot be solved by constraint propagation

More information

Recap: Search Problem. CSE 473: Artificial Intelligence. Space of Search Strategies. Constraint Satisfaction. Example: N-Queens 4/9/2012

Recap: Search Problem. CSE 473: Artificial Intelligence. Space of Search Strategies. Constraint Satisfaction. Example: N-Queens 4/9/2012 CSE 473: Artificial Intelligence Constraint Satisfaction Daniel Weld Slides adapted from Dan Klein, Stuart Russell, Andrew Moore & Luke Zettlemoyer Recap: Search Problem States configurations of the world

More information