Implementing a simulator for the gear assembly domain, described in Section 4.2, can be achieved quite simply. An interpreter for TWEAK-style specifications is needed, with a feature that includes feedback for different situations that occur such as those listed in Figure 4.6. Any given action table can then be fed in as data with specific initial conditions.· Such a program has been written in Prolog (Smith, 1 994b). The action table shown in Figure 4.5 was used as data, and part of the output from a test session (slightly modified and including diagrams for clarity) is presented in Figure 5 . 1 .
Note that computer prompts and responses are shown in plain font whereas user input is in bold. The numbers on the left are for reference and are not part of the dialogue.
D
Enter command : insert drive gear
D
2 Enter command : insert grommet
This isnot a legal operation 3 Enter command : insert sleeve
This is currently not possible 4 Enter command : why
Because sleeve is not available
5 Enter command : how
get sleeve
6 Enter command : get sleeve
D
7 Enter command : help
currently available actions are:
8 Enter command : insert sleeve
D
insert reduction gear from the edge insert sleeve
9 Enter command : insert reduction gear from the edge This is currently not possible
10 Enter command : why Because sleeve is in place
1 1 Enter command : how This cannot be achieved
Figure 5.2 gives a detailed summary of the different kinds of user action including erroneous ones, the cause of each error and the feedback given to the student. Most of these are easy to provide by examining the entries in Figure 4.5. Note that the user gets stuck at command 9 in the dialogue because there is no way that the reduction gear can be inserted once the sleeve and drive gear are in place. This is not a flaw in the program. The program describes the domain constraints and possibilities, not any particular task within the domain.
Command User action Source of problem System response
Number
1 carry out legal operation show result of carrying out
action
2 attempt to carry out non- operation is not in indicate illegal operation
existent command command list
3 attempt operation precondition(s) not satisfied indicate operation currently not
currently not possible possible
4 ask why operation precondition(s) not satisfied give precondition not currently
currently not possible satisfied
5 ask how operation can be precondition(s) not satisfied give operation making progress
made possible to precondition satisfaction
7 ask for all actions possible list all actions with
preconditions satisfied
1 1 ask how operation can be operation cannot be carried explain that operation cannot be made possible out from current position carried out
Figure 5.2 Analysis of gear assembly dialogue
5.2.2 The VCR domain
The gear assembly problem has been used to show how the Strips approach can be adapted to provide a simple tutor. It is not a domain, however, in which any useful teaching could take place. The question arises, can such methods be applied in practical domains? Mark ( 1 99 1 ) tests out people's ability to learn tasks by simulating the operation of a VCR. She demonstrates that people generally have difficulty in carrying out any but the simplest tasks for this device. Her statistical analysis supports a commonly held view that VCRs are difficult to master.
. Since many people are familiar with the VCR, if not its detailed operation, it seems an appropriate domain to test out models of representation. An initial attempt was
therefore made to simulate VCR operation using the TWEAK scheme. Unfortunately, the resultant system was unwieldy and opaque.
As noted in the previous chapter, by employing Tenenberg's approach of including static axioms, a much more succinct domain description can be achieved. This method was tried out in the VCR domain. The specific devices simulated were the Panasonic NV-F70 HQ video cassette recorder and Philips 20GR 1250 television. Most, but not all, of their relevant features have been included. The major omission is the timing facilities component. This consists of a more-or-less independent set of operations, and so, as previously noted, could be easily added to the current model.
The actions covered are: insert tape
press VCR button press stop
press ff
press record
press tv power button
press eject press play press pause press rewind select VCR channel N (N= l ..99) select tv channel N (N=0 .. 39) The essential predicates and their parameters are summarised in Figure 5.3.
predicate parameter parameter values
VCR s S=on, off
tape s S= playing, fast forwarding, rewinding, review playback,
cue playback, recording, playing double speed, stationary, out of VCR, paused play, paused record
VCR tuned s S=channel N {N=l ..99) tv tuned s S=channel N (N=0 .. 39)
tv s S=on, off
tape tab s S=present, absent
In addition, it is convenient to include two inessential predicates: 'tape in VCR' and 'tape activated'. The static axioms are shown below:
tv(on) tv(off) VCR( on) VCR( off) tape (S) tape (S) -7 -tv(off) -7 -tv(on) -7 -VCR(off) -7 -VCR(on) -7 tape activated -7 -tape (T)
tape tab(present) -7 -tape tab(absent) tape tab(absent) -7 -tape tab(present) -tape( out of VCR) -7 tape in VCR
(S;t:stationary, S;t:out of VCR) (S;t:T)
The action table for the complete simulation is shown in Figure 5 .4. Note that for channel selection, a variable N denoting the channel number is used. This produces what Tenenberg ( 1 99 1 , p229) calls an operator schema. Such schemata have to be grounded by instantiating variables before they can be applied.
A program has been written (Smith, 1 994c) that can interpret any Tenenberg domain specification and simulation activities within the domain, giving the kind of feedback described in Figure 4.6. Output from a program for VCR simulation is given in Figure 5.5.