Avida

 

Changeset 3651

Show
Ignore:
Timestamp:
02/25/10 15:49:25 (7 months ago)
Author:
blwalker
Message:

Added WRITE_CLONE, WRITE_INJECT_EVENTS, and WRITE_COMPETITION analyze commands to the documentation. (The commands already existed.)
Updated WRITE_INJECT_EVENTS and WRITE_COMPETITION to write current-style actions instead of deprecated ones.
Clarified the documentation of SaveClone? and LoadClone? actions somewhat.

Location:
development
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • development/documentation/actions.html

    r3530 r3651  
    36453645  </p> 
    36463646  <p> 
    3647    
     3647    Sets up a population based on a save file generated by <a href="#SaveClone">SaveClone</a> 
     3648    or WRITE_CLONE (an analyze command).  Note that a clone only consists of  
     3649    the genomes in the population, and their current state is lost, so the  
     3650    run may not proceed identically as it would have if it had continued as  
     3651    it was going. 
    36483652  </p> 
    36493653</li> 
     
    36993703  </p> 
    37003704  <p> 
    3701     Save a clone of this organism to the file specified; if no filename is 
     3705    Save a clone of this population to the file specified; if no filename is 
    37023706  given, use the name clone.<em>update</em>.  The update number allows regular 
    37033707  clones with distinct filenames to be saved with the same periodic event. 
     
    37053709  saved clone.  Note that a clone only consists of the genomes in 
    37063710  the population, and their current state is lost, so the run may not 
    3707   proceed identically as to if it had continued as it was going. 
    3708  
     3711  proceed identically as it would have if it had continued as it was going. 
    37093712  </p> 
    37103713</li> 
  • development/documentation/analyze.html

    r3623 r3651  
    524524 
    525525<p>&nbsp;</p> 
     526<h3>Building Input Files for Avida</h3> 
     527 
     528<p> 
     529These commands build input files for Avida, using the capabilities of analyze mode to  
     530automate some tedium. 
     531</p> 
     532 
     533<dl> 
     534<dt><strong> 
     535  WRITE_CLONE [<span class="cmdargopt">file='clone.dat'</span>] 
     536  [<span class="cmdargopt">num_cells=-1</span>] 
     537</strong></dt> 
     538<dd> 
     539  Creates a clone population file (as <a href="actions.html#SaveClone">SaveClone</a>)  
     540  from the current batch, suitable for loading with <a href="actions.html#LoadClone">LoadClone</a>.   
     541  The starting update is 0 and the archive is empty.  num_cells should be the number  
     542  of cells in the world -- the default value of -1 will not be accepted by LoadClone,  
     543  so be sure to specify the correct number. 
     544  <br /> 
     545  <strong>Warning:</strong> Unlike SaveClone, WRITE_CLONE does not preserve location.   
     546  Any spatial structure the population had is lost. 
     547</dd> 
     548<dt><strong> 
     549  WRITE_INJECT_EVENTS [<span class="cmdargopt">file='events_inj.cfg'</span>] 
     550  [<span class="cmdargopt">start_cell=0</span>] [<span class="cmdargopt">lineage=0</span>] 
     551</strong></dt> 
     552<dd> 
     553  Creates an <a href="events.html">events file</a> which injects all the genotypes of the current  
     554  batch at update 0.  Injection starts at the given start_cell id and increments  
     555  upward.  All injected organisms are assigned the given lineage label and start  
     556  with the relevant merit; num_cpus copies of each genotype are injected. 
     557  <br /> 
     558  <strong>Warning:</strong> injection is in order that the genotypes appear in the batch.   
     559  This will break any spatial structure your population may have had. 
     560</dd> 
     561<dt><strong> 
     562  WRITE_COMPETITION [<span class="cmdargopt">join_UD=0</span>] 
     563  [<span class="cmdargopt">start_merit=50000</span>] [<span class="cmdargopt">file='events_comp.cfg'</span>] 
     564  [<span class="cmdargopt">batch_A=cur_batch-1</span>]  
     565  [<span class="cmdargopt">file=batch_B=cur_batch</span>] [<span class="cmdargopt">grid_side=-1</span>] 
     566  [<span class="cmdargopt">lineage=0</span>] 
     567</strong></dt> 
     568<dd> 
     569  Creates an <a href="events.html">events file</a> which acts much like the one produced  
     570  by WRITE_INJECT_EVENTS, but injects two populations (from the given batches), separates  
     571  the populations at update 0 (via SeverGridRow grid_side), and joins them at the given  
     572  join_UD.  Organisms from batch_A are injected starting at cell id 0; organisms from  
     573  batch_B are injected starting at cell id grid_side*grid_side.    (If grid_side is negative,  
     574  an attempt will be made to infer it from the number of organisms in the population.) 
     575  <br /> 
     576  Each population should be square, of grid_side x grid_side dimensions.  (You will have  
     577  to set up the world in avida.cfg to have WORLD_X of grid_side and WORLD_Y of 2*grid_side.)   
     578  Each population may not be larger than 10,000 organisms.  Organisms from batch_A will  
     579  be assigned the given lineage label; organisms from batch_B will be assigned the given  
     580  lineage label + 1. 
     581  <br /> 
     582  <strong>Warning:</strong> Like WRITE_INJECT_EVENTS, WRITE_COMPEITITIONS will destroy any  
     583  spatial structure the populations may have had.  Also, since it severs/joins only the grid_side  
     584  row, it is not suitable for use with WORLD_GEOMETRY values other than 1 (bounded grid). 
     585</dd> 
     586</dl> 
     587 
     588 
     589<p>&nbsp;</p> 
    526590<h2><a name="USING_RESOURCES">Using Test CPU Resources Summary</a></h2> 
    527591 
  • development/source/analyze/cAnalyze.cc

    r3645 r3651  
    65726572    const cGenome & genome = genotype->GetGenome(); 
    65736573     
    6574     fp << "u 0 inject_sequence " 
     6574    fp << "u 0 InjectSequence " 
    65756575      << genome.AsString() << " " 
    65766576      << start_cell << " " 
     
    66566656    double cur_merit = start_merit; 
    66576657    if (cur_merit < 0) cur_merit = genotype->GetMerit(); 
    6658     fp << "u 0 inject_sequence " 
     6658    fp << "u 0 InjectSequence " 
    66596659      << genome.AsString() << " " 
    66606660      << inject_pos << " " 
     
    66726672    double cur_merit = start_merit; 
    66736673    if (cur_merit < 0) cur_merit = genotype->GetMerit(); 
    6674     fp << "u 0 inject_sequence " 
     6674    fp << "u 0 InjectSequence " 
    66756675      << genome.AsString() << " " 
    66766676      << inject_pos << " " 
     
    66826682  } 
    66836683   
    6684   fp << "u 0 sever_grid_row" << grid_side << endl; 
    6685   fp << "u " << join_UD << " join_grid_row " << grid_side << endl; 
     6684  fp << "u 0 SeverGridRow" << grid_side << endl; 
     6685  fp << "u " << join_UD << " JoinGridRow " << grid_side << endl; 
    66866686} 
    66876687