L15: Variable Heuristics Flashcards

1
Q

What are static heuristics?

A

Order in which variables/values selected/assigned chosen before search.
- Order is set before search starts.
- Order is fixed for entire search

E.g.
- Assign variables in order x1, x2, x3
- Assign variables in ascending order

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are some operations we can order heuristically?

A
  1. Variable assignment order.
  2. Value assignment order.
  3. Constraint checking order.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are dynamic heuristics?

A
  • Examine the state of the problem during the search
  • Decide on the ‘best’ variable/value to assign next

E.g.
- ’Smallest domain’ variable ordering (Affected by FC/MAC propagation, which differs based on the assignments made)
- ‘Min-conflicts’ value ordering

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do we know which type of heuristic to choose?

A
  • Make the most difficult choice first (variables).
  • Have the most far-reaching consequences for the rest of the problem.
  • Narrows down easy choices.
  • If we make the easy choices first, we can paint ourselves into a corner, as in the previous example.
  • For the most difficult choice choose the option most likely to succeed (values).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is first ordering?

A

For each variable, the first value we assign that is compatible with the past assignments is part of the solution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is second ordering?

A

Because of the variable assignment order, we make assignments that ‘look good’ but turn out to have no solutions and backtracking is required. (e.g. thrashing- repeated failure for the same reason)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How can we look at static variable heuristics?

A

Using a graph that represents the constraints

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a primal graph?

A

The primal graph has an edge between two nodes if they are in a constraint together (unlike the constraints graph where each edge represents a constraint)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a hypergraph?

A

A graph that describes an area rather than just an edge between 2 nodes.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is maximum degree ordering?

A

Order variables in decreasing order of their degrees in the graph (break ties arbitrarily).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the degree of a variable?

A

How many edges the variable has

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

How does maximum degree fit with the rationale of making hard choices first?

A

Variables in a lot of constraints may be highly constrained. However they may not, constraints vary in tightness.

Highly constrained may be the hardest choices.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is maximum cardinality ordering?

A
  1. Select the first variable arbitrarily
  2. Repeat until there are no more variables: append to the order a variable connected to the largest group among those already selected.

We want to prioritise the nodes with the most constraints that are related to past variables.
E.g., when picking node 4, we would prefer to pick a node with constraints to nodes 1, 2, 3 as much as possible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

How does maximum cardinality fit with the rationale of making hard choices first?

A

After assigning some variables, the next hard choice is the one most constrained by the existing assignment (after all we need to make choices compatible with the existing assignment).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the width at an ordered node?

A

Number of arcs/edges linking back to a previous variable in the ordering.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the width of an ordering?

A

Maximum width at any node.

17
Q

What is the width of a constraint graph?

A

Minimum width of all its orderings (that is not 0).
1. Identify all possible orderings.
2. For each ordering, identify the width of the nodes and the ordering.
3. Identify the ordering with the minimum width.

18
Q

What is an ordered graph?

A

An arrangement of graph nodes in a fixed linear order.

19
Q

What is minimum width ordering?

A

We want to achieve an ordered graph with a minimum width.

20
Q

How does minimum width fit with the rationale of making hard choices first?

A

The nodes with the greater widths are prioritised and therefore the harder choices are selected first.

21
Q

What are 3 static variable orderings?

A
  • Maximum degree
  • Maximum cardinality
  • Minimum width
22
Q

What are 3 dynamic variable orderings?

A
  • Smallest domain first
  • Brelaz
  • dom/deg
23
Q

What is smallest domain ordering?

A

Select the variable with the smallest number of
values compatible with past assignments.

Dynamic because selection made based on state during search.

24
Q

What is Brelaz ordering?

A

Select the variable with the smallest
number of values compatible with past
assignments. So far, same as Smallest Domain

Break ties by selecting the variable with
the maximum degree in the constraint
sub-graph of the future variables.

25
Q

What is dom/deg ordering?

A

Select the variable that minimises the quotient
domain size/degree in future constraint graph.

When constraint graph is sparse, minimum domain less useful than an ordering based on degree. When constraint graph is dense, minimum domain much better than degree alone. Rather than break ties with one or the other, this heuristic combines them.

26
Q

Compare the performance of static and dynamic heuristics.

A
  • In studies on random problems, dynamic
    orderings often seen to do better.
  • On structured problems, static orderings can
    often perform very well.
  • Part of the art of constraint programming is
    choosing an appropriate heuristic for your
    problem.
27
Q

What are some types of value ordering?

A
  • Ascending value
  • Min-conflicts
  • Geelen’s value-ordering heuristics
28
Q

What is ascending value assignment ordering?

A

Given an ordered domain, assign values lowest-first.

29
Q

What is min-conflict ordering?

A

Having chosen a variable, consider each of its domain elements. Count the number of incompatible vales in the domains of future variables.

Assign domain elements in increasing order of this count, i.e. least constraining first.