DOC PREVIEW
USC CSCI 561 - Session07_ConstraintSatisfactionProblems_short

This preview shows page 1-2-3-4-5-6 out of 17 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 17 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Constraint Satisfaction ProblemsProblemsArtificial IntelligenceAIMA 2ndedition, chapter 5Section 1 – 3Hadi Moradi1Outline Constraint Satisfaction Problems (CSP)Bkt ki hf CSPBacktracking search for CSPs Local search for CSPs22Constraint satisfaction problems (CSPs) CSP: Stategoal test3Example: Map-Coloring Variables4 Domains Constraints:3Example: Map-Coloring5 Solutions are complete and consistent assignments, Constraint graph Binary CSP: each constraint relates two variables Constraint graph: nodes are variables, arcs are constraints64Varieties of CSPs Discrete variables finite domains: infinite domains:7 Continuous variablesVarieties of constraints Unary constraints involve a single variable,  Binary constraints involve pairs of variables,8 Higher-order constraints involve 3 or more variables,5Real-world CSPs Assignment problems Timetabling problemsTransportation scheduling9pg Factory schedulingStandard search formulation (incremental)Let's start with the straightforward approach, then fix itInitialstate:Initial state:  Successor function Goal test:B anching facto101.Branching factor:6Backtracking search Variable assignments are commutative}, i.e.,[ WA = red then NT = green ] same as [ NT = green then WA = red ] Depth-first search for CSPs with single-variable assignments is called backtracking search11 Can solve n-queens for n≈ 25Backtracking search127Backtracking example13Backtracking example148Backtracking example15Backtracking example169Improving backtracking efficiency General-purpose methods can give huge gains in speed:gains in speed: Which variable should be assigned next? In what order should its values be tried?17 Can we detect inevitable failure early?Minimum Remaining Variable1810Degree Heuristic Choose the Most constraining variable:19Least constraining value Given a variable, choose the least constraining value:constraining value:2011Forward checking Idea:  Keep track of remaining legal values for unassigned variablespgg g Terminate search when any variable has no legal values21Forward checking2212Forward checking23Forward checking2413Constraint propagation Forward checking doesn't provide early detection for all failures:failures: 25Arc consistency Simplest form of propagation makes each arc consistentXÆYiittiffX ÆYis consistent ifffor every value x of X there is some allowed y2614Arc consistency Simplest form of propagation makes each arc consistentXÆYiittiffX ÆYis consistent ifffor every value x of X there is some allowed y27Arc consistency If Xloses a value, neighbors of Xneed to be rechecked2815Arc consistency29Arc consistency algorithm AC-33016Local search for CSPs Hill-climbing, simulated annealing typically work with "complete" states, i.e., all variables assigned To apply to CSPs:31Example: 4-Queens States: 4 queens in 4 columns (44= 256 states) Actions: move queen in column Goal test: no attacks Evaluation: h(n) = number of attacks3217Summary CSPs are a special kind of problem: states defined by values of a fixed set of variablesgoal test defined by constraints on variable valuesgoal test defined by constraints on variable values Backtracking = depth-first search with one variable assigned per node Variable ordering and value selection heuristics help significantly Forward checking prevents assignments that guarantee later failure Constraint propagation (e.g., arc consistency) does additional work to constrain values and detect inconsistencies33constrain values and detect inconsistencies Iterative min-conflicts is usually effective in


View Full Document

USC CSCI 561 - Session07_ConstraintSatisfactionProblems_short

Download Session07_ConstraintSatisfactionProblems_short
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Session07_ConstraintSatisfactionProblems_short and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Session07_ConstraintSatisfactionProblems_short 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?