人工智能05约束满足问题(PPT53页)

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
Binary CSP: 每个约束与2个变量有关 约束图: 节点是变量, 边是约束
General-purpose CSP algorithms(通用CSP算法) use the graph structure to speed up search.
E.g., Tasmania is an independent subproblem!
CSP的种类
离散变量 • finite domains 有限值域:
n 个变量, 值域大小d → O(dn) 完全赋值 e.g., Boolean CSPs/布尔CSP问题(NP-complete) • infinite domains 无限值域 (integers, strings, etc.) e.g., job scheduling, variables are start/end days for each job 不能通过枚举来描述值域,只能用约束语言 , e.g., 线性约束可解, 非线性约束不可解
第五章 约束满足问题
Review: Last Chapter
• Best-first search Heuristic functions estimate costs of shortest paths Good heuristics can dramatically reduce search cost Greedy best-first search expands lowest h — incomplete and not always optimal A* search expands lowest g+ h — complete and optimal — also optimally efficient (up to tie-breaks, for forward search) Admissible heuristics can be derived from exact solution of relaxed problems
Example: Map-Coloring
Solutions are assignments satisfying all constraints, e.g., {WA=red, NT =green, Q=red, NSW =green, V =red,
SA=blue, T=green}
Constraint graph(约束图)
CSP:
state is defined by goal test is a set of
vcaorniasbtrlaeisnXtsi
wspitehcivfayilnugesafllroowmadbolemcaoimn(bin值at域ion)s Doif
values
for subsets of variables
Local beam search Keep track of k states rather than just one
Genetic algorithms
本章大纲
• CSP examples • Backtracking search for CSPs • Problem structure and problem decomposition • Local search for CSPs
Review: Last Chapter
Local search algorithms • the path to the goal is irrelevant; the goal state itself is the solution • keep a single "current" state, try to improve it
每个约束包括一些变量的子集,并指定这些子集的值之间允许进行的
合并Biblioteka Baidu
Simple example of a formal representation language(形式化表示方法) Allows useful general-purpose(通用的,而不是问题特定的) algorithms with more power than standard search algorithms
Example: Map-Coloring
变量 WA, NT, Q, NSW, V, SA, T 值域 Di = {red,green,blue} 约束: adjacent regions must have different colors
e.g., WA ≠ NT, or (if the language allows this), or (WA,NT) ∈ {(red,green),(red,blue),(green,red), (green,blue), … }
Constraint satisfaction problems (CSPs)
Standard search problem: state is a “black box“ – any old data structure that supports goal test, eval, successor 任何可以由目标测试、评价函数、后继函数访问的数据结构
连续值域的变量 e.g., 哈勃望远镜观测的开始、结束时间 线性规划问题linear constraints solvable in polynomial time
by linear programming(LP) methods
约束的种类
• Unary(一元) 约束只限制单个变量的取值, e.g., SA ≠ green
Hill-climbing search depending on initial state, can get stuck in local maxima
Simulated annealing search escape local maxima by allowing some “bad” moves but gradually decrease their frequency
相关文档
最新文档