ϊΞΗΚΏGr      !"#$%&'()*+,-./0123456789:;< = > ? @ A B C D E F G H I J K L M N O P Q RSTUVWXYZ[\]^_`abcdefghijklmnopqportable experimentalamy@nualeargais.ieNoneA rotating logger. write msg' formats and writes a new log message.  d prefix n% creates a logger that will write to  directory d . The log "rotates" (starts a new log file) every n 3 records. Log files follow the naming convention prefix.k, where k J is the number of the last log record contained in the file. If logging  has already been set up in  directory#, then logging will continue where 7 it left off; appending to the most recent log file. rstuvwxyz{|}~ rstuvwxyz{|}~portable experimentalamy@nualeargais.ieNone7A database offering storage and retrieval for records. (Get a list of all keys in the database. !Read a record from the database. !Write a record to the database. J If an agent with the same name already exists, it will be overwritten. #Remove a record from the database. F The database may archive records rather than simply deleting them.      None FA simple database where each record is stored in a separate file, and % the name of the file is the record's key.   d# (re)creates the FSDatabase in the  directory d. Read a record from a file. €Write a record to a file. ‚ƒ„ …†€‡ˆ‰  ‚ƒ„ …†€‡ˆ‰portable experimentalamy@nualeargais.ieNone username sleepTime state task creates a daemon  running as username, which invokes task repeatedly, sleeping  for  sleepTime% microseconds between invocations of task. Š‹ŒŽ  Š‹ŒŽportable experimentalamy@nualeargais.ieNone From  1http://www.haskell.org/haskellwiki/Random_shuffle  xs n x returns a copy of xs in which the nth 1 element (if it exists) has been replaced with x.  xs n x returns a copy of xs in which the nth " element has been replaced with x. Causes an exception if xs has  fewer than n+1 elements. Compare with .  Assuming xs; is a sequence containing the elements of a square matrix,   n xs/ returns the elements of the submatrix of size nxn, & centred within the original matrix xs. Example: Suppose we have a 5x5# matrix and we want to extract the  central 3x3" submatrix, as illustrated below.   a b c d e  f g h i j g h i  k l m n o --!’ l m n  p q r s t q r s  u v w x y 8We can represent the elements of the original matrix as ['a'..'y']. % The elements of the submatrix are  ['g', 'h', 'i', 'l', 'm', 'n', 'q', 'r', 's'],  or equivalently, " ghilmnqrs". And that is what   3 ['a'..'y'] returns.  Assuming xs8 is a sequence containing the elements of a matrix with k  columns,  (a,b) (c, d) k xs returns the elements of the  submatrix from (a,b) in the upper left corner to (c,d) in the lower  right corner). ! Note: Matrix indices begin at (0,0). Example: Suppose we have a 4x6# matrix and we want to extract the 8 submatrix from (1,2) to (2,4), as illustrated below.   a b c d e f  g h i j k l --!’ i j k  m n o p q r o p q  s t u v w x 8We can represent the elements of the original matrix as ['a'..'x']. % The elements of the submatrix are  ['i', 'j', 'k', 'o', 'p', 'q'], or equivalently,  "ijkopq". And that is what  (1,2) (2,4) 6 ['a'..'x']  returns.  n? returns the greatest integer not greater than the square root  of n.  n m7 returns the greatest integer not greater than the log  base n of m.  n returns True if n is a perfect square (i.e., if 2 there exists an _integer_ m such that m*m = n) n  m returns True if n is a power of m (i.e., if 2 there exists an _integer_ k such that m^k = n)  !"  !"  "!  !"portable experimentalamy@nualeargais.ieNone#An encoding scheme. ''Encodes a value as a sequence of bits. )7Returns the value corresponding to a sequence of bits. +&Convert a list of bits to a string of 0s and 1s. ,JConstructs a Gray code for the specified values, using the minimum number 1 of bits required to encode all of the values. JIf the number of values provided is not a perfect square, some codes will  not be used; calling decode with those values will return Nothing. 8 You can find out if this will be the case by calling excessGrayCodes.  For example  mkGrayCode ['a','b','c'] would assign the code  00 to a, 01 to b, and 11 to c , leaving 10 unassigned. J To avoid having unassigned codes, you can repeat a value in the input 4 list so the example above could be modified to   mkGrayCode ['a','a','b','c'], which would assign the codes  00 and 01 to a, 11 to b, and 10 to c. IA Gray code maps values to codes in a way that guarantees that the codes H for two consecutive values will differ by only one bit. This feature J can be useful in evolutionary programming because the genes resulting K from a crossover operation will be similar to the inputs. This helps to F ensure that offspring are similar to their parents, as any radical F changes from one generation to the next are the result of mutation  alone. -- n/ returns the number of bits required to encode n  values. .. n2 returns the number of values that can be encoded  using n> bits. The number of values that can be encoded in n bits is  2^n. #$%&'()*+,-. #$%&'()*+,-. #$%&'()*+,-. #$%&'()*+,-.portable experimentalamy@nualeargais.ieNone#'()*+,#,'()*+portable experimentalamy@nualeargais.ieNone/,A paired instruction for building an agent. 0*Given two possible forms of a PairedGene, 0 takes into @ account any dominance relationship, and returns a PairedGene  representing the result. 1;Read the next pair of PairedGenes from a two sequences of   nucleotides4, and return the resulting PairedGene (after taking G into account any dominance relationship) and the remaining (unread) * portion of the two nucleotide strands. /01/01/01/01portable experimentalamy@nualeargais.ieNone 2@Cuts two lists at the specified locations, swaps the ends, and . splices them. The resulting lists will be:    a[0..n-1] ++ b[m..]  b[0..m-1] ++ a[n..]    Here are some examples.     Expression Result  2 2 5 ("abcdef", "ABCDEF") ("abF"," ABCDEcdef")  2 3 1 ("abcd", "ABCDEFG") (" abcBCDEFG","Ad")  2 4 4 ("abcdef", "ABCDEF") ("abcdEF","ABCDef")   F If n "d 0 or m "d 0, the corresponding input list will be completely  transferred to the other.     Expression Result  2 0 4 ("abcdef", "ABCDEF") ("EF"," ABCDabcdef")  2 (-2) 4 ("abcd", "ABCDEFGH") ("EFGH","ABCDabcd")  2 5 0 ("abcdef", "ABCDEF") (" abcdeABCDEF","f")   L If n or m are greater than or equal to length of the corresponding list, & that list will not be transferred.     Expression Result  2 10 0 ("abcdef", "ABCDEF") (" abcdefABCDEF","")  2 0 0 ("", "ABCDEF" ) ("ABCDEF","")   3Same as 2$, except that the two locations are  chosen at random. 4?Cuts two lists at the specified location, swaps the ends, and ( splices them. This is a variation of 2 where n "a m. 5Same as 4), except that the location is chosen at  random. 6&Mutates a random element in the list. 70Mutates a random element in one list in a pair. 86Performs an operation with the specified probability. 90Performs an operation a random number of times. . The probability of repeating the operation n times is p^n. ‘IRandomly select a boolean, but weighted to return True with probability  p. ’HChoose an element at random from a list and return the element and its  index 23456789‘:;’ 23456789:; 4267;:5398 23456789‘:;’ portable experimentalamy@nualeargais.ie Safe-Inferred<An artificial life species. B All species used in Crιatϊr must be an instance of this class. =Returns the agent ID. >5Returns True if the agent is alive, false otherwise. ?&A unique ID associated with an agent. @8The internal clock used by Crιatϊr is a simple counter. <=>?@<=>?@<=>?@<=>?@ portable experimentalamy@nualeargais.ie Safe-InferredA5A clock representing the time in a Crιatϊr universe. E It is used to schedule events and ensure that each agent gets its  fair share of the CPU. : This clock is entirely separate from the system clock.  It advances only when C is called. > This allows Crιatϊr to run without being affected by other < processes which might be using the CPU at the same time. BThe current time, measured in ticks CAdvance the clock to the next tick. ABCABCABCABC portable experimentalamy@nualeargais.ie Safe-InferredHCCreates a counter that will store its value in the specified file. D“”•–EFGH—˜™šDEFGHEFGDHD“”•–EFGH—˜™š portable experimentalamy@nualeargais.ieNoneK.Assign a unique ID using the supplied prefix. I›œJKLžŸIJKLJKILI›œJKLžŸ portable experimentalamy@nualeargais.ieNoneM?A species that reproduces, transmitting genetic information to : its offspring. Minimal complete definition: all except mate. N7The basic unit of hereditary information for an agent. # The type signature for the agent's genome is [Base a]. O>Recombines the genetic information from two parents, creating 0 genetic information for potential offspring. 0 Typically this involves the following steps: A 1. Recombine the two strands of genetic information (one from . each parent) to obtain two new strands. 8 2. Discard one strand, and return the remaining one. P@Builds an agent based on the genome provided, if it is possible  to do so. MNOPQMNOPQMNOPQMNOPQportable experimentalamy@nualeargais.ieNoneR?A species that reproduces, transmitting genetic information to : its offspring. Minimal complete definition: all except mate. S7The basic unit of hereditary information for an agent. # The type signature for the agent' s genome is  ([Base a] , [Base a]). T From the two/ strands of the genetic information from this  agent, creates a single$ strand that will contribute to the  child' s genome. A (This is analogous to creating either a single sperm or ova.) U@Builds an agent based on the genome provided, if it is possible  to do so. RSTUVRSTUVRSTUVRSTUVportable experimentalamy@nualeargais.ieNoneW&A habitat containing artificial life. WXYZ[\]^_`ab cdefg‘’£WXYZ[\]^_`abcdefgWXYZ[\]^g_`bdacfeWXYZ[\]^_`ab cdefg‘’£portable experimentalamy@nualeargais.ieNoneh@A program which allows an agent to interact with one or more of  its neighbours. @The input parameter is a list of agents. The first agent in the B list is the agent whose turn it is to use the CPU. The rest of D the list contains agents it could interact with. For example, if C agents reproduce sexually, the program might check if the first G agent in the list is female, and the second one is male, and if so, D mate them to produce offspring. The input list is generated in a E way that guarantees that every possible sequence of agents has an  equal chance of occurring. ?The program must return a list of agents that it has modified. ; (The universe will then be updated with these changes.) 2 The order of the output list is not important. i"A program for an agent which doesn't interact with other agents. E The input parameter is the agent whose turn it is to use the CPU. E The program must return the agent (which may have been modified). ; (The universe will then be updated with these changes.) hijklmn€op₯q¦ hijklmnopq ihnpoqjklm hijklmn€op₯q¦§  !"#$%&'()*+,-./01234456789:;<=>?@ABCDEFGHIJK L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a]^b`accdefghijklmnopqrstuvwxyz{|}~€‚ƒ„…†‡ˆ‰Š}‹Œƒ„Ž‘’“”•–—˜ T } ™ š ƒ „ › œ Y  ž Ÿ  ‘’£€₯¦§¨creatur-2.0.12ALife.Creatur.LoggerALife.Creatur.Database!ALife.Creatur.Database.FileSystemALife.Creatur.DaemonALife.Creatur.Util#ALife.Creatur.Genetics.CodeInternalALife.Creatur.Genetics.Gene$ALife.Creatur.Genetics.Recombination ALife.CreaturALife.Creatur.ClockALife.Creatur.CounterALife.Creatur.AgentNamer+ALife.Creatur.Genetics.Reproduction.Asexual*ALife.Creatur.Genetics.Reproduction.SexualALife.Creatur.UniverseALife.Creatur.Universe.TaskALife.Creatur.Genetics.CodeSimpleRotatingLoggerLogger writeToLogmkSimpleRotatingLoggerDatabaseDBRecordkeyslookupstoredeleteRecordkey FSDatabase mkFSDatabaseDaemon onStartup onShutdown onExceptiontaskusername sleepTimelaunchshufflesafeReplaceElementreplaceElement cropSquarecropRectisqrtilogBase perfectSquare isPowerOf reverseLookupstateMaprotateCodecSizecTableencode encodeNextdecode decodeNextasBits mkGrayCodegrayCodeLengthgrayCodeCapacity PairedGeneexpressdecodeAndExpress cutAndSplicerandomCutAndSplice crossoverrandomCrossover mutateListmutatePairedListswithProbabilityrepeatWithProbabilityrandomOneOfPairrandomOneOfListAgentagentIdisAliveAgentIdTimeClock currentTimeincTimePersistentCounterCountercurrent incrementmkPersistentCounterSimpleAgentNamer AgentNamergenNamemkSimpleAgentNamer ReproductiveBase recombinebuild makeOffspring produceGameteUniverse_clock_logger_agentDB_namer_extraSimpleUniverseagentDBclockextraloggeragentIds multiLookupstoreOrArchiveaddAgentmkSimpleUniverse AgentsProgram AgentProgram simpleDaemonstartupHandlershutdownHandlerexceptionHandler withAgentrunNoninteractingAgents withAgentsrunInteractingAgents initialised directory logFilename expFilenamemaxRecordsPerFile recordCount initIfNeeded initialisewrite'bumpRecordCount rotateLog$fLoggerSimpleRotatingLogger readRecord3 writeRecord3mainDir archiveDir writeRecord2isRecordFileName$fDatabaseFSDatabase termReceiveddaemonUsername daemonMaindaemonMainLoop handleTERM safeSlice expressMaybeweightedRandomBooleanrandomListSelectiontimefilename$fClockPersistentCounter$fCounterPersistentCounterprefixcounter withCounter$fAgentNamerSimpleAgentNamernamer$fAgentNamerUniverse$fClockUniverse$fLoggerUniverse withAgent' withAgents' makeViews