An Introduction to Expert System Shells

A Brief Overview ES Shell Structure and Comparison of Popular Expert System Shells

Pawara Siriwardhane, UG
Nerd For Tech

--

Image Source: https://www.canva.com/

Expert System is a classical symbolic Artificial Intelligence approach which is one of the best examples to represent Artificial Cognitive Systems (ACS). Today, though the standalone products like DENDRAL (1960, ACS only), DART (1991, ACS only), IBM’s Cognitive Computer Watson (2011, ML+ACS), etc. are rare, the concepts and implementation of inferencing and knowledge representation of expert systems are still in use in modern AI systems. For example the ROSS (2017): ‘the first artificial intelligence-powered attorney’ built on IBM’s Watson can understand language, postulate hypotheses, and backup the generated conclusions with references and citations. Hence the study about expert systems and ACSs cannot be thrown away.

However, the following article is not about the expert system; it is about building them.

In order to build expert systems easily, it is recommended to employ an expert system shell that saves both time and effort. Simply an expert system shell (ES Shell) is a toolkit that consists of built-in essential components of a typical expert system. Hence, this article aims to describe the structure and application of ES Shell in building expert systems and the benefits and limitations of popular shells.

The content of this article is organized as follows:

  1. Expert Systems
  2. Expert System Shells
  3. ES Shell structure
  4. Popular ES Shells
  5. Conclusion
  6. References

1. Expert Systems

An intelligent program that can mimic the problem-solving behavior of a human expert can be identified as an Expert System. Humans knowledge consists of subject-specific knowledge/ domain knowledge and problem-solving knowledge. The functionality of an expert system is similar to a human expert who solves a problem by applying his problem-solving knowledge to his domain-specific knowledge. Hence, an expert system is a computer program that symbolizes the knowledge of an expert in a certain domain.

Following are key features of an expert system:

  • Operates on a specific domain.
  • Dominates the question asking process.
  • Process incomplete information.
  • Provide certainty of an answer given by the expert system.
  • Process alternative solutions.
  • Provide reasons for answers

Expert Systems with the above features can be developed from scratch by using Logic Programming language like ProLog, or can easily be implemented by using an expert system shell.

2. Expert System Shells

Expert system shells are toolkits that can be used to develop expert systems. They consist of some built expert system components with an empty knowledge base. Hence, in most cases, the knowledge engineer is left with only populating the knowledge base. It is essentially a special-purpose tool that is built-in in line with the requirements and standards of a particular domain or expert-knowledge area applications. It may be defined as a software package that facilitates the building of knowledge-based expert systems by providing a knowledge representation scheme and an inference engine.

Difference ES shells offer various ways to model the knowledge into the knowledge base. They are

1. as rules

Knowledge is populated using rules. These rules can be programmed by Prolog, Java, Python or any other preferred language based on the expert system shell being used

2. in the form of a decision tree

Figure 02: A tree-based expert system created based on the rules mentioned above ( Source: Created by Author)

3. as objects (frames) — A data structure with typical knowledge about a particular object or concept.

ES shell is an ideal option for the rapid development of expert systems. Due to this reason, it can be considered as one of the most commercially viable approaches in expert system implementation.

3. Expert System Shell Structure

The Expert System Shell refers to a software module containing an:

  1. User interface (built-in)
  2. Inference engine (built-in)
  3. A structured skeleton of a knowledge base (in its empty state) with the suitable knowledge representation facilities

Not only the above components but also some ES Shells provide facilities for database connectivity through interpreter, web integration, and natural language processing (NLP) features.

Figure 03: Illustration by Author (Reference: Expert System Architecture (tripod.com))

The user interface is the portal available for both end-users (who use the expert system to get solutions) and the knowledge engineer (who perform the knowledge engineering and modelling).

The knowledge base can be connected with an external database (like MySQL) since the knowledge base is not optimal in storing extensive data. The knowledge base cannot directly access the database and these access features are mediated through an interpreter.

Some ES Shells have inbuilt knowledge base editors which facilitate the Knowledge Engineer to easily update and check the knowledge base. Knowledge Engineer collects the expertise knowledge in a specific domain and models in populating the knowledge base.

Inference engine which is the most important part of an expert system access the knowledge base and solves the problem by either backward chaining or forward chaining of facts and rules in the knowledge base. In ES Shells, the inference engine is also a built-in component that is usually programmed in ProLog.

Most ES shells are composed of another component called ‘Explanation System’ which provides the user with reasons and explanations to provide a certain answer, by considering the ‘case specification data’ available.

In an expert system shell, the design of the user interface and other software components are programmed by the software engineer. Therefore an expert system is a collaborative design of 03 major parties: expert, knowledge engineer and software engineer. (Depending on the size these parties may vary from individuals to large teams)

4. Popular Expert System shells

Following are a few examples of expert systems available for developers to build expert systems at various scales. Depending on the ES Shell there are various pros and cons associated with each shell.

4.1 ES-Builder

ES Builder stands for Expert System Builder. It is one of the most famous Expert System Shell. It is a free ES shell that is implemented especially for students and researchers to develop expert system shells. The shell consists of an improved web interface built using the AJAX framework. The ES-Builder stores the facts and rules of the knowledge base in an online MySQL database. There is a built-in inference engine (written in Prolog)and user interfaces are developed using simple HTML and CSS. The database connectivity is maintained to access the knowledge base using PHP.

The rule base knowledge base can also be developed using a decision tree that consists of attributes, values and conclusions.

  • Attribute: Attributes are characteristics of possible conclusions that are to be tested in the ES.
  • Value: Each Value node represents the most correct response to an Attribute for a particular conclusion.
  • Conclusion: The final decision made based on the attributes and values is the conclusion.

Benefits of ES Builder:

  • Autogenerated User Interfaces (Simple HTML CSS design of the user interface)
  • Ability to create backup files of the knowledge base and easy integration with MYSQL database.
  • Ability populates the knowledge base using the decision tree.
  • Optimized view of the rule-based knowledge base.

Limitations of ES-Builder:

  • Only forward chaining rules are supported backward chaining rules are not supported.
  • Desktop tools support only Windows 98 & Windows 7.

4.2 CLIPS

CLIPS stands for C-Language Integrated Production System. As the meaning suggests the CLIPS expert system shell is written in the procedural langue C. CLIPS was developed in 1985 at NASA’s Johnson Space Center. It is a rule-based programming language that is used for creating an expert system. CLIPS are used in systems where the heuristic solution is easier to implement and maintain than a traditional algorithmic approach.

CLIPS provides 03 different tools for knowledge representation in the form of programming methodologies/ programming paradigms. The 03 methods are:

  • Procedural
  • Object-oriented
  • Rule-based programming

Since the CLIPS is written in C language, the expert system developed by CLIPS requires ANSI compiler also. Since the systems that already have the ANSI compiler can easily run the expert system without changing the source code.

Benefits of CLIPS:

  • Can be easily embedded in other subroutines made in procedural languages to extend the existing functionality.
  • Support the methods like fuzzy logic and agents.

Limitations of CLIPS:

  • Support only forward chaining rules but does not support backward chaining rules.

4.3 JESS

JESS stands for Java Expert System Shell. JESS is another expert system shell and a scripting language that is completely written by Java programming language. JESS is heavily used to build rule-based expert systems which is tightly linked to systems that are written on Java. The expert systems built by using JESS can be either run on command-line interface or can be used as an Applet.

JESS based expert systems are widely used as intelligent agents, in enterprise resource planning systems, and in order validation of eCommerce platforms.

Benefits of JESS:

  • Better to be applied in bigger problems where performance is dominated by algorithm quality.
  • Include backward chaining and working memory queries.
  • Faster than the expert systems developed using expert system shells written on C language.
  • Contains some commands which allow less memory usage when executing the system.

Limitations of JESS:

  • Some capabilities are limited when used in Browser.

4.4 PyKE

PyKE stands for Python Knowledge Engine. PyKE uses logic programming that is inspired by Prolog, but PyKE is entirely written in the programming language Python. The python functions, PyKE rules, and PyKE pattern variables, graph plans are the major features of PyKE knowledge base. This is an inference engine that uses rules and facts to create additional facts using forward chaining of rules to prove goals.

And also, through backward chaining, it assembles Python functions into customizable call graphs which are also known as Plans.

Benefits of PyKE:

  • Highly customizable and code adaptability.
  • High performance.
  • Code reusability.
  • Both forward chaining and backward chaining is supported.
  • Ability to run commands on the local system to guide the inferencing.
  • Provide end-user question capability.

Limitations of PyKE:

  • The UI should be created manually.
  • Integration issues occur when integrating inference engines with different UIs.

5. Conclusion

It is obvious that ES Shells is a far better option rather than developing an expert system from the scratch. There are many ES Shells that support different programming languages that have been developed which open gates for developers who are familiar with various programming languages. The ES Shells should be properly selected mainly considering the requirements and the scale/size/complexity of the expert system to be developed.

Stay tuned. We will meet soon with the next article “How to make a expert system with ES-Builder”.

6. References

https://www.researchgate.net/publication/263278128_Basic_Concepts_of_Expert_System_Shells_and_an_efficient_Model_for_Knowledge_Acquisition

https://cinuresearch.tripod.com/ai/www-cee-hw-ac-uk/_alison/ai3notes/subsection2_5_2_1.html

https://www.researchgate.net/publication/235028224_The_Applicability_and_Limitations_of_Expert_System_Shells

--

--

Pawara Siriwardhane, UG
Nerd For Tech

73pawara@gmail.com, (+94) 71 869 7440👨🏻‍🎓 An enthusiastic IT undergraduate, with the sole goal of sharing information related to the IT industry 👨‍💻