Lets say you have an arraylist of HockeyPlayer objects. How could you sort that if they all have a variable "int goalsScored". How could you sort them by goalsScored?
I have a binary tree of functions and terminal values. I'd like to print this tree as a lisp statement would be represented!
For example, a tree with just a root of "+" and terminals of "2" and 4" would read (+ (2 4)).
I'm using ECJ with Java. I have an army of individuals who I all want to have the same brain. Basically, I'd like to evolve the brains using GP. I want things like "if-on-enemy-territory" and "if-sense-target" for if statements and "go-home" or "move-randomly" or "shoot" for terminals. However, these statements need to be full executable Java code. How can I do this with ECJ?