This is an archive of a previous version of Sodarace.

Please visit http://sodarace.net for the latest version.

forum  |  »» sodaplay
 
»» forums  »» artificial intelligence forum

subject: Evolving Models From Scratch - Hows it all going?

41 replies on 3 pages. most recent reply: 25-May-04 08:25 by wwan

»» back to topic list  

This topic has 41 replies on 3 pages [ 1 2 3 | » ]
»» previous topic   »» next topic  


jbrownlee

»» models

Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 00:06   »» 
Hi all,

I'm very interested in how others are going with evolving models from scratch. What’s your approach? Are you finding it hard? Got any wacky looking models to show?

Are there many of us out there? I'm sure many people are using Wodka, or like myself have built their own framework.

Representation’s the key, as we are well aware. I’m going for the connection focused approach, where connections are evolved between masses. Its based on genetic algorithms used to evolve away connections in neural networks. I typically get models completing races after 50 to 100 generations of populations of 100.

Here are a few little guys that recently emerged from the binary soup.


race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch5.jnlp



jbrownlee

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 00:59   »» 
Here are two little walkers from the same run (same and species). The first is from an generation ~50, the second is from much later on ~250.

race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch6.jnlp

jbrownlee

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 01:48   »» 
Wow, gravity > 1 and no initial velocity, how is this possible!?! :)

Little bastards may have discovered another loophole...

race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch7.jnlp

Lectvay

»» models
»» homepage

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 02:47   »» 
Here's something I posted in the other forum but it's more appropriate here:

---
Cool models. One thing I notice is that the "from scratch" GA-generated models I've seen pretty much all work almost solely on high-K vibrations to move (or at least that's what it looks like). I haven't seen any that work on controlled muscle movement. Are muscle timings too difficult for the GA to come up with? If the settings were controlled to make vibrating models impossible to create, would the GA be forced to innovate in other ways?
---

I am seeing a little bit more muscle control, I think, in the second race you posted. It's too bad these races make them so small -- it's really hard to see what's actually going on.

That last race you posted is insane! The models all just take flight. Weird!

jbrownlee

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 02:52   »» 
You raise some good points. I'll constrain the K and see what happens.

Yeah the above race is strange as :) I was watching, thinking "did that model really just do that????"

Here's something new, at least he uses the ground!


race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch8.jnlp

jbrownlee

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 04:24   »» 
K value between 0-0.3, wave speed between 0.0 and 0.5 (thought I'd slow things down a bit). Good suggestion, results are interesting!

race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch_low_k.jnlp

Lectvay

»» models
»» homepage

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 06:13   »» 
Really interesting results -- thanks for trying out my suggestions. What if friction was given a minimum value? This is probably even more important in terms of reducing vibration.

Also, I'm curious what the GA would come up with if the wave speed were capped even lower. There are some exceptions, but most models have wave speed well below 25%, I believe.

Lectvay

»» models
»» homepage

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 06:29   »» 
Sorry to double post, just had a few more thoughts.

Look, for instance, at the daintywalker, a very typical and basic walker, to see some fairly common values for settings. I wonder what the GA would come up with if it were given constraints like this.

I should have been more clear originally -- K is usually fairly high in models. When tuning models, I typically am aiming for having K as high as possible without creating jitters, while being sure not to use too much F to achieve this. But the main cause of jittery models is lack of friction.

I wonder what would happen if the GA tried to make something with settings close to these typical values. Too constraining? Some possible parameters could be: wave speed < 25%, 20% < F < 40%, 60% < K < 90%, or something like that. I haven't done much with text-coding of models, so those are just percentages as they graphically appear with the sliders in the applet.

Also, I was wondering what kind of rules the GA has when it is creating a brand new model from scratch. How random are the initial models?

the_duck

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 20:36   »» 
In the flying models race, the reason the models level off is that they hit the top of the race. Sodarace has a ceiling just like sodaconstuctor, its just invisible.

I'd be interested to see some models that didn't look like they moved on k. Maybe you could try contsttraining it even more? Or maybe constraining the k/f ratio?

jbrownlee

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 17-Dec-03 23:05   »» 
I am total open to suggestions. It is really great that expert model makers can/are providing feed back on how to evolve better models. Who better to suggest constraints for making/evolving good models!

Attached are 3 runs. The first I wanted to see what it could do with ony 4 masses. the second is a long run using 8 masses. Finally the last is a run with all the suggested constraints with 6 masses (Wave Speed <25%, F 20%-40%, K 60%-90%).

Though all the models are different, I feel they are still to samey if you know what I mean. Time for a new representation I think.

How does it work? Well it’s pretty damn flexible. If it can be thought up, I can build it. Right now it evolves connections between a set numbers of masses, where a connection can be of type: no connection, spring or muscle. All environment aspects are also evolved, along with numbers used for initial positions of the number of masses used.

Anything can be constrained in anyway. Typically I'm doing runs with various experimental constraints. Right now I'm limiting it to small number of masses. I believe in proving a representation on a small scale before scaling it up to larger more complex models.

I’m thinking of coming from a new angle: growing masses and connections as the model evolves. Sort of like growing a directed graph (also another approach used for evolving neural networks). The interesting technical angle is going to be variable length genomes, should be fun.


race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch9.jnlp
race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch10.jnlp
race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch11.jnlp

Lectvay

»» models
»» homepage

Re: Evolving Models From Scratch - Hows it all going?   posted: 18-Dec-03 04:01   »» 
I really like the results of the third run your posted. I think that's really getting somewhere interesting -- the models still have pretty fast muscle movements that push it along in a simple way, but the muscle movement seems much more controlled, and I don't notice much vibration contributing.

I really like the idea of growing more masses as the models evolve. That could really lead to something new.

I wonder if it would possible to encourage the GA to evolve something like legs. So far, the models seem to be a single structure with some mechanism to push it along as quickly as possible. What if the GA could recognize an effective leg structure and try to replicate on the body of the model, with timing in a different place, thereby producing an additional leg? I don't know how realistic an idea this is. It would, I think, be stepping into area in-between purely evolved models and human-planned models, but the results would really be interesting.

I'll keep watching this thread and posting ideas as they come. I wish I had the know-how to actually do some of the AI side of it myself, but it's plenty of fun watching what you come up with.

jbrownlee

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 18-Dec-03 05:02   »» 
Nice idea. My fallback approach if the “evolving connections” approach didn’t payoff was going to be a prefab approach where the GA is handed a library of prefab parts. Each part takes a number of parameters which define the parts behaviour. It would then be the responsibility of the GA to connect parts in different ways to see what it could come up with. Sounds nice on the surface, but ultimately its limited to humans thinking up, defining and testing parts suitable for the part library.

The idea of detecting “valuable” substructures is very clever, and (I think) some other people around here are going that approach, using a value or credit system for inherited elements, the higher the credit (the longer the part/s have been in the gene pool), the less likely that they will be broken up, removed or mutated, or some combination. A good approach I think. It could be adapted to detect the presence of “limbs”, the more difficult part being where you define a limb programmatically so it can be searched for in a model structure.

I really do believe that it will be a difficult task indeed to evolve complex “good looking”, “sensible” models without using an approach similar to the above, but being the optimist that I am, I don’t want to give up hope and resort to that approach just yet, I think the raw evolutionary approach still has a lot of fight left in it.

What’s needed at this stage I think is a smarter fitness function (way of evaluating models). Currently it only uses the score from the racer, and obviously this is a limiting factor. It is possible to bias evolved structures based on the representation used (constraining variables in the genome for example), but I think a better way is to reward desired values and punish undesired values rather than eliminating them from the GA’s search space.

It could even be possible to collect more information from the racer such as amount of air time, amount of ground time to reward/punish models that hop or fly excessively.

In all reality GA may not be the best approach for creating good models. It is in essence a search function, and is best used in optimisation problems, a fact demonstrated in the race forum. Perhaps GA is better suited in the role of optimising human designs. I’m not talking solely of complete models, but also substructures of models; such as optimising a perfect motor, or leg, or hop mechanism as a module for an existing model. My not have a GUI program similar to the constructor that non-low-level people can use, allowing substructures to be selected and defined (using different colours or what-have-you), then clicking the “optimise” button – it really could be that simple. Maybe when I get bored with evolving models from scratch…

Oh, by the way, here’s a little thing that climbed out of the primordial soup. It’s a little jittery but it does do some hopping.




race: http://sodarace.net/upload/jbrownlee/race_the_mountain_range_from_scratch13.jnlp

Lectvay

»» models
»» homepage

Re: Evolving Models From Scratch - Hows it all going?   posted: 18-Dec-03 05:27   »» 
I can imagine how it would be difficult for "good-looking" and "sensible" models to be made from scratch by a GA, and I think you have a good point about us needing a better way to evaluate models. In real life, if evolution were based solely on how fast an animal could get from point A to point B, animals in this world might all be illogical, spastic, jittering blobs of mass. But of course it is infinitely more complex than that. And it also doesn't help that in the sodaconstructor there are loopholes to exploit that GAs inevitably will.

It's interesting that the main way you've been able to produce models that are a bit more controlled and logical is to set constraints that we know are more likely to produce this type of model. This of course isn't necessary in the real world -- a trait doesn't evolve because it is harmful, not because it breaks any rules. But on the bright side, this still is all really fascinating, and your GA has come up with some really interesting solutions.

It would be great to see what it would come up with using different fitness tests. For example, what if, instead of making a super-fast one-way model, the goal were to make a model that was able to go back and forth in auto-reverse mode as consistently as possible. Factors to take into account might be -- number of successful trips across the screen before a "time out," average trip length (also comparing the averages of both directions and trying to get them as close as possible, encouraging symmetry), slowest trip, fastest trip, etc. Of course, the sodarace program isn't really designed to do this. But I think this sort of test would produce entirely different models.

jbrownlee

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 18-Dec-03 06:04   »» 
Yeah, your spot on!

Another important point to take into consideration is that models are evolved "for a terrain", not for all terrains. The GA finds jittery models because jittery gets models over the specific hard mountainous terrain, in the order that the mountains are placed in the terrain. Or, as shown, it simply flys over it.

Here’s an idea I’ve been rolling around for a while. We are limited to a single number from the race application to gauge a models performance, so why not run a model on a number of different tracks to get a more rounded score. This would change the focus from evolving fast models for a track, to evolving robust models that work in many different environments that may not necessary break the light barrier.

So what type of terrains make a good training ground? A flat, a steep mountain and a mountain range? Should jitteriness be constrained or are their environments that will prevent a jittery model performing well? Interesting stuff, time for more experimenting.

Mattis

»» models

Re: Evolving Models From Scratch - Hows it all going?   posted: 18-Dec-03 12:09   »» 
possibly not something that gives jitteries a disadvantage, but something that give other models an advantage.



This topic has 41 replies on 3 pages [ 1 2 3 | » ]


»» previous topic   »» next topic  

»» back to topic list  »» top of the page  

PLEASE READ THE FORUM GUIDELINES AND ALWAYS PREVIEW TO CHECK MESSAGES BEFORE POSTING...
...Help keep our forums creative and constructive. Thank you.


»» forum home