Thursday, January 31, 2008

Cool stuff I want to do with evolvable RETEs


Yes, Jenny, the cart is before the horse. :)

The basics aren't nearly done, but these are the interesting things I'd like to eventually do with evolvable RETEs.

Evolving Guilds



Early on I wasn't sure how the RHS of rules would be evolved. NEAT is useful for creating the RETE, which is the indexing behind the rule LHSs. (The LHS of each rule is derived from the logical conditions upstream in the RETE from the position of a rule execution node.) The necessary contents of the working memory also falls out from the LHS conditions. The question then is this: what do you do once rule conditions are met, and how can that be determined by evolution?

The first solution that came to me was to create the RHS code via grammatical evolution. The population would RHSs that all shared a common LHS, no matter which RETE they came from. In other words, RHSs from different RETEs would evolve together, independently from the mechanism that evolves their LHSs.

So, for example, say many agents had the following rule:

if
foo == 12
bar == "a_value"
bas1 >= bas2
then
...do something...

All RETEs that share this rule would join together and evolve the RHS of that rule via GE. The closest analogy I could find was a Guild: a group of artisans who want to do something, and collectively discover the tool necessary to do it. So, in a way, it could be a model for simulating technological evolution via cooperation.

For example, say all Guild members had a rule like this:

if
exists nail(inBoard == yes, protrusion == 4")
then
...some method for pounding the nail...

Possible RHS operations might be "hit it with a tack hammer," "hit it with a sledge hammer," "hit it with a regular hammer," or "leave it alone." Maybe there's more complex actions like "hit it once with a regular hammer, then tap it 5x with the tack hammer." Discovering the right action to take (RHS) given a certain situation (LHS) would be the job of the Guild. Essentially, Guild members would get together and "discuss" how they do their job. The better a member does their "job" (overall objective function performance) would have greater "prestige," affecting their influence in the Guild's evolutionary process. (A form of indirect fitness.)

Recently I've decided that it would be easier to have rule RHSs that only have one operation, easily encoded and evolved along with the LHS. This has it's limitations, and will reduce the richness of the evolutionary process, but I want to make the basics work before stepping off into la la land. (i.e. simultaneous evolution methods with mixed interdependent populations. Oi!) It's an idea I'd like to revisit later, though. It has other parallels with symbiotic / co-evolutionary processes like meme development, (cultural evolution) parasite/host codevelopment, and symbiotic relationships.

No comments: