ECJ-INTEREST-L Archives

January 2008

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

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

Print Reply
Sender:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Thu, 31 Jan 2008 14:32:30 -0500
MIME-version:
1.0 (Apple Message framework v752.3)
Reply-To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=US-ASCII; delsp=yes; format=flowed
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Content-transfer-encoding:
7bit
Comments:
To: ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (34 lines)
The parameter can be read at any time if you have access to the  
EvolutionState.  You can say:

int val = state.parameters.getInt(new Parameter("custom.BinInt- 
size"), null);

But you shouldn't do this over and over again, it's expensive.   
Instead, you should do it during your Problem's setup(...) method:

int val;
public void setup(EvolutionState state, Parameter base)
	{
	super.setup(state, base);
	val = state.parameters.getInt(new Parameter("custom.BinInt-size"),  
null);
	... other parameter setup goes here ...
	}


On Jan 31, 2008, at 1:55 PM, David vun Kannon wrote:

> I'm trying to modify tutorial 1 to create a BinInt problem that  
> will allow the bit string to be interpreted as a concatenation of  
> binary integers, for example, 150 bits = 30 5-bit integers. If I  
> create a parameter
>
>      custom.BinInt-size = 5
>
> where should I read this parameter to make it available to my  
> evaluate function?
>
> Thanks,
> David vun Kannon

ATOM RSS1 RSS2