Overriding human control

In the last section, it needed a human, to select the files to be read and placed into the "input" field. It needed a human to click upon the "do" button to initiate subsequent activities.

Although we are unlikely to want to do away with human control for the initial start to the cell's activity, it would be extremely cumbersome to have to have a human standing around all the time to activate instructions coming into a cell from outside sources.

So, what we are going to do now is to make arrangements for documents and objects to be able to override human intervention and do everything themselves.

You might feel justifiably alarmed at this proposal. Allowing documents to cut humans out of the control loop and take charge themselves is somewhat dangerous - it could be the thin end of the wedge - but, it has its advantages (if documents are going to end up ruling the Internet in the long term anyway, why stop them now?).

To facilitate document and object control we have to install an agent inside the cell with whom documents and objects can communicate with directly . This agent must be able to do the work of a human in arranging for specified documents outside of the cell to be read and their contents acted upon by the cell engine.

This is simply arranged by installing an object in RAM at start up, which will be able to read outside documents and transmit the code to the engine upon receiving an appropriate message with suitable parameters.

In Director, we can arrange for this in the portal document by birthing the object from a startMovie script and using a suitable parent script placed into the scriptText area of a cast member.

Figure 2.7 shows such a startMovie handler which is activated by an automatic startMovie message when the portal document is opened.

 

Figure 2.7

StartMovie handler which births a human override object when the portal document is opened

 

The startMovie handler first creates a global variable named humanOverRide then births an object into it using the "humanOverRide" parent script (cast member 18 in figure 2.7)

This parent script is shown in figure 2.8.

Figure 2.8

Parent script used for creating the humanOverRide object.

 

The humanOverRide parent script contains a handler which responds to the message doInstructions. When this message is sent to the humanOverRide object it is sent with parameters, which specify the name of the document to be used (fileName), its address (folder) and the parsing word which must be used to select the right portion of the text to be used (parseWord).

If you compare the instruction lines of this doInstructions handler with those of the mouseUp handler (used by humans) shown in fig 2.3 , you will see that they are very similar except that instead of the chosen text being out into the "Input" field it is put into a variable (theText).

The text is then parsed to extract any embedded scripts, using similar code as the "do" button. Then the contents of the variable theText is acted upon directly by the do command sending the instruction directly to the cell engine without it having to go via the "input" field.

We can check out how this works by sending ourselves an email which, when the text is acted upon by the cell, will send a doInstructions message to the humanOverRide object.

 

Figure 2.9

An email which will send a message to the humanOverRide object telling it to do the instructions contained in a text document named "Eqxz0002.txt"

 

When the human user selects this email to be read by the cell the single line shown in figure 2.10 will be placed into the "Input" field.

Clicking on the "do" button, with this line in the "Input" field, will take the human out of the control loop and put the documents in charge.

Figure 2.10

The instruction which will cut out the human control and put the documents in charge of subsequent cell activity.

 

Thinking time again

 

This extremely simple one line message can take control of the biotelemorphic cell out of the hands of the human user and give it to the documents.

Before reading the next section to see how this can happen, spend a little time to think it out for yourself.

Remember, at this early stage in the book, we are only importing text from files in a single folder on the hard disk. In later chapters we shall be altering the cell to be able to use an Internet protocol engine. This will allow the cell to be able to import text from anywhere on the system, from floppy disks, from CD-ROMs and from the Web. When this happens, giving over control to the documents, will mean the biotelemorphic cell is controllable by a vast intelligence made up from the combined input of thousands of documents all over the Web.

Unbelievable? Before seeing this one line command such a possibility may have seemed like science fiction. After reading the next section you will see how it is possible.

See if you can work it out for yourself though - before reading on.

 

 

 

copyright 1997 Peter Small - No part of this document can be used or reproduced in any form without express permission

Details of book, CD-ROM and online continuation - peter@genps.demon.co.uk