<p>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 <strong>[Q]</strong>). A list of the most common commands:</p>
<ul>
<li><strong>Q</strong>-- Quit the program</li>
<li><strong>M</strong>-- Switch to the map screen which shows a map of the population's fitness, merit, etc.</li>
<li><strong>S</strong>-- Switch to the statistics screen which shows information about the population and the dominate organism</li>
<li><strong>A</strong>-- Switch to the analyze screen</li>
<li><strong>Z</strong>-- Switch to the zoom screen which shows detail about one organism</li>
<li><strong>H</strong>-- Switch to the histogram screen which shows the abundance of genotypes/species in the population</li>
<li><strong>E</strong>-- Switch to the environment screen which shows the resources and reactions in the world</li>
<li><strong>O</strong>-- Switch to the options screen which shows current settings</li>
<li><strong>B</strong>-- Blank the screen</li>
<li><strong>CTRL-L</strong>-- Redraw the screen</li>
<li><strong>C</strong>-- Choose a different CPU to examine in detail</li>
<li><strong>X</strong>-- Extract organism and write a file of that organism</li>
<li><strong>P</strong>-- Pause/Unpause a run</li>
<li><strong>N</strong>-- Step forward one update</li>
<li><strong>&lt;</strong> and <strong>&gt;</strong>-- Move to a different page in a given screen</li>
<li>arrow keys -- let you move around a map</li>
</ul>
<p>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):</p>
<p><img class="aligncenter size-full wp-image-274" src="images/Text_View_Navigation.jpg" alt="Map Screen shows each organism as colored charecter" width="650" height="650" /></p>
<p>Draft Documentation based on: "Avida User's Manual" C. Ofria, C.T. Brown, and C. Adami in <em>Introduction to Artificial Life</em> by C. Adami:</p>
<p>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. These sections further explain each screen:</p>
<h2>The Stats Screen</h2>
<p>This screen displays all of the current statistics about the ongoing run. A typical snapshot of the screen looks like this:</p>
<p><img class="aligncenter size-full wp-image-276" src="images/Text_View_Stats_Mode.jpg" alt="Map Screen shows each organism as colored charecter" width="565" height="564" /></p>
<p>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:</p>
<ul>
<li>Tot Births indicates the number of organisms which have been born during the past update.</li>
<li>Breed True is the total number of organisms currently in the soup which are exact copies of their parents</li>
<li>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).</li>
<li>Energy is the log of the ratio between the fitness of the dominant genotype and the average fitness in the soup.</li>
<li>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.</li>
<li>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.</li>
</ul>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<h2>The Histogram Screen</h2>
<p>This screen is a histogram of the most abundant genotypes or species (use '</p>
<p><img class="aligncenter size-full wp-image-270" src="images/Text_View_Hist_Mode_1.jpg" alt="Histogram Screen shows a bar graph where showing the abundance of the 11 most common organisms" width="567" height="307" /></p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>Finally each line ends with a number which is the exact abundance of organisms currently within this genotype.</p>
<p>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:</p>
<p><img class="aligncenter size-full wp-image-271" src="images/Text_View_Hist_Mode_2.jpg" alt="Histogram Screen shows a bar graph where showing the abundance of the 11 most common organisms" width="566" height="314" /></p>
<p>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.</p>
<p><img class="aligncenter size-full wp-image-272" src="images/Text_View_Hist_Mode_3.jpg" alt="Histogram Screen shows a bar graph where showing the abundance of the 11 most common species" width="565" height="280" /></p>
<h2>The Environment Screen</h2>
<p>This screen shows reactions and resources that are defined in the environment.cfg file. An example of the Reaction View:</p>
<p><img class="aligncenter size-full wp-image-268" src="images/Text_View_Env_Mode_1.jpg" alt="Histogram Screen shows a bar graph where showing the abundance of the 11 most common organisms" width="562" height="288" /></p>
<p>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.</p>
<p>The Resource View is similar:</p>
<p><img class="aligncenter size-full wp-image-269" src="images/Text_View_Env_Mode_2.jpg" alt="Histogram Screen shows a bar graph where showing the abundance of the 11 most common organisms" width="560" height="288" /></p>
<p>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.</p>
<h2>The Options Screen</h2>
<p>This screen lists all of the options which are both currently available and were used to initialize this run. A typical screen looks like:</p>
<p><img class="aligncenter size-full wp-image-275" src="images/Text_View_Opt_Mode.jpg" alt="" width="566" height="560" /></p>
<p>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.</p>
<p>The lower part of the screen (within a box) shows the special options available to the user They are:</p>
<p>[H]istogram Screen: This will go to the histogram screen described above.</p>
<p>[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).</p>
<p>[R]edraw Screen: If the screen gets garbled this will erase it and refresh all text which is supposed to appear.</p>
<p>[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).</p>
<p>[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>
<p>[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.</p>
<p>[N]ext Update: When paused this will advance the soup a single update.</p>
<h2>The Zoom Screen</h2>
<p>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.</p>
<h3>CPU Stats Zoom View</h3>
<p>Here is a typical screen shot:</p>
<p><img class="aligncenter size-full wp-image-277" src="images/Text_View_Zoom_Mode_1.jpg" alt="Shows a screen with thirty or so variables and their values" width="487" height="334" /></p>
<p>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:</p>
<ul>
<li>GenotypID, Geno Name, SpeciesID: identifies the organism</li>
<li>Fitness: As described elsewhere fitness is the relative replication rate of this organism.</li>
<li>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.</li>
<li>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.</li>
<li>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 anothers memory) T: True Copy (the organism is an exact copy of its parent).</li>
<li>Location: The X/Y coordinate of the current organism</li>
<li>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.</li>
<li>Age: The number of updates that this organism has lived.</li>
<li>Executed: The number of instructions this organism has executed since it was born.</li>
<li>Last Divide: The number of instructions this organism has executed since its last divide.</li>
<li>Offspring: The number of offspring which this organism has produced.</li>
<li>Thread: Current/Total threads</li>
<li>IP: Instruction pointer indicates the next site in the memory to be executed.</li>
<li>AX - CX: Content of the registers.</li>
<li>Stack: Content of the top element of the stack.</li>
<li>Memory: The current (and two following) instructions</li>
</ul>
<h3>Component Zoom View</h3>
<p><img class="aligncenter size-full wp-image-278" src="images/Text_View_Zoom_Mode_2.jpg" alt="Shows a screen with thirty or so variables and their values" width="488" height="339" /></p>
<p>This view consists of a number of panes that can be accessed by using the TAB key.</p>
<p>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.</p>
<p>The top middle pane shows a miniature version of the map view around the current organism.</p>
<p>The bottom left pane shows the content of the registers, the Stack and the input values used by the organism.</p>
<p>The bottom right pane shows general information atou the organism</p>
<h3>Genotype Zoom View</h3>
<p><img class="aligncenter size-full wp-image-279" src="images/Text_View_Zoom_Mode_3.jpg" alt="Shows a screen with thirty or so variables and their values" width="487" height="336" /></p>

<h3>The Map Screen</h3>

<p>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. You can use the arrow keys to adjust which part of the map appears on the screen. (On computers using a "curses" interface the arrow keys will often not function properly; instead, you can use the number keys 8, 2, 4 and 6 to move up, down, left and right respectively.)  <strong>You reach the Map Screen by pressing the 'M' key.</strong></p>
<p>Here is an example map screen (showing genotype view on a color terminal):</p>
<p><img class="aligncenter size-full wp-image-273" src="images/Text_View_Map_Mode.jpg" alt="Map Screen shows each organism as colored character" width="487" height="605" /></p>
<p>Many different features can be displayed by the different map views. <strong>You can cycle through these views with the less-than and greater-than keys (&lt; and &gt;)</strong>, as shown at the bottom-right of the map screen.</p>
<p><strong>Genotype View</strong>: This view of displays the genotype of the organism at each location. Each organism is displayed as a hash mark ('#'); organisms with the same genotype have the same "color". (Hash marks might be bold; the bold version of a color represents a different genotype than the not-bold version. The bold and not-bold genotypes are not related in any particular way -- we're just using the bold versions as a way to get more "colors".)</p>
<p>As long as there are enough colors, each genotype has its own color, no matter how many or how few organisms have that genotype. When there are more genotypes than colors, the most abundant genotypes get their own colors, and all other genotypes are represented by a white not-bold hash mark (or by '+' if you cannot display color).  Which color is marking a genotype doesn't have any meaning at all.  (You can see the fitness, id, hash mark, and number of organisms for each of the most-abundant genotypes on the <a title="The Histogram Screen" href="http://avida.devosoft.org/wiki/documentation/general-information/the-text-viewer/the-histogram-screen/">Histogram Screen</a>, which you can reach by pressing the 'H' key.)</p>
<p><strong>Breed True View</strong>: This view simply displays a bold or not-bold hash mark ('*' or '-' if you can't display colors) for each organism, indicating whether it is an exact copy of its mother (bold white hash mark, or '*') or not (normal white hash mark, or '-').</p>
<p><strong>Parasite View</strong>: This view displays a bold or not-bold white hash mark ('*' or '-' if you can't display color) for each organism, indicating whether it is a parasite (bold white hash mark, or '*') or not (normal white hash mark, or '-').</p>
<p><strong>Forager View</strong>: If you know what this view shows, please edit this page!</p>
<p><strong>Avatar View</strong>: If you know what this view shows, please edit this page!</p>
<p><strong>Territory View</strong>: If you know what this view shows, please edit this page!</p>
<p><strong>Mutation View</strong>: This view displays a bold or not-bold white hash mark ('*' or '-' if you can't display color) for each organism, indicating whether it has been hit by mutations (bold white hash mark, or '*') or not (normal white hash mark, or '-').</p>
<p><strong>Thread View</strong>: This view displays the number of the thread that each organism is currently executing.  For runs where organisms have only one thread (which is typical), all the numbers will be 1.</p>
<p><strong>Modified View</strong>: If you know what this view shows, please edit this page!</p>
<p><strong>Lineage View</strong>: This view displays the lineage of the organism at each location; each color corresponds to a single lineage.  (Presumably the choice of colors and what happens when there are more lineages than colors is very similar to the way colors are handled in Genotype View.)</p>

<h3>The Histogram Screen</h3>

<p>This screen is a histogram of the most abundant genotypes or species (use '</p>
<p><img class="aligncenter size-full wp-image-270" src="images/Text_View_Hist_Mode_1.jpg" alt="Histogram Screen shows a bar graph where showing the abundance of the 11 most common organisms" width="567" height="307" /></p>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>Finally each line ends with a number which is the exact abundance of organisms currently within this genotype.</p>
<p>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:</p>
<p><img class="aligncenter size-full wp-image-271" src="images/Text_View_Hist_Mode_2.jpg" alt="Histogram Screen shows a bar graph where showing the abundance of the 11 most common organisms" width="566" height="314" /></p>
<p>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.</p>
<p><img class="aligncenter size-full wp-image-272" src="images/Text_View_Hist_Mode_3.jpg" alt="Histogram Screen shows a bar graph where showing the abundance of the 11 most common species" width="565" height="280" /></p>