ECJ-INTEREST-L Archives

July 2005

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced 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:
Wed, 27 Jul 2005 12:41:56 -0400
MIME-version:
1.0 (Apple Message framework v622)
Reply-To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=US-ASCII; 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 (39 lines)
On Jul 27, 2005, at 10:57 AM, Steve Butcher (Steve-O) wrote:

>             String alphabet = state.parameters.getStringWithDefault
> ( p, "aAbBcCdDeEfFgG");

To be forward-compatable with the next version of ECJ, you should write

        String alphabet = state.parameters.getStringWithDefault(
                p, null, "aAbBcCdDeEfFgG");


> However, when MyProblem goes to access the alphabet parameter, it's
> going to want to access it as "eval.problem.alphabet", isn't it?

Only if MyProblem specified the parameter name that way, one of:

        new Parameter("eval.problem.alphabet");
        new Parameter("eval").push("problem").push("alphabet");
        base.push("alphabet");  // assuming base passed in was "eval.problem"

> So can I just name the parameter "eval.problem.alphabet" in the 1st
> line
> of resetNode()

Absolutely.  In reset() you could write:

        new Parameter("eval.problem.alphabet");

Or if you'd like to just use "alphabet" as your parameter, in MyProblem
you can just ignore the base and do:

        new Parameter("alphabet");

Keep in mind that the ONLY function of parameter bases is to provide a
way of handling name-spacing.  In fact you can specify whatever the
heck parameter names you'd like.

Sean

ATOM RSS1 RSS2