Constraints and Decisions
Separate feasible assignments from preferences and uncertain outcomes.
artificial intelligence, constraints, decision makingWhat makes a schedule possible?
A constraint satisfaction problem (CSP) has variables, their allowed domains, and rules that valid assignments must obey. Consider two classes A and B sharing a room. Each may use morning or afternoon, but they cannot use the same time.
Assign and check
- Both classes start with domain
{morning, afternoon}. - Assign A to morning. The shared-room rule removes morning from B's options.
- Assign B to afternoon. Both assignments satisfy the constraint. If B had no remaining option, backtrack and try another choice for A.
See the reasoning
Narrow a timetable domain
See how the shared-room constraint affects the remaining choice. This is a prepared demonstration, not live code execution.
Start with domains
- Class AMorning or afternoonCurrent focus
- Class BMorning or afternoon
Both classes initially have two candidate times.
Feasibility is not preference
A hard constraint rules out a schedule; a soft preference ranks feasible schedules, such as preferring a morning class. Constraint propagation can remove impossible values early, while backtracking explores alternatives. Neither guarantees a quick answer for every large problem.
Decision-making can also involve uncertainty. Suppose an outdoor event has value 10 if dry and 0 if wet, with a stated dry probability of 0.6. Its expected value is 6. An indoor alternative worth 5 either way has expected value 5. This comparison depends on the probability and values being appropriate; fairness, risk and impacts not represented by that simple number still need consideration.
Reflect on the concept
Four fixed questions to reinforce the reasoning. Answers are not saved or scored.
