Brought to you by EarthWeb
IT Library Logo

Click Here!
Click Here!

Search the site:
 
EXPERT SEARCH -----
Programming Languages
Databases
Security
Web Services
Network Services
Middleware
Components
Operating Systems
User Interfaces
Groupware & Collaboration
Content Management
Productivity Applications
Hardware
Fun & Games

EarthWeb Direct EarthWeb Direct Fatbrain Auctions Support Source Answers

EarthWeb sites
Crossnodes
Datamation
Developer.com
DICE
EarthWeb.com
EarthWeb Direct
ERP Hub
Gamelan
GoCertify.com
HTMLGoodies
Intranet Journal
IT Knowledge
IT Library
JavaGoodies
JARS
JavaScripts.com
open source IT
RoadCoders
Y2K Info

Previous Table of Contents Next


8.2.2. Value Ordering Rules

The value ordering means which value the salesman is going to suggest first out of many alternative values for a certain variable. For instance, in the case of a businessman, the suit color is given by the following sequence: navy-blue, gray, and brown.

     {{ Value-ordering-rule-1
     IF (customer.occupation IS business) THEN (suit.color IS (ORDER navy-blue gray brown)) Importance: 0.7 }}

The relationships between variables and the associated constraints and rules can be depicted in the constraint and rule graph of Figure 5. The oval bubbles mean variables, and the ones enclosed in rectangles denote the seed variables. The directed arcs show the rules, while the undirected arcs indicate constraints.

9. REASONING PROCEDURE IN SALESMAN EXPERT SYSTEM

In this section, we illustrate an example of reasoning with UNIK-SES. Although the dialog is assisted by menu-driven windows, we illustrate the reasoning process with rules and constraints to show the logic behind the screen. Let us suppose the customer is a young teacher, who is tall and heavy with a pale-looking face. He is going to buy a shirt, suit, and necktie. Figure 6 shows the customer's input screen in the browser, which will be saved in the objects as follows.

     {{Customer (occupation: teacher) (face-color: pale) (age: 20-29) (height: 180-190) (body-type: heavy)}}
     {{(buying-plan (purpose: teaching) (budget-upper-bound: 700)}
     {{ goal (target-variables: suit shirt neck-tie) }}

Let us assume the customer does not set any values for the seed variables. The system UNIK-SES begins reasoning with its knowledge and default strategy to generate values from steps 1 to 5.


FIGURE 6 Customer input screen using HTML forms.

> Step 1. {{ Rule-1 IF (customer.height tall) (customer.body-type heavy)
  THEN (suit.brightness dark) }}
  —> (suit (brightness dark))
 
> Step 2. {{ Rule-9 IF (customer.body-type heavy) THEN (suit.style American-silhouette) }}
  —> (suit (style American-silhouette) (brightness dark))
 
> Step 3. {{ Rule-C8 IF (customer.occupation (teacher public-officer))
  (buying-plan.purpose teaching)
  THEN (suit.color (brown blue)) }}
  —> (suit (style American-silhouette) (color (brown blue)) (brightness dark))
 
> Step 4. {{ Rule-C9 IF (customer.face-color pale) THEN (shirt.color pink) }}
  —> (suit (style American-silhouette) (color (brown blue)) (brightness dark))
  —> (shirt (color pink))
 
> Step 5. {{ Rule-C12 IF: (customer.age young) THEN: (shirt.collar button-down) }}
  —> (suit (style American-silhouette) (color (brown blue)) (brightness dark))
  —> (shirt (collar button-down) (color pink))

Up to now, UNIK-SES has automatically generated the specification for the customer using rules. In step 6, the system finds that there are no applicable rules although there are variables still left to be determined, such as design of shirt, design and material of necktie, etc. In this case, there are two options that can be pursued. One is constraint propagation by ordering the undetermined variables and assigning their values according to the value ordering strategy. The other is an interactive reasoning with the customer by requesting the customer to select values of the variables he wants. In this example, suppose that the customer selects "horizontal-stripe" for the design of his suit, "checkered" for the design of his shirt, and "brown" for the color of his suit. Then, the system begins reasoning with these values.


FIGURE 7 Intermediate specification.

> Step 6. "There are no applicable rules."
  (User-input: 'suit 'design 'horizontal-stripe)
  (User-input: 'suit 'color 'brown)
  (User-Input: 'shirt 'pattern 'checkered)
  —> (suit (style American-silhouette) (color brown) (brightness dark)
  (pattern horizontal-stripe))
  —> (shirt (collar button-down) (color pink) (pattern checkered))

Figure 7 is a suggested specification waiting for customer's interaction.

However, the value that the customer input violates the incompatibility constraint-I1: the horizontal stripe does not suit a heavy person. In such a case, the system shows the incompatibility constraint and recommends other possible values on the design of his suit. Of course, the customer can adhere to his previous decision. In this example, suppose the customer selects "no-pattern" for his suit and the system resumes reasoning with the changed value.

> Step 7. "Ccnstraint-I1 is violated"
  {{ Constraint-I1 Associated-variables: customer.height customer.body-type suit.pattern
  Incompatible-value-set: (heavy horizontal-stripe) }}
  (User-input 'suit 'pattern 'no-pattern)
  —> (suit (style American-silhouette) (color brown) (brightness dark) (pattern no-pattern))
  (shirt (collar button-sown) (color pink) (pattern checkered))
 
> Step 8. {{ Rule-6 IF: (shirt.pattern checkered) THEN: (neck-tie.pattern no-pattern) }}
  —> (suit (style American-silhouette) (color brown) (brightness dark) (pattern no-pattern))
  —> (shirt (collar button-down) (color pink) (pattern checkered))
  —> (neck-tie (pattern no-pattern))
 
> Step 9. {{ Rule-7 IF: (neck-tie.pattern no-pattern) THEN: (neck-tie.material (silk wool)) }}
  —> (suit (style American-silhouette) (color brown) (brightness dark) (pattern no-pattern))
  —> (shirt (collar button-down) (color pink) (pattern checkered))
  —> (neck-tie (pattern no-pattern) (material (silk wool)))

At any step, the customer may stop the reasoning and accept the currently suggested items. Then the system stops reasoning and displays the resulting specification of the customer's choice. Figure 8 shows the final specification.

> Step 10 (User-input: 'buying-plan 'decision 'yes)
  (suit (style American-silhouette) (color brown) (brightness dark) (pattern no-pattern))
  (shirt (collar button-down) (color pink) (pattern checkered))
  (neck-tie (pattern no-pattern) (material (silk wool)))

For every step of the process, a user-friendly interface is neccessary because the system has to be directly accessable to the customers. Thus, a graphical user interface is under development using HTML (HyperText Mark-up Language), CGI (Common Gateway Interface) programming (NCSA, 1995), and JavaScript. For the given specification, UNIK-SES can display the combination of suit, shirt, and necktie in a multimedia-based screen as, illustrated in Figure 9. Upon reviewing the display, the customer may select the combination as a final decision or may request UNIK-SES to resume the reasoning process and modify the current specification.


FIGURE 8 Final specification.


FIGURE 9 Display screen showing selected items.


Previous Table of Contents Next

footer nav
Use of this site is subject certain Terms & Conditions.
Copyright (c) 1996-1999 EarthWeb, Inc.. All rights reserved. Reproduction in whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Please read our privacy policy for details.