ECJ-INTEREST-L Archives

July 2013

ECJ-INTEREST-L@LISTSERV.GMU.EDU

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

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

Print Reply
Content-Type:
text/plain; charset="us-ascii"
Date:
Mon, 15 Jul 2013 03:13:52 -0400
Reply-To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Subject:
From:
Sean Luke <[log in to unmask]>
Content-Transfer-Encoding:
8bit
In-Reply-To:
MIME-Version:
1.0 (Apple Message framework v1085)
Sender:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (33 lines)
On Jul 14, 2013, at 2:46 AM, Bojan Janisch wrote:

> I don't want to evaluate useless rules. Also I don't want that these rules flow into my next generation. Because until now ECJ is only blind trying to find a good rule. It is not really an optimization of rules.

Why not delete them during the evaluation process?  You have to determine that they're useless somewhere, either after breeding or after evaluation.

> For this purpose I have to write a Breeder which can manipulate and mix a GPTree (that represents my rule). If  the result is worse than the originals it removes the created tree and tries again (until limit,  then using other GPTrees for mix)

I think what you're trying to do here is compare the child to the parent.  You could do this in a Breeder or possibly in a BreedingPipeline.  What I would do is override SimpleBreeder.breedPopChunk.  If you look at the code of this method you will note that it has a section that looks like this:

                x=from[subpop];
                int upperbound = from[subpop]+numinds[subpop];
                while(x<upperbound)
                    x += bp.produce(1,upperbound-x,x,subpop,
                        newpop.subpops[subpop].individuals,
                        state,threadnum);

I would just change that to something like:

	for(int x = from[subpop]; x < from[subpop]+numinds[subpop]; x++)
		{
		while(true)
			{
			bp.produce(1, 1, x, subpop, newpop.subpops[subpop].individuals, state, threadnum);
			if (newpop.subpops[subpop].individuals[x]) meets my criteria....
				break;
			}
		}

Watch out for infinite loops.  Note that this code forces the breeding pipelines to generate one child at a time; that is, the second child in each crossover will be discarded.

Sean

ATOM RSS1 RSS2