New featues in MIKE 2.50 (see also MIKEREF.DOC and MIKE2REF.DOC)
----------------------------------------------------------------

MIKE 2.50 retains compatibilty with older versions of MIKE (v1.50 and
2.03) but also contains a variety of new features, most of which are
provided to make using MIKE more straightforward. The features include:

Included since version 2.03:

     o Graphical user interface replacing almost all MIKE top level
       commands, comprising:
          o MIKE status control panel
          o In-window working memory proof trees and frame/rule        
            descriptions
          o File selector for loading knowledge bases
          o User accessable menu and window manipulation via query,
            announce and ask_menu
          o Semi-integrated editor
          o Ability to switch out to DOS from MIKE
     o 'More' facility, prompting the user to press a key before text
       scrolls off of the screen
     o System for handling run-time frame creation when RETE is
       enabled
     o Improved error handling
     o Improved rule and frame descriptions (including true variable
       name display)
     o User settable justification tree depth

Since version 1.50:

     o Faster forward chaining using the RETE algorithm
     o Truth maintainance system
     o Hypothetical worlds system
     o Optional certainty factors for working memory elements
     o Working memory proof tree generator

The MIKE screen display
-----------------------

The MIKE screen is split into three sections, the status line (at the very
top of the screen), the MIKE dialogue window (at the bottom of the screen)
and the menu area (the rest of the screen).

The MIKE dialogue window
------------------------

This is a scrolling text window in which commands and queries may be
entered in command-line form. This is only usually used for invoking the
backward chainer (via deduce) and manipulating working memory and frames.
All entries in this window should be entered at the 'MIKE ?-' prompt and
terminated with a full stop. Pressing <F2> in the dialogue window will
cause MIKE to enter the menu system, subsequently stopping any input
occuring in the dialogue window. However, during some menu driven
activities, such as forward chaining, the dialogue window may be used for
conveying information (from the MIKE tracer for example) to the user. Many
commands which were available in the older versions of MIKE may be typed
in the dialogue window, speeding up some procedures if you are familiar
with the MIKE command line. If you find that you use the MIKE dialogue a
lot, or if you are using MIKE tracing facilities you may find that the
dialogue window is too small, in this case you should increase to size by
choosing 'height of MIKE dialogue window' from the 'MIKE status and user
preferences' menu.

Several editting keys are used in the dialogue window, these are:

<cursor keys> move back and forth in current line
<insert>      toggle insert mode on/off
<enter>       enter command shown.
<F2>          enter menu system via main menu

The menu system
---------------

The menu system is entered by pressing <F2> or by typing menu from the
MIKE dialogue window. The menu system provides easy access to almost all
MIKE commands and settings. All windows generated by the menu system will
appear in the shaded window area between the status line and the dialogue
window so as not obscure either of these areas (if you have the height
of the MIKE dialogue window set to eight). Further details on using the
menu system are given below.

The status bar
--------------

This displays the version number of MIKE and a context sensitive list of
useful keys.

Introduction to using MIKE menus
--------------------------------

Menu options are available only via the menu menu (entered by pressing
<F2> from the MIKE dialogue window). In the majority of the MIKE menus
an option can be selected by moving to it with the vertical cursor keys,
and then hitting the <enter> key. The neccessary action will then be taken
before control is returned to the menu from which the option was selected.

Sometimes an option will be enclosed in curved brackets, in this case the
option cannot be selected and will automatically be skipped when scrolling
through the menu.

In menus with a large number of options, such as the file menu, there are
often too many options to fit in a window simultaniously, in this case
vetical arrows will be placed in the left hand margin of the menu
indicating that more options are available my moving (with the cursor
keys) beyond the last (or the first) option shown in the window.

Pressing <esc> while in menu causes the previous menu to be reinstated,
in the case of the main menu control will be returned to the MIKE dialogue
window.

In menus which are not dependant on the knowledge base loaded, such as the
main menu and the forward chaing menu, options will have one of their
letters shown in upper case, to denote the 'accelerator key' for that
option. It is possible to select such menu items simply by pressing the
relevant accelerator key (e.g. F for forward chaing). This is particularly
useful if you are using a slow 8086 or 8088 based machine, where scrolling
though a menu can become tedious for the experienced MIKE 2.50 user. Note
that you can even pre-empt a menu by pressing the required accelerator key
before the menu appears.

Toggle menus
------------

Generally only one option may be selected from a menu in one go, however,
a small number of menus (such as the tracing menu) allow several options
to be selected before leaving a menu. When an option is selected (using
<enter> a tick is placed next to it. If neccessary a tick can be toggled
off again using the enter key. When you are satisfied with the selections
shown in the menu <esc> should be pressed to accept the choices. Note the
difference in the use of <esc> in the two types of menu.

Edit boxes
----------

In some cases (e.g. when selecting the page length) a menu is not
sufficient as there are too many possible options. Therefore an edit box
 is used instead. The displays a question below which the user must enter
a suitable answer. Often a suggestion will be provided (usually the old
setting) which can be editted. Once the answer appears to be correct
<enter> should be pressed to remove the edit box.

Menu system key summary
-----------------------

          Standard menu           Toggle menu           Edit box

<cursors> move up and down menu   move up and down menu move l/r
<enter>   select option           select option         accept answer
<esc>     return to previous menu accept choices shown  accept answer

Using a mouse
-------------

If your PC has a mouse, and the relevant driver has been installed, MIKE
will force you to use the mouse instead of keys when selecting menu
options. A message informs you if a mouse is installed when you first
load MIKE. The relationship between the key presses discussed above and
the mouse actions are detailed below. Note that in scrolling menus, in
which there are too many options to fit in the window, further options
may be scrolled into view by clicking the move cursor block on one of the
arrows shown in the left margin of the menu. The mouse has no function in
the MIKE dialogue window or in the kowledge base editor.

<enter>   is equivalent to the left hand mouse button
<esc>     is equivalent to the right hand mouse button
<cursors> are replaced by movement of the mouse

Using the menu system
=====================

This section assumes that you are already familiar with basic MIKE
operation, andgoes on to deal with new menu options and menus which do
not exactly follow follow the general guidelines given above.

Using the proof tree viewer
---------------------------

When a working memory element is selected from the working memory list a
proof tree, is displayed (if applicable). It is importaqnt to note that
it is possible to move up and down to tree, and that selecting a node on
the tree will produce a new proof tree for the chosen node. This 'zoom'
feature is particularly useful when viewing trees in which some branches
have been truncated by the depth cut-off feature (see below). Note that
pressing <escape> while viewing a 'zoomed' node will take you back to the
previous proof tree. Zooming is possible to any depth (memory permitting).

Switching out to DOS and using the editor
-----------------------------------------

In common with other common PC applications, MIKE 2.50 provides a menu
option allowing the user to switch out to a DOS shell, and then resume
MIKE some time later by typing EXIT at the DOS prompt. This feature is
particularly useful if you wish to execute another program while using
MIKE, or if you need to manipulate some files. The ammount of memory
available when switching to DOS is about 500k, large enough for executing
most programs. In order to provide all this space MIKE has to save the
current RAM state to disk as a data file, it is therefore neccessary to
have around 550k free in the root directory of you currently selected disk
if you wish to switch to DOS. This limitation will make switching to DOS
unfeasible for most floppy disk users.

Another menu option, 'Edit-then-load knowledge base', also switches out
to DOS, but this time it automatically runs the supplied text editor
(E.COM). Switching out to the editor in this way only requires 128k of
free disk space to save the RAM state too, so should be viable on most
floppy-based PCs.

The 'status of options and user preferences' menu
-------------------------------------------------

This menu is used like a control panel to view and set various MIKE
options. Many of these options were available, via commands like
'strategy menu', in older versions of MIKE but in addition MIKE 2.50 also
contains some new facilities, these are detailed below.

Rete
----

This option allows RETE to be toggled on or off, RETE is discussed in more
detail in section 7 of MIKE2REF.DOC.
 
TMS
---

This option allows the truthg maintainance system (TMS) to be toggled on
or off, worked examples and a thoughrough discussion of the TMS can be
found in section 8 of MIKE2REF.DOC.

More facility
-------------

This is another togglable option, but unlike the previous two this has no
significant effect on MIKE processing, it is merely provided to make MIKE
easier to use. When swithched on it causes MIKE to prompt the user for a
keypress (by printing --More-- to the window) every time the MIKE dialogue
window becomes full of text. This prevents text from scrolling out of
sight too quickly. Note that pressing <Ctrl-C> at the prompt causes
processing of the current task to be be aborted.

Logging
-------

It is sometimes useful, when a knowledge base does not behave as expected,
to keep a log of user interactions and MIKE tracing for later detailed
analysed. The logging option allows you to switch such a log on or off.
The log is saved to a file called MIKELG.LOG, which is created in the
currently selected directory of your disk when logging is switched on and
can easily be printed out using the PRINT command provided by DOS. While
logging is on it is advisable to switch the more facility off, to stop the
log file being interspersed by '--More--' prompts.

Height of MIKE dialogue window
------------------------------

This option allows the height of the MIKE dialogue window to be changed,
in order to display as much or as little information as required. The
height is shown in characters, and can be be changed to an integer in the
range 3 to 22 (full screen).

Proof tree depth
----------------

This allows a depth cut-off to be specified, after which the proof tree
generator will not provide any working memory justifications. Proof tree
branches truncated by the depth cut-off will be shown with dots after
them indicating that there is more to see. If an unlimited depth is
selected, no branches will be truncated. 

Uncertainty paradigm and threshold
----------------------------------

These menu items are analogous to the certainty and threshold commands of
MIKE 2.03, these are discussed in section 10 of MIKE2REF.DOC.

Conflict resolution strategy
----------------------------

This dual-window chooser replaces the MIKE 'strategy menu' command. The
chooser is used in a different way to other MIKE menus, so a brief
description of it is provided here. When strategy options are selected
from the pool on the left they appear in the window on the right. This
window shows the order in which strategies were chosen, which is also
the order in which MIKE will use them. When an option is taken from the
pool it becomes unselectable (shown in curved brackets). When the list
on the right is acceptable <escape> should be pressed to accept it and
return to the status menu. If all of the strategies have been taken from
the pool you will automatically be returned to the status menu. The
messages provided in the status bar will give further help when
manipulating the strategy list.

Setting MIKE status, tracing and user preferences from a knowledge base
-----------------------------------------------------------------------

With certain knowledge bases, such as the tea example (EX2-3.PL), it is
useful to be able to change the tracing options, for example,
automatically on loading. Obviously it is not possible for a knowledge
base to select options from a menu when it loads, so a set of analogous
commands are provided instead.The commands are accessed using directives.
For example, to make a knowledge base automatically switch rete on while
loading, the following line would need to be added:

?- rete_off.

Most of these are left over from previous versions of MIKE, and hence
MIKE 2.50 is compatible with older knowledge bases which use such
directives. The commands available are listed below, for more details see
MIKEREF.DOC and MIKE2REF.DOC.

rete_on.	rete_off.	tms_on.		tms_off.
log_on.		log_off.	tracing(X).	strategy(X).
threshold(X).	strategy List.	

Using menus, edit boxes and windows in MIKE knowledge bases
-----------------------------------------------------------

The powerful windowing environment used by the MIKE menu system may also
be accessed from user-written knowledge bases using the query, announce
and ask_menu commands. These perform similar actions to their previous
implementations, but in MIKE v2.50 all user interaction takes place in
pop-up menus and edit boxes. The commands are use as follows:

announce <announcement_list>.
e.g. announce ['Welcome',nl,'to MIKE'].

The contents of the list is printed in a pop-up window above the MIKE
dialogue window. All processing then halts until the user presses <esc>
to remove the announcement. The atom nl may be passed in the string to
signify the start of a new line.

NB: It is sometimes useful, when writing user defined tracing
    routines, to be able to write directly to the MIKE dialogue
    window instead of to a window. This can be done using dannounce,
    the syntax for which is the same as that of announce.

ask_menu(<object>,<relation>,<option_list>,<question_list>).
e.g. ask_menu(Patient,exhibits_symptom,[sneezing,coughing,headache,spots],
       ['What symptoms does ',Patient,' exhibit?']).

ask_menu can be used on the right-hand side of a rule to produce a pop-up
menu in which the user is required to select which of the options apply
(by placing a tick next to each one using the <enter> key). When the user
is satisfied with the choices ticked in the menu the <enter> key should be
pressed. Ticked options will then be placed in working memory as a triple,
for example [john, exhibits_symptom, coughing], and processing will then
continue.

The question possed to the user is generated from the question list passed
as the fourth argument to ask_menu and is placed in the title bar of the
menu window. The question list should be composed in the same way as an
announcement list.

NB: Users of previous versions of MIKE (prior to 2.50) will remember that
    the old version of ask_menu had only three arguments, as announce was
    generally used to prompt the user with a question. If a three
    argument instance of ask_menu is found on the right-hand side of a
    rule a warning message will be printed in the MIKE dialogue window
    and a menu will be created with a dummy question as a title.

query <query_template> receives_answer <answer-template>.

e.g. query 'is it raining' receives_answer no.
     query the age of conrad receives_answer Age.
     query the name of applicatant is john receives_answer yes.

The syntax for this command is is exactly the same as that used in older
versions of MIKE, but the method of interaction has been changed to
maximise the potential of the new user interface. Important points to
note are:

     o If the command is of the form 'query X receives_answer no' or
       'query X receives_answer yes' a menu will be produced with 
       four menu options (yes, no and two special options: how and 
       why). Selecting 'why' produces the reason for the query (in
       the MIKE dialogue window), while selecting 'how' displays the
       working memory element list, from which it is possible to
       determine how an element came to be in working memory.
     o If the command is of the form 'query X receives_answer Y' an
       edit box will be displayed in which the user may type any
       answer. If 'how' or 'why' are entered in the box the effect
       will be the same as that described for the query menu above.
     o It not neccessary to type a full stop after a query entry in
       the edit box.

Summary of MIKE menu hierarchy, showing accelerator keys and default status
---------------------------------------------------------------------------

Forward chaining
    Fresh start: begin at cycle 0, reset working memory
        <edit box: Working memory element to trigger forward chaining>
    Begin at cycle 0, without reseting wm
    Continue from latest cycle number without reseting working memory
Load new knowledge base [currently: none]
    change Path
        <edit box: Enter required path>
    change file Type
        <edit box: File type>
    <list of files: click on one to load>
Edit-then-load knowledge base [alt-X to return]
    <edit box: KB to edit and then load?>
        <editting screen> {press F1 for help or Alt-X to return to MIKE}
Working memory display [0 elements]
    <list of working memory elements: click on one for proof tree...>
Browse frame hierarchy [0 frames]
    <indented list of frames: click on one for description>
Rule display [0 rules]
    <list of rules: click on one for description>
History display
    <history display> {no more than 45 cycles may be viewed at a time}
Tracing options {toggle menu, all option toggle on/off}
    show Conflict set
    show refractoriness
    show specificity
    show recency
    show new Working memory elements or frame changes
    show chosen Rule
    show backward chaining
    show outcome of backward chaining
    show single stepping
    show History on request
Status of options and user preferences {first four options toggle on/off}
    Rete: on
    Tms: off
    More facility: on
    Loggin: off
    Height of MIKE dialogue window: 8
        <edit box: Enter new height (3-22)>
    Depth of proof tree: 2
        Set proof depth
            <edit box: Enter new depth limit>
        Unlimited depth
    Uncertainty paradigm: standard
        Standard
        Fuzzy
        Bayesian
    uncertainty Threshold: 2.0000
        <edit box: Enter new uncertainty threshold (0.0 to 1.0)>
    Conflict resolution strategy: [rec,sp,lhs,cf,ref]
        <dual-window strategy chooser>
switch to DOS [type exit to return]
Quit MIKE
    Cancel
    OK

