List of Figures – Jess in Action: Rule-Based Systems in Java

List of Figures

Chapter 2. What are rule-based systems?

Figure 2.1. The architecture of a typical rule-based system. The pattern-matcher applies the rules in the rule-base to the facts in working memory to construct the agenda. The execution engine fires the rules from the agenda, which changes the contents of working memory and restarts the cycle.

Chapter 3. Introducing Jess

Figure 3.1. The jess.Console interface for Jess. This as an alternative to the command-line jess.Main interface. You can enter Jess code in the small text field at the bottom left, and Jess output appears in the scrolling text area at the top.

Figure 3.2. The JessWin developer’s environment for Jess. JessWin is a third-party add-on that provides a graphical interface to many functions that are useful to Jess programmers.

Chapter 5. Scripting Java with Jess

Figure 5.1. You can use Jess from Java, and call Java methods from Jess.

Chapter 6. Representing facts in Jess

Figure 6.1. Facts in the working memory are Jess’s representation of information about the outside world.

Figure 6.2. Working memory is something like a relational database.

Figure 6.3. Jess uses the java.beans.Introspector class to turn JavaBeans into deftemplates.

Chapter 7. Writing rules in Jess

Figure 7.1. A pictorial representation of the factorial example from the text

Chapter 8. Under the hood: how Jess works

Figure 8.1. An unoptimized Rete network for the two rules example-1 and example-2

Figure 8.2. A Rete network that shares pattern nodes

Figure 8.3. A Rete network that shares both pattern and join nodes

Figure 8.4. Jess’s view command displays the Rete network in a window.

Chapter 12. Writing the PC Repair Assistant

Figure 12.1. A simple flowchart representing a trivial diagnostic process. The hypothesis “The car won’t run because it has no fuel” is implicit in the diagram.

Figure 12.2. A simple top-level flowchart for diagnosing PC hardware problems. This flowchart can diagnose the problem “The computer isn’t getting any electricity.”

Figure 12.3. The cycle of rules that fire to get answers from the user in this application. The rule power-supply-broken needs an answer fact before it matches. Jess’s backward-chaining engine detects this requirement and asserts a need-answer fact. The rule supply-answers detects this fact and asserts an ask fact in response. Finally, the ask-question-by-id rule fires in response to the ask fact and supplies the answer fact needed by power-supply-broken.

Figure 12.4. A simple flowchart for diagnosing some hardware problems in computers that make sound but don’t boot. The ERROR state is supposed to be impossible to reach.

Figure 12.5. The diagnostic flowchart for computers that beep fewer than three times and then don’t boot

Chapter 13. Adding a graphical interface

Figure 13.1. An empty JFrame created via a short Jess script as shown in the text

Figure 13.2. Application window with an added JTextArea for displaying questions

Figure 13.3. Application window with both an area for displaying questions and a lower panel for collecting answers

Figure 13.4. An instance of the class jess.awt.ActionListener that serves as an event adapter and forwards GUI events to the deffunction read-input

Figure 13.5. Some of the code in a GUI application runs on the main thread, and other code runs on the event thread. The separate threads can communicate by calling Jess functions. In the diagram, time flows down. Note how calling a Jess function like (run) results in a Java function like Rete.run() being called a short time later.

Figure 13.6. The multiple choice input panel displays a combo box and a button. The choices in the combo box are changed based on the question being displayed.

Chapter 14. The reality connection

Figure 14.1. A six-story building heated and cooled by two heat pumps. Each floor has temperature sensors and an automated air vent. This small building contains 14 devices to connect to the control software: six sensors, six vents, and two heat pumps.

Figure 14.2. A GUI for the HVAC simulator. The three columns of labels represent the heat pump state, vent state, and temperature for each floor. The text field on the bottom shows the current outdoor temperature.

Chapter 16. Writing the rules

Figure 16.1. Possibility distribution of young

Figure 16.2. The fuzzy terms cold, cool, OK, warm, and hot and the possibility graphs of temperatures they represent

Figure 16.3. Probability chart for the fuzzy terms corresponding to the five discrete settings used for the vents

Chapter 18. Embedding Jess in Java applications

Figure 18.1. Usage diagram for TextAreaWriter and TextReader

Chapter 19. Deploying web-based applications

Figure 19.1. The result of viewing the Hello servlet in Netscape

Figure 19.2. The TekMart login screen, as implemented in the file index.html. The customer ID will be used by the servlets in the Recommendations Agent.

Figure 19.3. The output of the catalog JSP