Issue of galib

Requests regarding how to set up experiments in ARGoS.
Ryan
Posts: 42
Joined: Wed Oct 23, 2019 3:26 am

Issue of galib

Postby Ryan » Sat Mar 21, 2020 12:32 am

Hello Sir,
I am writing an evolutionary algorithm for RNN, executed by N = 5, 15, 25 robots. For each setting of the simulation, five independent evolutionary trials were executed with a different random seed. I'm already referring to your galib code: https://github.com/ilpincy/argos3-examp ... b/main.cpp

But I have the following points I do not understand:
1. I noticed when the code runs to

Code: Select all

/ * Load it to configure ARGoS * /        cSimulator.LoadExperiment ();
The simulation started to perform 5 calculations under a random seed, but now I hope that the random seeds of the five calculations are different, so how do I set it.

2.I really don't understand how the function: float LaunchARGoS runs in the main function. In the main function call, no parameters are passed, how is this implemented?

pincy
Site Admin
Posts: 632
Joined: Thu Mar 08, 2012 8:04 pm
Location: Boston, MA
Contact:

Re: Issue of galib

Postby pincy » Sat Mar 21, 2020 3:38 am

1. I noticed when the code runs to
CODE: SELECT ALL

/ * Load it to configure ARGoS * /
cSimulator.LoadExperiment ();
The simulation started to perform 5 calculations under a random seed, but now I hope that the random seeds of the five calculations are different, so how do I set it.
That line does not run any code. It just loads the .argos file that will be used to run the experiments. The reason why there are 5 repetitions is because GALib has been initialized that way. Refer to the documentation of GAlib for the details.
2.I really don't understand how the function: float LaunchARGoS runs in the main function. In the main function call, no parameters are passed, how is this implemented?
This is about how GALib works. Check the documentation, it's just a callback.
I made ARGoS.


Return to “How to... ?”