📄 tierra.doc
字号:
MICRO STEP Mode = keypressCell 1: 55 0045aaa @ 12595 Slice= 19 Stack[ 12628]IP [ 12572]( -23 ) = 0x01 nop1 [ 12639]AX [ 30236] [ 12595]BX [ 12632] [ 45] <CX [ 7] [ 0]DX [ 4] [ 0]Flag = 0 [ 0]Daughter @ 30199 + 45 [ 0] [ 0] [ 0] MICRO | T-Track cell ESC-Main Menu n-Next Step The various components of the display are documented in the following:Cell 1: 55 0045aaa @ 12595 Slice= 19 Each creature has associated with it, a cell structure. The cellstructures are organized in a two dimensional array. Cell 1: 55 tells usthat the structure for the currently active creature is at location 1,55 inthe cells array. The currently active creature is 0045aaa whose cell starts at address12595 in the soup. This creature currently has 19 CPU cycles left in itstime slice. Note that when the Slice counts down to zero, the slicer willswap in the next creature in the slicer queue, and the debugger will displaythe CPU of the next creature. Therefore when there are more than onecreature in the soup, it is hard to follow the activity of a single creature,since the debugger will be swapped from creature to creature. This problemcan be eliminated by activating the track mode (see above).Daughter @ 30199 + 45 The currently active creature has allocated a space of 45 instructionsat address 30199 in the soup, which it presumably will use to make a daughter.IP [ 12572]( -23 ) = 0x01 nop1 The instruction pointer (IP) of the currently active creature ispresently located at the soup address 12572. Notice that this address islocated 23 instruction BEFORE the start of its own cell. The number inparentheses (-23) is the offset of the IP from the start of the cell. Aslong as the IP is inside the cell, this offset will be displayed without asign. If the IP is outside of the cell, the offset will be displayed witha + or a - sign. The current offset of -23 means that the instruction pointerof this creature is executing the code of some other creature. In fact0045aaa is a parasite. The instruction currently being executed isrepresented in the soup by the hex value 0x01. The assembler mnemonic of thisinstruction is nop1, it is a no-operation.AX [ 30236]BX [ 12632]CX [ 7]DX [ 4] The four CPU registers of the currently active creature contain thevalues indicated above. Probably, the AX value is the address where thecreature is writing in its daughter cell, the BX value is the address thatit is copying from in its own cell, the CX value is the number ofinstructions of the genome remaining to be copied, and the DX value is thesize of the last template used.Flag = 0 This shows the status of the flag register. This can be used torecognize when an instruction has failed, generating an error condition.Stack[ 12628] [ 12639] [ 12595] [ 45] < [ 0] [ 0] [ 0] [ 0] [ 0] [ 0] The stack of the currently active creature contains the values indicatedabove. The stack pointer points at the location indicated by the < sign(the top of the stack). The values on the stack probably include theaddress of the instruction pointer (12628) which was pushed on the stack whenthe parasite called the copy procedure of its host, the address of the endof the creature (12639), the address of the beginning of the creature(12595), and the size of the creature (45). 5.6.1.2.6) The Genome Injector The menu system provides a mechanism for injecting genomes into arunning simulation. This tool allows a genome from the genebank to beinjected into the run at the user's command. The genome must be in a .genfile in the path indicated by the GenebankPath soup_in variable. However, there is a function Inject(), in the genebank.c module, whichtakes a pointer to a genome as an argument. This function can be used toinject genomes from any source. An interesting use of this function would beto facilitate migration of genomes between simulations running on separatemachines, creating an archipelago (this is the basis of the CM5 portcurrently underway). 5.6.2) The Standard Output & Interrupt Handler When Tierra is compiled with: #define FRONTEND STDIO, while running itproduces output to the console that looks something like this:Using instruction set (INST) = 1TIERRA: LOG = on, Histogram Logging = off sizeof(Instruction) = 1sizeof(Cell) = 180sizeof(MemFr) = 16 60000 bytes allocated for soup 16380 bytes allocated for cells 8000 bytes allocated for MemFrtsetup: arrays allocated without errorbeginning of GetNewSoupseed = 1init of soup completeGetNewSoup: loading 0080aaa into cell 0,2InstExeC = 0 Generations = 0 Wed Apr 29 17:00:06 1992 NumCells = 1 NumGenotypes = 1 NumSizes = 1 AvgSize = 80 NumGenDG = 1 NumGenRQ = 1 RateMut = 6382 RateMovMut = 1280 RateFlaw = 102400tsetup: soup gottenextract: 0080aaa @ 276 vInstExeC = 1 Generations = 3 Wed Apr 29 17:01:04 1992 NumCells = 376 NumGenotypes = 131 NumSizes = 8 AvgSize = 79 NumGenDG = 1 NumGenRQ = 131 AvgPop = 292 Births = 995 Deaths = 620 MaxGenPop = 208 (0080aaa) MaxGenMem = 208 (0080aaa) RateMut = 12515 RateMovMut = 1264 RateFlaw = 101120extract: 0080abl @ 8InstExeC = 2 Generations = 5 Wed Apr 29 17:02:05 1992 NumCells = 380 NumGenotypes = 159 NumSizes = 12 AvgSize = 79 NumGenDG = 2 NumGenRQ = 159 AvgPop = 378 Births = 847 Deaths = 843 MaxGenPop = 169 (0080aaa) MaxGenMem = 169 (0080aaa) RateMut = 12648 RateMovMut = 1264 RateFlaw = 101120extract: 0080aan @ 8extract: 0045aab @ 8InstExeC = 3 Generations = 8 Wed Apr 29 17:03:17 1992 NumCells = 373 NumGenotypes = 141 NumSizes = 15 AvgSize = 77 NumGenDG = 4 NumGenRQ = 141 AvgPop = 368 Births = 918 Deaths = 925 MaxGenPop = 144 (0080aaa) MaxGenMem = 144 (0080aaa) RateMut = 11794 RateMovMut = 1232 RateFlaw = 98560extract: 0080adj @ 7extract: 0080acu @ 7extract: 0080aek @ 8extract: 0045aad @ 8InstExeC = 4 Generations = 10 Wed Apr 29 17:05:11 1992 NumCells = 383 NumGenotypes = 144 NumSizes = 19 AvgSize = 74 NumGenDG = 8 NumGenRQ = 144 AvgPop = 376 Births = 1071 Deaths = 1061 MaxGenPop = 118 (0080aaa) MaxGenMem = 118 (0080aaa) RateMut = 11185 RateMovMut = 1184 RateFlaw = 94720extract: 0080aad @ 8 The meaning of each different kind of information is described below:> Using instruction set (INST) = 1 Because we are likely to proliferate instruction sets in the nearfuture, the system lets us know which one it is using.> TIERRA: LOG = on, Histogram Logging = off If the soup_in variable ``Log'' is non-zero, most of the informationshown in the standard output listing above will be written to the file``tierra.log'' on disk. Histogram Logging = off indicates that histogramsviewed through the menu system will not be saved to the log. This optioncan be toggled so that static histograms are saved to the log.> sizeof(Instruction) = 1> sizeof(Cell) = 180> sizeof(MemFr) = 16 The size in bytes of each of the main structures, of which the systemwill allocate large arrays at startup.> 60000 bytes allocated for soup> 16380 bytes allocated for cells> 8000 bytes allocated for MemFr The total number of bytes used for each of the three main arrays ofstructures.> tsetup: arrays allocated without error Statement indicating that the arrays were allocated without error.> beginning of GetNewSoup Statement indicating that the program is entering the GetNewSoup()function.> seed = 690349257 A record of the seed of the random number generator used in this run.This can be used to repeat the run if desired.> init of soup complete A statement indicating that the soup has been initialized.> GetNewSoup: loading 0080aaa into cell 0,2 A statement indicating that the system is innoculating the soup witha creature of size 80. There will be a comparable line for every creatureused in innoculating the soup at startup. The first creature goes into cell2 of array 0, because cells 0 and 1 are used for other purposes.> InstExeC = 0 Generations = 0 Wed Apr 29 17:00:06 1992> NumCells = 1 NumGenotypes = 1 NumSizes = 1> AvgSize = 80 NumGenDG = 1 NumGenRQ = 1> RateMut = 6382 RateMovMut = 1280 RateFlaw = 102400> tsetup: soup gotten These lines indicate the starting conditions of several variables whichwill be explained below.> extract: 0080aaa @ 276 v This line indicates that the genotype 0080aaa crossed one of thefrequency thresholds set in the soup_in file, SavThrMem or SavThrPop,and that there were 276 adult creatures of this genotype in the soupwhen this was noted. However, no creatures are extracted until thereaper is activated when the soup becomes full. This means that 0080aaawas not actually extracted at the time that it crossed a threshold, butactually much later, when it had a relatively large population. The vafter 276 indicates that this was a ``virtual extraction'', which meansthat the genome was not actually saved to disk, since it already has beensaved to disk. Anytime a permanent genotype goes extinct, then reappearsand crosses a threshold, it will experience a virtual extraction, whichjust means that the crossing of the threshold will be reported as an extractin standard out and in the tierra.log file (this information can be putto good use by the tieout tool: tieout tierra.log ie ex)> InstExeC = 1 Generations = 3 Wed Apr 29 17:01:04 1992> NumCells = 376 NumGenotypes = 131 NumSizes = 8> AvgSize = 79 NumGenDG = 1 NumGenRQ = 131> AvgPop = 292 Births = 995 Deaths = 620> MaxGenPop = 208 (0080aaa) MaxGenMem = 208 (0080aaa)> RateMut = 12515 RateMovMut = 1264 RateFlaw = 101120 A statement of this form is printed after every million instructionsexecuted by the system. See the plan() function in the bookeep.c modulefor more details on this.> InstExeC = 1 Generations = 3 Wed Apr 29 17:01:04 1992 InstExeC = 1 tells us that one million instructions have been executedin this run. Generations = 3 tells us that roughly three generations ofcreatures have passed so far during this run. Wed Apr 29 17:01:04 1992tells us the time and date of this record.> NumCells = 376 NumGenotypes = 131 NumSizes = 8 NumCells = 376 tells us that there were 376 adult cells (and a roughlyequal number of daughter cells) at this point in the run. NumGenotypes = 131tells us that there were 131 distinct adult genotypes (code sequences) livingin the soup at the time of this record. NumSizes = 8 tells us that therewere eight distinct adult genome sizes (creature code lengths) living in thesoup at this time.> AvgSize = 79 NumGenDG = 1 NumGenRQ = 131 AvgSize = 79 tells us that the average size of all the adult creaturesliving in the soup at this time was 79 instructions. NumGenDG = 1 tells usthat there is one genotype that has received a permanent name and been savedto disk as .gen files in the genebank directory gb. NumGenRQ = 131 tells usthat at this time there were 131 distinct genotypes being held in the genebankin RAM (the ramqueue).> AvgPop = 292 Births = 995 Deaths = 620AvgPop = 292 tells us that during the last million instructions the averagepopulation was 292 adult cells. Births = 995 tells us that during the lastmillion instructions, there were 995 births. Deaths = 620 tells us thatduring the last million instructions, there were 620 deaths.> MaxGenPop = 208 (0080aaa) MaxGenMem = 208 (0080aaa) MaxGenPop = 208 (0080aaa) tells us that at this time, the genotypewith the largest population is 80aaa, and that it has a population of 208adult cells. MaxGenMem = 208 (0080aaa) tells us that the genotype whoseadult cells occupy the largest share of space in the soup is 80aaa, and thatit has
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -