Tuesday, March 23, 2010

Dealing with Invalid Individuals

My adviser suggested a nice clean way to deal with invalid symbols, such as in BGEP, and with invalid chromosomes, such as in GEP or PGEP where we do not specify a head and tail.
He suggested that a new element be added to the terminal set, and any bit string that does not map to a symbol or any operators that causes an individual to be invalid be interpreted as this terminal. In the case of set members, this would be a set containing some new element. After evaluating to the set that the expression tree represents, we would simply remove this element.
This avoids favoring some terminals or operators more then others. In some cases it may be easy to identify some identity terminal, but for my purposes this works very nicely.

I am about to add this idea to my GEP framework, and to make it easy to add new experiments with GEP or PGEP with as little new code as possible.

No comments:

Post a Comment