Download presentation
Presentation is loading. Please wait.
Published byPierce May Modified over 9 years ago
1
Introduction to Programming in Corvid EXSYS-Corvid is an intelligent systems programming environment General order of tasks: Enter and define Variables – static or confidence (goal) from glossary Define Command Block(s) – adds operational commands that give directions to inference engine and govern output Create Logic Block(s) – construct all the rules 2/9/20161
2
To enter title and author(s), change size of applet, and control other interface issues: Click properties size Title and author
3
3 V1: income gV1: denied rule 1 less than 25K Enter the following example into Corvid. 1. IF The customer's income is less than 25,000. THEN The customer's line of credit is denied. 2. IFThe customer's income is at least 25,000. ANDThe customer's credit rating is excellent. THEN The customer's line of credit is approved. 3. IF The customer's income is at least 25,000. ANDThe customer's credit rating is good. ANDThe customer has been in their present job less than 2 years. THEN The customer's line of credit is denied. 4. IF The customer's income is at least 25,000. ANDThe customer's credit rating is good. AND The customer has been in their present job at least 2 years. THEN The customer's line of credit is approved. 5. IF The customer's income is at least 25,000. AND The customer's credit rating is poor. THEN The customer's line of credit is denied. gV2: approved rule 2 V2: credit rating at least 25K excellent V3: in job good less than 2 gV1: denied rule 3 at least 2 gV2: approved rule 4 poor gV1: denied rule 5
4
4 Open Corvid. Create NEW file & name it If the [Variables] window does not appear, click on the [Variables] icon. The [Variables] window will be displayed. Click on the [New] button. The [New Variable] window will be displayed (next)
5
5 Enter “customers income is” in the [Name] area. Click on the [OK] button. The [Variables] window will reappear. (next)
6
6 Replace the content of the [Main Prompt] area with “The customer’s income is” Proceed to the [Static List] [Full Text] area. You will be entering the values for the “customers_income_is” variable in the [Value] area. (next)
7
7 Enter the first value, “less than $25,000”, in the [Value] area. If you want to shorten it, enter the same value in the [Short Text] area. Corvid maychange the format. Click Add to List Click Copy to enter the second value, “at least $25,000” in the [Value] area. Click Add to List again Both values should be in list at bottom Click on the [New] button. The [New Variable] window will appear. (next)
8
8 Continue with the “credit rating” variable. Enter “customers credit rating” in the [Name] Box. Click on the [OK] button the and [Variables] window will appear. Replace the content of the [Prompt] area with “The customer’s credit rating is”. Continue to the [Static List] [Value] area. Enter the credit rating value, “excellent”, in the [Value] area. Click Add to List Enter the remaining values, “good” and “poor”, for the credit rating variable. Click on [New]. Return to the [New Variable] window and enter the “time in job” variable. Customers credit rating
9
9 Follow the same steps to enter the “time in job” variable and it’s values. Then return to the [New Variable] window. The next two variables to be entered, “credit approved” and “credit denied”, are examples of confidence variables. These variables represent system goals, recommendations that are made at the end of a consultation. Enter the “credit approved” variable in the [Name] area. Eventually, this procedure will also be followed to enter “credit denied”. Change the default variable [Type] from [Static] to [Confidence] by clicking on the [Confidence] radio button. This establishes “credit approved” as a confidence variable whose value will be assigned when building the rule base. Click on the [OK] button to return to the [Variables] window. credit approved
10
10 Replace the content of the [Prompt] window, “credit approved”, with “The customer’s credit is approved”. Notice that the [Confidence] tab’s default value [Calculation] area is set to [Sum]. In general, this means that if more than one rule “fires” recommending a given confidence variable, the final confidence value will be a sum of the several rules. After entering “credit approved”, click on the [New] button to return to the [New variable] window. Follow the same steps to enter the “credit denied” variable. This completes entry of the credit- approval vocabulary of variables and values, needed to build the rule-base. Next we will configure Corvid’s inference engine (rules of inference) to support the Credit Approval System. Click [Done] to return the menu bar display.
11
11 On the Main Menu Bar, Click on the [Command Block] icon [C]. The [Command Block] window will appear. Click on the [Add] button in the Command- Add] area. This will display the [Commands] window found lower-right. This is the window that enables adding operational commands to the Command Block. (next)
12
12 In the [Variables] tag area, Click on the [All Confidence Variables] radio button. This will activate the [Derive a value from TO BE and Logic Blocks] radio button and “DERIVE CONF” is displayed in the [Command] area. This sets up the inference engine to have the [Logic Blocks] derive the values for all Confidence Variables. The rules will be tested. If the values of other variables are needed, the system will ask the user. Next we have to tell the system what we want it to display. Click on the [OK] button. (next)
13
13 Notice that in the [Command Block] area “DERIVE CONF” is displayed. Next we will instruct the system exactly what will be displayed (shown) to a user at the end of a consultation. Click on the [Add Below] button in the [Command] area. The [Commands] window will appear. Click on the [Results] tab. (next)
14
14 The [Commands] window with the [Results] tab area will be displayed. Select the [Display Default Results Screen] radio button. Notice that the “RESULTS” command is displayed in the [Command] area. Click the [OK] button. This will display the [Command Block window lower left. The [Command Block] window area shows the status of our Inference Engine. This Command Block will derive all values of Confidence Variables and the display the values of all variables set in the system. Next we add the rules to the system. (next)
15
15 Return to the Main Menu Bar and click on the [Logic Block] icon. A variation on the [Logic Block] window displayed to the right will appear.” It is empty, containing no rules. After we have finished entering (building) the rule-base in Corvid, the resulting [Logic Block] window will look something like the bottom window. It is filled with the rule- base that we are about to build. Now let’s build it. (next)
16
16 Starting in the [Logic Block] window click on the [Add] label in the [If-And- Add] area. This will display the [Add to Block] window. This is the window where we select variables from our dictionary to build the rule-base. Select “customer income is”. Its values, “less than 25000” and “at least 25000” will be displayed in the [Static List] tab area. There are several ways of building a rule-base in Corvid with the same inferential (logical) results. We will illustrate a method that builds the rules in decision-tree-order, one at a time, by entering their components in decision- tree-order. Your reading assignment illustrates another approach. (next)
17
17 Select the variable value “less than 25000”. Click on [Add each individually]. This will move the values to the [Add to Nodes] area. Click on [Done]. This moves the variable- value pair to the first position in the rule that we are building. (next)
18
18 This sequence of steps builds the first and, in this case, only antecedent condition of the rule, rule 1. It is displayed in the [Logic Block] window. As you will see, all antecedent conditions can be added in this manner. To add the “Then” or “Goal” clause for rule 1, select the first variable/value pair and select the [Variable] label in the [Then-Variable-Command] area. This takes us back to the [Add to Block] window.
19
19 Select “credit denied”. The [Expressions] tab area now displays “[credit denied] =“. Notice the full text is displayed in the window’s bottom left quadrant. This is the point where the developer decides what numerical confident to assign to the goal-variable. In this case, assign the value “1”, standing for “true” and representing complete confidence in the conclusion, that is, given that the antecedent condition(s) are true the conclusion will be true. Select [Add to List] (next)
20
20 Select [Done] This takes us back to the [Logic Block] window where the completed rule 1 is now displayed. As you will see, all rules can be built in this fashion. Add rule 2. Notice to add rule 2 you need to add a second antecedent BELOW and the rule has more than one antecedent condition. Add the rest of the rules. Run the program to see how it works and what the default output looks like.
21
If you have rules in two separate trees, you need to create Logic Block 2. For example: 21 6. IF The customer has never missed a payment THEN The customer's credit rating is excellent. 7.IFThe customer has missed a payment occasionally THEN The customer's credit rating is good. 8.IF The customer has always been late with payments THEN The customer's credit rating is poor. V4: customer payment V2: credit rating excellent rule 6 never missed V2: credit rating good rule 7 missed occasionally V2: credit rating poor rule 8 always late
22
Help on Printing Rules Be sure to print with these parameters or you get pages and pages of output. This will print rules only.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.