⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tierra.doc

📁 地球模拟器
💻 DOC
📖 第 1 页 / 共 5 页
字号:
     This documentation was written by Tom Uffner.Arg(1)                   USER COMMANDS                     Arg(1)NAME     arg - genbank archive utilitySYNOPSIS     arg c|r[v12...9] afile size file1 [file2...]     arg x|t[v12...9] afile [gen1 [gen2...]]DESCRIPTION     The arg utility is used to manipulate the genebank  archives     that  are used by tierra(1).  It is used to assemble or dis-     sasemble tierra code, list the genomes contained in a  file,     and also to convert between the old and new file formats.     The arg commands are:          c - create afile and add genomes in file1...filen          r - replace  in  afile  (or  add  to  end)  genomes  in               file1...filen          x - extract entire contents or specified  genomes  from               afile          t - list entire contents or specified genomes in afile     The optional modifiers are:          v - verbose output          1,2...9 - instruction set (defaults to Format: parameter				     of ascii source or to INST = 1)     Where filen and afile are any legal filenames, genn is  a  3     character genome label, and size is a decimal integer. (Note     that tierra(1) expects archives to have names consisting  of     4 digits, and an extension of .gen, or .tmp.FILES     GenebankPath/nnnn.gen permanantly saved genomes     GenebankPath/nnnn.tmp genomes from periodic savesSEE ALSO     An Approach to the Synthesis of Life     tierra(1), ov(1X), beagle(1DOS), genio(3), arg(5)BUGS     Genome extraction and internal  search  functions  could  be     faster, and will be in the next release.Tierra, V 4.0      Last change: 8 September 1992                  2Please remember that this new form of arg needs the file opcode.mapto be in the current working directory.  Arg ALWAYS reads the fileopcode.map for the mappings for assembling/disassembling genebankarchives.  5.3) The Birth-Death Output     During a run, if the DiskOut parameter is non-zero, a record of birthsand deaths will be written to disk in the path specified by OutPath, tofiles whose names depend on the BrkupSiz parameter.  The format of thisfile is a bit cryptic, so it will be explained here.  The file has eitherthree or four columns of output, depending on whether the GeneBnker parameteris set.  Three of the columns remain the same either way: 1) elapsed timesince last birth or death event in instructions, output in hexidecimal format.2) a `b' or a `d' depending on whether this is a birth or a death.  3) the sizeof the creature in instructions, output in decimal format.  If the genebankeris on, then there will be a fourth column containg the three letter codeidentifying the genotype of the creature.  Mutations appear in thebirth-death record as the death of one genotype followed by the birth ofanother, with an elapsed time of zero between the two events.     What makes the file cryptic, and also compact, is that columns areimplied to be identical in successive records unless otherwise indicated.Only the first column, elapsed time since last record, must be printed onevery line, and only the first record must have all three or four columns.Therefore, if there is a series of successive births, only the first birthrecord in the series will contain the b.  Notice that at the beginning ofthe file, there will generally be many lines with just one column, becauseat the outset, all records are of births of the same size and genotype.     The record of births and deaths is read by the Beagle program, andconverted into a variety of graphic displays: frequency distributions overtime, phase diagrams of the interactions between pairs of sizes or genotypes,or diversity and related measures over time.  The source code for reading andinterpreting the record of births and deaths is in the bread.c module of theBeagle source code.  5.4) The Genebank Output     If the GeneBnker parameter is set to a non-zero value, then as eachcreature is born, its genome will be sequenced and compared to that of itsmother.  If they are identical, the daughter will be assigned the same nameas the mother.  If they are different, the genome of the daughter will becompared to the same size genomes held in the RAM genebank.  If the daughtergenome is found in the bank, it will be given the same name as the matchinggenome in the bank.  If the daughter genome is not found in the RAM genebank,it will be compared to any same size genomes stored on the disk that are notin the RAM genebank.  If the daughter genome is found in the disk genebank,it will be given the same name as the matching genome in the disk genebank,and that genome will be brougt back into RAM from the disk.  If thedaughter genome does not match the mother or any genome in either the RAMor disk banks, then it will be assigned an arbitrary but unique three lettercode for identification.     The genebanker keeps track of the frequency of each size class and eachgenotype in the soup.  If a genotype exceeds one of the two genotype frequencythresholds, SavThrMem or SavThrPop, its assigned name will be made permanent,and it will be saved to disk in a .gen file.  Genotypes are grouped intoindividual files on the basis of size.  For example, all permanent genotypesof size 80 will be stored together in binary form in a file called 0080.gen.     When the simulator comes down, or when the state of the simulator issaved periodically during a run, all genotypes present in the soup which havenot been assigned permanent names will be stored in files with a .tmpextension.  For example, all temporary genotype names of size 45 would bestored in binary form in a file called 0045.tmp.     The parameter RamBankSiz places a limit on how many genotypes will bestored in RAM.  If there are more than RamBankSiz genotypes in the RAM bank,if any of them have permanent genotype names but have gone extinct in thesoup, they will be swapped out to disk into a .gen file.  Genotypes withoutpermanent names are deleted when they go extinct.  If the numberof living genotypes in the soup is greater than RamBankSiz, then the valueof RamBankSiz is essentially ignored (actually it is treated as if thevalue were equal to the number of living genotypes).  Living genotypes arenever swapped out to disk, only extinct ones.  Under DOS, the parameterRamBankSiz is of little importance, because it is raised if there are moreliving genotypes and if the simulator uses all 640K of RAM, RamBankSiz islowered so that genotypes will be swapped out to avoid running out ofmemory.  Under Unix, this parameter does determine how many genotypeswill be held in the rambank, as long as there are not more than RamBankSizliving genotypes.     The binary genebank files can be examined with the assembler-disassemblerarg (see the relevant documentation, section 5.2 above).  Also, the BeagleExplorer program contains utilities for examing the structure of genomes.One tool condenses the code by pulling out all instructions using templates,which can reveal the pattern of control flow of the algorithm.  Anotherfunction allows one genome to be used as a probe of another, to comparethe similarities and differences between genomes, or to look for the presenceof a certain sequence in a genome.  A completely separate tool called probewill scan the genebank pulling out any genomes that meet a variety ofcriteria that the user may define.  5.5) Restarting an Old Run     When you start Tierra by typing tierra to the prompt, you may providean optional command line argument, which is the name of the file to use asinput.  This is the file that contains the startup parameters.  The defaultfile name is soup_in.  When a simulator comes down, and periodically duringa run, the complete state of the machine is saved so that the simulator canstart up again where it left off.  In order to do this you must have thesimulator read the file soup_out on startup.  This means that you must type:tierra soup_out     That is all there is to it.  5.6) The User Interface     There are two interfaces available for Tierra.  The source code andexecutables are shipped in a form that is configured for the nicer of thetwo, the Basic interface.  However, if you make the appropriate modificationsto the configur.h file, you can recompile with the Standard Output interface(useful for running Tierra in the background).  Documentation for each ofthese interfaces follows.    5.6.1) The Basic Interface      5.6.1.1) The Basic Screen     The Basic frontend features a dynamic interface to the simulation.The screen area is divided into five basic areas:The STATS area consists of the top two lines of the screen.  This areadisplays several important variables, whose values are updated after everybirth:> InstExec  = 75,529993  Cells =  387  Genotypes =  191  Sizes =  23> Extracted = 0080aad @ 8InstExec  = 75,529993 tells us that the simulation has executed a total of75,529,993 instructions.  Cells =  387 tells us that there are presently387 adult cells living in the soup.  Genotypes =  191 tells us that thereare presently 191 distinct genotypes of adult cells living in the soup.Sizes =  23 tells us that there are presently 23 distinct sizes of adultcells living in the soup.  Extracted =  0080aad @ 8 tells us that the lastgenotype to cross one of the frequency thresholds (SavThrMem or SavThrPop)and get saved to disk and get a permanent name was a creature of size 80with the name aad, which had a population of 8 adult cells when it crossedthe threshold.The PLAN area displays the values of several variables, whose values areupdated every million instructions:> InstExeC      =     75  Generations  =    188  Thu Apr 30 11:49:46 1992>     NumCells  =    356  NumGenotypes =    178  NumSizes  =     21>     AvgSize   =     76  NumGenDG     =    171  NumGenRQ  =    239>     AvgPop    =    376  Births       =   1007  Deaths    =   1034>     RateMut   =  10966  RateMovMut   =   1216  RateFlaw  =  97280>     MaxGenPop =     21  (0078aak)    MaxGenMem =     21 (0078aak)InstExeC = 75 tells us that this set of variables was written whenthe simulation had executed 75 million instructions.  Generations = 188tells us that the simulation had run for about 188 generations at this time.Thu Apr 30 11:49:46 1992 tells us the actual time and date that this datawas printed.NumCells = 356 tells us that there were 356 adult cells living in the soup.NumGenotypes = 178 tells us that there were 178 distinct genotypes of adultcells living in the soup.  NumSizes = 21 tells us that there were 21 distinctsizes of adult cells living in the soup.AvgSize = 76 tells us that during the last million instructions, theaverage size was 76.  NumGenDG = 171 tells us that there are 171 genotypesthat have received permanent names and been saved to disk as .gen files inthe genebank directory gb.  NumGenRQ = 239 tells us that at this time therewere 239 distinct genotypes being held in the genebank in RAM (the ramqueue).AvgPop = 376 tells us that during the last million instructions, thepopulation was 376 adult cells.  Births = 1007 tells us that during the lastmillion instructions, there were 1007 births.  Deaths = 1034 tells us thatduring the last million instructions, there were 1034 deaths.     RateMut = 10966 tells us that the actual average background (cosmic ray)mutation rate for the upcoming million instructions will be one mutation per10966/2 instructions exectued.  RateMovMut = 1216 tells us that the actualaverage move mutation rate (copy error) for the upcoming million instructionswill be one mutation for every 1216/2 instructions copied.  RateFlaw = 97280tells us that the actual average flaw rate for the upcoming millioninstructions will be one flaw for every 97280/2 instructions exectued.  Thereason that these numbers represent twice the average mutation rates is thatthey are used to set the range of a uniform random variate determining theinterval between mutations.     MaxGenPop = 21 (0078aak) tells us that at this time, the genotypewith the largest population is 0078aak, and that it has a population of 21adult cells.  MaxGenMem = 21 (0078aak) tells us that the genotype whoseadult cells occupy the largest share of space in the soup is 0078aak, andthat it has a population of 21 adult cells.The MESSAGE area, for state changes, and Genebank data.  This area servesmany purposes - memory reallocation messages, Genebank information displays,large interface prompts (eg changing a soup_in variable ).The ERROR area at the second to the last line of the screen.All simulation errors and exit conditions are passed through this area.The HELP area at the last line of the screen.  This area providessuggestions for keystroke navigation.  Under DOS it will usually looklike this:>                  Press any Key for menu ...Under Unix it will generally look like this:>                  Press Interupt Key for menu ...Under DOS, pressing any key will get you the menu, under Unix, pressing theinterrupt key (usually Ctrl C) will get you the menu, described in thenext section.      5.6.1.2) The Menu Options     Please note that if the Tierra simulator is started with two arguments,it will come up with the menu system activated.  The first argument must bethe name of the soup_in file, the second argument is a dummy and anything willdo:  tierra soup_in1 junkThe frontend menu looks like this:> TIERRA |  i-info  v-var  s-save  q-save&quit  Q-quit  m-misc c-continue |->      These options allow for rapid IO from the simulation, in a user friendlyformat.  The interface allows transition between any data display mode.  Thefeatures are ativated by a single keypress ("Enter/Return" is usually notneeded).The options are:             i-info  v-var  s-save  q-save&quit  Q-quit  m-misc c-continue |->i-info: will display some information about creatures stored in the Genebank.     See below for details.v-var: allows you to alter the value of any of the variables in the     soup_in file at any point during a run.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -