ECJ-INTEREST-L Archives

March 2014

ECJ-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:
Raymond Shpeley <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Wed, 5 Mar 2014 13:49:28 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
Well, I'm not sure either, but this is what I did...

  /* copy random terminals to ordered list and drop duplicates */
    for (int i = 0; i < nTerm; i++) {
      d =  (int) tL.get(i); 
      if (oList[d] == d) return DUP_TERMINAL;
      oList[d] = d;
    }
    
tL is the list from getting the tree terminals

ArrayList tList = getTreeTerminals(((GPIndividual) ind).trees[0],
          nTerminals);

which is being done in evaluate()

I'm looking at trees and finding out which terminals have been created by the 
ERCs, then I assign a fitness based on that. I haven't gotten to testing this 
part yet, but I no longer get a compiler warning.

>Not sure how you're trying to cast an ERC into an int, but okay.
>
>Sean
>

ATOM RSS1 RSS2