MASON-INTEREST-L Archives

December 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Sat, 12 Dec 2015 14:45:27 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (17 lines)
On Dec 10, 2015, at 12:28 PM, Axel Kowald <[log in to unmask]> wrote:

> I would like to use ECJ to optimize some parameters of my MASON
> simulation, but I somehow can't find a tutorial or example that shows how to do it. Can you please point me in the right direction ?
 
I can't find my old examples -- I may have to build some new ones.  In general, you might look at Section 2.7.1 of the ECJ manual, which discusses how to use ECJ to optimize a simulation from a simulation toolkit.  It doesn't mention MASON specifically, but one approach is fairly straightforward:

- In your [ECJ] EvolutionState make a variable called

	public MySimState[/* num threads */] simulations;

- In your [ECJ] Problem.evaluate method, if state.simulations[threadnum] == null, construct a MASON SimState.  Otherwise call state.simulations[threadnum].finish().  In either case, THEN modify state.simulations[threadnum] to reflect the settings of the individual you're optimizing.  THEN repeatedly call state.simulations[threadnum].step(...) until you're done.  THEN extract the relevant statistics from state.simulations[threadnum] to determine the fitness of the individual, and set the individual's fitness appropriately.

- In your [ECJ] Finisher.finishPopulation(...) method, call finish() on any non-null SimStates in simulations, clean them up, and set them to null.

Sean

ATOM RSS1 RSS2