® BuscaLegis.ccj.ufsc.br

Rule Engines and Java:
Jess in Action

 

Interview with Dr. Ernest J. Friedman-Hill at Sandia National Laboratory

 

--------------------------------------------------------------------------------
By Jason Morris

--------------------------------------------------------------------------------

A year ago, while looking for Java tools to develop expert systems in Java, I stumbled upon the Java Expert System Shell or Jess, written by Dr. Ernest J. Friedman-Hill at Sandia National Labs (www.sandia.gov). I was particularly interested in expert system shells for rule-based architectures. (See sidebar Jess - a Rule Engine for the Java Platform for more information on Jess). While experimenting with Jess, I grew curious about its origin and Dr. Friedman-Hill's opinions on the artificial intelligence field. Here is what he had to say…

Dreaming of Thinking Machines

JM: Considering your background in chemistry, how did you become involved with artificial intelligence and expert systems?

EJF: My Ph.D. is in physical chemistry - very mathematical, very computational - so I've always been around computers. I've been interested in AI since I read Hofstadter's Godel, Escher, Bach (www.amazon.com/exec/obidos/tg/detail/-/ 0465026850/103-3690925- 7337401?v=glance) in college, and I began working on natural language understanding systems as a hobby soon afterwards. After coming to Sandia National Laboratories in 1992, as a physical chemist, I moved to a computer science department a year later. My early projects concerned applying heuristic methods, such as clustering and Bayesian filtering, to problems in drug design, which led to a project applying heuristic rules to natural language understanding - the project for which Jess was originally created. I was never involved in furthering the development of expert systems theory: my work concerned practical applications, so Jess has always had a very practical bent. The research aspect of Jess has been to make the system faster and more flexible, not searching for new paradigms - exploring the unspent potential of existing ones.

JM: So when you started graduate school at MIT in 1987, why did you remain interested in AI and expert systems when the industry lost momentum?

EJF: The "AI fervor" was already in its decline, but I do not think the industry really lost momentum; it just went underground. There is a classic problem with all AI research; as soon as a problem is understood, it is no longer considered AI. This is why AI is often considered to have "failed." Nothing of the sort is true: the fruits of AI research are widely evident. Speech recognition and computer vision were once AI research topics; now you routinely "say or press 2" on the telephone, and FBI systems search millions of fingerprint records in an instant.

JM: Do (Did) your interests extend to any other expert system architectures such as case-based reasoning or metaphors such as blackboard systems?

EJF: Yes, I've done classical blackboard systems (www.pcai.com/web/ai_info/blackboard_technology.html). I think the lines between all these areas, which were once distinct disciplines, have become very fuzzy. The perfect examples are Multi-Agent Systems (MASs) (www-2. cs.cmu.edu/afs/cs/usr/pstone/public/papers/97MAS-survey/revised-survey.html) in which multiple interacting autonomous programs collaborate. Many people are using Jess in MAS architectures, which have much of the flavor of blackboard systems [You Java web-agent programmers out there - take note - JM].

 

Jess and Java


JM: Can you share any anecdotes about the creation of Jess? What challenges did you encounter in writing Jess? EJF: I first started working on Jess when Java itself was very young, so Jess has grown up with Java. The original idea for Jess came when I needed a rule engine that worked as a Mobile Agent (www.cs.umn.edu/Ajanta), whose state was easily packed up and transmitted between machines, then reconstituted. I was already experimenting with C-like virtual machines when Java first came out. If Java had not appeared, Jess would have been written in a kind of pidgin interpreted C. Also, remember that Java 1.0 did not have object serialization, so when first written, Jess could not be a mobile agent anyway; serialization did not come until Java 1.1. However, long before then, Jess gained a life of its own.

JM: What are Jess's unique strengths? (i.e., does Jess integrate well with other knowledge tools?)

EJF: Jess is "The Rule Engine For Real Programmers". Jess is all about integration with other systems: it is easy to embed, it is easy to extend, and it is easy to call out to Java from the rule language. Since licensed users receive the source code, users can modify anything in the engine they want. Jess is probably the most flexible rule engine on the market - used on everything from Windows CE handhelds to full-blown J2EE enterprise applications.
Jess, designed from the ground up for integration, will be even better with Jess 7.0. Current versions of Jess only reason about data in its own working memory (although backward chaining (http://dictionary.reference.com/ search?q=backward%20chaining) to enables fetching data into working memory as needed.) Jess 7.0 will enable reason about data that is not in working memory, making it possible to efficiently make inferences on truly huge data sets. Jess's integration with agent frameworks and other tools includes integration with the popular ontology editor Protégé 2000 (http://protege.stanford.edu). Many people use this powerful combination to develop knowledge structures as well as the code that act on them.

JM: How does Jess compare with technologies such as IBM's Business Rules Markup Language (BRML) (www.oasis-open.org/cover/brml.html) and OPJS from Production Systems Technologies, Inc. (www.pst.com/opsj.htm).

EJF: BRML (www.alphaworks.ibm.com/tech/commonrules) is one of several XML-based rule and knowledge representation languages; RuleML (www.dfki.uni-kl.de/ruleml) and DAML (www.daml.org) are others in common use. Third party translators between Jess and RuleML and Jess and DAML exist. One of the features planned for Charlemagne (Jess 7.0) is native XML support. The neat thing about XML is that once you support one XML language, translation to others is straightforward.

JM: What tips can you give knowledge engineers for eliciting rules? Is there a best practice for modularizing rule-based programming?

Rule-based
systems in
general are
undergoing
a renaissance

EJF: This is a big topic; there are people whose entire profession consists of doing knowledge engineering. I cover some highlights in my book [See section 9.2 of Jess In Action (www.amazon.com/exec/obidos/tg/detail/-/1930110898/103- 3690925-7337401?v=glance#product-details) -JM]. I think the most important concept for a programmer to remember (and the hardest one for them to remember!) when interviewing a subject matter expert is to "get over yourself." Programmers tend to cop a superior attitude when talking with non-programmers about anything computer related. You have to remember that the person you are talking to is an expert in their own field, just as you are in your own field. Show some respect for the expert, and be humble. [For modularization of rules themselves, see section 7.6 of Jess In Action - JM].

JM: What is the next evolution for Jess? Are there any plans to upgrade to the Rete II algorithm?

EJF: The biggest feature of Charlemagne (Jess 7.0) will be a graphical IDE (Integrated Development Environment). It will be packaged as an Eclipse plug-in (www.eclipse.org). There is a debugger, a rule database, an editor with code completion and syntax checking as you type and an explorer that enables probing the relationship between templates and rules.
There will also be a number of engine enhancements, including alternative pattern-matching strategies. Compatibility is very important: the plan is to keep full source compatibility with Jess 6.0.
Rete II (used in OPSJ) is an unpublished, proprietary algorithm, so Jess will not be using it. Jess already uses a substantially improved version of Rete. There are always some performance tweaks being worked on. The current version of Jess has excellent performance - better than many rule engines written in C, orders of magnitude better in some cases - and it continues to improve.

JM: In the theory of technology-transfer, there is the S-curve concept, which maps the lifecycle of an innovation from inception to obsolescence. The innovation, Y, which ultimately obsoletes a given technology, X, often appears midway through X's lifespan as competitive forces accelerate Y from research and into the marketplace.
In the literature, I have often seen quoted the figure of 20 years for the lifespan of a high-level programming language. By that standard, C++ should be retired now and Java is approaching middle age. Where is Jess on its S-curve, and what (if any) obsolescing technology do you see as replacing Jess technology as Java ages?

EJF: After their initial rise and fall due to excessive AI hype, rule-based systems in general are undergoing a renaissance. Jess itself is now a mature product but it is still innovating; I expect its user base to continue to grow with the market for the near future.
As for an "obsolescing technology", there is more freedom for innovation with Jess than with a specific high-level language, which means its curve may well be more wiggly. Underneath the Jess language is the rule engine; these two layers can evolve independently. For example, in Charlemagne, we will see native support for an XML rule language. This will open up a new world of possibilities, bringing in the power of XSLT and other XML-based tools; Jess will thus support a whole range of different rule languages.

JM: I am concerned that AI/expert systems interest/experience is still too esoteric for most employers of Java programmers to value as a skill. Am I wrong? How does a Jess developer market him/herself?

EJF: You are right to say that AI experience is not going to impress many potential employers. However, out of curiosity, I just did a search at monster.com for "business rules" and found 1,200 job listings. Just like anything else, it is all in the marketing; again, the cardinal rule of defining AI: if it works, it is not AI anymore, it is "just programming."

JM: You mentioned the javax.rules API in your book. Would you explain the details of how this affects Jess developers and what it means for Jess's future?

EJF: The javax.rules (www.jcp.org/en/jsr/detail?id=094) is a standard API for accessing rule engines. It is primarily intended for use in the J2EE environment. The reference driver shipped with the javax.rules package is a Jess driver! Charlemagne will include an improved version of this driver. The people who are really going to benefit from javax.rules are those who build a lot of heavily componentized business applications, and want to migrate between rule engines the same way they might migrate between databases.

The New AI


JM: The Business Communications Company, Inc. said in its report, RG-275 Artificial Intelligence: Burgeoning Applications in Industry, that the total worldwide AI market was estimated at $11.9 billion in 2002, and that it was expected to grow 12.2% per year, reaching $21.2 billion by 2007.
The Gartner Group (www4.gartner.com/Init) forecasted that enterprise automation, including autonomous software agents and artificial intelligence software, would account for almost 50% of total IT spending in ten years. By 2010, they say that it will be worth $250 billion US.
The literature constantly mentions a change in perception about AI and expert systems in particular. What factors do you think have caused this change? Assuming a project meets the criteria for an expert system application, why is the time now correct to reinvestigate and reinvest in AI for ordinary business applications (finance, manufacturing, etc.)?


EJF: Well, as I said before, as AI applications become mainstream, they are no longer perceived as AI anymore. This is absolutely true about expert systems. They are not called that anymore. What used to be called an expert system shell is now called a rule engine, and they are already ubiquitous. More and more businesses, big and small, are adopting the business rules approach. Moreover, yes, the time is right. There are hundreds of impressive success stories.

JM: OK, I will give you a very practical problem faced by senior software developers: selling the early-adoption or utilization of a technology to management. Even for people, such as myself, who are comfortable evangelizing, presenting, and explaining the business case for integrating new technologies, we have to demonstrate a definite ROI path and business plan to convince management to implement a technology. Given the organization, this can range from easy to impossible.
What can you tell us about the Fortune 100 companies that are using Jess regarding their due-diligence process, how they integrated it, and how Jess is working for them?

EJF: Broadly, there are three types of companies using Jess. First, there are large, established ones who felt a need to improve how they were performing vital business functions, and were open minded to a new approach. These folks usually use Jess in in-house IT - for example, screening applications in the insurance and financial services industries. Generally, an existing process is recognized as a bottleneck, and someone proposes rule-based programming as an alternative. This can come from the top as easily as from the bottom, because of the large number of books on business-rule methods now includes books targeted at executives. IT people can recommend these types of books to management to illustrate how a new approach might work, or executives can see them in the airport (airport bookstores don't realize the power they have over the conduct of business in America!) Such projects are often very successful, because the institutional knowledge of how to solve the problem already exists; implementing the system just entails codifying that into a rule-based system. Usually this type of application is J2EE based.
Another type of company that successfully uses Jess is an applications service provider - a company that sells consulting services, builds, and maintains systems to suit. This type of company gets to pick the technology best suited to the task, and so if they want to introduce a rule-based solution, they simply do so. Again, these are usually J2EE applications.
Lastly, there are small shrink-wrap software companies whose entire reason for being is to take a risk Guidance and Results Those Who are Data Yet Information Vand apply new techniques to creating a unique product. They need to justify their approach to the VCs; they often have the luxury of implementing a small prototype and taking measurements that demonstrate an advantage. Currently several successful products on the market embed Jess, and more are in development.


JM: What are the enabling technologies that will make expert systems more feasible as components in commercial
software in the near future?

EJF: I do not think we are talking about the future, I think we are talking about now. There have been many advances that have made this possible: better tools for managing large amounts of data, better tools for structuring data, dynamic languages such as Java, and faster machines, all developed together in a compatible way, with a path forward from legacy technologies. It has been said that the worst thing that ever happened to the IT industry was the C language. There is absolutely some truth to that. People using LISP (www.lisp.org/table/contents.htm) and Smalltalk (www.smalltalk.org) in the seventies and eighties already knew the benefits of dynamic languages; C kept the vast majority of programmers from discovering these benefits for many years. Now things have come full circle. Today's enabling tools bear a much stronger similarity to technology first developed in the seventies than many people care to admit.

Room at the Bottom


JM: Another favorite research subjects at Sandia is MEMS (Micro Electro-Mechanical Systems - www.sandia.gov/isrc/ssm.html and www.sandia.gov/mstc/technologies/ microana lytical). When do you think that the world of AI will cross with the world of the small? What do you see as possibilities for embedding reasoning in micro-machines (for control maybe)?

EJF: One of my favorite airplane-reading books in the last few years was Ray Kurzweil's The Age of Spiritual Machines(www.amazon.com/exec/ obidos/tg/detail/-/ 0140282025/103-83013972971820?v=glance). 2971820?v=glance). In it, Kurzweil projects Moore’s Law into the near future to predict the arrival of sentient machines. He describes a fascinating version of a physical cyberspace populated by autonomous nanomachines that self-organize into arbitrary structures, eventually providing a substrate into which human consciousness can be downloaded. Spiritual Machines is a far-fetched book, but it certainly makes you think about what Richard Feynman’s Room at the Bottom (www.zyvex.com/nanotech/
feynman.html) lecture was all about. In any event, I would be surprised if we did not have something you could meaningfully call "computing" operating at micro-machine scale within ten years. [You J2ME/Wireless Java programmers out there - take note - JM]

JM: Are there any other topics related to Jess and expert systems about which you wish to comment?

EJF: One of the best things about Jess is the community. Over the years that I have been developing Jess, I have been fortunate to work closely with many, many really great people. Some people develop Jess extensions, others help design new features, others provide valuable feedback. The book Jess in Action gave me a chance to work more closely with Bob Orchard, the creator of FuzzyJess (www.iit.nrc.ca/IR_public/fuzzy/fuzzyJTool kit2.html) and the FuzzyJ toolkit; Bob's a terrific guy who contributed an extended essay to the book and also served as a reviewer. All of the reviewers were great.

JM: If a friend had $10K to invest in an emerging technology and asked your opinion, what would you recommend and why? EJF: Robotics. I think we are on the verge of a revolution in applied robotics. I do not mean big humanoid robots - I mean

JM: If a friend had $10K to invest in an emerging technology and asked your
opinion, what would you recommend and why?

EJF: Robotics. I think we are on the verge of a revolution in applied robotics. I do not mean big humanoid robots – I mean little, functional robots such as Roomba (www.roombavac.com), the autonomous vacuum cleaner. I think Roomba is only the beginning of a wave of products that will transform our living environments.

Summary


In the late 80s, the buzz-phrase "Artificial Intelligence (AI)" went out of vogue after initial returns on early applications did not rise to the media hype. Expert systems - a species of Artificial Intelligence that emulates human reasoning in a specific domain - are no longer ahead of their time due to exponential advances in computing power and application possibilities. Rule-based expert systems, which reason about problem facts using IF..THEN type rules are the most mature of these technologies. Such systems unobtrusively power many current high-tech applications such as web agents, financial calculators, and mechanical/electrical controls. Java technology is a key enabler in this reemerging field.
With the popularity of Java for distributed computing across the enterprise and the explosion of business complexity, more Java developers are reexamining the feasibility of including AI components in their applications. Until recently, there have been only a few tools available for integrating such business rules into Java applications. Jess (the Java Expert System Shell) is a robust, versatile, Java API for creating a wide variety of commercial-strength, rule-based expert systems.

References


You can learn more about Jess at:
http://herzberg.ca.sandia.gov/jess/index.shtml

Join the Jess user community at:
http://herzberg.ca.sandia.gov/ jess/mailing_list.shtml

See Dr. Friedman-Hill's Jess in Action at: www.manning.com/friedman-hill

Jess, the Java Expert System Shell - Introduction and Table of Contents www.cs.vu.nl/~ksprac/2002/doc/Jess60/intro.html www.cs.vu.nl/~ksprac/2002/doc/Jess60/
table_of_contents.html

Dr. Ernest J. Friedman-Hill is a principal investigator in the Distributed Systems Research department at Sandia National Labs. He earned his Ph.D. from MIT in Physical Chemistry, and his current work at Sandia includes the development of software for mechanical design and analysis. He lives in Gaithersburg, MD. You can reach him at ejfried@ca.sandia.gov.

Jason Morris has been involved in mechanical CAD and software development since 1993. He runs Morris Technical Solutions, specializing in engineering information technology. He holds a B.S. in Engineering Arts from Michigan State University and a BS in Mechanical Engineering from Michigan Technological University. When not coding, writing, or working on his masters, he is out hiking in the Oregon Cascades. He can be reached at consulting@morristechnicalsolutions.com.

Fonte:http://www.pcai.com/Paid/Issues/PCAI-Online-Issues/17.3_OL/New_Folder/DOH912/17.3_PA/PCAI-17.3-Paid-pg.33-Art2.htm