Hacker News new | past | comments | ask | show | jobs | submit login

It's not accurate to say there's no fitness function. There is a fitness function, but it is not a continuous function. (There's no way to have a GA without some notion of fitness.)



There is no explicit function that decides which organisms are more fit than others. But you are right that there is selection pressure since all organisms have the same lifetime(they are eventually popped from front as newer ones are pushed to back). This means that if they did not produce viable offspring, the genetic information does not stay in the simulation.


Like I say above (my comment was tongue-in-cheek but) I really like the idea of a FIFO queue rather than an explicit fitness function. I'm thinking of writing a little a-life/learner thingy just for fun at some point and I'll definitely nick your idea. Is it a common approach in genetic algorithms? Is there some research on it?

Also, for some reason I thought you actually used a LIFO stack. So, what if you did? My guess is organisms that put more offspring on the top of the queue would take longer to be popped from it, so that they'd have a better chance to produce more offspring. They would also benefit from organisms almost as successful as themselves (but not more).

Is this also a known approach, and if so, how well does it work?


The queue structure is one of my own ideas. It is possible that it has been done before, but I did not check. There does not seem to be a lot of research on this topic. That being said, it is a nice toy problem to explore genetic algorithms and diversity.

Regarding the stack approach, I would suspect that new genetic information would immediately be lost since a new organism dies before having much chance to produce offspring. In the off chance it manages to produce offspring, those offspring would also be lost almost immediately since they get popped first.

If you are really curious, you can change line 163 in vivarium.cpp from a pop_front() to a pop_back() to see what happens.


Thanks - my assumption was that the speedup in dying would increase the reproductive pressure and make the whole process a lot more competitive. But GAs are not my specialty (far from).

I am indeed very curious, but also very, very short on time! Before I can justify picking up someone else's code I have a couple of pieces of coursework and a dissertation to work on - but I might get some time round abouts next weekend, I'll let you know how I get on :)


I understand, I tested it for you and my suspicions where right. The simulation simply stalls early on. Nothing interesting happens after that.


Oh well - so much for that then!

I'll still try to give your code a whirl next weekend. I know how useful it is to get some feedback for your projects.


I appreciate it.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: