To compile the rec system you need to have the following setup:

A root directory named "hal".
the two sub directories of hal are "classes" and "source".

put the source tree into the "source" directory.  you should now have something like ~/hal/source/rec/....(lots of dirs)...

You need to set the environment variable HAL_DIR to be your hal directory:
setenv HAL_DIR /home/cd/moltmans/hal

You also need to set the classpath to include (in this order):
setenv CLASSPATH .:${HAL_DIR}/classes:${HAL_DIR}/source:/home/hci/metaglue/playground

if you are not on the ai lab system you can add the javax apis to the
classpath including the javax speech api.

Next you need to rename the file:
HAL_DIR/rec/mod/sample_system_properties.mod to system_properties.mod
and change its contents for your system.  If you aren't using the
annotation modules (aka ASSISTANCE) you can just change the speech
property to be off (there aren't any real speech capabilities in
ASSIST just yet--maybe you are reading this because you want to write
them).  

If you do want the speech stuff then sound dir needs to point to a
directory that contains: room_ack.wav and room_sound2.wav and
sound-player should be a sound program that takes a command line
argument which is a wav file and plays it asap.  I'm sure there are a
gazillion things that you will need to know for this to work, but I'm
not sure what they will be... sorry.  you do need viavoice though and
its dlls need to be in your dos PATH.

To run the simulations via Working Model 2D you need to install it (no
duh) and you need to install the neva coroutine package.  which is
available at http://www.nevaobject.com/java/javadde/jddemain.htm.  its
dll needs to be in the class path too.  this is the guy that talks to
working model from java.  There are some values in
rec/mod/system_properties that need to change as well.  It should be
obvious which ones need to change.  To find the WM-window-title run working model and see what the window's title is.

To compile the system set the environment vars as listed above, cd to
~/hal/source/rec and do a "make world" make world deletes all existing
.class files and builds them again in "batch" mode.  you can also just
do a standard "make" or "make all" but this will call javac once for
each source file, which may take a long time.  The last option is to
call make from a sub directory and it will just make that part of the
tree.  Also if you add/remove files from a directory you need to run
"make filelist" to update the file called "files" which lives in each
directory and says which .java and .gram files to compile.

to extend the system add packages under rec and run the script
newMakefile and it will generate the makefile for you.

good luck...  Mike "5 minute documentation" Oltmans.
moltmans@ai.mit.edu

This is all for the old school rec system.  I don't think any of this
has actually made sense for the last year.  mike oltmans

======================================================================



  Note:  We are assuming person is using xerxes, the tablet, etc.  The 
  person using the 'draw' account.



Running the system:
------------------

A) Just the sketching system

   * Setting the classpaths:
           (should be done automatically)

   Make sure that the Java CLASSPATH goes to ~draw/hal/classes/
   Also make sure that the classpath goes to ~draw/hal/source/, before
   the classes clause

   And finally make sure the classpath goes to /home/hci/metaglue/playground


   * Running the program:

   java rec.ui.RecSystem <.ini file>

	Currently there is simple.ini, big.ini, fsm.ini, and house.ini. 

	big.ini is everything thrown together, an experiment with 
	multiple concurrent contexts.



B) The sketching and the voice program

   * Setting the classpaths:

   Same as for (A), above.

   * Run a catalog

   java metaglue.MetaglueAgent -catalog

	This is a registry all the agents use to find eachother.  Run
	in its own window and then just forget about it.

	Usually 'catalog' works as an alias for this.  On xerxes, this
	alias is storied in C:\Dos (as is mg and mgat).

   * Running the program

   java metaglue.MetaglueAgent draw xerxes rec.demo.Start

	The draw is the "society" of the agents, which controls default
	behaviours, which variables are loaded, etc.

	The xerxes line is the Center, namely what computer holds the
	catalog which should be used.

	Usually this can be abbreviated as 'mg rec.demo.Start'

   * Starting a particular program

   Wake up the computer by saying "Computer"

	It should twitter at your

   Say either, "I want to sketch finite state machines," or "I want to 
   "sketch floor plans" (or some similar variant.)

	If it heard you say something it will beep

   You can say "stay awake" to make the computer stay awake so you do not
   have to say "Computer" all the time.


C) Specific sketching and voice systems

   * Set rec.agent.Sketch's "start file" attribute for the draw society

	Eg: "fsm.ini" for the fsm recognizers

   * Run the program

	mg demo.group-fsm

   * Everything should be started up


Easy Modifications of the System:
--------------------------------

A) Adding a possible utterance variant to the system

   * Find proper .gram file

	Either in hal/source/rec/house/speech, or hal/source/rec/fsm/speech
	or in hal/source/rec/agent

   * Modify it appropriately

        Fairly straightforward, '|' is "or".

   * 'Make' to commit the changes

        Type "make" in the directory with the changed files.
   

B) Modifying attributes (such as whether to load up full screen)

   * Go to http://hcipc.ai.mit.edu/perl/metaglue

	Password is foo, user name is hal

   * Select the draw society
 
   * Make any changes desired.  

	DEFAULT society lists all possible attributes which can be
	changed


C) Modifying which speech agents (and other agents) get loaded

   * Go to /hal/source/demo/

   * Look for .pro files (such as Group-fsm.pro)

   * change which agents are loaded by modifying this file
   
	'#' at the beginning of the line denotes a comment




Troubleshooting:
---------------



A) Testing just the Speech

	* Run mg speech.tools.Test

		Watch output carefully

		If not obvious, ask intelligent room people.

	* Say "help"

		See if voice out and in works properly.
