《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter05

CONSTRAINT SATISFACTION PROBLEMS CHAPTER 5 Chapter 5 1
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
Outline ♦ CSP examples ♦ Backtracking search for CSPs ♦ Problem structure and problem decomposition ♦ Local search for CSPs Chapter 5 2

Constraint satisfaction problems (CSPs) Standard search problem: state is a "black box"-any old data structure that supports goal test,eval,successor CSP: state is defined by variables Xi with values from domain Di goal test is a set of constraints specifying allowable combinations of values for subsets of variables Simple example of a formal representation language Allows useful general-purpose algorithms with more power than standard search algorithms Chapter 5 3
Constraint satisfaction problems (CSPs) Standard search problem: state is a “black box”—any old data structure that supports goal test, eval, successor CSP: state is defined by variables Xi with values from domain Di goal test is a set of constraints specifying allowable combinations of values for subsets of variables Simple example of a formal representation language Allows useful general-purpose algorithms with more power than standard search algorithms Chapter 5 3

Example:Map-Coloring Northern Territory Western Queensland Australia South Australia New South Wales Victoria Variables WA,NT,Q,NSW,V,SA,T Tasmania Domains Di={red,green,blue} Constraints:adjacent regions must have different colors e.g.,WA NT (if the language allows this),or (WA,NT){(red,green),(red,blue),(green,red),(green,blue),...} Chapter 5 4
Example: Map-Coloring Western Australia Northern Territory South Australia Queensland New South Wales Victoria Tasmania Variables WA, NT, Q, NSW, V , SA, T Domains Di = {red, green, blue} Constraints: adjacent regions must have different colors e.g., WA 6= NT (if the language allows this), or (WA, NT) ∈ {(red, green),(red, blue),(green, red),(green, blue), . . .} Chapter 5 4

Example:Map-Coloring contd. Northern Territory Western Queensland Australia South Australia New South Wales /ictoria Tas Solutions are assignments satisfying all constraints,e.g., {WA=red,NT=green,Q=red,NSW=green,V=red,SA=blue,T=green} Chapter 5 5
Example: Map-Coloring contd. Western Australia Northern Territory South Australia Queensland New South Wales Victoria Tasmania Solutions are assignments satisfying all constraints, e.g., {WA = red, NT = green, Q = red, NSW = green, V = red, SA = blue, T = green} Chapter 5 5

Constraint graph Binary CSP:each constraint relates at most two variables Constraint graph:nodes are variables,arcs show constraints NT WA SA NSW General-purpose CSP algorithms use the graph structure to speed up search.E.g.,Tasmania is an independent subproblem! Chapter 5 6
Constraint graph Binary CSP: each constraint relates at most two variables Constraint graph: nodes are variables, arcs show constraints Victoria WA NT SA Q NSW V T General-purpose CSP algorithms use the graph structure to speed up search. E.g., Tasmania is an independent subproblem! Chapter 5 6

Varieties of CSPs Discrete variables finite domains;size d=O(d")complete assignments e.g.,Boolean CSPs,incl.Boolean satisfiability (NP-complete) infinite domains (integers,strings,etc.) e.g.,job scheduling,variables are start/end days for each job need a constraint language,e.g.,StartJob1+5<Start.Jobs linear constraints solvable,nonlinear undecidable Continuous variables e.g.,start/end times for Hubble Telescope observations linear constraints solvable in poly time by LP methods Chapter 5 7
Varieties of CSPs Discrete variables finite domains; size d ⇒ O(dn) complete assignments ♦ e.g., Boolean CSPs, incl. Boolean satisfiability (NP-complete) infinite domains (integers, strings, etc.) ♦ e.g., job scheduling, variables are start/end days for each job ♦ need a constraint language, e.g., StartJob1 + 5 ≤ StartJob3 ♦ linear constraints solvable, nonlinear undecidable Continuous variables ♦ e.g., start/end times for Hubble Telescope observations ♦ linear constraints solvable in poly time by LP methods Chapter 5 7

Varieties of constraints Unary constraints involve a single variable, e.g,SA卡green Binary constraints involve pairs of variables, e.g,SA≠WA Higher-order constraints involve 3 or more variables, e.g.,cryptarithmetic column constraints Preferences(soft constraints),e.g.,red is better than green often representable by a cost for each variable assignment constrained optimization problems Chapter 5 8
Varieties of constraints Unary constraints involve a single variable, e.g., SA 6= green Binary constraints involve pairs of variables, e.g., SA 6= WA Higher-order constraints involve 3 or more variables, e.g., cryptarithmetic column constraints Preferences (soft constraints), e.g., red is better than green often representable by a cost for each variable assignment → constrained optimization problems Chapter 5 8

Example:Cryptarithmetic T WO R +T WO FOUR 2 Variables:F TU W RO X1 X2 X3 Domains:{0,1,2,3,4,5,6,7,8,9} Constraints alldiff F,T,U,W,R,O) O+O=R+10·X1,etc. Chapter 59
Example: Cryptarithmetic F T U W R O + T W O T W O F O U R X3 X2 X1 Variables: F T U W R O X1 X2 X3 Domains: {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Constraints alldiff(F, T,U, W, R, O) O + O = R + 10 · X1, etc. Chapter 5 9

Real-world CSPs Assignment problems e.g.,who teaches what class Timetabling problems e.g.,which class is offered when and where? Hardware configuration Spreadsheets Transportation scheduling Factory scheduling Floorplanning Notice that many real-world problems involve real-valued variables Chapter 5 10
Real-world CSPs Assignment problems e.g., who teaches what class Timetabling problems e.g., which class is offered when and where? Hardware configuration Spreadsheets Transportation scheduling Factory scheduling Floorplanning Notice that many real-world problems involve real-valued variables Chapter 5 10
按次数下载不扣除下载券;
注册用户24小时内重复下载只扣除一次;
顺序:VIP每日次数-->可用次数-->下载券;
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter05-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter04b.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter04b-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter04a.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter04a-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter03.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter03-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter02.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter02-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter01.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter01-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(教材,英文版)Part VI Learning 20 Statistical Learning Methods.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(教材,英文版)Part IV Planning 11 Planning.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(教材,英文版)Part III Knowledge and Reasoning 7 Logical Agents.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(教材,英文版)Part II Problem Solving 5 Constraint Satisfaction Problems.pdf
- 《单片机应用技术》课程教学资源(教案)单片机应用技术教案.pdf
- 《C语言程序设计》课程教学资源(教案讲义)第8章 函数.pdf
- 《Python程序开发》教学资源(讲义)第二章 数据类型与结构.pdf
- 《数据库设计与应用》课程教学资源(PPT课件讲稿)T-SQL语言.pdf
- 南京大学:《计算理论之美》课程教学资源(课件讲稿)Social Choice Theory.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter06-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter06.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter07-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter07.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter08-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter08.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter09-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter09.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter13-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter13.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter14a-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter14a.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter14b-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter14b.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter15a-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter15a.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter15b-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter15b.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter16-6pp.pdf
- 《Artificial Intelligence:A Modern Approach》教学资源(讲义,英文版)chapter16.pdf