Written 2009-04-02 BDB

Return to the Index

# The Text Viewer

The viewer has a number of one character commands that can be typed while the program is running. Often the most common commands are shown on the screen between square brackets (for example [Q]). A list of the most common commands:

- Q -- Quit the program
- M -- Switch to the map screen which shows a map of the population's fitness, merit, etc.
- S -- Switch to the statistics screen which shows information about the population and the dominate organism
- A -- Switch to the analyze screen
- Z -- Switch to the zoom screen which shows detail about one organism
- H -- Switch to the histogram screen which shows the abundance of genotypes/species in the population
- E -- Switch to the environment screen which shows the resources and reactions in the world
- O -- Switch to the options screen which shows current settings
- B -- Blank the screen
- CTRL-L -- Redraw the screen
- C -- Choose a different CPU to examine in detail
- X -- Extract organism and write a file of that organism
- P -- Pause/Unpause a run
- N -- Step forward one update
- < and > -- Move to a different page in a given screen
- arrow keys -- let you move around a map

Available key strokes are shown on the screen (note that the number of keys at the top screen will vary based on the width of the screen):

##

Draft Documentation based on: "Avida User's Manual" C. Ofria, C.T. Brown, and C. Adami in Introduction to Artificial Life by C. Adami:

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 view on a color terminal):

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

Genotype view: 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 organisms 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 view: This viewing method is only available when speciation has been turned on. It works in a manner very similar to the genotype view 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 view tends to be much "cleaner" than genotype view for observing the current dynamics taking place

Breed True view: This view 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 view: This view works identically to Breed True with white (or *) indicating organisms which are parasites.

Mutation view: Again this view works like Breed True where white (or *) marks those organisms that have been hit by mutations.

Thread view: This shows the number of the thread.

Modified view:

Lineage view: This view works in a manner very similar to the genotype view except single colors (or letters) are assigned to the decedents of particular ancestors.

## The Stats Screen

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

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 organisms which have been born during the past update.
- Breed True is the total number of organisms currently in the soup which are exact copies of their parents
- Parasites is the total number of organisms 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.
- Max Fitness is the highest fitness which 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 organism 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.

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 organisms which have completed each of the assortment of tasks available in avida These numbers reflect only those organisms which have actually finished the task so even if every organism 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 or species (use '<' or '>' to toggle between them) in the population. A typical screen where species are not being tracked looks like this:

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

Next comes the name of the genotype (For example 096-aaacf) 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 '#' after the name is the actual histogram; the number of characters which appear here is the relative current abundance of the genotype This allows quick recognition of which genotypes are dominant in the soup.

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

If species information is being recorded (i.e. the SPECIES_RECORDING flag in the avida.cfg file is set to 1 or 2) the Genotype Abundance and Species Abundance Views might look like:

Notice that the '#' have been replaced with letters that represent the species of this genotype so any two lines with the same letter are of the same species.

## The Environment Screen

This screen shows reactions and resources that are defined in the environment.cfg file. An example of the Reaction View:

One the left side of the main screen is a list of all the defined reactions. To the right is the number of organisms that have completed this reaction. Using the up and down arrow keys one of the reactions is highlighted. If there are any resources associated with the selected reaction they are displayed in the bottom pane.

The Resource View is similar:

In this case the resource names are shown with the inflow amount, outflow rate and total quantity of that resource in the environment. The reaction(s) associated with this resource are shown in the bottom pane.

## 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:

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 avida.cfg 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 screen with the cursor on the screen Position the cursor over the CPU you would like to select and press enter Additionally in the Windows version of avida the mouse can be used to select CPUs while in this screen. A single click highlights the CPU targeted and a double click selects it as the new active CPU and exits from this screen The selected CPUs inner workings and genome can then be viewed in the Zoom screen (see below).

[E]xtract organism: This will save the genotype of the active organism (the one currently selected) to a file by the same name as the genotype An extracted organism 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: Freezes activity in the soup but still allows navigation through the interface and examination of the soup Additionally many screens have additional options when the soup is paused.

[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 has three views (CPU Stats Zoom, Component Zoom and Genotype Zoom). This screen is especially useful while avida is paused The space bar will cause the active organism to advance a single instruction and the return key will cause it to advance a full update In this way the execution of the organism can be fully examined.

### CPU Stats Zoom View

Here is a typical screen shot:

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:

- GenotypID, Geno Name, SpeciesID: identifies the organism
- Fitness: As described elsewhere fitness is the relative replication rate of this organism.
- Gestation: This is the gestation time for the organism (the number of instructions it needs to execute in order to copy itself) If the organism has not copied itself a zero appears here.
- Cur Merit: This is the merit which the organism 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 organism size)g and the value it was at before the divide will be used to determine how much CPU time it should get.
- 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 organism has allocated memory for itself which it has not yet divided off) I: Injected (the organism was injected into the soup by the user) M: Mutated (an instruction has been struck by a point mutation) P: Parasite (the organism has executed code from within another s memory) T: True Copy (the organism is an exact copy of its parent).
- Location: The X/Y coordinate of the current organism
- Facing or Executing: This attribute gives the direction in which the organism is pointed. Facing indicates that instructions which involve other organisms will use the organism at this X/Y coordinate while Executing means that the code in the specified organism is actually being run (parasitically) by this organism's CPU.
- Age: The number of updates that this organism has lived.
- Executed: The number of instructions this organism has executed since it was born.
- Last Divide: The number of instructions this organism has executed since its last divide.
- Offspring: The number of offspring which this organism has produced.
- Thread: Current/Total threads
- IP: Instruction pointer indicates the next site in the memory to be executed.
- AX - CX: Content of the registers.
- Stack: Content of the top element of the stack.
- Memory: The current (and two following) instructions

### Component Zoom View

This view consists of a number of panes that can be accessed by using the TAB key.

The top left pane shows the genome of the current organism. The number at the top box shows how many instructions are in the memory. The bottom box shows the individual instructions, if they are executate or were copied, and the location of the flow, write and read heads. Instructions can be edited here as well.

The top middle pane shows a miniature version of the map view around the current organism.

The bottom left pane shows the content of the registers, the Stack and the input values used by the organism.

The bottom right pane shows general information atou the organism

### Genotype Zoom View

Return to the Index