- ChangeEnvironment
<string env_string>Action designed to read in and process a line formatted as if it were in the
environment file. This will change
environmental settings on the fly. You should create all resources and
reactions in the environment file and only use this file to change these
resources and reactions. Also, note that this action does not replace reactions already in the environment that share the same name as the argument given to ChangeEnvironment; it simply adds another reaction with the same name.
- DelayedDemeEvent
<int x1> <int y1> <int x2> <int y2> <int delay> <int duration> <bool static_position> <int total_events>
- DelayedDemeEventsPerSlots
<int x1> <int y1> <int x2> <int y2> <int delay> <int duration> <bool static_position> <int total_slots_per_deme> <int total_events_per_slot_max> <int total_events_per_slot_min> <int tolal_event_flow_levels>
- InjectResource
<string res_name> <double res_count>Inject (add) a specified amount of a specified resource.
res_name must already exist as
a resource in environment file.
- InjectScaledResource
<string res_name> <double res_count>
- MergeResourceAcrossDemes
<string deme_res_name> <string global_res_name>
- OutflowScaledResource
<string res_name> <double res_percent>
- SetCellResource
<int cell_id> <string res_name> <double res_count>
- SetConfig
<string config_var> <string value>
- SetDemeResource
<string res_name> <double res_count>
- SetDemeResourceInflow
<int deme id> <string resource_name> <double inflow>
- SetDemeResourceOutflow
<int deme id> <string resource_name> <double outflow>
- SetEnvironmentInputs
<int input_1> <int input_2> <int input_3> Set the inputs that all organisms get from the environment when doing IO to these specific values. There must
be exactly three inputs, and they must have the usual values for the top 8 "key" bits, i.e. they must be of the form
0x0F?????? 0x33?????? 0x55?????? where ? can be replaced with any hexadecimal digit.
- SetEnvironmentRandomMask
<int mask>
- SetFracDemeTreatable
SetGradientResource
<string env_string>
Action designed to read in and process a line for ONE gradient resource,
formatted as if it were in the environment file.
This will change environmental settings for this one gradient resource on the fly.
You should create the resource in the environment file and only use this file to
change this resource.
Unlike with ChangeEnvironment, no resources other than the one specified in the event
will be affected.
SetGradientInflow
<string res_name> <double res_inflow>
Set existing gradient resource plateau inflow rate to a new value, without redrawing
the entire resource.
SetGradientOutflow
<string res_name> <double res_outflow>
Set existing gradient resource plateau outflow rate to a new value, without redrawing
the entire resource.
SetGradientConeInflow
<string res_name> <double res_inflow>
SetGradientConeOutflow
<string res_name> <double res_outflow>
SetGradientPlatInflow
<string res_name> <double res_inflow>
SetGradientPlatOutflow
<string res_name> <double res_outflow>
SetGradPlatVarInflow
<string res_name> <double mean> <double variance> <int type>
Set existing gradient resource plateau inflow rate to a new value, without redrawing
the entire resource, based on a random number pull from normal distribution of this
mean and variance. As such, this uses a half normal or folded normal approach with
expected value = sigma * sqrt(2 /pi).
If type == 0, new inflow will be the random number pulled.
If type > 0, new inflow will be mean + abs(the random number pulled).
If type == 1, new inflow will be max (0, mean - abs(the random number pulled)).
If type == 2, new inflow will be max (0, mean + the random number pulled).
- SetNumInstBefore0Energy
<int new_value>
- SetOptimizeMinMax
No Arguments
- SetPeriodicResource
<string reaction_name> <string amplitude> <string pi/frequence> <phaseShift*pi> <string initial_Y>
- SetReactionInst
<string reaction_name> <string inst>Set the instruction triggered by this reaction.
reaction_name must already
exist in the environment file.
inst must be in the instruction set.
SetPopCapEnforcement
[int cap=0] [int rate=1]
Will set POPULATION_CAP to cap and begin killing orgs off at rate rate by killing rate # orgs + 1 every time a new org is born.
Accepts string args (e.g. SetPopCapEnforcement cap=0:rate=1).
SetPredatoryResource
<string res_name> <double kill_odds> <double guarded_juvs_per_adult>double detection_prob>
A gradient resource with teeth. If set in motion, will kill with prob kill_odds 1 random org
in each cell of plateau. If it passes over a den resource, will kill unguarded offspring with
probability kill_odds. If an org steps on the resource, the org is killed with probability
kill_odds. detection_prob sets the probability of orgs detecting the predator via look sensors.
- SetReactionMaxTaskCount
<string reaction_name> <int max_count>Set the max task count required to trigger a reaction to task_count.
reaction_name must already
exist in the environment file.
- SetReactionMinTaskCount
<string reaction_name> <int min_count>Set the min task count required to trigger a reaction to task_count.
reaction_name must already
exist in the environment file.
- SetReactionTask
<string reaction_name> <string task_name>Set the task required to trigger a reaction to task_name.
reaction_name and task_name must already
exist in the environment file.
- SetReactionValue
<string reaction_name> <double value>Set the reaction value to a specific level.
reaction_name must already
exist in the environment file.
value can be negative.
- SetReactionValueMult
<string reaction_name> <double value>Multiply the reaction value by the value.
reaction_name must already
exist in the environment file.
value can be negative.
- SetResource
<string res_name> <double res_count>Set the resource amount to a specific level.
res_name must already exist as
a resource in environment file.
- SetResourceInflow
<string resource_name> <double inflow>Set the resource inflow to a specific level.
res_name must already exist as
a resource in environment file.
- SetResourceOutflow
<string resource_name> <double outflow>Set the resource outflow to a specific level.
res_name must already exist as
a resource in environment file.
- SetSeasonalResourceSets resource availiblity to seasonal
- SetSeasonalResource10Kyears_1To_1Sets resource availiblity to seasonal 1 to -1 for 10K years of 365 updates
- SetSeasonalResource1Kyears_1To_1Sets resource availiblity to seasonal 1 to -1 for 1K years of 365 updates
- SetTaskArgDouble
<int task> <int arg> <double value>
- SetTaskArgInt
<int task> <int arg> <int value>
- SetTaskArgString
<int task> <int arg> <string value>
- ZeroResources
noneSet all resurce levels to zero.
- AssignRandomCellData
[num_cells=deme_size]
AttackDen
[double probability=0.0] [int juvs_per_adult=1]
Kills each unguarded juv in dens (habitat == 3 or 4) with set probability. juvs_per_adult sets
the ratio of guarding adults to juvs. E.g. if ratio is set to 5 and there are 2 guards and 12
juveniles in a den, two random juveniles will be attacked with their probability of death at
the set probability.
- AvidianConjugation
(prob. of donation)
- CompeteDemes
[int type=1]
- CompeteDemes_AttackKillAndEnergyConserve
No Arguments
- CompeteDemesByEnergyDistribution
Competes demes according to the distribution of energy among the organisms
- CompeteDemesByNetwork
No arguments.
- CompeteDemesByTaskCount
Competes demes according to the number of times a given task has been completed within that demeCompetes demes based on the total number of times that a
task has been completed by an organism in the deme since the
was initialized. This action takes one integer parameter representing
number of the task that is to be used for competition. If no parameter
supplied, the class uses the first task defined in the environment file
compete the demes.
- CompeteDemesByTaskCountAndEfficiency
Competes demes according to the number of times a given task has been completed within that deme and the efficiency with which it was done
- CompeteOrganisms
[int type=0] [int parents_survive=0] [double scaled_time=1.0] [int dynamic_scaling=0]Calculates fitness of each organism in the population and creates a new population of descendants
where each organism has a chance of replication proportional to its fitness. Can be used to make Avida
operate without population dynamics and asynchronous replication, i.e. like a genetic algorithm. If NewTrial
events have occurred since the last CompeteOrganisms event, then the average fitness over those trials
will be used.
competition_type controls how the fitnesses of multiple trials determine the overall fitness
used for the competition: 0=geometric mean of fitnesses, 1=scaled geometric mean of fitnesses (the greatest fitness
of each trial is scaled to 1.0 before taking the geometric mean), 2=arithmetic mean, 3=geometric mean plus
rescales effective fitness values by the geometric mean of the difference from the top score and the median.Setting parents_survive to 1, causes the first copy of an organism that makes it into the new
population to be the original (unmutated) parent organism.
- ConnectCells
<int cellA_x> <int cellA_y> <int cellB_x> <int cellB_y>Connects a pair of specified cells.
- CopyDeme
<int src_id> <int dest_id>
- CountMultipleOpinions
[int opinion_count=0]
- CountOpinions
[int desired_opinion=0 [int multiplicity=1 [int side=0]]]
- DecayPoints
No ArgumentsDecays the number of points a deme has accumulated by
a percentage that is set in the configuration file.
- DemeBalanceTwoTasks
Two min and max for not
- DemeReactionDiversity
No arguments.
- DemeResourceThresholdPredicate
cString resourceName, cString comparisonOperator, double threasholdValue
- Desynchronization
No Arguments
- DiffuseHGTGenomeFragments
<none>
- DisconnectCells
<int cellA_x> <int cellA_y> <int cellB_x> <int cellB_y>Disconnects a pair of specified cells.
- DistributeData
No arguments.
- DistributeDataCheaply
No arguments.
- DistributeDataEfficiently
No arguments.
- DivideDemes
No arguments (yet!)
- Flash
No arguments
FlushTopNavTraceNo arguments
Force printing of nav trace (as set up by PrintTopNavTrace) even if all candidate orgs have not been
evaluated / reproduced.
- Inject
[string fname="START_ORGANISM"] [int cell_id=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]Inject a single organisms into the population. Arguments must be
included from left to right; if all arguments are left out, the default
creature is the ancestral organism, and it will be injected into cell 0,
have an uninitialized merit, and be marked as liniage id 0.
- InjectAll
[string fname="START_ORGANISM"] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]Same as Inject, but no cell_id is specified and the organism is placed
into all cells in the population.
- InjectAllRandomRepro
<int length> [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
- InjectCanvas
[string fname="START_ORGANISM"] [int canvas_id=0] [int canvas_x=0] [int canvas_y=0] [int group_id=-1] [int forager_type=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
- InjectDemes
[string fname="START_ORGANISM"] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
- InjectDemesFromNest
[int num_orgs=1] [int nest_cellid=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
- InjectDemesRandom
[int num_orgs=1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
- InjectGroup
[string fname="START_ORGANISM"] [int cell_id=0] [int group_id=-1] [int forager_type=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
- InjectModuloDemes
[string fname="START_ORGANISM"] [int mod_num = 1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
- InjectParasite
<string filename> <string label> [int cell_start=0] [int cell_end=-1]Attempt to inject a parasite genome into the supplied population cell
range with the specified label.
- InjectParasitePair
<string filename_genome> <string filename_parasite> <string label> [int cell_start=0] [int cell_end=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]Inject host parasite pairs into the population cell range specified.
- InjectRandom
<int length> [int cell_id=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]Injects a randomly generated genome of the supplied length into the population.
- InjectRange
[string fname="START_ORGANISM"] [int cell_start=0] [int cell_end=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]Injects identical organisms into a range of cells of the population.Example:
InjectRange 000-aaaaa.org 0 10Will inject 10 organisms into cells 0 through 9.
- InjectSequence
<string sequence> [int cell_start=0] [int cell_end=-1] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]Injects identical organisms based on the supplied genome sequence into
a range of cells of the population.Example:
InjectSequence ckdfhgklsahnfsaggdsgajfg 0 10 100Will inject 10 organisms into cells 0 through 9 with a merit of 100.
- InjectSequenceWDivMutRate
<string sequence> [int cell_start=0] [int cell_end=-1] [double div_mut_rate=0] [double merit=-1] [int lineage_label=0] [double neutral_metric=0]
- IteratedConsensus
[int compete_period=100 [int replace_number=1 [int kill=1 [int restrict_range=1]]]]
- JoinGridCol
[int col_id=-1] [int min_row=0] [int max_row=-1]Add connections between cells along a column in an Avida grid.
- JoinGridRow
[int row_id=-1] [int min_col=0] [int max_col=-1]Add connections between cells along a row in an Avida grid.
- KillFractionInSequence
[double fraction=0.01]
- KillFractionInSequence_PopLimit
[double fraction=0.01]
- KillInstLimit
[double probability=0.9] [cString inst=nand] [int limit=5]
- KillInstPair
[double probability=0.9] [cString inst1=nand] [cString inst2=nor] [int limit=1]
- KillMeanBelowThresholdPaintable
- KillNBelowResourceThreshold
[int numkills=0, string resource name, double threshold=0]
- KillProb
[double probability=0.9]Using the specified probability, test each organism to see if it is killed off.
- KillRate
[double probability=0.9]Randomly removes a certain proportion of the population.
In principle, this action does the same thing as the KillProb event.
However, instead of a probability, here one has to specify a rate. The
rate has the same unit as fitness. So if the average fitness is 20000,
than you remove 50% of the population on every update with a removal rate
of 10000.
- KillRectangle
[int x1=0] [int y1=0] [int x2=0] [int y2=0]Kill off all organisms in a rectangle defined by the points (x1, y1) and (x2, y2).
- KillWithinRadiusBelowResourceThreshold
[int numradii=0, int radius=0, string resource name, double threshold=0, double killdensity=1]
- KillWithinRadiusBelowResourceThresholdTestAll
[int numradii=0, int radius=0, string resource name, double threshold=0, double killdensity=1]
- KillWithinRadiusMeanBelowResourceThreshold
[int numradii=0, int radius=0, string resource name, double threshold=0, double killdensity=1]
- MeasureDemeNetworks
No arguments.
- MixPopulation
No arguments.
- ModMutProb
[string mut_type="COPY_MUT"] [double prob=0.0] [int start_cell=-1] [int end_cell=-1]Values for mut_type are POINT, COPY_MUT, COPY_INS, COPY_DEL, COPY_UNIFORM, COPY_SLIP, DIV_MUT, DIV_INS, DIV_DEL, DIV_UNIFORM, DIV_SLIP, DIVIDE_MUT, DIVIDE_INS, DIVIDE_DEL, DIVIDE_UNIFORM, DIVIDE_SLIP, PARENT, INJECT_MUT, INJECT_INS, and INJECT_DEL. These correspond to their counterparts in avida.cfg.To turn off all mutations, use ZeroMuts.
- NewTrial
No ArgumentsImmediately calculates the fitness of each organism in the population, saves this value for use with the CompeteOrganisms
event, and resets the state of all organisms.
- PhenotypeMatch
string file-name
- Pred_DemeEventMoveBetweenTargets
[int times=1]
- Pred_DemeEventMoveCenter
[int times=1]
- Pred_DemeEventNUniqueIndividualsMovedIntoTarget
[int numorgs=1]
PrintMiniTraces
[boolean random=0] [boolean save_dominants=0] [boolean save_groups=0] [boolean save_foragers=0] [int orgs_per=1] [int max_samples=0] [boolean print_genomes=0] [boolean initial]
Prints a condensed trace of execution during a lifetime. Who is traced is determined by arguements.
E.g. with the args save_dominants=1:orgs_per=2, at the specified update(s) a list is
created containing the two most abundant genotypes. The next offspring born to parents with those specified
genotypes will then be traced for their entire lifetimes. If save_foragers is set to 1, the list
would contain the two most abundant genotypes for EACH existing forager type. Multiple types can
be saved without duplicating traces. E.g. save_dominants=1:save_foragers=1:orgs_per=2 would
trace one org from each of the two most dominant genotypes and one org from each of the two most
common genotypes for each of the existing forager types if those genotypes were not also one of the
two most abundant overall. If max_samples is > 0, this will cap the total number of orgs traced with
priorities on fullfilling orgs_per quota for: dominants > forager types > group ids.
Setting random will look at current population, select individuals up to max_samples (without replacement)
record the sampled genotypes (one per individual, including genotype duplicates) and then trace the next orgs
born with those genotypes, removing the genotype instance from the 'to-do' list with each new trace. Random option
is not currently compatible with (will override) other save_ arguements or orgs_per.
Minitraces are currently only fully implemented for the experimental hardware and partially for
the SMT hardware because of differences in the way some minitrace variables are tracked by the
different hardware types.
Each call to PrintMiniTraces resets the genotype list, rather than appending to it.
PrintMicroTraces
[boolean random=0] [boolean rand_prey=0] [boolean rand_pred=0] [int next_prey=0] [int next_pred=0] [boolean save_dominants=0] [boolean save_groups=0] [boolean save_foragers=0] [int orgs_per=1] [int max_samples=0] [boolean print_genomes=0]
Same general operation behavior as PrintMiniTraces but only saves executed instruction symbols along with
org id, genotype id, forager type, and birth and death updates. Microtraces map executions as 'what the org was trying
to do'. So, failed executions are recorded except when CPU costs are being paid. If CPU costs are being paid, we record
the execution when the instruction was submitted, not necessarily when it was actually executed. Each microtrace is
saved on a single line in microtrace.dat.
rand_pred and rand_prey are compatible with each other, building a single list of genotypes to trace based on
current genotypes in the population for each of the two general forager types (will generate a list of 2 X max_samples
if both arguements are used).
Each call to PrintMicroTraces appends to the genotype list, rather than replacing it (opposite of mini traces).
If next_prey or next_pred are used, the organisms born to parents with prey or predator
foraging targets will be traced, regardless of genotype, until the set arg number have been traced (requested number will
be replaced, not appended to, by subsequent event calls).
- RemovePredators
- ReplaceFromGermline
[double p(kill)=0.0 [int update_cell_data=0]]
- ReplicateDemes
[string trigger=full_deme]
Tests all demes in a population and replicates those wherein a specific trigger condition has been met. The available triggers are:
- full_deme: All deme cells are occupied by organisms.
- corners: The upper-left and lower-right cells in a deme are occupied
- deme-age: The deme has reached the age specified as DEMES_MAX_AGE in avida.cfg
- birth-count: The deme has reached the number of births specified as DEMES_MAX_BIRTHS in avida.cfg
- sat-mov-pred: ???
- events-killed: ???
- sat-msg-pred: ???
- sat-deme-predicate: ???
- perf-reactions: ???
- consume-res: The deme has consumed a total number of resources specified as RES_FOR_DEME_REP in avida.cfg
- ResetDemes
No Arguments
- SerialTransfer
[int transfer_size=1] [int ignore_deads=1]Similar to KillProb, but we specify the exact number of organisms to
keep alive after the event. The ignore_deads
argument determines whether only living organisms are retainted.
- SetMigrationRate
[double rate=0.0]
- SetMutProb
[string mut_type="COPY_MUT"] [double prob=0.0] [int start_cell=-1] [int end_cell=-1]For a list of values for mut_type, see SetMutProb.
- SeverGridCol
[int col_id=-1] [int min_row=0] [int max_row=-1]Remove the connections between cells along a column in an Avida grid.
- SeverGridRow
[int row_id=-1] [int min_col=0] [int max_col=-1]Remove the connections between cells along a row in an Avida grid.
- SwapCells
<int cell_id1> <int cell_id2> Swaps the two organisms and all associated information (such as previous inputs). Doesn't work with identical cell ids.
- SwapRandomCells
<int number swaps> Swaps the specified number of pairs of randomly selected organisms. If randomly selected ids happen to be the same, nothing happens that iteration.
- Synchronization
No Arguments
- TherapyDecayDemeResource
[string resource_name=resname, string decrease_type=(none|lin|exp), double amount=0.2]
- TherapyStructuralNumInst
[cString inst=nand] [double exprWeight=1.0] [double exponent=1.0(linear)]
- TherapyStructuralRatioDistBetweenNearest
[cString inst=nand] [double exprWeight=1.0] [double exponent=1.0(linear)] [int print=100]
- ToggleFitnessValley
No Arguments
- ToggleRewardInstruction
No Arguments
- TrackAllMessages
No Arguments
- UnitFitness
No arguments.
- ZeroMuts
No ArgumentsThis event will set all mutation rates to zero. That is, it will set all cell mutation rates to zero, so that new organisms born will have zero mutation rates. Current organisms will not be affected, and may still mutate.