Getting Evolution Started

24 views
Skip to first unread message

Jacob Schrum

unread,
May 8, 2013, 3:30:42 PM5/8/13
to evoro...@googlegroups.com
So, since this is a GECCO competition, I was assuming that getting some evolution up and running would be an easy thing in this code, but I have a thread going on over in the main RoboCode Google Group that seems to indicate that this is a very difficult thing to do (https://groups.google.com/forum/?fromgroups=#!topic/robocode/d_1jFrN2rVA), but maybe I'm just doing it wrong.

Does anyone have suggestions on how to get started with evolution in RoboCode? I'm trying to evaluate genotypes using the BattleSpecification class to run a match, but this code is only able to load agents from source files ... but how can I pass in a genotype object to a class that is loaded from the raw class files? Has anyone modified the code to get around this? Or maybe I should be using a different class altogether to run a match/eval.

Any ideas?
-Jacob

Daniele Loiacono

unread,
May 9, 2013, 11:16:28 AM5/9/13
to evoro...@googlegroups.com
Dear Jacob,

my suggestions are similar to the ones you got from RoboCode google group. 
I think you have mainly two options:

- you can setup an evaluation process that relies on compiling your candidates (accordingly, your phenotype will be a generated source code wich embeds all the evolved parameters/code)
- you can develop a meta-robot, i.e., a robot that will decode run-time the genotype you need to evaluate. In order to pass this genotype, you can either use a file or a static variable in the memory (of course you need to re-write the file / change the value of the variable before every evaluation of the fitness)

I also asked to Moshe Sipper that previously worked on this, and the following is the feedback from a researcher of his group:

If I recall correctly, we've held total separation between the evolutionary system (ECJ) and the Robocode engine(s).
For each generation, the evolutionary system created .java files per individual, then compiled them to java classes, then executed the Robocode game engine per match. This design has probably led to slightly worse performance compared to invoking Robocode from within the evolutionary system, but spared us from dealing with class loaders - as each match was created from scratch in a dedicated Java VM.
A nice benefit from this design is the ability to simultaneously run Robocode processes on multiple machines: we had 10-20 machines (idle Linux computers at the CS labs) ready to execute single matches per request, and a single machine (think it was one of our own PCs, but can't recall for sure) acted as the main evolutionary server - making asynchronous calls to the satellites for fitness evaluation.

I hope it helps,
Daniele
Reply all
Reply to author
Forward
0 new messages