Simultaneous Runs
Posted: Tue Feb 27, 2018 10:07 am
I'm trying to evolve controllers in argos.
As the algorithm is written in Java, I use JNI to launch ARGoS.
Currently I am creating the Simulator at the beginning of the algorithm, then do sequential executions.
I'd like to run the simulation simulatneous, much like in the galib-example, but without a fixed set of instances.
I would be very happy with a solution, that uses a method, that can be called multible times and just instantiates a complete independent instance of ARGoS.
Currently I'm trying something of the following:
My guess is, that the problem lies with the Singleton CSimulator.
Is there a way to get around this?
As the algorithm is written in Java, I use JNI to launch ARGoS.
Currently I am creating the Simulator at the beginning of the algorithm, then do sequential executions.
I'd like to run the simulation simulatneous, much like in the galib-example, but without a fixed set of instances.
I would be very happy with a solution, that uses a method, that can be called multible times and just instantiates a complete independent instance of ARGoS.
Currently I'm trying something of the following:
Code: Select all
double LaunchArgos(int genome[], int length) {
CSimulator &cSimulator = argos::CSimulator::GetInstance();
cSimulator.SetExperimentFileName("experiments/construction-nsga2.argos");
cSimulator.LoadExperiment();
[...]
cLoopFunctions.ConfigureFromGenome(genome, length);
cSimulator.Execute();
return cLoopFunctions.Performance()
}
Is there a way to get around this?