分享好友 最新动态首页 最新动态分类 切换频道
1.1. 什么是规则引擎?
2024-12-26 20:43

Artificial Intelligence (A.I.) is a very broad research area that focuses on "Making computers think like people" and includes disciplines like Neural Networks, Genetic Algorithms, Decision Trees, Frame Systems and Expert Systems. Knowledge representation is the area of A.I. concerned with how knowledge is represented and manipulated. Expert Systems use Knowledge representation to facilitate the codification of knowledge into a knowledge base which can be used for reasoning - i.e. we can process data with this knowledge base to infer conclusions. Expert Systems are also known as Knowledge-based Systems and Knowledge-based Expert System and are considered 'applied artificial intelligence'; the process of developing with an Expert System is Knowledge Engineering. EMYCIN was one of the first "shells" for an Expert System, which was created from the MYCIN medical diagnosis Expert System. Where early Expert Systems had their logic hard coded "shells" separated the logic from the system, providing an easy to use environment for user input. Drools is a Rule Engine that uses the Rule Based approached to implement an Expert System and is more correctly classified as a Production Rule System.

1.1. 什么是规则引擎?

The term "Production Rule" originates from formal grammer - where it is described as "an abstract structure that describes a formal language precisely, i.e., a set of rules that mathematically delineates a (usually infinite) set of finite-length strings over a (usually finite) alphabet" (wikipedia).

Business Rule Management Systems build value on top of an Rule Engine providing systems for rule management, deployment, collaboration, analysis and end user tools for business users. Further to this the "Business Rules Approach" is a fast evolving and popular methodology helping to formalise the role of Rule Engines in the enterprise.

The term Rule Engine is quite ambiguous in that it can be any system that uses rules, in any form, that can be applied to data to produce outcomes; which includes simple systems like form validation and dynamic expression engines: "How to Build a Business Rules Engine (2004)" by Malcolm Chisholm exemplifies this ambiguity. The book is actually about how to build and alter a database schema to hold validation rules which it then shows how to generate VB code from those validation rules to validate data entry - while a very valid and useful topic for some, it caused quite a suprise to this author, unaware at the time in the subtleties of Rules Engines differences, who was hoping to find some hidden secrets to help improve the Drools engine. jBPM uses expressions and delegates in its Decision nodes; which controls the transitions in a Workflow. At each node it evaluates a rule that dicates the transition to undertake - this is also a Rule Engine. While a Production Rule System is a kind of Rule Engine and also Expert System, the validation and expression evaluation Rule Engines mention previously are not Expert Systems.

A Production Rule System is turing complete with a focus on knowledge representation to expression propositional and first order logic in a concise, non ambigious and declarative manner. The brain of a Production Rules System is an Inference Engine that is able to scale to a large number of rules and facts. The Inference Engine matches facts, the data, against Production Rules, also called Productions or just Rules, to infer conclusions which result in actions. A Production Rule is a two-part structure using First Order Logic for knowledge representation.

The process of matching the new or existing facts against Production Rules is called Pattern Matching, which is performed by the Inference Engine. There are a number of algorithms used for Pattern Matching by Inference Engines including:

Drools has implementations for both Rete and Leaps; Leaps is considered experimental, as it is quite new. The Drools Rete implementation is called ReteOO signifying that Drools has an enhanced and optimised implementation of the Rete algorithm for Object Oriented systems. Other Rete based engines also have marketing terms for their proprietary enhancements to Rete, like RetePlus and Rete III. It is important to understand that names like Rete III are purely marketing where, unlike the original published Rete Algorithm, no details of implementation are published; thus asking a question like "Does Drools implement Rete III?" is nonsensical. The most common enhancements are covered in "Production Matching for Large Learning Systems (Rete/UL)" (1995) by Robert B. Doorenbos.

The Rules are stored in the the Production Memory and the facts that the Inference Engine matches against the Working Memory. Facts are asserted into the Working Memory where they may then be modiied or retracted. A system with a large number of rules and facts may result in many rules being true for the same fact assertion, these rules are said to be in conflict. The Agenda manages the execution order of these conflicuting rules using a Conflict Resolution stategy.

A Production Rule System's Inference Engine is stateful and able to enforce truthfulness - called Truth Maintence. A logical relationship can be declared by actions which means the action's state depends on the inference remaining true; when it is no longer true the logical dependant action is undone. The "Honest Politician" is an example of Truth Maintenance, which always ensures that hope can only exist for a decomcracy while we have honest politicians.

There are two methods of execution for a Production Rule Systems - Forward Chaining and Backward Chaining; systems that implement both are called Hybrid Production Rule Systems. Understanding these two modes of operation are key to understanding why a Production Rule System is different and how to get the best from them. Forward chaing is 'data-driven' and thus reactionary - facts are asserted into the working memory which results in one or more rules being concurrently true and scheduled for execution by the Agenda - we start with a fact, it propagates and we end in a conclusion. Drools is a forward chaining engine.

最新文章
除了谷歌和必应,还有哪些适合外贸网站的搜索引擎?
除了谷歌和必应,还有多个适合外贸网站的搜索引擎。例如,Naver是韩国门户网站,也是一个搜索引擎,对于需要针对韩国市场的外贸网站来说,它是一个很好的选择。Deusu是德国本土搜索引擎,适合德国市场的外贸网站。对于俄罗斯市场,Yandex是
神三群聊:三国
2014年7月6号早上一间宽阔而空旷的卧室内,各式家具齐全。电脑桌前,长有一张瓜子脸儿,嘴唇薄而优美,眉目灵动,俏艳非常,仿如人间仙子般。年纪尚幼,却已长得亭亭玉立,举止娉婷袅袅,再看她楚腰纤细,肤若凝脂,肌质晶莹,笑着时齿若编
谷歌识图,以图搜图
您可参考该文实现更多搜图方案:怎么用图片搜索番号?以图搜图大全,搜图工具汇总(点击查看)
黄冈网站的海外推广策略:通过二维码吸引更多目标用户
二维码作为一种现代的互联网营销工具,已经在全球范围内得到了广泛应用。尤其是在中国,二维码在各类商业、社交、支付等领域的应用已经深入人心。那么,对于黄冈网站的推广,如何利用二维码来吸引更多的海外用户,成为了一个值得探讨的话题
明天放晴、风大,体感冷!冷!冷!
秋去冬来,季节轮换!捡起几片落叶藏进口袋,把秋天的好运气带到冬天里~本周“上海城市映像”向大家征集#上海别秋迎冬的浪漫。快将你拍的照片(可附上拍摄点位和图片说明)投稿给小布吧~看完天气别走开,拉到文末看小布举个例子
河南省工业和信息化厅开展全省煤矿安全生产督导检查
转自:国家矿山安全监察局日前,河南省工业和信息化厅印发通知,从即日起至2025年3月31日开展全省煤矿安全生产督导检查,进一步压实煤矿安全生产主体责任,扎实做好岁末年初煤矿安全生产工作。河南省工业和信息化厅组成6个工作组,对该省煤
禾创智城(兰州)AI科技公司成立,助力智能制造与数字服务
近日,禾创智城(兰州)人工智能科技有限公司正式成立,凭借1000万人民币的注册资本及广泛的经营范围,该公司致力于推动智能制造和数字技术服务的发展。法定代表人吴凡表示,公司将专注于人工智能基础软件开发、智能设备制造与销售,以及相
雷克萨斯NX着力打造智能驾趣新生活 看完这篇你就知道
全新依旧沿用外形,细节之处又有不少改变。新车前脸造型配备格栅,运动感明显增强,两侧亮眼的大灯造型,内部灯组错落有致,点亮时炯炯有神。侧面看依旧是雷克萨斯独到的整体设计,妖娆的身段更是展现的淋漓尽致!前端采用18直径前轮,有助
美漫:我能抽取随机身份
重生到资本横行的西方世界,李昂原本以为自己将会是金钱开道的都市流小说主角,不曾想这个世界却是一锅炖不下的大杂烩世界……怪奇物语、死寂这些鬼怪集结已经是恐怖无比,不曾想电视新闻中占据封面位置的托尼·史塔克让人更加惊恐!“这个
微信小程序的音乐播放器排行榜系统的设计与实现
HBuilder 是基于HTML、js、css的等H5语法的开发技术,使得开发者很容易上手学习,里面涉及的数据绑定基于Vue语法涉及,在开发效率上也比传统的jquery快,当然HBuilder 也保留了对jquery的支持,两种语法可以
相关文章
推荐文章
发表评论
0评