- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Ch 14. An Introduction to Prolog.ppt
Artificial Intelligence Ch 14. An Introduction to Prolog an Implementation of logic as a programming language(PROgramming in LOGig) many interesting contributions to AI problem solving declarative semantics built-in unification high-powered techniques for pattern matching and search 14.1 Syntax for Predicate Calculus Programming 14.1.1 Representing Facts and Rules 14.1.2 Creating, Changing, and Monitoring the PROLOG Environment 14.1.3 Lists and Recursion in PROLOG 14.1.4 Recursive Search in PROLOG 14.1.5 The Use of Cut 14.1.1 Representing Facts and Rules(1) English Predicate Calculus PROLOG and ù , or ú ; only if ? :- not ? not “Everyone likes Susie.” likes(X, susie). or likes(Everyone, susie). The set of people that are liked by George AND Susie likes(george, Y), likes(susie, Y). “George likes Kate OR George likes Susie.” likes(george, kate); likes(george, susie). 14.1.1 Representing Facts and Rules(2) “George likes Susie if George likes Kate.” likes(george, susie) :- likes(george, kate). “Kate does not like Susie.” not(likes(kate, susie)). A Model for the database Database - a set of specifications describing the objects and relations in a problem domain Queries to the database are patterns in the same logical syntax as the database entries. Prolog interpreter uses pattern-directed search to find whether these queries logically follow from the contents of the database. 14.1.1 Representing Facts and Rules(3) Prolog exmaple 14.1.1 Representing Facts and Rules(4) Prolog interpertations The prompts with (;) forces a backtrack on the most recent result. Continued prompts force Prolog to find all possible solutions to the query Closed world assumption or Negations as failure assumes that “anything is false if it is not known to be true.” Horn clause logic the left hand side(conclusion) of an implication must be a single positive literal. An example of a rule friends(X, Y) :- likes(X, Z), likes(Y, Z). ?- friends(george, susie). yes Prolog d
您可能关注的文档
- 2013最新血脂指南解读.ppt
- 2014年中考历史专题复习中外历史上的重大改革.ppt
- 226有效教学内涵.ppt
- 2导数的几何意义.ppt
- 3. b p m f.ppt
- 4–.ppt
- 46-320-01Tests and Measurements.ppt
- 518人力银行.ppt
- 7-Segment Display and Count by 16.ppt
- 7.4 利用轴对称设计图案.ppt
- Ch. 13 – Administering Web Resources.ppt
- Ch. 14 The Olympic Games.ppt
- Ch. 16; Minority Women of Color Unpacking Racial Ideology.ppt
- Ch. 18 Elasticity.ppt
- Ch4. 目标成本与价格制定.ppt
- Challenges for education with equity.ppt
- Chapter 13 – Aggregate Planning.ppt
- Chapter 13 –Designing for Quality.ppt
- Chapter 13 - Inheritance and Polymorphism.ppt
- Chapter 13 - Introduction to Phylum Platyhelminthes.ppt
文档评论(0)