<!DOCTYPE Book PUBLIC "-//GNOME//DTD DocBook PNG Variant V1.0//EN" [] >

<Book id="index">
 <title>gLife</title>
 <bookinfo>

  <authorgroup>
   <author>
    <firstname>Telsa</firstname>
    <surname>Gwynne</surname>
   </author>
   <author>
    <firstname>Ali</firstname>
    <surname>Abdin</surname>
   </author>
  </authorgroup>

  <copyright>
   <year>2000</year>
   <holder>Telsa Gwynne</holder>
  </copyright>
  <copyright>
   <year>2000</year>
   <holder>Ali Abdin</holder>
  </copyright>

  <releaseinfo>documentation in progress</releaseinfo>

  <legalnotice>
   <para>
     Permission is granted to copy, distribute and/or modify this
     document under the terms of the <citetitle>GNU Free Documentation
     License</citetitle>, Version 1.1 or any later version published
     by the Free Software Foundation with no Invariant Sections, no
     Front-Cover Texts, and no Back-Cover Texts. You may obtain a copy
     of the <citetitle>GNU Free Documentation License</citetitle> from
     the Free Software Foundation by visiting <ulink type="http"
     url="http://www.fsf.org">their Web site</ulink> or by writing to:
     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
     Boston, MA 02111-1307, USA.
   </para>
   <para>
     Many of the names used by companies to distinguish their products and
     services are claimed as trademarks. Where those names appear in any
     GNOME documentation, and those trademarks are made aware to the members
     of the GNOME Documentation Project, the names have been printed in caps
     or initial caps.
   </para>
  </legalnotice>

 </bookinfo>

 <toc></toc>
  
 <chapter id="glife-intro">
  <title>gLife</title>
    
  <sect1 id="intro">
   <title>Introduction</title>
   <para>
     <application>gLife</application> is an artificial life implementation 
     using GNOME as its front-end. It uses some principles of cellular
     automata. It's similar in appearance to Conway's "Game of Life"
     but uses very different rules. Eventually it should demonstrate
     growth of little societies.
   </para>
   <para>
     What this means for those not into <acronym>AI</acronym> is that 
     <application>gLife</application> draws a grid, populates it with 
     animals represented by blobs of different colours, and then updates 
     the grid. You can watch the animals grow in numbers, group together, 
     move away, reproduce, and eventually die (aww).
   </para>
   <para>
     You can configure much of the appearance of gLife to your own
     preferences, although the rules for how the animals behave remain
     the same.
   </para>
   <para>
     <application>gLife</application> is a work in progress, as is this
     guide to it. The documentation may lag. This documentation was last
     updated to describe gLife version 0.2.
   </para>
   <para>
     Start glife by typing <command>glife</command> at the command line,
     or by selecting
     <menuchoice>
      <guimenu>Programs</guimenu>
      <guisubmenu>Games</guisubmenu>
      <guimenuitem>gLife</guimenuitem>
     </menuchoice>.
   </para>
  </sect1>

  <sect1 id="appearance">
   <title>The main screen</title>
   <para>
     <application>gLife</application> begins with a <interface>window
     </interface> displaying a 25x25 grid on the left. On the right
     a window with a selection of buttons beneath it:
     <guibutton>Continue</guibutton>, <guibutton>Pause</guibutton>, 
     <guibutton>Terrain info</guibutton> and <guibutton>Animal
     info</guibutton>. Two <guilabel>Co-ordinate boxes</guilabel> complete
     the choice. A standard <guilabel>menubar</guilabel> is at the top
     of the <application>gLife</application> window. 
   </para>

   <para>
     To begin a simulation, open the <guimenu>File menu</guimenu> and
     select <guimenuitem>Start simulation</guimenuitem>. The
     <guibutton>Pause</guibutton> button will become available from the
     main screen, and the simulation will begin. You can watch your
     animals growing and moving in the varied terrain of the main grid 
     and watch the summaries for each turn in the <interface>window
     </interface> to the right. 
   </para>

   <para>
     The simulation will end naturally, unless you have made your
     animals immortal, but you can halt it yourself if you want.
     To end a simulation, open the <guimenu>File menu</guimenu> and 
     select <guimenuitem>End simulation</guimenuitem>. The animals
     must stop moving before you can end the turn. This means it will
     be harder to end a simulation with really fast timeouts.
   </para>
  </sect1>

  <sect1 id="glife-menus">
   <title>gLife's options</title>
   <para>
     <application>gLife</application> has three main menus, explained
     below:
   </para>

   <sect2 id="glife-file-menu">
    <title>The file menu</title>
    <para>
      Parts of this menu are only accessible at different times.
    </para>
     
    <variablelist>
     <varlistentry>
      <term>Start simulation</term>
      <listitem>
       <para>
         Starts a new simulation. The only menu option which is accessible
         initially. It is only accessible when no simulation is running:
         either actively, or paused.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Restart simulation</term>
      <listitem>
       <para>
         Restarts the simulation from turn one again, using the same
         animals and terrain. It is only available when a simulation
         is running but has been paused.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>End simulation</term>
      <listitem>
       <para>
         Ends the simulation and clears the grid.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Exit</term>
      <listitem>
       <para>
         What it says. Exits <application>gLife</application> and closes 
         the window. This option is always available.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </sect2>

   <sect2 id="glife-set-menu">
    <title>The settings menu</title>

    <para>
      There is only one option available on the <guimenu>Settings 
      Menu</guimenu>: that of <guimenuitem>Preferences</guimenuitem>.
      See the section about <link linkend="glife-preferences">things to
      fiddle with</link> for details.
    </para>
   </sect2>

   <sect2 id="glife-help-menu">
    <title>The help menu</title>

    <para>
      There are two options on the <guimenu>Help Menu</guimenu>:
    </para>

    <variablelist>

     <varlistentry>
      <term>gLife Documentation</term>
     <listitem>
       <para>
         This option is what brought you to this guide to <application>
         gLife</application>. Well, probably.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>About</term>
      <listitem>
      <para>
         This option brings up a <guilabel>dialogue box</guilabel>
         with information about <application>gLife</application>: its 
         author, copyright details, version number, and 
         <ulink type="http"
         url="http://glife.sourceforge.net">website</ulink> location.
      </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </sect2>
  </sect1>

  <sect1 id="glife-coord-info">
   <title>Getting more information</title>

   <para>
     If at any stage you want more information on a particular animal
     or piece of terrain, you can get it. Click the 
     <guibutton>Pause</guibutton> button on the main screen and fill
     in the co-ordinates of the location you are interested in. Selecting
     <guibutton>Terrain info</guibutton> or <guibutton>Animal Info</guibutton>
     will then give you more details: the amount of food available there,
     whether an animal is present, the age of the animal and so on.
   </para>
  </sect1>

  <sect1 id="glife-preferences">
   <title>Things to fiddle with</title>
   <para>
     The <guimenuitem>preferences</guimenuitem> menu item from
     the <guimenu>Settings Menu</guimenu> produces a new window
     containing three sections. The contents of these can be
     customised to your choice.
   </para>

   <sect2 id="glife-gen-prefs">
    <title>General preferences</title>
    <para>Two options, currently:</para>

    <variablelist>
     <varlistentry>
      <term>Initial number of animals</term>
      <listitem>
       <para>
         You can increase or decrease the number of animals you start
         with here. You can either focus your mouse pointer in the box
         and type in the number you want, or you can use the <guibutton>
         arrow-shaped buttons</guibutton> to alter the number. The
         default is 150 animals. The range is from 2 animals to 625.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Milliseconds per update</term>
      <listitem>
       <para>
         <application>gLife</application> updates at regular intervals.
         By default, the interval is 1.5 seconds. You can type in a
         new number when the mouse pointer is focused in the box, or
         use the <guibutton>arrow-shaped buttons</guibutton> to alter
         it. The range is from 100ms to 9999ms (one tenth of a second
         to just under ten seconds). Be warned that very fast updates
         will require a lot of CPU to redraw the screen so fast and make
         it difficult to end the simulation. 
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </sect2>

   <sect2 id="glife-display-prefs">
    <title>Display preferences</title>
    <para>
      For setting your favourite colours and other display options.
    </para>

    <variablelist>
     <varlistentry>
      <term>Colour animals by sex</term>
      <listitem>
       <para>
         As it suggests, <guibutton>colour animals by sex</guibutton>
         controls whether animals are coloured by sex or not. The default 
         is that they are.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Male animal colour</term>
      <listitem>
       <para>
         Clicking on <guilabel>male animal colour</guilabel> brings up
         the <application>GNOME colour selector</application> for you
         to change the colour of the little boy animals. They begin as
         blue and slightly transparent.
       </para>
      </listitem>
     </varlistentry>
 
     <varlistentry>
      <term>Female animal colour</term>
       <listitem>
        <para>   
          Clicking on <guilabel>female animal colour</guilabel> brings up
          the <application>GNOME colour selector</application> for you
          to change the colour of the little girl animals. They begin
          as red and slightly transparent.
        </para>
       </listitem>
     </varlistentry>
  
     <varlistentry>
      <term>Terrain colour</term>
      <listitem>
       <para>   
         Clicking on <guilabel>terrain colour</guilabel> brings up
         the <application>GNOME colour selector</application> for you
         to change the colour of the terrain. Terrain begins as opaque yellow;
         and the larger the area of a square on the grid which is coloured,
         the more food is available there. 
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Enable grid display</term>
      <listitem>
       <para>
         Clicking on <guibutton>enable grid display</guibutton> toggles
         whether the lines of the grid are drawn or not. The default is
         is that they are drawn. Disabling this speeds up the redrawing
         of the display slightly. 
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Enable terrain display</term>
      <listitem>
       <para>
         Clicking on <guibutton>enable terrain display</guibutton> toggles
         whether or not the terrain is drawn in. The default is to draw it.
         Disabling this speeds up the redrawing of the display greatly.
       </para>
      </listitem>
     </varlistentry>


     <varlistentry>
      <term>Enable animals display</term>
      <listitem>
       <para>
         Clicking on <guibutton>enable animals display</guibutton> toggles
         whether or not the animals themselves are drawn. The default, not
         surprisingly, is that animals are drawn. Disabling it moderately
         speeds up redrawing of the display -- but of course you don't
         see the animals then...
       </para>
      </listitem>
     </varlistentry>

    </variablelist>
   </sect2>
   
   <sect2 id="glife-age-prefs">
    <title>Age preferences</title>

    <para>
      You can give your animals an upper age limit or range. When they 
      reach that stage they will die. (Aww!). Their default age range
      is between 75-100 but can be set to any range between 50 and 115. 
      If you want your animals to be immortal, you can unselect 
      <guibutton>enforce age limits</guibutton> by clicking on it.
    </para>
   </sect2>

   <sect2 id="glife-repro-prefs">
    <title>Reproduction preferences</title>

    <variablelist>
     <varlistentry>
      <term>Allow reproduction</term>
      <listitem>
       <para>
         The <guibutton>allow reproduction</guibutton> checkbox must
         be on for the settings underneath to have any effect. It is
         enabled by default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Minimum reproduction age</term>
      <listitem>
       <para>
         The <guilabel>minimum reproduction age</guilabel> box allows
         you to decide how old animals must be to reproduce. The default
         is eighteen and the range is from one to thirty-five.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Minimum food needed for reproduction</term>
      <listitem>
       <para>
         The <guilabel>minimum food for reproduction</guilabel> box allows
         you to decide how much food is necessary for reproduction.
         The default is 25 and the range is from zero to 250.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term>Percentage of food to give children</term>
      <listitem>
       <para>
         The <guilabel>percentage of food to give children</guilabel>
         box determines how much of the animal's food it will give to its 
         offspring. The default is 50% and the range is from zero to 99%.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </sect2>
  </sect1>

  <sect1 id="glife-attributes">
   <title>Terrain and animal attributes</title>
   <para>
     gLife generates terrain and animals with initial attributes, which
     are listed below.
   </para>

   <sect2 id="glife-terrain-gen">
    <title>Terrain generation</title>
    <para>
      For generating the terrain:
    </para>
    <itemizedlist>
     <listitem>
      <para>
        A maximum amount of food found on each section of terrain is set. 
        This maximum is currently <parameter>250</parameter>. The food 
        found there at the start is a random amount between 1 and 250.
      </para>
     </listitem>
     <listitem>
      <para>
        The rate that food can regenerate on the terrain is set. The maximum
        rate would be 5 units a turn.
      </para>
     </listitem>
    </itemizedlist>
   </sect2>

   <sect2 id="glife-animal-gen">
    <title>Animal generation</title>
    <para>
      When creating new animals, a new animal has a variety of 
      characteristics which are currently:
    </para>
    <variablelist>
     <varlistentry>
      <term>Sex</term>
      <listitem>
       <para>
         <varname>Sex</varname> is either male or female: a simple 50:50 chance.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term>Age</term>
      <listitem>
       <para>
         A new animal starts as 1.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term>Vision</term>
      <listitem>
       <para>
         <varname>Vision</varname> is generated but not yet used. 
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term>Food issues</term>
      <listitem>
       <para>
         The animal has two food characteristics: its 
         <varname>metafood</varname> value (its metabolism) and its food 
         storage: <varname>foodstore</varname>. These are not yet used.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term>Speed</term>
      <listitem>
       <para>
         The animal's <varname>speed</varname> is generated, and determines
         how many units of space it can move in a turn.
       </para>
      </listitem>
     </varlistentry>
     <varlistentry>
      <term>Positioning</term>
      <listitem>
       <para>
         The animal's position on the grid is generated as a X co-ordinate
         and a Y co-ordinate, and it starts there.
       </para>
      </listitem>
     </varlistentry>
    </variablelist>
   </sect2>
  </sect1>

  <sect1 id="glife-rules">
   <title>Animal rules</title>
   <para>
     gLife is under active development. The following are the rules
     planned and whether they are implemented yet or not:
   </para>

   <sect2 id="glife-rules-terrain">
    <title>Terrain</title>
    <orderedlist>
     <listitem>
      <para>
        The terrain should regenerate food each turn. Status: not yet done.
      </para>
     </listitem>
    </orderedlist>
   </sect2> 

   <sect2 id="glife-rules-age">
    <title>Age</title>
    <orderedlist>
     <listitem>
      <para>
        If older than the maximum age permitted, then die. Status: done.
      </para>
     </listitem>
    </orderedlist>
   </sect2>

   <sect2 id="glife-rules-move">
    <title>Movement</title>
    <orderedlist>
     <listitem>
      <para>
        Look around you for a spot that is on the grid and not another
        animal's territory. Move to that spot. Status: done.
      </para>
     </listitem>
     <listitem>
      <para>
        Use of <varname>vision</varname>: vision will allow an animal to 
        see <parameter>&lt;vision&gt</parameter> units around it. This 
        will be used to identify terrain with a lot of food and to spot 
        predators. Status: not yet implemented.
      </para>
     </listitem>
     <listitem>
      <para>
        Use of <varname>speed</varname>: some animals will be able to move
        further per turn than other animals. Each animal will be able to
        move <parameter>&lt;speed&gt;</parameter> units per turn. Status: 
        (hot from the press at last revising of this manual!) done.
      </para>
     </listitem>
    </orderedlist>
   </sect2>

   <sect2 id="glife-rules-repro">
    <title>Reproduction</title>
    <orderedlist>
     <listitem>
      <para> 
        Reproduction: if you are old enough and have enough food, then look 
        around for a member of the opposite sex which is also old enough 
        and has enough food. If there is an empty space around you both, 
        then reproduce. If any of these conditions are not met, then don't. 
        Status: Done.
      </para>
     </listitem>
     <listitem>
      <para>
        An animal can reproduce multiple times if the above conditions
        are met (for each animal surrounding it). If there are four females
        surrounding one male, the male will check the conditions and, if
        possible, mate.
      </para>
     </listitem>
     <listitem>
      <para>
        The rules used for inheritance are Mendelian: the child has a
        25% chance of inheriting both traits from the father, a 25% chance
        of inheriting both traits from the mother, and a 50% chance of
        inheriting one from each. 
      </para>
     </listitem>
     <listitem>
      <para>
       Traits are:
      </para>
      <orderedlist>
       <listitem>
        <para>
          Vision and metabolism are grouped together as a trait.
        </para>
       </listitem>
       <listitem>
        <para>
          Speed and maximum age are grouped together as a trait.
        </para>
       </listitem>
      </orderedlist>
     </listitem>
    </orderedlist>
   </sect2>

   <sect2 id="glife-rules-metabolism">
    <title>Metabolism</title>
    <orderedlist>
     <listitem>
      <para>
        Use of food and metabolism: Metafood is its metabolism: every
        turn, the animal will eat <parameter>&lt;metafood&gt</parameter>
        units from its <varname>&lt;foodstore&gt</varname> amount. It will 
        also collect food from the terrain into its 
        <varname>&lt;foodstore&gt;</varname>. Status: not yet implemented.
      </para>
     </listitem>
     <listitem>
      <para>
        Animals may become diseased. Status: not yet implemented.
      </para>
     </listitem>
    </orderedlist>
   </sect2> 

   <sect2 id="glife-rules-combat">
    <title>Combat</title>
    <orderedlist>
     <listitem>
      <para>
        Predators may be introduced. Status: not yet done, and not
        too likely.        
      </para>
     </listitem>
     <listitem>
      <para>
        Combat will be introduced. Status: not yet done.
      </para>
     </listitem>
    </orderedlist>
   </sect2> 
  </sect1>

  <sect1 id="glife-bugs">
   <title>Known bugs and limitations</title>

   <para>
     <application>gLife</application> has no bugs known at the moment.
   </para>

   <para>
     Limitations:
   </para>
   <itemizedlist>
    <listitem>
     <para>
       Some of the planned features are not yet implemented.
       They are listed in the <link linkend="glife-rules">rules page</link>
       and marked as such.
     </para>
    </listitem>
   </itemizedlist>
  </sect1>

  <sect1 id="glife-credits">
   <title>Credits</title>
   <para>
     <application>glife</application> was written by Ali Abdin 
     (<email>aliabdin@aucegypt.edu</email>) For more information about
     it, see <ulink type="http" url="http://glife.sourceforge.net">the
     gLife home page</ulink> or the author's <ulink type="http"
     url="http://www.advogato.org/person/rakholh">development diary</ulink>.
    
   </para>
   <para>
     Please send all comments, suggestions and bug reports to the author 
     or to the bug-tracker at 
     <ulink type="http" url="http://sourceforge.net/bugs/?group_id=748">
     its web site</ulink>. <application>glife</application> is not
     currently listed on the GNOME bug-tracker, so please don't use that
     for this program.
   </para>
   <para>
     This manual was written by Telsa Gwynne 
     (<email>telsa@linuxchix.org</email>)
     and revised (extensively!) by Ali Abdin 
     (<email>aliabdin@aucegypt.edu</email>).
   </para>
  </sect1>
 </chapter>
</book>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->
