This directory contains the source code for the machine learning version
of the walking robot simulation.  This version shows the robot walking around
inside a maze and it has 2 operating modes:  In the first, the robot explores
the maze trying to find the longest path in it.  In the second operating mode,
we can play a path found during the discovery mode.

The display of the simulation is composed of 2 windows.   The larger one
shows the floor, the maze and the robot.   The second displays the scene seen
by the robot from the view point of a head mounted camera located on the robot's
forehead (the red sphere on the robots forehead).

The maze is contained in an ascii file and different maze configurations
can be loaded in to generate different simulations.

This simulation was written in 'C' and makes use of the Silicon Graphics(SGI)
Graphics Library, and therefore will only run in a SGI machine.


Here is some information about the simulation.

1. Files

     C code: insectm.c, insectdraw.h
     Header: insectm.h
     Log file: insect.log
     Recorded file: insect.rec, contains the sequence of turns found by the
                    learning algorithm during the discovery phase. It is an
                    ascii file.
     Maze file: maze.dat

2. Compile by typing: make

3. Run by typing:
    
    In the discovery mode: insectm maze.dat.   You can also type:
                           insectm maze.dat record, to record a sequence of moves
                           while in this phase.  This will erase a previous .rec file.
                               
    In the play mode: insectm maze.dat play

4. Control the program by typing the following keys:

     Type       Function

      G       Starts the robot going forward
      S       Stops the simulation
      C       Resets the robot to its original position
      Q       Quits the program


