I am fairly new to ecj also but I believe this is the difference. Taken from
the ERC javadoc an ERC is an abstract GPNode which implements Ephemeral
Random Constants, as described in Koza I. An ERC is a node which, when first
instantiated, gets set to some random constant value which it always returns
from then on, even after being crossed over into other individuals. In order
to implement an ERC, you need to override several methods below.
So when a new ERC GPNode is created it gets a value which does not change
and is always returned.
lets assume we are trying to generate a subtree which is equivalent to 5x
using no ERCs this could be done using
x + x + x + x + x simple form
(+ x (+ x (+ x (+ x x)))) using the lisp function format
using ERCs it could be simplified to
(* 5 x) where "5" is an ERC GPNode whose value was assigned 5
|