EVE: Evolution in Variable Environments 1. Files included in package: eve23.cpp generic_header.h debug_file.h ilibrary.cpp ilibrary.h import_export.cpp import_export.h lineage.cpp lineage.h list.cpp list.h rtclass.cpp rtclass.h value_calculation.cpp value_calculation.h Makefile 2. How to install EVE: Copy files to any directory and compile. You may compile by running the Makefile (type "make") or you may compile and link by typing: g++ -c -o eve23.o eve23.cpp g++ -c ilibrary.cpp g++ -c import_export.cpp g++ -c lineage.cpp g++ -c rtclassv3.cpp g++ -c list.cpp g++ -c value_calculation.cpp g++ -o eve23 eve23.o ilibrary.o import_export.o lineage.o rtclassv3.o list.o value_calculation.o Instead of g++ you may use any C++ compiler of your choice. 3. How to run EVE: EVE can read 3 files: "readme.txt", which has environmental parameters, "import.txt" which has the signals and nutrients time series, and "last_population_proc%_exp%.txt", which is a file with all the parameters of all cells in a population (replace % with the processorID and experimentID that you want to load). These files are not necessary for EVE to run; However it allows the user to define the desired parameters without changing EVE code. To run EVE you just type ./eve followed by its attributes. When no attributes are specified, the default message indicates what should be included: Input must have 13 arguments: 1. Import Readme (Default '0'. If 1 loads from readme.txt) 2. Import Signal (Default '0'. If 1 loads from import.txt) 3. Import Cells (Default '0'. If 1 loads population from $experimentID.txt) 4. Number of Experiments (Default '1') 5. Total Duration (Default '18000000') 6. Number of Cells (Default '200') 7. Selection Period (Default '4500') 8. Processor ID (Default '1') 9. Initial Experiment ID (Default '1') 10. Starting generation (Default '0') 11. Random Appearance Flag (Default '0') 12.Random Duration (Default '0') 13.Save Path and Name Example: ./eve23 0 0 0 1 18000000 200 4500 1 1 0 0 0 /temp/test/ NOTE: Imported parameter values from text files override all others. NOTE2: Import Cell =2 is clonal, 3= competition N/2|N/2, 4= fittest competition. ***EXITING*** As seen from the prompt above, the attributes are the following: [1] Import Readme Flag = '0' when parameters should be the default given by the code, '1' when the parameters are read from the readme.txt file which is present in the target path. [2] Import Signal Flag = '0' when the signal waveforms are the default given in the code, '1' when imported from the import.txt file which is present in the target path. [3] Import Cells = '0' when no cells are imported, '1' when all cells in the population are imported by the file "last_population_proc#_exp#.txt' (with # being the procID and expID respectively), '2' when the parameters from only one cell are read from the file "fittest_cell.txt" and a clonal population is created, '3' when two populations are loaded, '4 [4] Number of Experiments = any positive integer that indicates the number of total runs that should be conducted. [5] Total Duration = any multiple of the "selection_period" parameter. [6] Number of Cells = total number of cells in the population (always fixed size). [7] Selection Period = any positive integer over 100. This defines the number of time units per epoch. An epoch serves as an observation point, where statistics are gathered. If the signals are loaded from an import file, the selection period parameter here should match the timepoints of the signals in the import.txt file. [8] Processor ID = the processor ID, this is used in SMP machines to distinguish processes. In single processor machines it should be 1. [9] Experiment ID = the experiment ID, this is used in SMP machines to distinguish processes. In single processor machines it should be 1. [10] Starting generation = The starting epoch, which usually is 0. In some cases (eg. when continuing an experiment from a later point, saving after a crash, explore evolution in parallel universes), this can be set differently to maintain continuity of data files. [11] Random Appearance Flag = When set to '1' signals keep their relative correlation but peaks occur in random intervals. [12] Random Duration Flag = When set to '1' signals keep their relative correlation but peaks have a bounded random duration. [13] Save Path and Name = Target path, where the import files are and all new files will be stored. For example the typing: ./eve 0 0 0 1 18000000 200 4500 1 1 0 0 0 /temp/test/ will run the EVE program with: default parameters (it does not read the readme/import/population txt files), one simulation of 18,000,000 time units and 200 cells in the population, with statistics taken every 4,500 time points (=one epoch). The processor ID and experiment ID will be 1 (these parameters are used in supercomputer SMP environments, to run simulations as dinstinct processes), the signals will not be stohastically distributed (occurence and duration, respectively) and all files will be created in /temp/test/. Note that the readme/import/population files should also be in the target folder, otherwise an error message will appear: Unable to open the readme file: /temp/test/readme.txt that contains the parameters! EXITING! 4. What files are created during an EVE run In a typical EVE run, the following files are generated: [1] last_generation_proc#_exp#.txt : A file that has a population snapshot at the end of the simulation. It includes all parameters for all cells in the population. For example: Cell 84902 numnodes 6 fitness 0 energy 54152 sparcity 0.037289 MutationalBias 0 0 0 0 2 Connection to any signal - Input Sensor Protein: 0 0 0 0 0 1 slope: 1.7561 3.2392 3.8014 2.0636 3.5115 1.3826 middlepoint: 0.72498 0.086177 0.085599 -0.28459 0.12576 0.54388 basal: 0.30713 0.17214 0.31873 0.23944 0.26357 0.46361 degradation: 0.12404 0.34731 0.54684 0.62965 0.85739 0.47246 Weight Matrix 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.2375 0 0 2.136 0 0 0 0 0 0 0 0 0 0 0 0 0 regslope 2.1294 2.6296 3.0487 3.9456 1.3377 2.7399 2.0916 1.2908 1.4355 2.8246 3.1324 3.9249 2.4028 1.6841 2.3922 2.2843 1.2251 1.1955 3.0822 2.6786 3.238 3.7804 3.4978 1.5088 1.9699 2.3743 1.6119 2.9869 2.4868 1.895 1.1691 2.3538 1.2353 3.2115 1.2791 3.5989 regmiddle 7.9555 8.7092 5.0356 5.5929 5.6016 2.5881 4.9509 4.1077 2.5617 0.79168 3.2359 9.36 0.19451 7.8574 8.2514 1.9125 0.19066 2.6389 4.4712 1.8006 7.3854 4.8689 7.795 7.5948 7.5709 6.7215 5.8606 0.46333 0.30897 9.3746 3.3569 3.2346 6.7434 4.5727 2.3358 4.4597 v_history: ... Cell 84906 .... The various parameters are used the way they were described in the Supplementary online material of the paper. Please note that the size of the file can be quite large (>4Gb) depending on the size of each cell in the population. [2] lineage_graphviz_proc#_exp#.txt: File needed to create Graphviz visualization of the cell's lineage. EVE can by default create graphviz representations (Graphviz is a free visualization tool available at http://www.graphviz.org/) but this function is currently disabled. [3] lineage_proc#_exp#.txt: File contains lineage information for all cells. [4] mutations_mild_proc#_exp#.txt : A file that keeps record of all mild mutations per node that happen in each organism. Each line represent an organism; Each line has as many elements as the number of nodes in the organism that correspond to that line; Each element (number) is the number of mild mutations that have been recorded for the respective node. [5] mutations_strong_proc#_exp#.txt: A file that keeps record of all strong mutations per node that happen in each organism. Each line represent an organism; Each line has as many elements as the number of nodes in the organism that correspond to that line; Each element (number) is the number of strong mutations that have been recorded for the respective node. [6] mutation_proc#_exp#.txt : The mild, strong, creation, destruction mutation rate as well as evolvability - in that order - for all organisms in a population. Each line represent a specific snapsot of the population in time, sampled each 100 epochs. For example in a simulation of 4000 epochs ("generations") and 200 cells, there are 40 lines (40*100 = 4000), with each line having 1000 elements (5*200 = 1000). [7] branching_proc#_exp#.txt: Each line has the index ids of the offsprings of a specific cell, that correspond to that particular line. Data are saved in each sampling point (100 epochs). [8] connections_proc#_exp#.txt : Total number of connections for all cells in a population. Data are saved in each epoch and are stored in a line. [9] energy_proc#_exp#.txt : Total energy level of all cells in a population. Data are saved in each epoch and are stored in a line. [10] fitness_proc#_exp#.txt: Total fitness level of all cells in a population. Data are saved in each epoch and are stored in a line. [11] index_proc#_exp#.txt : The indices of all cells in a population. Data are saved in each epoch and are stored in a line. [12] nodes_proc#_exp#.txt : Total number of nodes of all cells in a population. Data is saved in each epoch and are stored in a line. [13] evolutionaver_proc#_exp#.txt : Average fitness of the population at each epoch, stored in the respective line. [14] evolutionmax_proc#_exp#.txt : Fitness of the fittest cell in the population at each epoch, stored in the respective line. [15] analysis_proc#_exp#.txt : Cell ID, Energy levle, Fitness of all cells in every epoch of the simulation. It also includes the seed of the random number generator which can be used to rerun the simulation. A typical analysis file: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Experiment : 1/(1-1) % Duration: : 18000000 % #_of_Cells : 200 % Selection_per: 4500 % EnvirMUTATION: 5e-06 5e-06 5e-05 2e-05 % Seed : 1245017159 % Date : Sat May 9 09:26:07 2009 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% CellID 0 Energy: 740965 Fitness: 0 CellID 1 Energy: 750072 Fitness: -0.019209 CellID 2 Energy: 756743 Fitness: -0.042064 CellID 3 Energy: 742598 Fitness: -0.028329 CellID 4 Energy: 720427 Fitness: -0.051134 CellID 5 Energy: 640711 Fitness: -0.0087828 ...