[Avida-SVN] r2731 - in branches/uml-merge: source/orchid tests/_orchid-avida-mde/config

dk at myxo.css.msu.edu dk at myxo.css.msu.edu
Mon Jul 28 13:44:26 PDT 2008


Author: dk
Date: 2008-07-28 16:44:26 -0400 (Mon, 28 Jul 2008)
New Revision: 2731

Modified:
   branches/uml-merge/source/orchid/cOrchidFactory.cc
   branches/uml-merge/source/orchid/cOrchidOrganism.cc
   branches/uml-merge/tests/_orchid-avida-mde/config/avida.cfg
Log:
fixes to consistency configuration.

Modified: branches/uml-merge/source/orchid/cOrchidFactory.cc
===================================================================
--- branches/uml-merge/source/orchid/cOrchidFactory.cc	2008-07-28 17:33:45 UTC (rev 2730)
+++ branches/uml-merge/source/orchid/cOrchidFactory.cc	2008-07-28 20:44:26 UTC (rev 2731)
@@ -7,7 +7,7 @@
 
 /*! This method is called from cOrganism::cOrganism() to build an Orchid organism.
  */
-cOrchidOrganism* cOrchidFactory::BuildOrchidOrganism(cWorld* world) 
+cOrchidOrganism* cOrchidFactory::BuildOrchidOrganism(cWorld* world)
 {
 	return new cOrchidOrganism(world);
 }
@@ -32,7 +32,7 @@
   
  NOTE: I suspect that parent will be null for the ancestor... not sure about this.
  */
-void cOrchidFactory::cOrchidInheritParentInfo (cOrchidOrganism* parent, cOrchidOrganism* child)
+void cOrchidFactory::cOrchidInheritParentInfo(cOrchidOrganism* parent, cOrchidOrganism* child)
 {
 	child->SetParentXML(parent->GetUMLModel()->GetXML());
 	child->SetParentBonus(parent->GetParentBonus());
@@ -341,352 +341,3 @@
 
 	return model;
 }
-
-/*
-xmi_info loadFile(const char* filename) {
-	std::string data, line; // or maybe stringstream? (strstream?)
-	std::ifstream infile;
-	infile.open(filename);  
-	assert(infile.is_open());
-	std::string s;
-	xmi_info x;
-	
-	while (getline (infile, line))
-	{
-		// handle xmi_begin
-		if (line == "=XMI-BEGIN==================") {
-			line.erase();
-			infile >> line;
-			while (line != "=END========================") { 
-				// cat line to the xmi_begin string...
-				x.xmi_begin += (line + " ");
-				infile >> line;
-			}
-		} else if (line == "=XMI-END====================") { 
-			// handle xmi_end
-			line.erase();
-			infile >> line;
-			while (line != "=END========================") { 
-				// cat line to the xmi_begin string...
-				x.xmi_end += (line + " ");
-				infile >> line;
-			}
-		} else if (line == "=CLASS======================") { 
-			// handle xmi_end
-			line.erase();
-			infile >> line;
-			data = "";
-			while (line != "=END========================") { 
-				// cat line to the xmi_begin string...
-				data += (line + " ");
-				infile >> line;
-			}
-			x.classes_info.push_back(data);			
-		}
-		
-		line.erase();
-	}
-	
-	infile.close();
-	return x;
-}
-*/
-
-/*! This function intializes variables with data read from a file named "seed-model.cfg". 
- 
- "This is a crappy little function to read in from a file. 
- It is not robust. It will not understand things unless you 
- follow the *very* specific file format."
- */
-void seed_diagrams(const char* seed_model,
-									 std::vector<cUMLClass>& classes,
-                   std::vector<cUMLStateDiagram>& state_diagrams,
-                   std::vector<scenario_info>& scenarios,
-                   int& hydra_mode, 
-									 bool& witness_mode, 
-									 int& gen_mode, 
-									 int& related_class_mode, 
-									 cMDEPropertyGenerator& pg) {
-  std::string data, line; 
-	int cur_class = -1;
-	int Num_classes;
-	std::ifstream infile;
-	infile.open(seed_model);
-	assert(infile.is_open());
-	std::string class_name;
-	std::string temp, temp1, temp2;
-	std::string op_name, op_code;
-	std::string att_name, att_type, att_val;
-	int trig_i, guard_i, act_i, orig_i, dest_i;
-	std::vector<std::string> att_vals;
-	scenario_info s;
-	std::string path_step, util_name;
-	float util_val;
-	
-	
-	while (getline (infile, line))
-	{
-		if (line == "==MODEL==") {
-			line.erase();
-			infile >> temp1 >> Num_classes;
-			infile >> temp1 >> hydra_mode;
-			infile >> temp1 >> witness_mode;
-			infile >> temp1 >> gen_mode;
-			infile >> temp1 >> related_class_mode;
-			// resize state diagrams & classes to correspond to the Number of classes.
-			classes.resize(Num_classes);
-			state_diagrams.resize(classes.size());
-		} else if (line == "==CLASS==") { 
-			line.erase();
-			infile >> temp1 >> class_name;
-			cur_class++;
-			classes[cur_class].AddClassName(class_name);
-		} else if (line == "==ATTRIBUTES==") {
-			line.erase();
-			infile >> att_name;
-			while (att_name != "==END==") { 
-				infile >> att_type >> temp1 >> att_val;
-				att_vals.clear();
-				while (att_val != "]") { 
-					att_vals.push_back(att_val);
-					infile >> att_val;
-				}
-				
-				classes[cur_class].AddAttribute(att_name, att_type, att_vals);
-				infile >> att_name;				
-			}
-		} else if (line == "==OPERATIONS==") {
-			line.erase();
-			infile >> op_name;
-			while (op_name != "==END==") { 
-				infile >> op_code;
-				classes[cur_class].AddOperation(op_name, op_code);
-				infile >> op_name;				
-			}
-		} else if (line == "==ASSOCIATIONS==") {
-			line.erase();
-			infile >> class_name;
-			while (class_name != "==END==") { 
-				classes[cur_class].AddAssociatedClass(class_name);
-				infile >> class_name;			
-			}
-		} else if (line == "==SCENARIO==") { 
-			line.erase();
-			s.path.clear();
-			s.stateDiagramID = cur_class;
-			infile >> s.shouldLoop >> s.startState;
-			infile >> s.alt_Set_name;
-			infile >> temp;
-			
-			// loop for utility
-			if (temp == "-utility-") { 
-				infile >> temp;
-				//				std::cout << "utility " << temp << std::endl;
-				while (temp != "-end-utility-") { 
-					infile >> util_name >> util_val;
-					//					std::cout << "util_name " << util_name << " util_val " << util_val << std::endl;
-					s.utilityMap[util_name] = util_val;
-					infile >> temp;
-				}
-			}
-			infile >> temp;
-			//			std::cout << temp << std::endl;
-			
-			while (temp != "==END==") { 
-				infile >> path_step;
-				s.path.push_back(path_step);
-				infile >> temp;
-			} 
-			scenarios.push_back(s);
-		} else if (line == "==TRANSITIONS==") { 
-			line.erase();
-			infile >> temp; 
-			while (temp != "==END==") { 
-				infile >> orig_i >> dest_i >> trig_i >> guard_i >> act_i; 
-				if (temp != "0") { 
-					state_diagrams[cur_class].AddTransitionTotal(orig_i, dest_i, trig_i, guard_i, act_i);
-				}	
-				infile >> temp; 
-			}
-		}	else if (line == "==TRANSITION=LABELS==") { 
-			line.erase();
-			infile >> temp;
-			while (temp != "==END==") { 
-				infile >> trig_i >> guard_i >> act_i; 
-				if (temp!="0") { 
-					state_diagrams[cur_class].AddTransitionLabel(trig_i, guard_i, act_i);
-				}
-				infile >> temp;
-			} 
-		}  else if (line == "==TRIGGERS==") { 
-			line.erase();
-			infile >> temp;
-			state_diagrams[cur_class].AddTrigger("<null>", "<null>");
-			while (temp != "==END==") { 
-				infile >> temp1 >> temp2; 
-				if (temp!="0") { 
-					state_diagrams[cur_class].AddTrigger(temp1, temp2);
-				}
-				infile >> temp;
-			} 
-		} else if (line == "==GUARDS==") { 
-			line.erase();
-			infile >> temp;
-			state_diagrams[cur_class].AddGuard("<null>");
-			while (temp != "==END==") { 
-				infile >> temp2; 
-				if (temp!="0") { 
-					state_diagrams[cur_class].AddGuard(temp2);
-				}
-				infile >> temp;
-			} 
-		} else if (line == "==ACTIONS==") { 
-			line.erase();
-			infile >> temp;
-			state_diagrams[cur_class].AddAction("<null>");
-			while (temp != "==END==") { 
-				infile >> temp2; 
-				if (temp!="01") { 
-					state_diagrams[cur_class].AddAction(temp2);
-				}
-				infile >> temp;
-			} 
-		} else if (line == "==KNOWN=EXISTENCE==") { 
-			line.erase(); 
-			//			infile >> temp;
-			getline (infile, temp);
-			while (temp!= "==END==") { 
-				//				infile >> temp2;
-				pg.AddKnownExistenceProperty(temp);
-				getline (infile, temp);
-			}
-		} else if (line == "==KNOWN=ABSENCE==") { 
-			line.erase(); 
-			//			infile >> temp;
-			getline (infile, temp);
-			while (temp!= "==END==") { 
-				//				infile >> temp2;
-				pg.AddKnownAbsenceProperty(temp);
-				//				infile >> temp;
-				getline (infile, temp);
-			}
-		} else if (line == "==KNOWN=UNIVERSAL==") { 
-			line.erase(); 
-			//			infile >> temp;
-			getline (infile, temp);
-			while (temp!= "==END==") { 
-				//				infile >> temp2;
-				pg.AddKnownUniversalProperty(temp2);
-				//				infile >> temp;
-				getline (infile, temp);
-			}
-		} else if (line == "==KNOWN=PRECEDENCE==") { 
-			line.erase(); 
-			//			infile >> temp;
-			getline (infile, temp);
-			while (temp!= "==END==") { 
-				//				infile >> temp1 >> temp2;
-				getline (infile, temp2);
-				pg.AddKnownPrecedenceProperty(temp, temp2);
-				//				infile >> temp;
-				getline (infile, temp);
-			}
-		} else if (line == "==KNOWN=RESPONSE==") { 
-			line.erase(); 
-			//			infile >> temp;
-			getline (infile, temp);
-			while (temp!= "==END==") { 
-				//				infile >> temp1 >> temp2;
-				getline (infile, temp2);
-				pg.AddKnownResponseProperty(temp, temp2);
-				//				infile >> temp;
-				getline (infile, temp);
-			}
-		} else if (line == "==RELEVANT=ATTRIBUTE==") {
-			line.erase(); 
-			infile >> temp;
-			while (temp!= "==END==") { 
-				infile >> temp2;
-				pg.AddRelevantAttribute(temp2);
-				//				std::cout << "relevant at " << temp2 << std::endl;
-				infile >> temp;
-			}
-		} else if (line == "==RELEVANT=OPERATION==") {
-			line.erase(); 
-			infile >> temp;
-			while (temp!= "==END==") { 
-				infile >> temp2;
-				pg.AddRelevantOperation(temp2);
-				//				std::cout << "relevant op " << temp2 << std::endl;
-				infile >> temp;
-			}
-		}
-		
-	}
-	
-	//	seedTriggersGuardsActions(classes, state_diagrams);
-	// For each class... 
-	// triggers = methods
-	// guards = attribute equality / inequality
-	// actions = methods of related classes.
-	cUMLClass c;
-	class_attribute a;
-	operation o;
-	int temp_size;
-	std::string temp3;
-	std::string at_type;
-	std::set<std::string> rc;
-	std::set<std::string>::iterator rcit;
-	
-	for (unsigned int i=0; i<classes.size(); i++) { 
-		c = classes[i];
-		temp_size = c.NumAttributes();
-		
-		// Add nulls.
-		//		state_diagrams[i].AddGuard("<null>");
-		//		state_diagrams[i].AddTrigger("<null>", "<null>");
-		//		state_diagrams[i].AddAction("<null>");
-		
-		// For each attribute...
-		for (int j=0; j<temp_size; j++) {
-			a = c.GetAttribute(j);
-			for (unsigned int k=0; k<a.attribute_values.size(); k++){
-				// Create both an equality and an inequality expression
-				temp2 = a.attribute_values[k];
-				temp3 = a.attribute_name + "=" + temp2;
-				state_diagrams[i].AddGuard(temp3);
-				temp3 = a.attribute_name + "!=" + temp2;
-				state_diagrams[i].AddGuard(temp3);
-			}
-		}
-		
-		// For each method
-		temp_size = c.NumOperations();
-		for (int m=0; m<temp_size; m++) {
-			o = c.GetOperation(m);
-			state_diagrams[i].AddTrigger(o.op_name, o.op_code);
-		}
-		
-		// For each of the related classes, Add an action for each of 
-		// its methods... (yucky...)
-		rc.clear();
-		rc = classes[i].GetAssociatedClasses();
-		for (rcit=rc.begin(); rcit!=rc.end(); rcit++) { 
-			// Find the related class in the list of classes...
-			for (unsigned int k=0; k<classes.size(); k++){
-				if (classes[k].GetClassName() == (*rcit)){
-					// For each of its operations, Add an action...
-					temp_size = classes[k].NumOperations();
-					for (int m=0; m<temp_size; m++) {
-						o = classes[k].GetOperation(m);
-						temp2 = "^" + classes[k].GetClassName() + "." + o.op_name + "()";
-						state_diagrams[i].AddAction(temp2);
-					}
-				}
-			}
-		}
-	}
-  
-	infile.close();
-	return;
-}

Modified: branches/uml-merge/source/orchid/cOrchidOrganism.cc
===================================================================
--- branches/uml-merge/source/orchid/cOrchidOrganism.cc	2008-07-28 17:33:45 UTC (rev 2730)
+++ branches/uml-merge/source/orchid/cOrchidOrganism.cc	2008-07-28 20:44:26 UTC (rev 2731)
@@ -1,4 +1,6 @@
 #include "cOrchidOrganism.h"
+#include "cOrchidPopulation.h"
+#include "cPopulation.h"
 #include "cWorld.h"
 
 /*! Default constructor for Orchid support.  Initialize all Orchid-related variables
@@ -8,6 +10,10 @@
 : m_world(world)
 , m_state_diag(0)
 {
+	// This method has to be smart enough to initialize the cOrchidOrganism from the cUMLModel inside
+	// cOrchidPopulation when called.
+	// 
+	m_model = *m_world->GetPopulation().GetOrchidPopulation()->GetUMLModel();
 }
 
 

Modified: branches/uml-merge/tests/_orchid-avida-mde/config/avida.cfg
===================================================================
--- branches/uml-merge/tests/_orchid-avida-mde/config/avida.cfg	2008-07-28 17:33:45 UTC (rev 2730)
+++ branches/uml-merge/tests/_orchid-avida-mde/config/avida.cfg	2008-07-28 20:44:26 UTC (rev 2731)
@@ -3,7 +3,7 @@
 # For more information, see doc/config.html
 #############################################################################
 
-VERSION_ID 2.7.0   # Do not change this value.
+VERSION_ID 2.9.0   # Do not change this value.
 
 ### GENERAL_GROUP ###
 # General Settings
@@ -12,7 +12,11 @@
                 # 2 = Interactive
 VIEW_MODE 1     # Initial viewer screen
 CLONE_FILE -    # Clone file to load
-VERBOSITY 1     # Control output verbosity
+VERBOSITY 1     # 0 = No output at all
+                # 1 = Normal output
+                # 2 = Verbose output, detailing progress
+                # 3 = High level of details, as available
+                # 4 = Print Debug Information, as applicable
 
 ### ARCH_GROUP ###
 # Architecture Variables
@@ -22,17 +26,25 @@
                   # 2 = Torus
                   # 3 = Clique
 RANDOM_SEED 83123671     # Random number seed (0 for based on time)
-HARDWARE_TYPE 0   # 0 = Original CPUs
+HARDWARE_TYPE 5   # 0 = Original CPUs
                   # 1 = New SMT CPUs
                   # 2 = Transitional SMT
                   # 3 = Experimental CPU
                   # 4 = Gene Expression CPU
+                  # 5 = Orchid CPU
+SPECULATIVE 1     # Enable speculative execution
+BCAST_HOPS 1      # Number of hops to broadcast an alarm
+ALARM_SELF 0      # Does sending an alarm move sender IP to alarm label?
+                  # 0=no
+                  # 1=yes
 
 ### CONFIG_FILE_GROUP ###
 # Configuration Files
 DATA_DIR data                       # Directory in which config files are found
-#INST_SET instset-uml.cfg              # File containing instruction set
-INST_SET custom-uml-instructions.cfg # File containing instruction set
+INST_SET custom-uml-instructions.cfg                          # File containing instruction set
+INST_SET_FORMAT 0                   # Instruction set file format.
+                                    # 0 = Default
+                                    # 1 = New Style
 EVENT_FILE events.cfg               # File containing list of events during run
 ANALYZE_FILE analyze.cfg            # File used for analysis mode
 ENVIRONMENT_FILE environment-uml.cfg    # File that describes the environment
@@ -40,54 +52,124 @@
 
 ### DEME_GROUP ###
 # Demes and Germlines
-NUM_DEMES 1                  # Number of independent groups in the population.
-DEMES_USE_GERMLINE 0         # Whether demes use a distinct germline; 0=off
-DEMES_HAVE_MERIT 0           # Whether demes have merit; 0=no
-GERMLINE_COPY_MUT 0.0075     # Prob. of copy mutations occuring during
-                             # germline replication.
-GERMLINE_REPLACES_SOURCE 0   # Whether the source germline is updated
-                             # on replication; 0=no.
-GERMLINE_RANDOM_PLACEMENT 0  # Whether the seed for a germline is placed
-                             #  randomly within the deme; 0=no.
-MAX_DEME_AGE 500             # The maximum age of a deme (in updates) to be
-                             # used for age-based replication (default=500).
+NUM_DEMES 1                             # Number of independent groups in the
+                                        # population (default=1).
+DEMES_USE_GERMLINE 0                    # Whether demes use a distinct germline (default=0).
+DEMES_PREVENT_STERILE 0                 # Whether to prevent sterile demes from
+                                        # replicating (default=0 or no).
+DEMES_RESET_RESOURCES 0                 # Reset resources in demes on replication. 
+                                        # 0 = reset both demes 
+                                        # 1 = reset target deme 
+                                        # 2 = deme resources remain unchanged
+DEMES_REPLICATE_SIZE 1                  # Number of identical organisms to create or copy from the
+                                        # source deme to the target deme (default=1).
+DEMES_PROB_ORG_TRANSFER 0.0             # Probablity of an organism being transferred from the
+                                        # source deme to the target deme (default=0.0).
+DEMES_ORGANISM_SELECTION 0              # How organisms are selected for transfer from
+                                        # source to target during deme replication.
+                                        # 0=random with replacement (default).
+                                        # 1=sequential.
+DEMES_ORGANISM_PLACEMENT 0              # How organisms are placed during deme replication.
+                                        # 0=cell-array middle (default).
+                                        # 1=deme center.
+                                        # 2=random placement.
+                                        # 3=sequential.
+DEMES_ORGANISM_FACING 0                 # How organisms are facing during deme replication.
+                                        # 0=unchanged (default).
+                                        # 1=northwest.
+                                        # 2=random.
+DEMES_MAX_AGE 500                       # The maximum age of a deme (in updates) to be
+                                        # used for age-based replication (default=500).
+DEMES_MAX_BIRTHS 100                    # The maximum number of births that can occur
+                                        # within a deme; used with birth-count
+                                        # replication (default=100).
+DEMES_MIM_EVENTS_KILLED_RATIO 0.7       # Minimum ratio of events killed required for event period to be a success.
+DEMES_MIM_SUCCESSFUL_EVENT_PERIODS 1    # Minimum number of consecutive event periods that must be a success.
+GERMLINE_COPY_MUT 0.0075                # Prob. of copy mutations occuring during
+                                        # germline replication (default=0.0075).
+GERMLINE_INS_MUT 0.05                   # Prob. of an insertion mutation occuring
+                                        # during germline replication (default=0.05).
+GERMLINE_DEL_MUT 0.05                   # Prob. of a deletion mutation occuring
+                                        # during germline replication (default=0.05).
+DEMES_REPLICATE_CPU_CYCLES 0.0          # Replicate a deme immediately after it has used
+                                        # this number of cpu cycles, normalized
+                                        # by number of orgs in deme (0 = OFF).
+DEMES_REPLICATE_TIME 0.0                # Replicate a deme immediately after it has used
+                                        # this number of cpu cycles, normalized
+                                        # by number of orgs in deme and organism merit (0 = OFF).
+DEMES_REPLICATE_BIRTHS 0                # Replicate a deme immediately after it has 
+                                        # produced this many offspring (0 = OFF).
+DEMES_REPLICATE_ORGS 0                  # Replicate a deme immediately once it reaches a
+                                        # certain number of organisms (0 = OFF).
+DEMES_REPLICATION_ONLY_RESETS 0         # Kin selection mode. Deme replication really:
+                                        # 1=resets deme resources
+                                        # 2=rests deme resources and re-injects organisms
+DEMES_MIGRATION_RATE 0.0                # Probability of an offspring being born in a different deme.
+DEMES_MIGRATION_METHOD 0                # How do we choose what demes an org may land in when it migrates?
+                                        # 0=all other demes
+                                        # 1=eight adjacent neighbors
+                                        # 2=two adjacent demes in list
+DEMES_NUM_X 0                           # Simulated number of demes in X dimension. Only used for migration. 
+DEMES_SEED_METHOD 0                     # Deme seeding method.
+                                        # 0=maintain old consistency
+                                        # 1=new method using genotypes
+DEMES_DIVIDE_METHOD 0                   # Deme divide method. Only works with DEMES_SEED_METHOD 1
+                                        # 0=replace and target demes
+                                        # 1= replace target deme, reset source deme to founders
+                                        # 2=replace target deme, leave source deme unchanged
+DEMES_DEFAULT_GERMLINE_PROPENSITY 0.0   # Default germline propensity of organisms in deme.
+                                        # For use with DEMES_DIVIDE_METHOD 2.
+DEMES_FOUNDER_GERMLINE_PROPENSITY -1.0  # Default germline propensity of founder organisms in deme.
+                                        # For use with DEMES_DIVIDE_METHOD 2.
+                                        #  <0 = OFF
+DEMES_PREFER_EMPTY 0                    # Give empty demes preference as targets of deme replication?
 
 ### REPRODUCTION_GROUP ###
 # Birth and Death
-BIRTH_METHOD 0           # Which organism should be replaced on birth?
-                         # 0 = Random organism in neighborhood
-                         # 1 = Oldest in neighborhood
-                         # 2 = Largest Age/Merit in neighborhood
-                         # 3 = None (use only empty cells in neighborhood)
-                         # 4 = Random from population (Mass Action)
-                         # 5 = Oldest in entire population
-                         # 6 = Random within deme
-                         # 7 = Organism faced by parent
-                         # 8 = Next grid cell (id+1)
-                         # 9 = Largest energy used in entire population
-                         # 10 = Largest energy used in neighborhood
-PREFER_EMPTY 1           # Give empty cells preference in offsping placement?
-ALLOW_PARENT 1           # Allow births to replace the parent organism?
-DEATH_METHOD 2           # 0 = Never die of old age.
-                         # 1 = Die when inst executed = AGE_LIMIT (+deviation)
-                         # 2 = Die when inst executed = length*AGE_LIMIT (+dev)
-AGE_LIMIT 20             # Modifies DEATH_METHOD
-AGE_DEVIATION 0          # Creates a distribution around AGE_LIMIT
-ALLOC_METHOD 0           # (Orignal CPU Only)
-                         # 0 = Allocated space is set to default instruction.
-                         # 1 = Set to section of dead genome (Necrophilia)
-                         # 2 = Allocated space is set to random instruction.
-DIVIDE_METHOD 1          # 0 = Divide leaves state of mother untouched.
-                         # 1 = Divide resets state of mother
-                         #     (after the divide, we have 2 children)
-                         # 2 = Divide resets state of current thread only
-                         #     (does not touch possible parasite threads)
-INJECT_METHOD 0          # 0 = Leaves the parasite thread state untouched.
-                         # 1 = Resets the calling thread state on inject
-GENERATION_INC_METHOD 1  # 0 = Only the generation of the child is
-                         #     increased on divide.
-                         # 1 = Both the generation of the mother and child are
-                         #     increased on divide (good with DIVIDE_METHOD 1).
+BIRTH_METHOD 0            # Which organism should be replaced on birth?
+                          # 0 = Random organism in neighborhood
+                          # 1 = Oldest in neighborhood
+                          # 2 = Largest Age/Merit in neighborhood
+                          # 3 = None (use only empty cells in neighborhood)
+                          # 4 = Random from population (Mass Action)
+                          # 5 = Oldest in entire population
+                          # 6 = Random within deme
+                          # 7 = Organism faced by parent
+                          # 8 = Next grid cell (id+1)
+                          # 9 = Largest energy used in entire population
+                          # 10 = Largest energy used in neighborhood
+PREFER_EMPTY 1            # Give empty cells preference in offsping placement?
+ALLOW_PARENT 1            # Allow births to replace the parent organism?
+DEATH_METHOD 2            # 0 = Never die of old age.
+                          # 1 = Die when inst executed = AGE_LIMIT (+deviation)
+                          # 2 = Die when inst executed = length*AGE_LIMIT (+dev)
+AGE_LIMIT 20              # Modifies DEATH_METHOD
+AGE_DEVIATION 0           # Creates a distribution around AGE_LIMIT
+ALLOC_METHOD 0            # (Orignal CPU Only)
+                          # 0 = Allocated space is set to default instruction.
+                          # 1 = Set to section of dead genome (Necrophilia)
+                          # 2 = Allocated space is set to random instruction.
+DIVIDE_METHOD 1           # 0 = Divide leaves state of mother untouched.
+                          # 1 = Divide resets state of mother
+                          #     (after the divide, we have 2 children)
+                          # 2 = Divide resets state of current thread only
+                          #     (does not touch possible parasite threads)
+                          # 3 = Divide resets mother stats, but not state.
+                          # 4 = 3 + child inherits mother registers and stack values.
+EPIGENETIC_METHOD 0       # Inheritance of state information other than genome
+                          # 0 = none
+                          # 1 = offspring inherits registers and stacks of first thread
+                          # 1 = parent maintains registers and stacks of first thread
+                          # 
+                          # 1 = offspring and parent keep state information
+INJECT_METHOD 0           # 0 = Leaves the parasite thread state untouched.
+                          # 1 = Resets the calling thread state on inject
+GENERATION_INC_METHOD 1   # 0 = Only the generation of the child is
+                          #     increased on divide.
+                          # 1 = Both the generation of the mother and child are
+                          #     increased on divide (good with DIVIDE_METHOD 1).
+RESET_INPUTS_ON_DIVIDE 0  # Reset environment inputs of parent upon successful divide.
+REPRO_METHOD 1            # Replace existing organism: 1=yes
 
 ### RECOMBINATION_GROUP ###
 # Sexual Recombination and Modularity
@@ -104,27 +186,35 @@
 
 ### DIVIDE_GROUP ###
 # Divide Restrictions
-CHILD_SIZE_RANGE 2.0    # Maximal differential between child and parent sizes.
-MIN_COPIED_LINES 0.5    # Code fraction which must be copied before divide.
-MIN_EXE_LINES 0.5       # Code fraction which must be executed before divide.
-REQUIRE_ALLOCATE 1      # (Original CPU Only) Require allocate before divide?
-REQUIRED_TASK -1        # Task ID required for successful divide.
-IMMUNITY_TASK -1        # Task providing immunity from the required task.
-REQUIRED_REACTION -1    # Reaction ID required for successful divide.
-IMPLICIT_REPRO_BONUS 0  # Immediately call Inst_Repro to divide when upon achieving this bonus. 0 = OFF
-IMPLICIT_REPRO_TIME 0   # Immediately call Inst_Repro after this many cpu cycles. 0 = OFF
+CHILD_SIZE_RANGE 2.0         # Maximal differential between child and parent sizes.
+MIN_COPIED_LINES 0.5         # Code fraction which must be copied before divide.
+MIN_EXE_LINES 0.5            # Code fraction which must be executed before divide.
+REQUIRE_ALLOCATE 1           # (Original CPU Only) Require allocate before divide?
+REQUIRED_TASK -1             # Task ID required for successful divide.
+IMMUNITY_TASK -1             # Task providing immunity from the required task.
+REQUIRED_REACTION -1         # Reaction ID required for successful divide.
+REQUIRED_BONUS 0.0           # Required bonus to divide.
+IMPLICIT_REPRO_BONUS 0       # Call Inst_Repro to divide upon achieving this bonus. 0 = OFF
+IMPLICIT_REPRO_CPU_CYCLES 0  # Call Inst_Repro after this many cpu cycles. 0 = OFF
+IMPLICIT_REPRO_TIME 0        # Call Inst_Repro after this time used. 0 = OFF
+IMPLICIT_REPRO_END 0         # Call Inst_Repro after executing the last instruction in the genome.
+IMPLICIT_REPRO_ENERGY 0.0    # Call Inst_Repro if organism accumulates this amount of energy.
 
 ### MUTATION_GROUP ###
 # Mutations
 POINT_MUT_PROB 0.0    # Mutation rate (per-location per update)
-COPY_MUT_PROB 0.0  # Mutation rate (per copy)
+COPY_MUT_PROB 0.0075  # Mutation rate (per copy)
+COPY_SLIP_PROB 0.0    # Slip rate (per copy)
 INS_MUT_PROB 0.0      # Insertion rate (per site, applied on divide)
 DEL_MUT_PROB 0.0      # Deletion rate (per site, applied on divide)
 DIV_MUT_PROB 0.0      # Mutation rate (per site, applied on divide)
+UNIFORM_MUT_PROB 0.0  # Uniform mutation probability (per site, applied on divide)
+                      # - Randomly applies any of the three classes of mutations (ins, del, point).
 DIVIDE_MUT_PROB 0.0   # Mutation rate (per divide)
-DIVIDE_INS_PROB 0.0  # Insertion rate (per divide)
-DIVIDE_DEL_PROB 0.0  # Deletion rate (per divide)
+DIVIDE_INS_PROB 0.05  # Insertion rate (per divide)
+DIVIDE_DEL_PROB 0.05  # Deletion rate (per divide)
 DIVIDE_SLIP_PROB 0.0  # Slip rate (per divide) - creates large deletions/duplications
+SLIP_FILL_MODE 0      # Fill insertions from slip mutations with 0=duplication, 1=nop-X, 2=random, 3=scrambled
 PARENT_MUT_PROB 0.0   # Per-site, in parent, on divide
 SPECIAL_MUT_LINE -1   # If this is >= 0, ONLY this line is mutated
 INJECT_INS_PROB 0.0   # Insertion rate (per site, applied on inject)
@@ -134,6 +224,7 @@
 META_STD_DEV 0.0      # Standard deviation of meta mutation size.
 MUT_RATE_SOURCE 1     # 1 = Mutation rates determined by environment.
                       # 2 = Mutation rates inherited from parent.
+MIGRATION_RATE 0.0    # Uniform probability of offspring migrating to a new deme.
 
 ### REVERSION_GROUP ###
 # Mutation Reversion
@@ -159,6 +250,10 @@
 SLICING_METHOD 1            # 0 = CONSTANT: all organisms get default...
                             # 1 = PROBABILISTIC: Run _prob_ proportional to merit.
                             # 2 = INTEGRATED: Perfectly integrated deterministic.
+                            # 3 = DemeProbabalistic, each deme gets the same number of CPU cycles, which are awarded probabalistically within each deme.
+                            # 4 = ProbDemeProbabalistic, each deme gets CPU cycles proportional to its living population size, which are awarded probabalistically within each deme.
+                            # 5 = CONSTANT BURST: all organisms get default, in SLICING_BURST_SIZE chunks
+SLICING_BURST_SIZE 1        # Sets the scheduler burst size, when supported.
 BASE_MERIT_METHOD 4         # 0 = Constant (merit independent of size)
                             # 1 = Merit proportional to copied size
                             # 2 = Merit prop. to executed size
@@ -168,12 +263,15 @@
                             # 6 = Merit prop. to num times MERIT_BONUS_INST is in genome.
 BASE_CONST_MERIT 100        # Base merit when BASE_MERIT_METHOD set to 0
 DEFAULT_BONUS 1.0           # Initial bonus before any tasks
-MERIT_DEFAULT_BONUS 0       # Scale the merit of an offspring by the default bonus
-                            # rather than the accumulated bonus of the parent?
+MERIT_DEFAULT_BONUS 0       # Scale the merit of an offspring by this default bonus
+                            # rather than the accumulated bonus of the parent? 0 = off
 MERIT_BONUS_INST 0          # in BASE_MERIT_METHOD 6, this sets which instruction counts
                             # (-1 = none, 0 = First in INST_SET.)
 MERIT_BONUS_EFFECT 0        # in BASE_MERIT_METHOD 6, this sets how much merit is earned
                             # per instruction (-1 = penalty, 0 = no effect.)
+FITNESS_METHOD 0            # 0 = default, >=1 = experimental
+FITNESS_COEFF_1 1.0         # 1st FITNESS_METHOD parameter
+FITNESS_COEFF_2 1.0         # 2nd FITNESS_METHOD parameter
 FITNESS_VALLEY 0            # in BASE_MERIT_METHOD 6, this creates valleys from
                             # FITNESS_VALLEY_START to FITNESS_VALLEY_STOP
                             # (0 = off, 1 = on)
@@ -188,6 +286,7 @@
                             #   (num_threads-1) * THREAD_SLICING_METHOD + 1
                             # 0 = One thread executed per time slice.
                             # 1 = All threads executed each time slice.
+NO_CPU_CYCLE_TIME 0         # Don't count each CPU cycle as part of gestation time
 MAX_LABEL_EXE_SIZE 1        # Max nops marked as executed when labels are used
 MERIT_GIVEN 0.0             # Fraction of merit donated with 'donate' command
 MERIT_RECEIVED 0.0          # Multiplier of merit given with 'donate' command
@@ -197,7 +296,13 @@
                             # donation attempt threshold; -1=no thresh
 DONATE_THRESH_QUANTA 10     # The size of steps between quanta donate thresholds
 MAX_DONATES 1000000         # Limit on number of donates organisms are allowed.
-PRECALC_MERIT 0             # Pre-calculate merit at birth (unlimited resources only).
+PRECALC_PHENOTYPE 0         # 0 = Disabled
+                            #  1 = Assign precalculated merit at birth (unlimited resources only)
+                            #  2 = Assign precalculated gestation time
+                            #  3 = Assign precalculated merit AND gestation time.
+                            # Fitness will be evaluated for organism based on these settings.
+FASTFORWARD_UPDATES 0       # Fast-forward if the average generation has not changed in this many updates. (0 = off)
+FASTFORWARD_NUM_ORGS 0      # Fast-forward if population is equal to this
 
 ### GENEOLOGY_GROUP ###
 # Geneology
@@ -259,26 +364,34 @@
 
 ### ANALYZE_GROUP ###
 # Analysis Settings
-MAX_CONCURRENCY -1   # Number of concurrent analyze threads
-ANALYZE_OPTION_1   # String variable accessible from analysis scripts
-ANALYZE_OPTION_2   # String variable accessible from analysis scripts
+MAX_CONCURRENCY -1  # Maximum number of analyze threads, -1 == use all available.
+ANALYZE_OPTION_1    # String variable accessible from analysis scripts
+ANALYZE_OPTION_2    # String variable accessible from analysis scripts
 
 ### ENERGY_GROUP ###
 # Energy Settings
-ENERGY_ENABLED 0                       # Enable Energy Model. 0/1 (off/on)
-ENERGY_GIVEN_ON_INJECT 0               # Energy given to organism upon injection.
-ENERGY_GIVEN_AT_BIRTH 0                # Energy given to offspring upon birth.
-FRAC_PARENT_ENERGY_GIVEN_AT_BIRTH 0.5  # Fraction of perent's energy given to offspring.
-FRAC_ENERGY_DECAY_AT_BIRTH 0.0         # Fraction of energy lost due to decay during reproduction.
-NUM_INST_EXC_BEFORE_0_ENERGY 0         # Number of instructions executed before energy is exhausted.
-ENERGY_CAP -1                          # Maximum amount of energy that can be stored in an organism.  -1 means the cap is set to Max Int
-APPLY_ENERGY_METHOD 0                  # When should rewarded energy be applied to current energy?
-                                       # 0 = on divide
-                                       # 1 = on completion of task
-                                       # 2 = on sleep
-ENERGY_VERBOSE 0                       # Print energy and merit values. 0/1 (off/on)
-LOG_SLEEP_TIMES 0                      # Log sleep start and end times. 0/1 (off/on)
-                                       # WARNING: may use lots of memory.
+ENERGY_ENABLED 0                               # Enable Energy Model. 0/1 (off/on)
+ENERGY_GIVEN_ON_INJECT 0                       # Energy given to organism upon injection.
+ENERGY_GIVEN_AT_BIRTH 0                        # Energy given to offspring upon birth.
+FRAC_PARENT_ENERGY_GIVEN_TO_ORG_AT_BIRTH 0.5   # Fraction of perent's energy given to offspring organism.
+FRAC_PARENT_ENERGY_GIVEN_TO_DEME_AT_BIRTH 0.5  # Fraction of perent's energy given to offspring deme.
+FRAC_ENERGY_DECAY_AT_ORG_BIRTH 0.0             # Fraction of energy lost due to decay during organism reproduction.
+FRAC_ENERGY_DECAY_AT_DEME_BIRTH 0.0            # Fraction of energy lost due to decay during deme reproduction.
+NUM_INST_EXC_BEFORE_0_ENERGY 0                 # Number of instructions executed before energy is exhausted.
+ENERGY_CAP -1                                  # Maximum amount of energy that can be stored in an organism.  -1 means the cap is set to Max Int
+APPLY_ENERGY_METHOD 0                          # When should rewarded energy be applied to current energy?
+                                               # 0 = on divide
+                                               # 1 = on completion of task
+                                               # 2 = on sleep
+FRAC_ENERGY_TRANSFER 0.0                       # Fraction of replaced organism's energy take by new resident
+LOG_SLEEP_TIMES 0                              # Log sleep start and end times. 0/1 (off/on)
+                                               # WARNING: may use lots of memory.
+FRAC_ENERGY_RELINQUISH 1.0                     # Fraction of organisms energy to relinquish
+ENERGY_PASSED_ON_DEME_REPLICATION_METHOD 0     # Who get energy passed from a parent deme
+                                               # 0 = Energy divided among organisms injected to offspring deme
+                                               # 1 = Energy divided among cells in offspring deme
+INHERIT_EXE_RATE 0                             # Inherit energy rate from parent? 0=no  1=yes
+ATTACK_DECAY_RATE 0.0                          # Percent of cell's energy decayed by attack
 
 ### SECOND_PASS_GROUP ###
 # Tracking metrics known after the running experiment previously
@@ -298,10 +411,68 @@
 # Promoters
 PROMOTERS_ENABLED 0             # Use the promoter/terminator execution scheme.
                                 # Certain instructions must also be included.
+PROMOTER_INST_MAX 0             # Maximum number of instructions to execute before terminating. 0 = off
 PROMOTER_PROCESSIVITY 1.0       # Chance of not terminating after each cpu cycle.
 PROMOTER_PROCESSIVITY_INST 1.0  # Chance of not terminating after each instruction.
-PROMOTER_BG_STRENGTH 0          # Probability of positions that are not promoter
-                                # instructions initiating execution (promoters are 1).
-REGULATION_STRENGTH 1           # Strength added or subtracted to a promoter by regulation.
-REGULATION_DECAY_FRAC 0.1       # Fraction of regulation that decays away. 
-                                # Max regulation = 2^(REGULATION_STRENGTH/REGULATION_DECAY_FRAC)
+PROMOTER_TO_REGISTER 0          # Place a promoter's base bit code in register BX when starting execution from it?
+TERMINATION_RESETS 0            # Does termination reset the thread's state?
+NO_ACTIVE_PROMOTER_EFFECT 0     # What happens when there are no active promoters?
+                                # 0 = Start execution at the beginning of the genome.
+                                # 1 = Kill the organism.
+                                # 2 = Stop the organism from executing any further instructions.
+PROMOTER_CODE_SIZE 24           # Size of a promoter code in bits. (Maximum value is 32)
+PROMOTER_EXE_LENGTH 3           # Length of promoter windows used to determine execution.
+PROMOTER_EXE_THRESHOLD 2        # Minimum number of bits that must be set in a promoter window to allow execution.
+INST_CODE_LENGTH 3              # Instruction binary code length (number of bits)
+INST_CODE_DEFAULT_TYPE 0        # Default value of instruction binary code value.
+                                # 0 = All zeros
+                                # 1 = Based off the instruction number
+CONSTITUTIVE_REGULATION 0       # Sense a new regulation value before each CPU cycle?
+
+### COLORS_GROUP ###
+# Output colors for when data files are printed in HTML mode.
+# There are two sets of these; the first are for lineages,
+# and the second are for mutation tests.
+COLOR_DIFF CCCCFF        # Color to flag stat that has changed since parent.
+COLOR_SAME FFFFFF        # Color to flag stat that has NOT changed since parent.
+COLOR_NEG2 FF0000        # Color to flag stat that is significantly worse than parent.
+COLOR_NEG1 FFCCCC        # Color to flag stat that is minorly worse than parent.
+COLOR_POS1 CCFFCC        # Color to flag stat that is minorly better than parent.
+COLOR_POS2 00FF00        # Color to flag stat that is significantly better than parent.
+COLOR_MUT_POS 00FF00     # Color to flag stat that has changed since parent.
+COLOR_MUT_NEUT FFFFFF    # Color to flag stat that has changed since parent.
+COLOR_MUT_NEG FFFF00     # Color to flag stat that has changed since parent.
+COLOR_MUT_LETHAL FF0000  # Color to flag stat that has changed since parent.
+
+### BIOMIMETIC_GROUP ###
+# Biomimetic Features Settings
+BIOMIMETIC_REFRACTORY_PERIOD 0.0  # Number of updates affected by refractory period
+BIOMIMETIC_MOVEMENT_STEP 1        # Number of cells to move Avidian on move instruction
+BIOMIMETIC_MOVEMENT_LOG 0         # Log detailed movement information (WARNING: large data file)
+BIOMIMETIC_MOVEMENT_FACTOR 1.0    # Scale merit bonus due to movement (m<1.0 applies a cost)
+BIOMIMETIC_EVAL_ON_MOVEMENT 0     # Force task evaluation on each movement step
+BIOMIMETIC_K 0                    # Carrying capacity in number of organisms
+
+### PHEROMONE_GROUP ###
+# Pheromone Settings
+PHEROMONE_ENABLED 0        # Enable pheromone usage. 0/1 (off/on)
+PHEROMONE_AMOUNT 1.0       # Amount of pheromone to add per drop
+PHEROMONE_DROP_MODE 0      # Where to drop pheromone
+                           # 0 = Half amount at src, half at dest
+                           # 1 = All at source
+                           # 2 = All at dest
+EXPLOIT_EXPLORE_PROB 0.00  # Probability of random exploration
+                           # instead of pheromone trail following
+LOG_PHEROMONE 0            # Log pheromone drops.  0/1 (off/on)
+PHEROMONE_LOG_START 0      # Update at which to start logging pheromone drops
+EXPLOIT_LOG_START 0        # Update at which to start logging exploit moves
+EXPLORE_LOG_START 0        # Update at which to start logging explore moves
+MOVETARGET_LOG_START 0     # Update at which to start logging movetarget moves
+LOG_INJECT 0               # Log injection of organisms.  0/1 (off/on)
+INJECT_LOG_START 0         # Update at which to start logging injection of
+                           # organisms
+
+### ORCHID_GROUP ###
+# Orchid settings
+ENABLE_ORCHID 1                   # Enable the Orchid subsystem, 0==off (default), 1==on.
+ORCHID_SEED_MODEL seed-model.cfg  # UML configuration file.




More information about the Avida-cvs mailing list