The Text Interface

For the most part, the text interface to avida is simple and straightforward to use; most of the options available are listed on the screen. For example, at all times there is a menu-bar at the top of the screen which lists the current update, and the keys to press to go to any of the most used avida screens. This section further defines the function of each of these options.

The Map Screen

The Map screen displays the spatial representation of the population of organisms in avida. The grid itself is toroidal and typically will not fit entirely on the screen. The arrow keys will allow the users to adjust the portion of the map viewed. On computers using a ``curses'' interface, the arrow keys will often not function properly, in which case the number keys 8, 2, 4, and 6 can be used to move up, down, left, and right respectively. Here is an example map screen (showing genotype mode on a noncolor terminal):

+----------------+----------------------------------------------+-----------+
|  Update: 97    |  [M]ap  [S]tats  [O]ptions  [Z]oom  [Q]uit   |   Avida   |
+----------------+----------------------------------------------+-----------+
                   A A A A . I A A A A K . . . K K A A + K K K
                 A A A A A I I A A . A K K . . + K A K K K . K A A A
               A . A A A A A A A . A A K A A + K K A A A K K A A A
                 A A A A A A A I . . A K A . A K K K K A K K K A A
                 A A . A . A A I A A A A A . A A K K K K A . A .
               A A A A A A A A A A A . . A A A A A A . . K A . A .
               A A . A A A A A A A A A . A K K A . A A . A . K A A
                 A A A A A A . A A A A A A A . A A . . K A A A A + A
               A A A A A . A A A A . A . A F A A A A A A A F A A A +
             A   A A . A . A A A A A . A F A A A A . . A F A A A +
                 A A A A + A A A A A A A A F A A A A A F F F F A A A
               A A A . . A A A . A A A A F A . + A A A A + F F F . .
                 A A A . . A A A A A A A A . A . + F A F A F F F F F
               A . A A A A . A A A A A A A A A F A F F F . + . A . .
               . A A A A A A . A A . A A A A F . . F F F F . F . A
                 A A + A . A A . H H H A A A . F A . F F F F F A A
                   A A A A A A + A A A H . . A . A F F . F F A F +
                 A A A A . A A A A A A A A A A A . A A A F F F A
                 A A A . . A A A A A . A A A A . A A A A F F F   .
                    A   A A A A A A A A . . A A . . B G G A G .
* Clipping last 40 line(s) *                         [<]  Genotype View  [>]

Many different features can be displayed by the different map modes (which can be cycled through using the `<' and `>' keys). The available map viewing styles are:

  • Genotype mode: This view of of the soup will display the genotype at each location. The most abundant genotypes each have a unique color (or letter if colors are not available) assigned to them; all sites which are of the same color (or letter) harbor the same genotype. Creatures which have passed the genotype threshold, but are not abundant enough to have a color of their own, are represented by white (or a +) on the map. Sub-threshold genotypes are denoted by gray (or a .).
  • Species mode: This viewing method is only available when speciation has been turned on. It works in a manner very similar to the genotype mode, except single colors (or letters) are assigned to entire species. Additional species (those which are less abundant) are denoted by the color white (or marked by a +). Species mode tends to be much cleaner than genotype mode for observing the current dynamics taking place.
  • Age mode: The age of each creature is displayed using a similar scheme where a 0-9 represents the exact age (in updates) if possible; otherwise a range of Roman numerals are used to approximate the actual age (X = 10-20, L = 21-80, C = 81-200, + = 201 or greater...)
  • Breed True mode: This mode simply displays a binary gray or white (- or * if no colors) indicating whether a program at that grid point is an exact copy of its mother. White (or a *) stands for a true-breeding program.
  • Parasite mode: This mode works identically to Breed True, with white (or *) indicating creatures which are parasites.
  • PointMut mode: Again, this mode works like Breed True, where white (or *) marks those creatures that have been hit by point mutations.
  • The Stats Screen

    This screen displays all of the current statistics about the ongoing run. A typical snapshot of the screen looks like this:

    +----------------+----------------------------------------------+-----------+
    |  Update: 97    |  [M]ap  [S]tats  [O]ptions  [Z]oom  [Q]uit   |   Avida   |
    +----------------+----------------------------------------------+-----------+
    
    Tot Births.:       2   -- Dominant Genotype --              Dominant  Average
    Breed True.:     475   Name........: 031-aaaaa   Fitness..:   0.2213   0.1893
    Parasites..:       0   ID..........:         1   Merit....:       31       31
    Energy.....:    0.16   Species ID..:         0   Gestation:      140    140.3
    Max Fitness:  0.3115   Age.........:        97   Size.....:       31     30.8
    Max Merit..: 3.8e+01                             Copy Size:       31     30.8
                                                     Exec Size:       25     24.9
               Current    Total  Ave Age  Entropy    Abundance:      415     5.85
    Creatures:     655  2.1e+03      4.5     6.48    Births...:        0    0.018
    Genotypes:     112  3.2e+02     71.3     0.68    BirthRate:    0.214    0.183
    Threshold:      15  1.6e+01     83.8
    Species..:       9  9.0e+00     89.0     0.41
    
    +---------------------------------------------------------------------------+
    | Input...:     19      Not.....:      0      Nor.....:      0              |
    | Output..:      1      And.....:      0      Xor.....:      0              |
    | I/O.....:      0      ~A Or B.:      0      Equals..:      0              |
    | Echo....:      0      ~A And B:      0                                    |
    | Nand....:      0      Or......:      0                                    |
    +---------------------------------------------------------------------------+
    

    Starting at the upper left column of the screen, the first block of statistics describes the current state of the soup. These statistics are defined as follows:

  • Tot Births indicates the number of creatures which have been born during the past update.
  • Breed True is the total number of creatures currently in the soup which are exact copies of their parents.
  • Parasites is the total number of creatures which have displayed parasitic behavior, i.e., the number which have executed instructions outside of their own memory.
  • Energy is the log of the ratio between the fitness of the dominant genotype and the average fitness in the soup. (See Glossary.)
  • Max Fitness is the highest fitness that can be found in the soup. During equilibrium this will usually be approximately the same as the fitness of the dominant genotype.
  • Max Merit is the highest merit which can be found in the soup. Since this gives no indication as to the replication abilities of this creature, it is typically not a very revealing quantity.
  • To the right of the soup status column, we have some information about the dominant genotype. This section simply lists the name of this genotype, its ID, its species ID, and its age (how many updates it has existed for). The first three of these statistics are purely for identification purposes.

    On the right side of the screen, more statistics are given for a number of common measurements on the dominant genotype, as well as the average across all genotypes. All of these statistics are described in the Glossary.

    In the middle left side of the screen, we have information about the various taxonomic levels in avida; we give the current abundance of each in the Current column, the total number of each that have existed over the entire run in the Total column, the average number of updates each have existed in the Ave Age column, and finally the entropy of each in the Entropy column.

    Finally, along the bottom of this screen, we list the total number of creatures which have completed each of the assortment of tasks available in avida. These numbers reflect only those creatures which have actually finished the task, so even if every creature in the soup is capable of completing a task, not all of them may be listed because the newborns would not have finished it for the first time.

    The Histogram Screen

    This screen is a histogram of the most abundant genotypes in the population. A typical screen looks like this:

    +----------------+----------------------------------------------+-----------+
    |  Update: 97    |  [M]ap  [S]tats  [O]ptions  [Z]oom  [Q]uit   |   Avida   |
    +----------------+----------------------------------------------+-----------+
    
    Fitness Name       Histogram: [<] Genotype Abundance [>]
     0.2213 031-aaaaa: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA  415
     0.2204 031-aaaad: A                                                       4
     0.1845 031-aaaah: A                                                       5
     0.2727 029-aaaac: H                                                       3
     0.2251 031-aaaaf: A                                                       5
     0.2227 031-aaaab: AAAAAA                                                 47
     0.2236 031-aaaac: C                                                       4
     0.2214 031-aaaag: A                                                       4
     0.2192 029-aaaaa: D                                                       5
    
     0.2190 030-aaaaa: BBBBBB                                                 44
    

    The first number here represents the fitness of the creature; this is the relative replication rate as compared to the other creatures in the population.

    Next comes the name of the genotype (for example 109-aaaad). This is an identifier for the genotype, and the name of the file it will be saved under if it is extracted. The number portion (before the dash) of the name is the length of the code for that genotype, and the letter sequence after the dash gives a unique identifier for it. These are never repeated throughout a single run.

    The repeated letter after the name is the actual histogram; the number of letters which appear here is the relative current abundance of the genotype. This allows quick recognition of which genotypes are dominant in the soup. The letter itself represents the species of this genotype, so any two lines with the same letter are of the same species.

    Finally, each line ends with a number which is the exact abundance of creatures currently within this genotype.

    The Options Screen

    This screen lists all of the options which are both currently available, and were used to initialize this run. A typical screen looks like this:

    +----------------+----------------------------------------------+-----------+
    |  Update: 97    |  [M]ap  [S]tats  [O]ptions  [Z]oom  [Q]uit   |   Avida   |
    +----------------+----------------------------------------------+-----------+
    
    Current CPU..: (0, 0)                   Time Slicing.: Constant
    Genotype.....: 031-aaaaa                Task Merit...: Exponential
    ID #.........: 0                        Size Merit...: Full Size
                                            Birth Method.: Replace max age
    Max Updates..: 50000                    Ave TimeSlice: 30
    World Size...: 60x60
    Random Seed..: 1                        Point  Mut: 0
    Threshold....: 3                        Copy   Mut: 50
                                            Divide Mut: 0    Ins: 0    Del: 0
    Debug Level..: OFF
    Inst Set.....: inst_set.24.base
    Task Set.....: task_set
    Events File..: event_list
    
    
    +---------------------------------------------------------------------------+
    | [H]istogram Screen          [C]hoose New CPU         Un-[P]ause           |
    | [B]lank Screen              [E]xtract Creature       [N]ext Update        |
    | [R]edraw Screen                                                           |
    +---------------------------------------------------------------------------+
    

    The upper left corner of this screen gives information about the active genotype in the soup, and the remainder of the upper portions of the screen list values from the genesis file, and what they were initialized to.

    The lower part of the screen (within a box) shows the special options available to the user. They are:

  • [H]istogram Screen: This will go to the histogram screen described above.
  • [B]lank Screen: This option will clear the screen making avida run marginally faster (since it will not be wasting much CPU time on the display)
  • [R]edraw Screen: If the screen gets garbled, this will erase it and refresh all text which is supposed to appear.
  • [C]hoose New CPU: This option will put avida in map mode with the cursor on the screen. Position the cursor over the CPU you would like to select, and press . Additionally, in the Windows version of avida, the mouse can be used to select CPUs while in this mode. A single click highlights the CPU targeted, and a double click selects it as the new active CPU, and exits from this mode. The selected CPUs inner workings and genome can then be viewed in the Zoom screen (see below).
  • [E]xtract Creature: This will save the genotype of the active creature (the one currently selected) to a file by the same name as the genotype. An extracted creature will include all of its statistics as comments (gestation time, fitness, tasks completed, etc.) and can be loaded into another soup without modifying the file.
  • [P]ause: This freezes activity in the soup, but still allows navigation through the interface and examination of the soup. Additionally, many modes have additional options when the soup is paused. To Un[P]ause, press P again.
  • [N]ext Update: When paused, this will advance the soup a single update.
  • The Zoom Screen

    This screen contains all of the information about the state of the active CPU. Here is a typical screenshot:

    +----------------+----------------------------------------------+-----------+
    |  Update: 97    |  [M]ap  [S]tats  [O]ptions  [Z]oom  [Q]uit   |   Avida   |
    +----------------+----------------------------------------------+-----------+
    
    Current CPU.: (0, 0)         +--------------+-------------+-----------------+
    Genotype....: 031-aaaaa      | Memory:  62  | Stack A     |  A A A A A A A  |
    Species.....: spec-0         +--------------+-------------+  A A . A . A F  |
                                 | 16:    nop-A |           0 |  A A A . A F A  |
    Gestation...:     140        | 17:    nop-B |           0 |  A A A[A]A A F  |
    CurrentMerit:      31        | 18:     copy |           0 |  . A A A A F A  |
    LastMerit...:      31        | 19:      inc |           0 |  A A A A A A .  |
    Fitness.....:  0.2214        | 20: if-n-equ |           0 |  A A A A A A A  |
    Offspring...:       0        | 21:   jump-b |           0 |[<] Genotypes [>]|
    Errors......:       0        | 22:    nop-C |           0 +-----------------+
    Age.........:       3        | 23:    nop-A |           0 | AX:          31 |
    Executed....:      69        | 24:    nop-C |           0 | BX:          15 |
    Last Divide.:      69        | 25:    nop-A |           0 | CX:          31 |
    Flags.......:  A             +--------------+-------------+-----------------+
    Facing......: (59, 58)       | Inputs       | Get.:  0  Not.:  0  Nor.:  0  |
                                 +--------------+ Put.:  0  And.:  0  Xor.:  0  |
    Un-[P]ause                   |    343139087 | GGP.:  0  ~Or.:  0  Equ.:  0  |
    [N]ext Update                |    314146099 | Echo:  0  ~And:  0            |
    [Space] Next Instruction     |     81633365 | Nand:  0  Or..:  0            |
    [-] and [+] Scroll Memory    +--------------+-------------------------------+
    

    The column on the left of the screen gives all of the current statistics for this CPU, and the right of the screen contains information about the actual hardware in the CPU; the memory, the stack, the registers, and the I/O buffers.

    The execution statistics recorded here are:

  • Gestation: This is the gestation time for the creature (the number of instructions it needs to execute in order to copy itself.) If the creature has not copied itself, a zero appears here.
  • CurrentMerit: This is the merit which the creature is currently building during this gestation cycle. Every time a new task is completed, this value will increase appropriately. When a divide occurs, the current merit will be reset to its base value (typically the creature size), and the value it was at before the divide will be used to determine how much CPU time it should get.
  • LastMerit: This is the merit which determines how much CPU time this creature gets. It is locked in when a creature divides (transferred from the current merit). When a creature is first born, it is initialized to the merit of its parent.
  • Fitness: As described elsewhere, fitness is the relative replication rate of this creature.
  • Offspring: The number of offspring this creature has produced.
  • Errors: Every time the creature tries to execute an instruction and fails (e.g., tries to allocate negative space) this value is incremented. This has no feedback into the soup; it is only for the reference of the user.
  • Age: The number of updates that this creature has lived.
  • Executed: The number of instructions this creature has executed since it was born.
  • Last Divide: The number of instructions this creature has executed since its last divide.
  • Flags: There are a number of flags within a CPU which can be set; a corresponding letter will appear in this field when this is the case. The flags are - A: Allocated (the creature has allocated memory for itself which it has not yet divided off); I: Injected (the creature was injected into the soup by the user); M: Mutated (an instruction has been struck by a point mutation); P: Parasite (the creature has executed code from within another's memory); T: True Copy (the creature is an exact copy of its parent).
  • Facing or Executing: This attribute gives the direction in which the creature is pointed. Facing indicates that instructions which involve other creatures will use this creature, while Executing means that the code in the specified creature is actually being run (parasitically) by this creature's CPU.
  • This screen is especially useful while avida is paused. The space bar will cause the active creature to advance a single instruction, and the return key will cause it to advance a full update. In this way, the execution of the creature can be fully examined.


    NEXT: Configuring Avida Runs
    PREV: Installing Avida

    INDEX


    Page maintained by Charles Ofria
    Send all comments to charles@krl.caltech.edu