[Avida-cvs] [avida-svn] r604 - in development: Avida.xcodeproj source/actions source/analyze source/event source/main
brysonda@myxo.css.msu.edu
brysonda at myxo.css.msu.edu
Tue Apr 11 20:37:01 PDT 2006
Author: brysonda
Date: 2006-04-11 23:37:01 -0400 (Tue, 11 Apr 2006)
New Revision: 604
Modified:
development/Avida.xcodeproj/project.pbxproj
development/source/actions/LandscapeActions.cc
development/source/actions/cAction.h
development/source/analyze/cAnalyze.cc
development/source/analyze/cAnalyzeGenotype.cc
development/source/analyze/cAnalyzeUtil.cc
development/source/event/cEventManager.cc
development/source/main/cLandscape.cc
development/source/main/cLandscape.h
Log:
Implement RandomLandscape and AnalyzeLandscape actions.
Modified: development/Avida.xcodeproj/project.pbxproj
===================================================================
--- development/Avida.xcodeproj/project.pbxproj 2006-04-10 17:31:08 UTC (rev 603)
+++ development/Avida.xcodeproj/project.pbxproj 2006-04-12 03:37:01 UTC (rev 604)
@@ -556,7 +556,7 @@
700AE91B09DB65F200A073FD /* cTaskContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cTaskContext.h; sourceTree = "<group>"; };
700AEB7B09E3490300A073FD /* avida-smt.cfg */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = "avida-smt.cfg"; sourceTree = "<group>"; };
700E28CF0859FFD700CF158A /* tObjectFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tObjectFactory.h; sourceTree = "<group>"; };
- 700E2B83085DE50C00CF158A /* avida-viewer */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = "avida-viewer"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 700E2B83085DE50C00CF158A /* avida-viewer */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "avida-viewer"; sourceTree = BUILT_PRODUCTS_DIR; };
701384330900A45B0087ED2E /* organism.smtx */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = organism.smtx; sourceTree = "<group>"; };
7013845F09028B3E0087ED2E /* cAvidaConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cAvidaConfig.h; sourceTree = "<group>"; };
7013846009028B3E0087ED2E /* cAvidaConfig.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cAvidaConfig.cc; sourceTree = "<group>"; };
@@ -891,7 +891,7 @@
70DCAC77097AF730002F8733 /* key_chart */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = key_chart; sourceTree = "<group>"; };
70DCAC78097AF730002F8733 /* viewer.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = viewer.cc; sourceTree = "<group>"; };
70DCAC9B097AF7C0002F8733 /* primitive.cc */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = primitive.cc; sourceTree = "<group>"; };
- 70DCAD1C097AF7CC002F8733 /* avida-s */ = {isa = PBXFileReference; includeInIndex = 0; lastKnownFileType = "compiled.mach-o.executable"; path = "avida-s"; sourceTree = BUILT_PRODUCTS_DIR; };
+ 70DCAD1C097AF7CC002F8733 /* avida-s */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "avida-s"; sourceTree = BUILT_PRODUCTS_DIR; };
70DCAD1F097AF81A002F8733 /* AvidaScript.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AvidaScript.h; sourceTree = "<group>"; };
70DCAD20097AF81A002F8733 /* cLexer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = cLexer.h; sourceTree = "<group>"; };
70DCAD21097AF81A002F8733 /* cLexer.l */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.lex; path = cLexer.l; sourceTree = "<group>"; };
Modified: development/source/actions/LandscapeActions.cc
===================================================================
--- development/source/actions/LandscapeActions.cc 2006-04-10 17:31:08 UTC (rev 603)
+++ development/source/actions/LandscapeActions.cc 2006-04-12 03:37:01 UTC (rev 604)
@@ -20,26 +20,188 @@
#include "cHardwareManager.h"
#include "cLandscape.h"
#include "cStats.h"
+#include "cString.h"
#include "cWorld.h"
+#include "tSmartArray.h"
-class cActionSampleLandscape : public cAction
+class cActionAnalyzeLandscape : public cAction
{
private:
cString m_filename;
- int m_sample_size;
+ int m_trials;
+ int m_min_found;
+ int m_max_trials;
+ tArray<int> m_depths;
+ tList<cLandscape> m_batches[10];
+
+public:
+ cActionAnalyzeLandscape(cWorld* world, const cString& args)
+ : cAction(world, args), m_filename("land-analyze.dat"), m_trials(1000), m_min_found(0), m_max_trials(0)
+ {
+ cString largs(args);
+ if (largs.GetSize()) m_filename = largs.PopWord();
+ if (largs.GetSize()) m_trials = largs.PopWord().AsInt();
+ if (largs.GetSize()) m_min_found = largs.PopWord().AsInt();
+ if (largs.GetSize()) m_max_trials = largs.PopWord().AsInt();
+ }
+
+ const cString GetDescription()
+ {
+ return "AnalyzeLandscape [filename='land-analyze.dat'] [int trials=1000] [int min_found=0] [int max_trials=0]";
+ }
+
+ void Process(cAvidaContext& ctx)
+ {
+ int update = -1;
+ cLandscape* land = NULL;
+
+ if (ctx.GetAnalyzeMode()) {
+ cAnalyzeGenotype* genotype = NULL;
+ tListIterator<cAnalyzeGenotype> batch_it(m_world->GetAnalyze().GetCurrentBatch().List());
+ while (genotype = batch_it.Next()) {
+ LoadGenome(genotype->GetGenome());
+ m_depths.Push(genotype->GetDepth());
+ }
+ } else {
+ cGenotype* genotype = m_world->GetClassificationManager().GetBestGenotype();
+ LoadGenome(genotype->GetGenome());
+ m_depths.Push(genotype->GetDepth());
+ update = m_world->GetStats().GetUpdate();
+ }
+
+ m_world->GetAnalyze().GetJobQueue().Execute();
+
+ cDataFile& outfile = m_world->GetDataFile(m_filename);
+ outfile.WriteComment("Landscape analysis. Distance results are grouped by update/depth.");
+ for (int i = 0; i < m_depths.GetSize(); i++) {
+ for (int dist = 1; dist <= 10; dist++) {
+ land = m_batches[dist - 1].Pop();
+
+ outfile.Write(update, "update");
+ outfile.Write(m_depths[i], "tree depth");
+ outfile.Write(dist, "distance");
+ outfile.Write(land->GetProbDead(), "fractional mutations lethal");
+ outfile.Write(land->GetProbNeg(), "fractional mutations detrimental");
+ outfile.Write(land->GetProbNeut(), "fractional mutations neutral");
+ outfile.Write(land->GetProbPos(), "fractional mutations beneficial");
+ outfile.Write(land->GetNumTrials(), "number of trials");
+ outfile.Write(land->GetNumFound(), "number found");
+ outfile.Write(land->GetAveFitness(), "average fitness");
+ outfile.Write(land->GetAveSqrFitness(), "average sqr fitness");
+ outfile.Endl();
+
+ delete land;
+ }
+ }
+ }
+
+private:
+ void LoadGenome(const cGenome& genome)
+ {
+ cAnalyzeJobQueue& jobqueue = m_world->GetAnalyze().GetJobQueue();
+ cInstSet& inst_set = m_world->GetHardwareManager().GetInstSet();
+
+ for (int dist = 10; dist >= 1; dist--) {
+ cLandscape* land = new cLandscape(m_world, genome, inst_set);
+ land->SetDistance(dist);
+ land->SetTrials(m_trials);
+ m_batches[dist - 1].PushRear(land);
+ if (dist == 1) {
+ jobqueue.AddJob(new tAnalyzeJob<cLandscape>(land, &cLandscape::Process));
+ } else {
+ land->SetMinFound(m_min_found);
+ land->SetMaxTrials(m_max_trials);
+ jobqueue.AddJob(new tAnalyzeJob<cLandscape>(land, &cLandscape::RandomProcess));
+ }
+ }
+ }
+};
+
+
+class cActionRandomLandscape : public cAction
+{
+private:
+ cString m_filename;
+ int m_dist;
+ int m_trials;
tList<cLandscape> m_batch;
public:
+ cActionRandomLandscape(cWorld* world, const cString& args)
+ : cAction(world, args), m_filename("land-random.dat"), m_dist(1), m_trials(0)
+ {
+ cString largs(args);
+ if (largs.GetSize()) m_filename = largs.PopWord();
+ if (largs.GetSize()) m_dist = largs.PopWord().AsInt();
+ if (largs.GetSize()) m_trials = largs.PopWord().AsInt();
+ }
+
+ const cString GetDescription()
+ {
+ return "RandomLandscape [filename='land-random.dat'] [int distance=1] [int trials=0]";
+ }
+
+ void Process(cAvidaContext& ctx)
+ {
+ int update = -1;
+ cLandscape* land = NULL;
+
+ if (ctx.GetAnalyzeMode()) {
+ cAnalyzeJobQueue& jobqueue = m_world->GetAnalyze().GetJobQueue();
+ cInstSet& inst_set = m_world->GetHardwareManager().GetInstSet();
+
+ tListIterator<cAnalyzeGenotype> batch_it(m_world->GetAnalyze().GetCurrentBatch().List());
+ cAnalyzeGenotype* genotype = NULL;
+ while (genotype = batch_it.Next()) {
+ cLandscape* land = new cLandscape(m_world, genotype->GetGenome(), inst_set);
+ land->SetDistance(m_dist);
+ land->SetTrials(m_trials);
+ m_batch.PushRear(land);
+ jobqueue.AddJob(new tAnalyzeJob<cLandscape>(land, &cLandscape::RandomProcess));
+ }
+ jobqueue.Execute();
+ } else {
+ land = new cLandscape(m_world, m_world->GetClassificationManager().GetBestGenotype()->GetGenome(),
+ m_world->GetHardwareManager().GetInstSet());
+ m_batch.PushRear(land);
+ land->SetDistance(m_dist);
+ land->SetTrials(m_trials);
+ land->RandomProcess(ctx);
+ update = m_world->GetStats().GetUpdate();
+ }
+
+ std::ofstream& outfile = m_world->GetDataFileOFStream(m_filename);
+ while (land = m_batch.Pop()) {
+ land->PrintStats(outfile, update);
+ delete land;
+ }
+ }
+};
+
+
+class cActionSampleLandscape : public cAction
+{
+private:
+ cString m_filename;
+ int m_trials;
+ tList<cLandscape> m_batch;
+
+public:
cActionSampleLandscape(cWorld* world, const cString& args)
- : cAction(world, args), m_filename("land-sample.dat"), m_sample_size(0)
+ : cAction(world, args), m_filename("land-sample.dat"), m_trials(0)
{
cString largs(args);
- if (largs.GetSize()) m_sample_size = largs.PopWord().AsInt();
- if (m_sample_size == 0) m_sample_size = m_world->GetHardwareManager().GetInstSet().GetSize() - 1;
if (largs.GetSize()) m_filename = largs.PopWord();
+ if (largs.GetSize()) m_trials = largs.PopWord().AsInt();
+ if (m_trials == 0) m_trials = m_world->GetHardwareManager().GetInstSet().GetSize() - 1;
}
+ const cString GetDescription()
+ {
+ return "SampleLandscape [filename='land-sample.dat'] [int trials=0]";
+ }
+
void Process(cAvidaContext& ctx)
{
int update = -1;
@@ -53,6 +215,7 @@
cAnalyzeGenotype* genotype = NULL;
while (genotype = batch_it.Next()) {
cLandscape* land = new cLandscape(m_world, genotype->GetGenome(), inst_set);
+ land->SetTrials(m_trials);
m_batch.PushRear(land);
jobqueue.AddJob(new tAnalyzeJob<cLandscape>(land, &cLandscape::SampleProcess));
}
@@ -61,7 +224,7 @@
land = new cLandscape(m_world, m_world->GetClassificationManager().GetBestGenotype()->GetGenome(),
m_world->GetHardwareManager().GetInstSet());
m_batch.PushRear(land);
- land->SetTrials(m_sample_size);
+ land->SetTrials(m_trials);
land->SampleProcess(ctx);
update = m_world->GetStats().GetUpdate();
}
@@ -77,5 +240,7 @@
void RegisterLandscapeActions(cActionLibrary* action_lib)
{
- action_lib->Register<cActionSampleLandscape>("SAMPLE_LANDSCAPE");
+ action_lib->Register<cActionAnalyzeLandscape>("AnalyzeLandscape");
+ action_lib->Register<cActionRandomLandscape>("RandomLandscape");
+ action_lib->Register<cActionSampleLandscape>("SampleLandscape");
}
Modified: development/source/actions/cAction.h
===================================================================
--- development/source/actions/cAction.h 2006-04-10 17:31:08 UTC (rev 603)
+++ development/source/actions/cAction.h 2006-04-12 03:37:01 UTC (rev 604)
@@ -34,6 +34,7 @@
const cString& GetArgs() const { return m_args; }
+ virtual const cString GetDescription() = 0;
virtual void Process(cAvidaContext& ctx) = 0;
};
Modified: development/source/analyze/cAnalyze.cc
===================================================================
--- development/source/analyze/cAnalyze.cc 2006-04-10 17:31:08 UTC (rev 603)
+++ development/source/analyze/cAnalyze.cc 2006-04-12 03:37:01 UTC (rev 604)
@@ -3407,8 +3407,13 @@
cAnalyzeGenotype * genotype = NULL;
while ((genotype = batch_it.Next()) != NULL) {
cLandscape landscape(m_world, genotype->GetGenome(), inst_set);
- if (num_test == 0) landscape.Process(m_ctx, dist);
- else landscape.RandomProcess(m_ctx, num_test,dist,num_test,num_test*2);
+ landscape.SetDistance(dist);
+ if (num_test == 0) {
+ landscape.Process(m_ctx);
+ } else {
+ landscape.SetTrials(num_test);
+ landscape.RandomProcess(m_ctx);
+ }
landscape.PrintStats(fp);
}
}
Modified: development/source/analyze/cAnalyzeGenotype.cc
===================================================================
--- development/source/analyze/cAnalyzeGenotype.cc 2006-04-10 17:31:08 UTC (rev 603)
+++ development/source/analyze/cAnalyzeGenotype.cc 2006-04-12 03:37:01 UTC (rev 604)
@@ -340,7 +340,8 @@
void cAnalyzeGenotype::CalcLandscape(cAvidaContext& ctx)
{
cLandscape landscape(m_world, genome, inst_set);
- landscape.Process(ctx, 1);
+ landscape.SetDistance(1);
+ landscape.Process(ctx);
land_frac_dead = landscape.GetProbDead();
land_frac_neg = landscape.GetProbNeg();
land_frac_neut = landscape.GetProbNeut();
Modified: development/source/analyze/cAnalyzeUtil.cc
===================================================================
--- development/source/analyze/cAnalyzeUtil.cc 2006-04-10 17:31:08 UTC (rev 603)
+++ development/source/analyze/cAnalyzeUtil.cc 2006-04-12 03:37:01 UTC (rev 604)
@@ -119,7 +119,8 @@
cAvidaContext& ctx = world->GetDefaultContext();
cLandscape landscape(world, genome, inst_set);
- landscape.Process(ctx, dist);
+ landscape.SetDistance(dist);
+ landscape.Process(ctx);
double peak_fitness = landscape.GetPeakFitness();
cGenome peak_genome = landscape.GetPeakGenome();
@@ -163,12 +164,16 @@
int num_found = 0;
for (int dist = 1; dist <= 10; dist++) {
landscape.Reset(genome);
+ landscape.SetDistance(dist);
+ landscape.SetTrials(sample_size);
if (dist == 1) {
- landscape.Process(ctx, dist);
- num_found = genome.GetSize() * (inst_set.GetSize() - 1);
+ landscape.Process(ctx);
} else {
- num_found = landscape.RandomProcess(ctx, sample_size, dist, min_found, max_sample_size);
+ landscape.SetMinFound(min_found);
+ landscape.SetMaxTrials(max_sample_size);
+ landscape.RandomProcess(ctx);
}
+ num_found = landscape.GetNumFound();
fp << update << " " // 1
<< dist << " " // 2
@@ -426,7 +431,8 @@
// create landscape object for this creature
if (landscape && genotype->GetTestFitness() > 0) {
cLandscape landscape(world, genome, world->GetHardwareManager().GetInstSet());
- landscape.Process(ctx, 1);
+ landscape.SetDistance(1);
+ landscape.Process(ctx);
landscape.PrintStats(fp);
}
else fp << endl;
Modified: development/source/event/cEventManager.cc
===================================================================
--- development/source/event/cEventManager.cc 2006-04-10 17:31:08 UTC (rev 603)
+++ development/source/event/cEventManager.cc 2006-04-12 03:37:01 UTC (rev 604)
@@ -1898,12 +1898,9 @@
private:
int landscape_dist;
int sample_size;
- int min_found;
- int max_sample_size;
- bool print_if_found;
public:
const cString GetName() const { return "random_landscape"; }
- const cString GetDescription() const { return "random_landscape [int landscape_dist=1] [int sample_size=0] [int min_found=0] [int max_sample_size=0] [bool print_if_found=false]"; }
+ const cString GetDescription() const { return "random_landscape [int landscape_dist=1] [int sample_size=0]"; }
void Configure(cWorld* world, const cString& in_args)
{
@@ -1912,9 +1909,6 @@
cString args(in_args);
if (args == "") landscape_dist=1; else landscape_dist=args.PopWord().AsInt();
if (args == "") sample_size=0; else sample_size=args.PopWord().AsInt();
- if (args == "") min_found=0; else min_found=args.PopWord().AsInt();
- if (args == "") max_sample_size=0; else max_sample_size=args.PopWord().AsInt();
- if (args == "") print_if_found=false; else print_if_found=args.PopWord();
}
///// random_landscape /////
void Process(){
@@ -1922,8 +1916,9 @@
cGenome & genome = m_world->GetClassificationManager().GetBestGenotype()->GetGenome();
cLandscape landscape(m_world, genome, m_world->GetHardwareManager().GetInstSet());
- landscape.RandomProcess(ctx, sample_size, landscape_dist, min_found,
- max_sample_size, print_if_found);
+ landscape.SetDistance(landscape_dist);
+ landscape.SetTrials(sample_size);
+ landscape.RandomProcess(ctx);
landscape.PrintStats(m_world->GetDataFileOFStream("land-random.dat"), m_world->GetStats().GetUpdate());
}
};
Modified: development/source/main/cLandscape.cc
===================================================================
--- development/source/main/cLandscape.cc 2006-04-10 17:31:08 UTC (rev 603)
+++ development/source/main/cLandscape.cc 2006-04-12 03:37:01 UTC (rev 604)
@@ -26,9 +26,9 @@
cLandscape::cLandscape(cWorld* world, const cGenome & in_genome, const cInstSet & in_inst_set)
-: m_world(world), inst_set(in_inst_set), base_genome(1), peak_genome(1), trials(1)
+: m_world(world), inst_set(in_inst_set), base_genome(1), peak_genome(1), trials(1), m_min_found(0),
+ m_max_trials(0), site_count(NULL)
{
- site_count = NULL;
Reset(in_genome);
}
@@ -71,7 +71,7 @@
neg_epi_size = 0;
no_epi_size = 0;
- if (site_count != NULL) delete [] site_count;
+ if (site_count) delete [] site_count;
site_count = new int[base_genome.GetSize() + 1];
for (int i = 0; i <= base_genome.GetSize(); i++) site_count[i] = 0;
@@ -79,6 +79,8 @@
complexity = 0.0;
neut_min = 0.0;
neut_max = 0.0;
+
+ m_num_found = 0;
}
void cLandscape::ProcessGenome(cAvidaContext& ctx, cTestCPU* testcpu, cGenome& in_genome)
@@ -126,11 +128,9 @@
}
-void cLandscape::Process(cAvidaContext& ctx, int in_distance)
+void cLandscape::Process(cAvidaContext& ctx)
{
cTestCPU* testcpu = m_world->GetHardwareManager().CreateTestCPU();
-
- distance = in_distance;
// Get the info about the base creature.
ProcessBase(ctx, testcpu);
@@ -150,6 +150,8 @@
total_entropy += (log((double) site_count[i] + 1) / max_ent);
}
complexity = base_genome.GetSize() - total_entropy;
+
+ m_num_found = base_genome.GetSize() * (inst_set.GetSize() - 1);
}
@@ -524,11 +526,8 @@
}
-int cLandscape::RandomProcess(cAvidaContext& ctx, int in_trials, int in_distance, int min_found,
- int max_trials, bool print_if_found)
+void cLandscape::RandomProcess(cAvidaContext& ctx)
{
- distance = in_distance;
-
cGenome mod_genome(base_genome);
int genome_size = base_genome.GetSize();
@@ -542,15 +541,8 @@
// Loop through all the lines of genome, testing many combinations.
int cur_trial = 0;
int total_found = 0;
-
- // for (cur_trial = 0;
- // (cur_trial < in_trials) ||
- // (total_found < min_found && cur_trial < max_trials);
- // cur_trial++) {
- // Way too confusing and not being used, commented it out DM
-
- for (cur_trial = 0; cur_trial < in_trials; cur_trial++) {
+ for (cur_trial = 0; (cur_trial < trials) || (total_found < m_min_found && cur_trial < m_max_trials); cur_trial++) {
// Choose the lines to mutate...
ctx.GetRandom().Choose(genome_size, mut_lines);
@@ -581,7 +573,7 @@
delete testcpu;
- return total_found;
+ m_num_found = total_found;
}
void cLandscape::BuildFitnessChart(cAvidaContext& ctx, cTestCPU* testcpu)
@@ -709,6 +701,8 @@
double pos_frac = 1.0;
+ distance = 1;
+
bool finished = false;
while (finished == false) {
if (pos_frac == 0.0) finished = true;
@@ -718,7 +712,7 @@
const int max_line = cur_genome.GetSize();
// Try all Mutations...
- Process(ctx, 1);
+ Process(ctx);
// Try Insertion Mutations.
Modified: development/source/main/cLandscape.h
===================================================================
--- development/source/main/cLandscape.h 2006-04-10 17:31:08 UTC (rev 603)
+++ development/source/main/cLandscape.h 2006-04-12 03:37:01 UTC (rev 604)
@@ -50,6 +50,8 @@
int ins_distance;
int trials;
+ int m_min_found;
+ int m_max_trials;
int total_count;
@@ -83,6 +85,8 @@
double neut_min; // These two variables are a range around the base
double neut_max; // fitness to be counted as neutral mutations.
tMatrix<double> fitness_chart; // Chart of all one-step mutations.
+
+ int m_num_found;
void BuildFitnessChart(cAvidaContext& ctx, cTestCPU* testcpu);
@@ -107,17 +111,21 @@
void Reset(const cGenome& in_genome);
- void Process(cAvidaContext& ctx, int in_distance = 1);
+ void Process(cAvidaContext& ctx);
void ProcessDelete(cAvidaContext& ctx);
void ProcessInsert(cAvidaContext& ctx);
void PredictWProcess(cAvidaContext& ctx, std::ostream& fp, int update = -1);
void PredictNuProcess(cAvidaContext& ctx, std::ostream& fp, int update = -1);
- void SetTrials(int in_trials) { trials = in_trials; }
+ inline void SetDistance(int in_distance) { distance = in_distance; }
+ inline void SetTrials(int in_trials) { trials = in_trials; }
+ inline void SetMinFound(int min_found) { m_min_found = min_found; }
+ inline void SetMaxTrials(int max_trials) { m_max_trials = max_trials; }
void SampleProcess(cAvidaContext& ctx);
- int RandomProcess(cAvidaContext& ctx, int in_trials, int in_distance = 1, int min_found = 0,
- int max_trials = 0, bool print_if_found = false);
+ void RandomProcess(cAvidaContext& ctx);
+
+ inline int GetNumFound() { return m_num_found; }
void TestPairs(cAvidaContext& ctx, int in_trials, std::ostream& fp);
void TestAllPairs(cAvidaContext& ctx, std::ostream& fp);
More information about the Avida-cvs
mailing list