Everything except for #6 (the GUI) can be achieved by writing a special objective function (i.e. by implementing the 'Problem' class in ECJ).

My group frequently uses ECJ to tune the parameters of models that have been implemented in C++.  To use ECJ with an arbitrary external simulator, what I've done is written a Problem that invokes an external process, and pipes it a list of individuals on stdin.  The external program is then responsible for decoding the genomes and returning either a fitness value, or phenotypic measurements that the Problem can use to compute a fitness value.

So, long story short, I'm not sure what specific additional "dovetailing" work was done for MASON, but most of what you describe is simple to do with ECJ and wouldn't require tinkering about with its internals more than usual.


On Wed, Sep 2, 2015 at 3:50 AM, Adil Raja <[log in to unmask]> wrote:

Dear all,
   I want to use ECJ for a research project. I was wondering if anyone could provide me details about integrating ECJ with other software, written possibly in Java. I want to dovetail ECJ with another simulator that is written in Java. I saw on the website of ECJ that it has already been dovetailed with MASON, which has been cited as a sister project of ECJ, but actually it is a simulator of multi-agent systems. I want to integrate ECJ with other simulators such as the famous TORCS (The Open Racing Car Simulator). I was wondering if anyone has already tried such dovetailing of ECJ with other specific or arbitrary simulators. Moreover, I would want to know that what sort of expertise and tools would be required that would be most suitable for such an integration.

Through the integration (dovetailing), I would want to be able to achieve certain objectives. These are listed as follows:

1) Through the integration, I should be able to instantiate an experiment in ECJ using one of the evolutionary computing algorithms that are already implemented in it. 
2) The instantiated experiment should have individuals that are relevant to the agents in the simulation environment. This is to say that if the simulator is a car racing simulator, then I should be able to instantiate an experiment in ECJ, the members of which fully encapsulate the representation of the controllers of the cars. Same goes for any other type of simulator that simulates, for example, soccer players, or aircraft, or panels for solar energy systems.

Perhaps I need to elaborate on this point a little bit more. Say that we have a car simulator that can have cars run in it. The cars are normally run by the means of their controllers (or microcontrollers). Suppose that I want to evolve controllers for the car(s) object(s) using ECJ. Now if I start an experiment in ECJ with a simple genetic algorithm, or genetic programming, or any variant of these, I should be able to specify the representation of the controllers to ECJ to encode as the genotype of the individuals of my experiment.

I hope that I have explained this point well.

3) The dovetailing software should also be able to gather results and store them either in the ECJ experiment, to be used latter, or somewhere in itself from where it could be retrieved for analysis and reflection.

4) The dovetailing software should be general in nature. This is to say that it could achieve the above stated objectives for any of the evolutionary computing algorithms implemented in ECJ, and an arbitrary simulator, plenty of which are available online.

5) The software should also be able to save the states of the experiment and the simulator (if necessary) to be used at intermediate steps of experiments (evolution), and be able to pass the states back and forth between ECJ and the simulator if necessay.

6) The software should preferably have a nice GUI front-end so that anyone with minimal exposure to computer programming could invoke various types of experiments and play with them.

7) The dovetailing should also be able to leverage from the parallel processing abilities of ECJ and of the simulator, if possible.

So this message is rather large. However, I shall be thankful to anyone who could provide me hints on as to how to implement such an application integration (dovetailing) software.

I was also wondering that although it is mentioned on the website of ECJ that it is dovetailed with MASON, where could one find the implementation of that dovetailing.

Thanks for reading this through,

Looking forward to hearing from you,
Muhammad Adil


Ph.D student in Computer Science, George Mason University
CFO and Web Director, Journal of Mason Graduate Research