\documentclass{article}

\begin{document}

\section*{Computer Exercises: Reentry using Cellular Automata}

\subsection*{Description of the menu}
This nested list describes all menus and subwindows available within the
program. The root list (circles) includes all the options found in the
main menu.

\begin{itemize}

\item {\bf run}: This submenu provides job control for the cellular
automata (CA) simulation. Click on it and you'll see two items.

   \begin{itemize}

   \item {\bf start}: Start or restart the simulation. The protocol will
   be repeated, using the current state of the lattice as initial
   condition. If you want to save the initial state, type

   \begin{quote} 
     {\tt etat\_init= etat;} 
   \end{quote} 
   at the {\tt Matlab} prompt. You can then reinitialize the state by
   typing
   \begin{quote}
      {\tt etat=etat\_init;}
   \end{quote}

   \item {\bf continue}: Simulation will continue from the point where
   it has been interrupted. You may have stopped the simulation to
   change something, and simply want to continue from there

   \end{itemize}

\item {\bf stop}: Interrupt the simulation to end or change something.

\item {\bf stepping}: This submenu provides two methods for carrying out
the iteration of the cellular automaton. Click on it and you'll see two
items.

   \begin{itemize}

   \item {\bf step}: One time step is executed each time you click the
   mouse on the lattice.

   \item {\bf flow}:  Execute the full protocol (default).

   \end{itemize}

\item {\bf define}: This submenu allows you to {\em initialize} the
cellular automata simulation. Click on it and you'll see five items.

   \begin{itemize}

   \item {\bf load}: Load a previous initialization that was saved using
   the {\tt save} main menu option. Select it and you'll get a file
   browser with which to load your initialization file.

   \item {\bf state space}: Define the number of excited and refractory
   states in the model. There is always one rest state. Select this
   entry and you'll get a small window where you may define the numbers
   of states in each category, namely

      \begin{itemize}

      \item {\bf excited}: The states during which a cell can excite
      its neighbors (default:2)

      \item {\bf refractory}: The states during which the cell is
      totally or partially refractory (see also {\tt threshold})
      (default:3).

     \end{itemize}

   \item {\bf lattice:} Set the size of the cellular automata
   lattice. Select it and you'll get a small window where you may define
   the number of columns ({\tt horizontal}) and rows ({\tt vertical})
   for the cellular automata lattice.

   \item {\bf neighborhood:} Set the neighborhood of a typical cellular
   automata cell. Select it and you'll get a small window with a center
   cell marked by an ``X''. Click on neighboring cells to toggle their
   activation as ``connected'' neighbors whose value is taken into
   consideration to determine activation of the center cell {\bf X}. A
   cell that is part of the neighborhood is marked with an {\bf
   O}. Click {\bf OK} when done.

      \begin{itemize}

      \item {\bf weight}: A weight can be given to each individual cell
      chosen to be part of the neighborhood (default is 1 for all
      cells). This weight fixes the contribution of each cell of the
      neighborhood to the excitation of the center cell (see also {\bf
      threshold}). Click the item weight.  A window appears giving the
      weights. They can be changed by typing the new values at the
      appropriate locations. Click {\bf OK} when done.

      \item {\bf ok}: Click {\bf OK} when both the neighborhood has been
      defined and the weights have been allocated.

      \end{itemize}

   \item {\bf threshold}: Define the weighted sum of excited neighbors
   required to cause the transition from a given state to the excited
   state. Select it and you will get a small window with all possible
   states listed (one per line). For each one, you may define the
   threshold needed to excite that state, i.e. cause a transition to
   first excited state. A threshold of zero {\bf 0} indicates that this
   cell cannot be activated (absolutely refractory, threshold is
   infinite).

\end{itemize}

\item {\bf state}: This menu option allows you to set the state of cells
within the lattice. Click on it and you will see two items.

   \begin{itemize}

   \item {\bf reset}: Resets all cells within the lattice to the rest
   state.

   \item {\bf modify}: Set the state of specific cells by hand. Select
   this option and a window will appear containing a representation of
   the cellular automata lattice. After selecting a value for the state
   to be assigned in the lower bar (do not be concerned that the cursor
   does not move, but do hit return after entering a number), click on a
   cell location to assign that value to the selected cell. The cell
   color will change to reflect its state. The integer state values are
   assigned as follows: 
 
      \begin{description} 

      \item rest=0 (black), 

      \item excite:1 to number of excited states, 

      \item refractory: number of excited+1 to the total number of
      states.  

      \end{description} 

    To see the correspondence between states and color, see the item
    {\bf colormap})

\end{itemize}

\item {\bf protocol}: This menu option allows you to define a series of
protocols of specified duration to be executed consecutively and making
up the whole of the cellular automata simulation. We now define the
contents of each protocol before explaining how a simulation is
effectively carried out by the program. Click on {\bf protocol} and you
will see two items.

   \begin{itemize}

   \item {\bf nb of stages}: Number of protocol to be defined. Select
   this and a small window will appear allowing you to define the number
   of protocols making up the whole simulation (default: 1). Click {\bf
   OK} when you're done.

   \item {\bf set}: Define the properties of each protocol. Select this
   and a small window will appear allowing you to choose which protocol
   to define. Click on the protocol number and another larger window
   will appear where you may define the properties of the protocol. For
   each stage of the protocol, the properties to be defined (one per
   line) are as follows:

     \begin{itemize}

     \item {\bf nb steps}: Number of time steps in the protocol. This is
     the total duration of this specific protocol. For example, if you
     define two protocols each having this entry set to 100 steps, then
     the total simulation will last 200 steps, with the first 100 steps
     proceeding according to the definition of protocol 1, and the last
     100 steps proceeding according to the definition of protocol 2. The
     state after protocol 1 is passed unchanged as an initial condition
     to protocol 2.

     \item {\bf period stim}: Period of stimulation in time steps. If
     non-zero, this value specifies the period of stimulation for
     stimuli applied during the protocol. The first stimulus is always
     applied at of the onset of the protocol, and each stimulation last
     one time step. The cells to be stimulated are selected using the
     {\bf cells stimulated} item within the same window (see below).

     \item {\bf amp. stim}: Amplitude of the stimulation, if any. For
     the cells selected for stimulation, this number is used as the
     stimulus amplitude, expressed as the number of excited cells within
     the neighborhood of that cell. Hence this number must exceed the
     threshold value for that cell in its current state in order for it
     to get excited.

     \item {\bf cells stimulated}: Select cells to be excited by the
     periodic stimulation. You cannot set the number that appears
     here. It is set automatically for you after you interactively
     select the stimulated cells by clicking the {\bf stimul}
     button. Clicking this button brings a window representing the
     cellular automata lattice. Clicking on cells within this lattice
     toggles them for stimulation (black=stimulation, white=no
     stimulation). Click {\bf OK} when done.

     \item {\bf cells disconnected}: Select cells to be disconnected
     from their neighbors. You cannot set the number that appears
     here. It is set automatically for you after you interactively
     select the disconnected cells by clicking the {\tt discon}
     button. Clicking this button brings a window representing the
     cellular automata lattice. Clicking on cells within this lattice
     toggles them for ``disconnection'' (black=disconnected, white=
     connected). Click {\bf OK} when done. Effectively, disconnecting a
     cell makes it a barrier against propagation since it cannot excited
     its neighbors or be excited by then. Click {\bf OK} when done.

     \end{itemize}

  \item {\em Note:} As stated earlier, a simulation is made up of a
  number of specific protocols executed in turn. To generate a single
  periodic stimulation sequence,a single protocol will be needed, but
  for more complex stimulation patterns, you'll need to adjust the
  number of protocols and their individual properties.

  \end{itemize}

\item {\bf save}: This menu option saves the initialization of the
cellular automata into a file that can be later recalled using {\tt
load}. Click on this option and you'll get a file browser. Type a name
for the file where information will be stored. {\it The character ``.''
must not appear in the name}. Click on {\bf done}, and a beep will sound
when the save operation has been completed.

\item {\bf colormap}: Click on this option and a window appears, showing
the colors associated to the states of the automaton. The window can be
removed by clicking the item delete in this window. If you change the
number of states, you must click again the item colormap to see the new
color allocation

\end{itemize}

\end{document} 