This is updated for Version 1.08, December 1997.
Normally you don't need to bother about this lot as they are set up during installation and Amiga startup. But if something goes wrong then this list might help.
KBTools:
to some directory for best effect, since it is in subdirectories of this that Istar seeks knowledge bases and places dumps etc.
IstarSys:
to some directory for prefs files (and, in future, other things)
iff.library
(can run without it)
asl.library
is needed for saving etc. (supplied with Amiga 1200)
IstarSys:IstarPrefs
but the defaults are:
Istall Istar
icon and decide in which drawer you are going to install it.
It doesn't do anything clever; it merely copies across the Istar program and some relevant files and directories, and updates your s:user-startup
with commands to assign IstarSys:
and KBTools:
.
This describes the normal start of Istar, from WorkBench.
(Advanced Options for Starting Istar:
)
Note: Bold is often used for concepts and jargon terms used in Istar when they are first used. Italics is often used for some action you should take. 'Oops' is used to tell you what to do if things don't seem to be going as expected.
1. Double click on the Istar icon.
2. You will be presented with a grey Control Screen part way up the view. Initially this has 'Istar' on its title bar but that is soon obscured by a horizontal strip and, at the left, the Initial Control Panel.
3. Click the 'New' button, and two things will happen. First another screen, a large blank white one appears. This is the Easel on which you draw your KB (knowledge base). And, on the Control Screen, another panel appears with columns of buttons and two list gadgets. (If you are operating with limited memory, the standard Easel size (30 by 24 inches) might be too large, and you will have to alter the Prefs before clicking the New button.)
Here are a few instructions to get you started ...
4. Move the mouse pointer up over the large white Easel then press left mouse button (LMB) and keep it down. A box appears that moves with the mouse. Move the mouse around. Then release LMB. (Oops: No box appears. Have you clicked rather than press, drag, release? Do not click it; clicking does something else.)
5. Draw another box, in the same way, to the right of first one.
6. Move the mouse pointer tip over the right hand edge of the left-hand box, and press LMB while over the edge. You will see a short line appear from your mouse pointer to a point one quarter the way into the box. This line follows the mouse as you move it. Move mouse around until line is over the other (right-most) box and release LMB. A line should appear from one box to the other. (The left-hand box is called the antecedent of the right, and the right is the consequent of the left.) (Oops: No line appears, but the box moves? You had the mouse pointer too far into the box, not exactly over the right-hand edge; you have about one sixteenth of an inch leeway. Oops: A new box appears? You had the mouse pointer too far outside the box, not exactly over the right-hand edge. In either case hit Escape key; see 7 below. Oops: When I release the LMB no link appears between the boxes? Probably because you have released the LMB too soon; when you release, it is not the mouse tip that should be in the box so much as the end of the moving-line; sometimes this end is not quite at the mouse tip, for reasons that are discussed elsewhere.)
6a. (If you wish, you can draw the line in the reverse direction: from the left-hand edge of the right-most box leftwards to the left-most box.)
6b. If you want to insert a bend in your line while drawing it, hit Space bar when moving-end of line is where you want the bend.
6c. Note: The boxes and links you have drawn are not just pieces of graphics; they have specific meaning. Behind the user interface that you see, in the knowledge base itself, for each box an item and attribute have been created and for each link an inference relationship has been created. You will learn more of both as you progress through this tutorial and into the Using Istar for Inference tutorial.
7. (To escape from any operation you have started but don't want, hit the Escape key. Then release the mouse button.)
That's the basic mechanism, and the whole knowledge base can be drawn like that. Not too bad, is it?
To Resize a box, move mouse to over box edge and then press Right-shift and move the mouse. Or else, go into box info (Right-click over box) and enter size manually by figures (pixels).
b) Bend an existing drawn link by pressing LMB over a link. Dotted bent line follows mouse to new position; release. Pressing LMB over existing bend will just move the bend to new position. (Oops: line doesn't bend, but a box appears instead? You were not near enough to the line when you pressed LMB. Hit Escape and try again.)
c) To move an existing bend in a link, place cursor over the bend, press LMB, and drag the bend to new position and release. Hint: If you find a new bend appearing, it means you did not quite position the cursor over the existing bend, but it will show you more precisely where the existing bend is. So hit Esc key and try again.
d) To delete a bend in a link, place cursor over the bend, move it around to check you have it, then press the Del key.
e) To Redirect a Link from one box to another, hold down Left-Shift, place cursor over where the link enters or exits the box (either side works), press LMB and you should see a dotted line appear as you move the mouse from the link you want to move. Drag the end of the dotted line until it's over the new box, then release the LMB. Link should now be joined to the new box. Hint: If several links emerge from box, you might pick up the wrong one. So, bend the others out of the way temporarily, redirect the link you want, and then delete the temporary bends you made. (Other modifications are possible e.g. to redirect a link to another box, or to delete a box, delete a link, delete a bend from a link: see below.)
9a. Entering detail, e.g. Name and Meaning. Click the Right Mouse Button (RMB) over centre of box. (Oops: If you get a dotted box outline as in 8(a) then you haven't clicked fast enough; hit escape key, release MB and try again. You'll soon get the hang of it.) Up comes the Control Screen, showing an Attribute Detail panel with around fifty gadgets. Don't panic: you need only the top two: Label and Meaning; ignore the others for now. (Oops: If a small panel comes up with half a dozen buttons - the Action panel - then you have clicked the wrong MB; as we shall see below, this comes up when you click the LMB rather than the RMB. To get to the Attribute Details Panel, either hit the 'Data..' button, which will take you there, or hit the 'Done' button with the LMB to send it away and try again.)
9b. Along top of panel are two string gadgets which allow you to enter a name for the box and a longer meaning if you wish. For now, type something in Label string, press Return and carry on typing in Meaning string - type anything that you like. Then click the OK button. The Control Screen returns and your box should display the new name. (Oops: If you try to type and nothing enters either string then click LMB over the string you wish to type in to activate the string gadget.)
9c. (There are two OK buttons on the Attribute Details Panel: a small one in the top row for your convenience when merely entering label and meaning, and the main one about two-thirds of the way down. There is also a third, OK-Act, which we will use later.)
10. Showing Meaning. On the Easel, move the mouse over the box (do not press any mouse button). The Meaning text should appear in the horizontal window in the top of the Control Screen. Move mouse away, and it disappears. In this way, even when the box label text is too small to read you can easily see what a box means.
10a. (Oops: Nothing happens? Probably the Easel has not been reactivated after hitting the OK button. Only one panel or easel is active at any time. If you see the border of a panel is pink rather than grey then that panel is active, rather than the Easel. You can activate the Easel in several ways. One is to hit the 'See Easel' button on the control panel (not available on earliest versions of Istar). Another is to move over the centre of a box on the Easel, press LMB in an attempt to move it - see 8a above - and release or hit Escape key. Anything using LMB over Easel will activate it (but using the RMB will not).)
11. More antecedents. Draw another couple of boxes (see 4 above) near the left-hand box (above or below it) and link these to the right-hand box as in 6 above. The right-most box now has three or more antecedents. Best also to name them with different names as in 8 above.
12. Running the inference net. Now click with the Left Mouse Button over the centre of the right-hand box. Up comes a small panel at the top of the Control Screen containing a few buttons, the Attribute Action panel. The two buttons on the left are: Reset and Infer, which allow you to run the KB. Hit Reset, then hit Infer. Up comes a User Question panel, with text at the top showing the meaning or label of one of the antecedent attributes, a large central Value gadget, a slider, and an large OK gadget to right, with a few others. Enter a Value by sliding the slider over towards the the right using the LMB and hit OK with LMB. Then a similar panel should appear for the next attribute. And the next. If you have three antecedent (left-hand) boxes feeding into the consequent (right-hand) one you should get three such User Question panels. (Oops: No panels come up. Have you hit Reset then Infer? Oops: Only one Question panel comes up. Maybe you have the Action panel for one of the antecedent attributes? A glance at its title will give the name/label of the attribute for which it is the Action panel.)
12a. (The meaning of the values given by the sliders will become clear when you start the chapter Using Istar.)
13. Seeing the result. When the question sequence has finished, the Attribute Action panel is still there. Hit the Data button, and you are taken to the Attribute Details panel. The result should be shown in the slider gadget on the second row in the middle - and it should show somewhere over to its right end if you slid all the antecedent sliders over to the right.
14. Control Screen. You can drag the Control Screen up and down using the thin white line along its top, just above the strip where the meaning texts appear. Use the tip of the mouse pointer and LMB to do this. Half way up is not a very convenient place, so you can park it by dragging the screen down to reveal more of the Easel and hitting the second gadget from the left on the Control Screen strip. This is the parking button. From then on this is where the Control Screen returns to. Whenever you want to access the Control Screen, hit the Gadget showing two arrows at left edge of the top strip of the Control Screen. Up it comes. Hit it again, and it parks back down the bottom.
16. Scrollable Easel. Ensure the Easel is active (step 10a). Now move the mouse over to the right hand side and keep moving. The Easel scrolls smoothly to the left - a tribute to the Amiga's hardware-assisted scrolling. This allows you to traverse a large knowledge base - and, since scrolling happens even during drawing, allows you to draw very long links. But, for now, we use it to gain empty space for a new inference net.
17a. Draw a new box on the Easel in some empty space (= step 4) - it should say 'Integer' in it and be a different colour from the Bayesian boxes you had before. Give it a name/label of 'Result' (= step 9).
17b. Draw three antecedent boxes for it (to its left), and link them to the Result. Give them three different names e.g. 'I1', 'I2', 'I3'. (Note that this little inference net is not connected to the earlier one you drew.)
18. Run this wee inference net. (Step 12: click over Result box with LMB to bring up its Action panel and hit Reset then Infer; 'running' an inference always involves hitting Reset, to clear out previous values, and Infer.) The User Question panels will now show, not a slider value gadget, but a rectangle which says '0' and into which you can type a number. In each of the three that comes up type a number, say 5, 6 and 7.
19. Hit the Data button on Result's Action panel, and its Attribute Details panel should appear, showing as its value the sum of the numbers you entered (18 for the above numbers).
20. To run it again there is a short cut to the Action panel, the OK-Act button near its bottom. Hit that. (It short-cuts the process of hitting OK and then finding the box and clicking on it with LMB.) The Attribute Action and Attribute Details panels form a pair, and each is accessible from the other: the OK-Act button brings up the Action panel and the Data button thereon brings up the Details panel. Run it again, making sure this time that the three numbers you enter are all above 1.
21. Different Inference Method. When the question sequence has stopped, hit the Data button to bring up the Details panel. On about the fourth row you should see a radio button saying 'Inferred' and to its right a string in a slot that says "X = A + B, C, ...". This is the inference method by which the values of all the antecedents are combined to give this attribute's value. "X = A + B, C, ..." means "Add all the antecedent values together - X refers to this current attribute (labelled 'Result'), A refers to the first antecedent, B to the second, and so on. You can select another inference method: attached at the left end of the slot is a wee button; hit it with LMB. Up comes a list of inference methods. Select multiplication, shown by "X = A * B, C, ...". Hit the OK button on this list to send it away, and the string in your slot should be updated accordingly.
22. Now run the inference net again. (Step 20: notice how convenient the OK-Act button is when you are changing things like inference method and trying it out.) Make sure all numbers are above 1. Look at the Result Data. (If you entered 5, 6, 7 the result value should now be 210.)
23. Suppressing irrelevant information. Note that Istar only asks questions that it needs to, and thus avoids asking irrelevant ones. With multiplication this happens if one of the antecedents is zero - we then know the consequent will be zero, whatever values the remaining antecedents take, so there is no point asking them. Try it: run the inference net again (step 20) and enter the second number as 0. It should not then ask the third number.
23a. (There are various item types for which this effect can occur. Integers with multiply, Booleans with AND or OR, and anything with Chooser inference method, etc.)
24. Short-cut to changing item type. The main way of selecting item type for your next box is to bring up the control screen, hit the item type listview gadget for the type you want. A bit of a nuisance; there is a short-cut if you have a box of that type already showing on the Easel: press 'T' for Type over that box and Istar will select its type. You have two types, Bayesian and Integer, with (Free) Integer currently selected. Ensure the Easel is active (step 10a). Then move the mouse pointer over one of your earlier Bayesian boxes and press the T key. The item type should select Free Bayesian. If you now draw a box it will be of Bayesian type.
25. Automatic Type Conversion. Find some spare space on the Easel (step 16), create a (Free) Probability box to the left and an Integer to the right. Link the Probability box as antecedent of the Integer. Run this little inference net; you should be presented with a slider in the User Question panel. Slide the Probability to some suitable number, say 90. Look at the value in the Integer attribute; it should say 90 (though early versions of Istar might be one out due to rounding errors in the gadget but not internally!). As far as possible Istar intelligently converts from one value type to another.
26. Some errors. Don't be scared of errors. Try experiencing a few errors that might happen - if you have not already done so! Most do not do any harm.
27. Making Space in Crowded Net. After a time the net gets crowded. Two ways of making space. One is to move boxes one by one (easily done because it's just a matter of press-drag-release). Second is to make 'breathing space' on screen, either horizontally or vertically.
In either case, all the links are redrawn to where the moved item boxes have moved to. However the bends in the links are not moved, so you will find some ugly 'elbows' that need moving. And you might find some links now cross over things and obscure them so you should bend those links out of the way. What I often find is that often, after creating breathing space, some of the bends I made before to avoid things can be removed.
** IF YOU WISH, YOU CAN NOW GO STRAIGHT TO USING ISTAR.
Advanced use: From CLI you can start with various tracing on, by adding the parameters:
so the command might be:
Istar -tu -te
This will usually only be of value when you suspect some bug and want to send me a trace of what happens.
This method involves starting up and immediately altering some of the preferences via the Prefs panel.
Note, though, that you should only do this if you can work with a small KB or easel. Note that doing this will not alter the sizes of KB or easel that are loaded from file - only brand new ones.
A file, IstarPrefs_LowMem is already supplied, so you need only enter the following command from a CLI:
COPY IstarSys:IstarPrefs_LowMem IstarSys:IstarPrefs
Bring up the Prefs panel to see the sizes it has given you. If you wish anything different then make up your own IstarPrefs file. There are many other Preferences that can be set via this file. See 'Preferences' section in the 'KBs' chapter for details.
If you want to restore the original, enter the command:
COPY IstarSys:IstarPrefs_Orig IstarSys:IstarPrefs
On the Item Type list on the KB panel, select 'Text Fragment' ('Contract Meaning' in earlier versions). This is an item expressed by two boxes, when you draw it on the Easel. The top, smaller, box expressed the item itself, the bottom one an attribute of the item.
You can define your own item types. Let's try doing so. Hit the 'New' button beside (below, before version 1.08) the Item Type list. A new panel, Item Type Panel, comes up for an item type called 'Unnamed'. Change the name to 'Employee'.
Now we will add attributes to the item type. To add each attribute to an item type we do three things:
(Before version 1.08, these steps were slightly different.)
So first, locate the Attributes panel list near the bottom of the Item Type Panel, hit its 'New' button, and up comes a smaller panel requesting a new attribute. On this panel, select String from the list of attribute typse, enter a Name below it of "EmpName", and then enter a Meaning such as "Employee's formal name". Hit its OK button. The panel should go, and 'EmpName' should appear in the Item Type's list of attributes.
Now repeat the process to add an Age attribute (using integer attribute type). Thirdly, create an attribute called 'Day off' of Type 'Weekdays'. Lastly, create an attribute called 'Salary' of Type Integer.
Then press OK (called Done in some versions) on the Item Type Panel, and it disappears. Look at the Item Types panel list and you will see 'Employee' has been added at the bottom and should be selected (if not, select it).
Now draw on the Easel and you should get a tall box group with five boxes: a smaller one at the top representing the employee itself, with four attribute boxes: EmpName, Age, Day off, Salary.
Click with RMB in the item (top) box to bring up the Item Details Panel. Alter its Name to e.g. 'John', and that will appear in the item box. To give values to its attributes is a bit long-winded at present, and we will deal with this in
Notice the similarity to databases: item = entity or record, attribute = attribute or field. Unlike many databases new item types can be created at any time. And (from version 1.08) new attributes can be added to existing item types, and even to existing item instances.
Attributes can be of a variety of types ('domains' in database jargon), which normally are defined in terms of value types (see below).
It became clear during the INCA research project that the conventional picture, of items with several attributes, was not always appropriate. In an inference net a lot of items exist merely to support a single attribute, and so Istar developed the idea of 'free attributes', in which the item is still there for structural purposes but is de-emphasized and not shown on the easel. So in the Select Item Type panel list the first set of items is normally a load of free attributes. They are represented by single boxes. Whether they are called attributes or items is immaterial.
Types and Instances
'Employee' is an item type. John is one instance of the item type 'Employee'. It is instances that are expressed as boxes and arrows on the easel.
What is an Attribute?
An attribute is a holder of a value - such as EmpName, Age, etc. It can be of two types: a property of an item or a free attribute. Each attribute is expressed by a box. When you started above, you were drawing (creating) free attributes. When you drew the Employee box group you created an item with four property attributes. Free attributes actually belong to a hidden item, for which there is no visible box.
What are ...
Copyright (c) Andrew Basden 13 February 1998. 31 January 2002. 11 April 2014 Breathing space, and instructions for bend manipulation and redirect links. 5 October 2020 inserted missing /ul, restoring original. 6 October 2020 resize box.