人工智能课件:AIChapter06BuildingControlAlgorithms.ppt
- 【下载声明】
1. 本站全部试题类文档,若标题没写含答案,则无答案;标题注明含答案的文档,主观题也可能无答案。请谨慎下单,一旦售出,不予退换。
2. 本站全部PPT文档均不含视频和音频,PPT中出现的音频或视频标识(或文字)仅表示流程,实际无音频或视频文件。请谨慎下单,一旦售出,不予退换。
3. 本页资料《人工智能课件:AIChapter06BuildingControlAlgorithms.ppt》由用户(罗嗣辉)主动上传,其收益全归该用户。163文库仅提供信息存储空间,仅对该用户上传内容的表现方式做保护处理,对上传内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知163文库(点击联系客服),我们立即给予删除!
4. 请根据预览情况,自愿下载本文。本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
5. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007及以上版本和PDF阅读器,压缩文件请下载最新的WinRAR软件解压。
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 人工智能 课件 AIChapter06BuildingControlAlgorithms
- 资源描述:
-
1、 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsChapter 6 Building ControlAlgorithms forState Space Search 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithms6.0 Introduction6.1 Recursion-based Search6.2 production system6.3 The Blackboard Architecture for Problem Solving 超级计算学院 人工智能 第 6 章 BuildingControlAlgori
2、thms6.1 Recursion-based Search6.1.1 Recursive SearchA Recursive procedure consists of : 1. A recursive step: the procedure calls itself to repeat a sequence of actions. 2. A termination conditions that stop the procedure from recurring endlessly(the recursive version of an endless loop) 超级计算学院 人工智能
3、第 6 章 BuildingControlAlgorithmsfuntion depth-first-searchbegin open:=Start; closed:= ; while open do begin removed leftmost state from open, call it x; if x is a goal then return SUCCSESS else begin generate children of x; put x on closed; discard children of x if already on open or closed put remai
4、ning children on left end of open; end end return FAILend 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsfuntion depthsearch (current_state)begin current_state :=Start; closed:= ; if current_state is a goal state then return SUCCSESS add current_state to closed while current_state has unexamined child b
5、egin child :=next unexamined child; if child not member of closed; then if depthsearch(child)=SUCCESS then return SUCCESS end; return FAILend 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsNote of the recursive procedure1. The combination of recursive and iterative2. The open list is ommitted3. Backtrac
6、king is effected when all descendants of a state fail to include a goal.4. the closed contain the SUCCESS nodes 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithms6.1.2 Recursive Search Examplefuntion pattern_search (current_goal)begin if current_goal is a member of closed; then return FAIL else add current
7、_goal to closed while there remain in data base unifying facts or rules do begin case current_goal unifies with a fact return SUCCESS current_goal is a conjunction(pq ) begin 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsExample: prove a, b, c, abd, ac e, bdf, f g = g cabedfgh 超级计算学院 人工智能 第 6 章 Buildin
8、gControlAlgorithms for each conjunct to call pattern_search on conjunct; if all pattern_search succeeds for all conjuncts then return SUCCESS else return FAIL end current_goal unifies with rule conclusion (p in q p) begin applying goal unifying substitutions to premise(q); call pattern_search on pre
9、mise; if pattern_search on premise succeeds then return SUCCESS else return FAIL end end endreturn FAILend 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsThe advantage of the above procedure1. We have a mean of separating problem-solving knowledge from its control and implementation on the computer.2. S
10、ome subtleties must be addressed: the order with which the algorithm tries alternative matches and proper handing of the full set of logical operatorsThe revisions needed to do:1. Add ability to deal with negation and disjunction 2. The algorithm should return a bindings 超级计算学院 人工智能 第 6 章 BuildingCo
11、ntrolAlgorithmsfuntion pattern_search (current_goal)begin if current_goal is a member of closed; then return FAIL else add current_goal to closed while there remain in data base unifying facts or rules do begin case current_goal unifies with a fact return unifying substitutions; current_goal is nega
12、ted(p) begin 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithms call pattern_search on p; if pattern_search return FAIL then return ; else return FAIL; end;current_goal is a conjunction(pq ) begin for each conjunct to call pattern_search on conjunct; if pattern_search return FAIL then return FAIL else appl
13、y substitutions to other conjuncts then return composition of unifications; else return FAIL end; 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmscurrent_goal is a conjunction(pq ) begin repeat for each disjunct to call pattern_search on disjunct; until no more disjuncts or SUCCESS if pattern_search retu
14、rn SUCCESS then return substitutions else return FAIL; end; 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithms current_goal unifies with rule conclusion (p in q p) begin applying goal unifying substitutions to premise(q); call pattern_search on premise; if pattern_search on premise succeeds then return com
15、position of p and q substitutions else return FAIL end end endreturn FAILend 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsNote: the recursive call can go into the inside of a integer formula, and be used to its components. 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithms6.2 Production System6.2.1 Definitio
16、n and HistoryDefinition: production System A production system is defined by 1. The set of production rules. These rules often simply called productions. The production rule is a condition- action pair and defines a single chunk of problem- solving knowledge. The condition part of the rule is a patt
17、ern that determine when that rule may be applied to a problem instance. The action part defines the associated problem-solving step. 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithms 2. Working memory contains a description of the current state of the world in a reasoning process. The description is a pat
18、tern that is matched against the condition part of a production rule to select appropriate problem-solving action. When the condition element of a rule is matched by the content of working memory. the action associated with that condition may then be performed. The action of production rules are spe
19、cifically designed to alter the contents of working memory 3. The recognized-act cycle. The control structure for a production system is simple: working memory is initialized with the beginning problem description. The current state of the problem-solving is maintained as a 超级计算学院 人工智能 第 6 章 Buildin
20、gControlAlgorithms a set of pattern in working memory. These patterns are matched against the condition part of a production rule, this produces a subset he of the production rules, called the conflict set, whose conditions match the patterns in working memory. The production rules in the conflict s
21、et are said to be enabled. One of the production rule in the conflict set is then selected(conflict resolution) and the production rule is fired, To fire a rule, its action is performed, changing the contents of working memory. After the selected production rule is fired, the control cycle repeats w
22、ith modified working memory. The process terminates when the contents of working memory do not match any rule conditions. 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsWorkingMemoryPatternC1A1C2A2C3A3 PatternActio CnAnA production system. Control loops until working memory pattern no longer matches the
23、 conditions of any productions 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsA simple example of production systemSort the string composed of the letters a, b and cThe set of production rules 1. ba ab 2. ca ac 3. cb bc 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsIteration Working memory Conflict set rul
24、e fired 0 cbaca 1, 2, 3, 1 1 cabca 2 2 2 acbca 2, 3 2 3 acbac 1, 3 1 4 acabc 2 2 5 aacbc 3 3 6 aabcc HaltTrace of a simple production system 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithms6.2.2 Example of Production SystemExample: 8-Puzzle A production system is defined by The set of production rules co
25、ndition Action goal state in working memory halt blank is not on the left edge move the blank left blank is not on the top move the blank up blank is not on the right edge move the blank right blank is not on the bottom edge move the blank down 超级计算学院 人工智能 第 6 章 BuildingControlAlgorithmsControl regi
展开阅读全文