<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
please vote up:<br>
<a
href="http://www.dzone.com/links/drools_54_artificial_intelligence_a_little_history.html">http://www.dzone.com/links/drools_54_artificial_intelligence_a_little_history.html</a><br>
-----copied from website link-----<br>
As part of the 5.4 release, going out the door as we speak, I
updated the intro docs. I have tried to give a wider understanding
of the field and scope of work. Here is a copy. I'll try and improve
the sections over future releases, I ran out of time and the later
sections are little rushed and thin. I'm not the best of writers, so
please have patience, all contributions welcome :)<br>
<h3 style="text-align: left;">
<b>A Little History</b></h3>
Over the last few decades artificial intelligence (AI) became an
unpopular term, with the well know <a class="link"
href="http://en.wikipedia.org/wiki/AI_winter" target="">"AI
Winter"</a>. There were large boasts from scientists and engineers
looking for funding, that never lived up to expectations along with
many failed projects. <a class="link"
href="http://en.wikipedia.org/wiki/Thinking_Machines_Corporation"
target="">Thinking Machines Corporation</a> and the <a
class="link"
href="http://en.wikipedia.org/wiki/Fifth-generation_computer"
target="">5th Generation Computer</a> (5GP) project probably
exemplify best the problems at the time.<br>
<br>
Thinking Machines Corporation was one of the leading AI firms in
1990, it had sales of nearly $65 million. Here is quote from it's
brochure:<br>
“<span class="quote">Some day we will build a thinking machine. It
will be a truly intelligent machine. One that can see and hear and
speak. A machine that will be proud of us.</span>”<br>
<br>
Yet 5 years later it filed for Chapter 11. inc.com has a fascinating
article titled <a class="link"
href="http://www.inc.com/magazine/19950915/2622.html" target="">"The
Rise and Fall of Thinking Machines"</a>. The article covers the
growth of the industry and how a cosy relationship with Thinking
Machines and <a class="link"
href="http://en.wikipedia.org/wiki/DARPA" target="">DARPA</a> over
heated the market, to the point of collapse. It explains how and why
commerce moved away from AI and towards more practical number
crunching super computers.<br>
<br>
The 5th Generation Computer project was a 400mill USD project in
Japan to build a next generation computer. Valves was first,
transistors was second, integrated circuits was third and finally
microprocessors was fourth. This project spurred an "arms" race with
the UK and USA, that caused much of the AI bubble. The 5GP would
provide massive multi-cpu parallel processing hardware along with
powerful knowledge representation and reasoning software via Prolog;
a type of expert system. By 1992 the project was considered a
failure and cancelled. It was the largest and most visible
commercial venture for Prolog, and many of the failures are pinned
on the problems trying to run a logic based programming language
concurrently on multi cpu hardware with effective results. Some
believe that the failure of the 5GP project tainted Prolog and
resigned it academia, see <a class="link"
href="http://www.dvorak.org/blog/whatever-happened-to-prolog/"
target="">"Whatever Happened to Prolog"</a> by John C. Dvorak.<br>
<br>
However while research funding dried up and the term AI became less
used, many green shoots where planted and continued more quietly
under discipline specific names: cognitive systems, machine
learning, intelligent systems, knowledge representation and
reasoning. Offshoots of these then made their way into commercial
systems, such as expert systems in the Business Rules Management
System (BRMS) market.<br>
<br>
Imperative, system based languages, languages such as C, C++, Java
and .Net have dominated the last 20 years. Enabled by the
practicality of the languages and ability to run with good
performance on commodity hardware. However many believe there is
renaissance undergoing in the field of AI, spurred by advances in
hardware capabilities and AI research. In 2005 Heather Havenstein
authored <a class="link"
href="http://www.computerworld.com/s/article/99691/Spring_comes_to_AI_winter"
target="">"Spring comes to AI winter"</a> which outlines a case
for this resurgence, which she refers to as a spring. Norvig and
Russel dedicate several pages to what factors allowed the industry
to over come it's problems and the research that came about as a
result:<br>
<br>
“<span class="quote">Recent years have seen a revolution in both the
content and the methodology of work in artificial intelligence. It
is now more common to build on existing theories than to propose
brand-new ones, to base claims on rigorous theorems or hard
experimental evidence rather than on intuition, and to show
relevance to real-world applications rather than toy examples.</span>”
(Artificial Intelligence : A Modern Approach.)<br>
<br>
Computer vision, neural networks, machine learning and knowledge
representation and reasoning (KRR) have made great strides in become
practical in commercial environments. For example vision based
systems can now fully map out and navigate their environments with
strong recognition skills, as a result we now have self driving cars
about to enter the commercial market. Ontological research, based
around description logic, has provided very rich semantics to
represent our world. Algorithms such as the tableaux algorithm have
made it possible to effectively use those rich semantics in large
complex ontologies. Early KRR systems, like Prolog in 5GP, were
dogged by the limited semantic capabilities and memory restrictions
on the size of those ontologies.<br>
<h3 style="text-align: left;">
<b>Knowledge Representation and Reasoning </b></h3>
In A Little History talks about AI as a broader subject and touches
on Knowledge Representation and Reasoning (KRR) and also Expert
Systems, I'll come back to Expert Systems later.<br>
KRR is about how we represent our knowledge in symbolic form, i.e.
how we describe something. Reasoning is about how we go about the
act of thinking using this knowledge. System based languages, like
Java or C+, have classification systems, called Classes, to be able
to describe things, in Java we calls these things beans or
instances. However those classification systems are limited to
ensure computational efficiency. Over the years researchers have
developed increasingly sophisticated ways to represent our world,
many of you may already have heard of OWL (Web Ontology Language).
Although there is always a gap between what we can be theoretically
represented and what can be used computationally in practically
timely manner, which is why OWL has different sub languages from
Lite to Full. It is not believed that any reasoning system can
support OWL Full. Although Each year algorithmic advances try and
narrow that gap and improve expressiveness available to reasoning
engines.<br>
<br>
There are also many approaches to how these systems go about
thinking. You may have heard of discussions comparing the merits of
forward chaining, which is reactive and data driven, or backward
chaining, which is passive and query driven. Many other types of
reasoning techniques exists, each of which enlarges the scope of the
problems we can tackle declaratively. To list just a few: imperfect
reasoning (fuzzy logic, certainty factors), defeasible logic, belief
systems, temporal reasoning and correlation. Don't worry if some of
those words look alien to you, they aren't needed to understand
Drools and are just there to give an idea of the range of scope of
research topics; which is actually far more extensive than this
small list and continues to grow as researches push new boundaries.<br>
<br>
KRR is often refereed as the core of Artificial Intelligence Even
when using biological approaches like neural networks, which model
the brain and are more about pattern recognition than thinking, they
still build on KRR theory. My first endeavours with Drools were
engineering oriented, as I had no formal training or understanding
of KRR. Learning KRR has allowed me to get a much wider theoretical
background. Allowing me to better understand both what I've done and
where I'm going, as it underpins nearly all of the theoretical side
to our Drools R&D. It really is a vast and fascinating subject
that will pay dividends for those that take the time learn, I know
it did and still does for me. Bracham and Levesque have written a
seminal piece of work, called "Knowledge Representation and
Reasoning" that for anyone wanting to build strong foundations is a
must read. I would also recommend the Russel and Norvig book
"Artificial Intelligence, a modern approach" which also covers KRR.<br>
<h3 style="text-align: left;">
<b>Rule Engines and Production Rule Systems</b></h3>
We've now covered a brief history of AI and learnt that the core of
AI is formed around KRR. We've shown than KRR is vast and
fascinating subject which forms the bulk of the theory driving
Drools R&D.<br>
The rule engine is the computer program that delivers KRR
functionality to the developer. At a high level it has three
components:<br>
<div class="itemizedlist">
<ul>
<li>Ontology</li>
<li>Rules</li>
<li>Data</li>
</ul>
</div>
As previous mentioned the ontology is the representation model we
use for our "things". It could be a simple records or Java classes
or full blown OWL based ontologies. The Rules do the reasoning and
facilitate thinking. The distinction between rules and ontologies
blurs a little with OWL based ontologies, who's richness is rule
based.<br>
<br>
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. This includes simple systems like form validation and
dynamic expression engines. The book "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. The book then shows how to generate VB code
from those validation rules to validate data entry. Which while very
valid, it is very different to what we talking about so far.<br>
<br>
Drools started life as a specific type of rule engine called a
production rule system (PRS) and was based around the Rete
algorithm. The Rete algorithm, developed by Charles Forgey in 1979,
forms the brain of a Production Rules System and is able to scale to
a large number of rules and facts. A Production Rule is a two-part
structure: the engine matches facts and data against Production
Rules - also called Productions or just Rules - to infer conclusions
which result in actions.<br>
<pre class="JAVA"><span class="java_plain">when</span>
<span class="java_plain"> </span><span class="java_operator"><</span><span class="java_plain">conditions</span><span class="java_operator">></span>
<span class="java_plain">then</span>
<span class="java_plain"> </span><span class="java_operator"><</span><span class="java_plain">actions</span><span class="java_operator">></span><span class="java_separator">;</span></pre>
The process of matching the new or existing facts against Production
Rules is called pattern matching, which is performed by the
inference engine. Actions execute in response to changes in data,
like a database trigger; we say this is a data driven approach to
reasoning. The actions themselves can change data, which in turn
could match against other rules causing them to fire; this is
referred to asforward chaining<br>
<br>
Drools implements and extends the Rete algorithm;. The Drools Rete
implementation is called ReteOO, signifying that Drools has an
enhanced and optimized implementation of the Rete algorithm for
object oriented systems. Our more recent work goes well beyond Rete.
Other Rete based engines also have marketing terms for their
proprietary enhancements to Rete, like RetePlus and Rete III. Th e
most common enhancements are covered in "Production Matching for
Large Learning Systems (Rete/UL)" (1995) by Robert B. Doorenbos.
Leaps used to be provided but was retired as it became unmaintained,
the good news is our research is close to producing an algorithm
that merges the benefits of Leaps with Rete.<br>
<br>
The Rules are stored in the Production Memory and the facts that the
Inference Engine matches against are kept in the Working Memory.
Facts are asserted into the Working Memory where they may then be
modified 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 conflicting rules using a
Conflict Resolution strategy.<br>
<div class="separator" style="clear: both; text-align: center;">
<a
href="http://3.bp.blogspot.com/-vWa8Xb6vQwM/T6nHhPwGfiI/AAAAAAAAAug/dqMpgCGhDqc/s1600/rule-engine-inkscape.png"
imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img
src="cid:part9.09010009.03050401@codehaus.org" border="0"
height="177" width="320"></a></div>
<h3 style="text-align: left;">
<b>Hybrid Reasoning Systems</b></h3>
You may have read discussions comparing the merits of forward
chaining (reactive and data driven) or backward chaining(passive
query). Here is a quick explanation of these two main types of
reasoning.<br>
<br>
Forward chaining is "data-driven" and thus reactionary, with facts
being asserted into working memory, which results in one or more
rules being concurrently true and scheduled for execution by the
Agenda. In short, we start with a fact, it propagates and we end in
a conclusion.<br>
<div class="separator" style="clear: both; text-align: center;">
<a
href="http://2.bp.blogspot.com/-VpcT8CsFVvI/T6nHI4nXNZI/AAAAAAAAAuI/Z8ym04qHZ0c/s1600/Forward_Chaining.png"
imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img
src="cid:part11.02060303.05080706@codehaus.org" border="0"
height="227" width="320"></a></div>
<br>
Backward chaining is "goal-driven", meaning that we start with a
conclusion which the engine tries to satisfy. If it can't it then
searches for conclusions that it can satisfy; these are known as
subgoals, that will help satisfy some unknown part of the current
goal. It continues this process until either the initial conclusion
is proven or there are no more subgoals. Prolog is an example of a
Backward Chaining engine. Drools can also do backward chaining,
which we refer to as derivation queries.<br>
<div class="separator" style="clear: both; text-align: center;">
<a
href="http://1.bp.blogspot.com/-K4Cy7TxxFJQ/T6nHQh0iVSI/AAAAAAAAAuQ/jvDqKhrYIgc/s1600/Backward_Chaining.png"
imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img
src="cid:part13.05080703.08080906@codehaus.org" border="0"
height="320" width="250"></a></div>
<br>
Historically you would have to make a choice between systems like
OPS5 (forward) or Prolog (backward). Now many modern systems provide
both types of reasoning capabilities. There are also many other
types of reasoning techniques, each of which enlarges the scope of
the problems we can tackle declaratively. To list just a few:
imperfect reasoning (fuzzy logic, certainty factors), defeasible
logic, belief systems, temporal reasoning and correlation. Modern
systems are merging these capabilities, and others not listed, to
create hybrid reasoning systems (HRS).<br>
<br>
While Drools started out as a PRS, 5.x introduced Prolog style
backward chaining reasoning as well as some functional programming
styles. For this reason HRS is now the preferred term when referring
to Drools, and what it is.<br>
<br>
Drools current provides crisp reasoning, but imperfect reasoning is
almost ready. Initially this will be imperfect reasoning with fuzzy
logic, later we'll add support for other types of uncertainty. Work
is also under way to bring OWL based ontological reasoning, which
will integrate with our traits system. We also continue to improve
our functional programming capabilities.<br>
<br>
<b>Expert Systems</b> <br>
<br>
You will often hear the terms expert systems used to refer to
production rule systems or Prolog like systems. While this is
normally acceptable, it's technically wrong as these are frameworks
to build expert systems with, and not actually expert systems
themselves. It becomes an expert system once there is an ontological
model to represent the domain and there are facilities for knowledge
acquisition and explanation.<br>
<br>
Mycin is the most famous expert system, built during the 70s. It is
still heavily covered in academic literature, such as the
recommended book "Expert Systems" by Peter Jackson.<br>
<div class="separator" style="clear: both; text-align: center;">
<a
href="http://1.bp.blogspot.com/-LJouA2Bc8ow/T6nG9Y18NoI/AAAAAAAAAuA/CbZIhdW-zko/s1600/expertsytem_history.png"
imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img
src="cid:part15.05000409.06030807@codehaus.org" border="0"
height="264" width="320"></a></div>
<h3 style="text-align: left;">
<b>Recommended Reading</b></h3>
<h4 style="text-align: left;">
<span class="bold"><b>General AI, KRR and Expert System Books</b></span></h4>
For those wanting to get a strong theoretical background in KRR and
expert systems, I'd strongly recommend the following books.
"Artificial Intelligence: A Modern Approach" is must have, for
anyone's bookshelf.<br>
<div class="itemizedlist">
<ul>
<li>Introduction to Expert Systems<br>
<div class="itemizedlist">
<ul>
<li>Peter Jackson</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="itemizedlist">
<ul>
<li>Expert Systems: Principles and Programming<br>
<div class="itemizedlist">
<ul>
<li>Joseph C. Giarratano, Gary D. Riley</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="itemizedlist">
<ul>
<li>Knowledge Representation and Reasoning<br>
<div class="itemizedlist">
<ul>
<li>Ronald J. Brachman, Hector J. Levesque</li>
</ul>
</div>
</li>
</ul>
</div>
<div class="itemizedlist">
<ul>
<li>Artificial Intelligence : A Modern Approach.<br>
<div class="itemizedlist">
<ul>
<li>Stuart Russell and Peter Norvig</li>
</ul>
</div>
</li>
</ul>
</div>
<br>
<div class="separator" style="clear: both; text-align: center;">
<a
href="http://1.bp.blogspot.com/-MxwC6sGAonk/T6nGt3cUUmI/AAAAAAAAAtw/T2fooYHJLEM/s1600/book_recommendations.png"
imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img
src="cid:part17.08020705.01030205@codehaus.org" border="0"
height="320" width="241"></a></div>
<h4>
<div style="text-align: left;">
<span class="bold"><b>Papers</b></span></div>
</h4>
Here are some recommended papers that cover some interesting areas
in rule engine research.<br>
<div class="itemizedlist">
<ul>
<li>Production Matching for Large Learning Systems : Rete/UL
(1993)<br>
<div class="itemizedlist">
<ul>
<li>Robert B. Doorenbos</li>
</ul>
</div>
</li>
<li>Advances In Rete Pattern Matching<br>
<div class="itemizedlist">
<ul>
<li>Marshall Schor, Timothy P. Daly, Ho Soo Lee, Beth R.
Tibbitts (AAAI 1986)</li>
</ul>
</div>
</li>
<li>Collection-Oriented Match<br>
<div class="itemizedlist">
<ul>
<li>Anurag Acharya and Milind Tambe (1993)</li>
</ul>
</div>
</li>
<li>The Leaps Algorithm (1990)<br>
<div class="itemizedlist">
<ul>
<li>Don Battery</li>
</ul>
</div>
</li>
<li>Gator: An Optimized Discrimination Network for Active
Database Rule Condition Testing (1993)<br>
<div class="itemizedlist">
<ul>
<li>Eric Hanson , Mohammed S. Hasan</li>
</ul>
</div>
</li>
</ul>
</div>
<h4>
<div style="text-align: left;">
<span class="bold"><b>Drools Books</b></span></div>
</h4>
There are currently three Drools books, all from Packt Publishing.<br>
<div class="itemizedlist">
<ul>
<li>JBoss Drools Business Rules<br>
<div class="itemizedlist">
<ul>
<li>Paul Brown</li>
</ul>
</div>
</li>
<li>Drools JBoss Rules 5.0 Developers Guide<br>
<div class="itemizedlist">
<ul>
<li>Michali Bali</li>
</ul>
</div>
</li>
<li>Drools Developer's Cookbook<br>
<div class="itemizedlist">
<ul>
<li>Lucas Amador</li>
</ul>
</div>
</li>
</ul>
</div>
<br>
<div class="separator" style="clear: both; text-align: center;">
<a
href="http://2.bp.blogspot.com/-aXE48hRa38Y/T6nG0-4ASXI/AAAAAAAAAt4/qJL-BiWI6dg/s1600/drools_book_recommendations.png"
imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img
src="cid:part19.09030403.08090602@codehaus.org" border="0"
height="320" width="259"></a></div>
<br>
</body>
</html>