AI CSP

0.0(0)
studied byStudied by 0 people
0.0(0)
call with kaiCall with Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/74

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 6:09 PM on 1/28/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

75 Terms

1
New cards

Constraint Satisfaction Problem (CSP)

A search problem where states are assignments to variables that must satisfy constraints.

2
New cards

What search is for

Planning focuses on paths; identification focuses on assignments.

3
New cards

CSP problem type

CSPs are identification problems, not path-finding problems.

4
New cards

CSP world assumptions

Single agent, deterministic actions, fully observed, discrete state space.

5
New cards

Standard search state

An arbitrary data structure with no internal structure.

6
New cards

CSP state representation

A set of variables with values from domains.

7
New cards

CSP goal test

A set of constraints that must all be satisfied.

8
New cards

Why CSPs are special

They allow powerful general-purpose algorithms.

9
New cards

CSP variables

X₁, X₂, … each representing a decision.

10
New cards

CSP domain

The set of allowed values for a variable.

11
New cards

CSP constraints

Rules restricting combinations of variable assignments.

12
New cards

CSP solution

A complete assignment satisfying all constraints.

13
New cards

Map coloring CSP variables

Regions on the map.

14
New cards

Map coloring CSP domains

Colors.

15
New cards

Map coloring CSP constraints

Adjacent regions must have different colors.

16
New cards

N-Queens CSP goal

Place queens so none attack each other.

17
New cards

N-Queens formulation 1

Variables = columns, domain = rows.

18
New cards

N-Queens formulation 2

Variables = queens, domain = board positions.

19
New cards

Binary CSP

A CSP where each constraint involves at most two variables.

20
New cards

Constraint graph

Graph where nodes are variables and edges are constraints.

21
New cards

Purpose of constraint graph

Exploit structure to speed up search.

22
New cards

Independent subproblems

Disconnected components in the constraint graph.

23
New cards

Cryptarithmetic CSP

Letters are variables, digits are domains, arithmetic rules are constraints.

24
New cards

Sudoku CSP variables

Each square on the board.

25
New cards

Sudoku CSP domains

{1,2,…,9}

26
New cards

Sudoku CSP constraints

AllDiff constraints on rows, columns, and regions.

27
New cards

Unary constraint

A constraint on a single variable.

28
New cards

Binary constraint

A constraint involving two variables.

29
New cards

Higher-order constraint

A constraint involving three or more variables.

30
New cards

Soft constraints

Preferences rather than strict requirements.

31
New cards

Real-world CSP examples

Scheduling, timetabling, assignments, circuit layout, medicine.

32
New cards

Standard CSP search state

Partial assignment of variables.

33
New cards

CSP initial state

Empty assignment {}.

34
New cards

CSP successor function

Assign a value to an unassigned variable.

35
New cards

CSP goal test

Assignment is complete and consistent.

36
New cards

Why BFS is bad for CSPs

All solutions are at the deepest level.

37
New cards

Why DFS is better for CSPs

Finds complete assignments earlier.

38
New cards

Backtracking search

DFS with constraint checking and variable ordering.

39
New cards

Backtracking idea 1

Assign one variable at a time.

40
New cards

Backtracking idea 2

Check constraints incrementally.

41
New cards

Incremental goal test

Check constraints after each assignment.

42
New cards

Backtracking effectiveness

Can solve N-Queens up to about n ≈ 25.

43
New cards

Choice points in backtracking

Order of variables and order of values.

44
New cards

Improving CSP search

Ordering, filtering, and exploiting structure.

45
New cards

Filtering idea

Remove illegal values early from domains.

46
New cards

Forward checking

Remove values that conflict with a new assignment.

47
New cards

Forward checking limitation

Does not detect all future conflicts.

48
New cards

Constraint propagation

Reason from constraint to constraint.

49
New cards

Arc consistency definition

For every value of X, there exists a legal value of Y.

50
New cards

Arc consistency direction

Delete values from the tail of the arc.

51
New cards

Arc consistency benefit

Detects failure earlier than forward checking.

52
New cards

Arc consistency drawback

High runtime cost.

53
New cards

Arc consistency runtime

O(n²d³), can be improved to O(n²d²).

54
New cards

Closed-world limitation

Arc consistency cannot detect all failures.

55
New cards

MRV heuristic

Choose variable with minimum remaining values.

56
New cards

MRV intuition

Fail fast by choosing most constrained variable.

57
New cards

Least constraining value heuristic

Choose value that rules out the fewest options.

58
New cards

Why least constraining value

Keeps future choices flexible.

59
New cards

Combining heuristics

MRV + LCV + propagation gives huge speedups.

60
New cards

Problem structure

Exploit independence and graph structure.

61
New cards

Independent subproblems

Solve separately for massive speedups.

62
New cards

Tree-structured CSP

A CSP whose constraint graph has no cycles.

63
New cards

Tree-structured CSP complexity

O(nd²)

64
New cards

General CSP complexity

O(dⁿ)

65
New cards

Tree-structured CSP algorithm

Backward pass + forward assignment.

66
New cards

Backward pass purpose

Make arcs consistent from leaves to root.

67
New cards

Forward assignment purpose

Assign values without backtracking.

68
New cards

Why tree CSPs don’t backtrack

Consistency guarantees legal assignments.

69
New cards

Why cycles break tree CSPs

Multiple parents may conflict.

70
New cards

Cutset conditioning

Instantiate variables to make the graph a tree.

71
New cards

Cutset size c

Runtime O(dᶜ (n−c)d²)

72
New cards

Tree decomposition

Create mega-variables forming a tree.

73
New cards

Mega-variable purpose

Encode overlapping subproblems.

74
New cards

Agreement constraint

Mega-variables must agree on shared variables.

75
New cards

CSP summary

CSPs use backtracking + ordering + filtering + structure.