Comments on: Wallace Jr. Grows On Trees http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/ After all, it could only cost you your life, and you got that for free. Mon, 28 Jan 2013 23:45:58 +0000 hourly 1 http://wordpress.org/?v=3.8.5 By: Paul Kuliniewicz http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/comment-page-1/#comment-2887 Mon, 09 Mar 2009 20:56:32 +0000 http://www.kuliniewicz.org/blog/?p=1204#comment-2887 And now that I’ve approved Wes’s comment (no idea why it got caught in the moderation queue): that’s also a definite possibility.

]]>
By: Paul Kuliniewicz http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/comment-page-1/#comment-2886 Mon, 09 Mar 2009 20:53:58 +0000 http://www.kuliniewicz.org/blog/?p=1204#comment-2886 Wow, lots of comments. Here goes:

Keeping state: I was going to save discussion on future improvements for another post, since this one was getting long enough. Suffice it to say for now that only being able to look at the sprite RAM in the current frame has several limitations.

Penalizing large organisms: Wallace Jr. can’t do this yet — the fitness function doesn’t have any access to the organism itself — but it’s not hard to implement. If anything, the penalty for being huge would be small relative to the scoring for actual performance. Like fluffy said, having “junk” in the “genome” can serve as a way to accumulate novel features without immediately impacting fitness, which is why the breeding only uses the unoptimized versions of the organisms.

Requiring death: See this post for my motivation for penalizing runs that don’t end in someone dying. The short answer is, evolution gamed the fitness metric, finding ways to get a high score early on with things that looked nothing like expertly avoiding getting hit. Since running out of input is impossible with trees, it’s not as much as a concern, but I still want to avoid getting stuck in the door glitch local maximum.

Breeding: The run I discuss in this post used 80% crossover, 5% subtree mutation, 5% point mutation, and 10% error-free cloning (aka reproduction). It’s there in the config file, but I never came out and said it. Selection is by tournament selection of size 50 (i.e., pick 50 at random and choose the fittest). There’s lots of different breeding techniques. Although Wallace Jr. only currently implements a few simple ones, it’s designed to facilitate adding new ones.

]]>
By: fluffy http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/comment-page-1/#comment-2885 Mon, 09 Mar 2009 20:20:46 +0000 http://www.kuliniewicz.org/blog/?p=1204#comment-2885 If the gene pool is large enough, it shouldn’t matter that lack-of-death is penalized, since in theory the lack-of-death ones won’t be immediately wiped out. It depends on how Wallace is actually breeding things, though – the best approach I’ve seen is to randomly select two samples from the population, breed them to produce some offspring, and then have all of them Do Their Thing, and of them only the top few survive (in the case of this problem they don’t have to rerun the simulation, though, since they should always get the same result every time). This is better than simply skimming off the top, since then you avoid the local-maximum problem.

Basically the breeding strategy itself is a very vital part that determines how well the genetic programing works out. (Of course, this is something that farmers have known for millennia.)

]]>
By: Wes http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/comment-page-1/#comment-2884 Mon, 09 Mar 2009 19:29:28 +0000 http://www.kuliniewicz.org/blog/?p=1204#comment-2884 It sounds like if you’re plateauing so quickly it’s time to update the fitness function. Something like losing health earlier is worse than losing health later, or winning faster is better than winning slower, or something that will differentiate the umpteen “identical” performances.

]]>
By: Ryan http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/comment-page-1/#comment-2883 Mon, 09 Mar 2009 17:03:07 +0000 http://www.kuliniewicz.org/blog/?p=1204#comment-2883 I’d be okay with Mega Man Singularity

]]>
By: E Procter http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/comment-page-1/#comment-2882 Mon, 09 Mar 2009 16:02:51 +0000 http://www.kuliniewicz.org/blog/?p=1204#comment-2882 First, I agree with fluffy’s second comment… he just beat me to it… bastard…

Second, it had been awhile since I read anything, so I had to go back to find your fitness function, and I’m not sure I understand why you penalize runs that don’t end in a death. If I understand it correctly, you effectively penalize it to the extent that it won’t continue to the next generation (although I was admittedly too busy (read: lazy) to look and see how you select for reproduction)… But just because no one died doesn’t necessarily mean that it has no merit; it may be on the verge of an ass-kicking given a little more development. Or am I just missing something here because of the aforementioned business (read: laziness)?

Whatever the case, I enjoy reading about it…

]]>
By: fluffy http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/comment-page-1/#comment-2881 Mon, 09 Mar 2009 05:05:36 +0000 http://www.kuliniewicz.org/blog/?p=1204#comment-2881 Oh yeah, another thing is in traditional genetic programming, the fitness function should rate a small program higher than a large program. So, if a 10-operation program gets the same score as a 20-operation program, the 10-operation one should defeat the 20-operation one. I suspect that having a bunch of “junk DNA” around might actually be beneficial though.

]]>
By: fluffy http://www.kuliniewicz.org/blog/archives/2009/03/08/wallace-jr-grows-on-trees/comment-page-1/#comment-2880 Mon, 09 Mar 2009 05:03:37 +0000 http://www.kuliniewicz.org/blog/?p=1204#comment-2880 I have a feeling that if you were to incorporate some notion of state variables, it would be able to do a lot better. Like, add two operators, (write A B) to write byte B into address A, and (read A B) to do the obvious thing. Then it’d be able to record a rudimentary amount of history and perhaps learn about movement patterns and so on.

Careful not to cause the singularity, though. I’d like my post-singularity life to involve things that aren’t Mega Man 2.

]]>