you are viewing a single comment's thread.

view the rest of the comments →

[–]magnora7[S] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (4 children)

Thanks, it's based off of a phd project I found online. I changed the javascript and html quite a bit, but it's really a short program when you consider all that it does. Maybe 2k lines total for everything.

[–][deleted] 3 insightful - 3 fun3 insightful - 2 fun4 insightful - 3 fun -  (3 children)

Yeah this emergent behavior stuff is fascinating. I like watching the dumb bastard fish swim in circles before they get smart.

[–]magnora7[S] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (2 children)

Haha yeah there are some really dumb ones in the beginning. Sometimes they lean toward the "avoid the red" strategy and sometimes they lean more toward the "get the green/yellow" strategy. Sometimes you'll get a genius population that's good at both, but you have to get lucky to discover the right gene settings, since it's basically a smart random-walk function. But I guess real evolution is too. It's super fascinating.

[–][deleted] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (1 child)

This is really impressive considering the lines of code. I like the 'F' interface too. And my fish swim way faster on desktop. Also my kid says "that's amazing" and "how cute".

So is the skipping/redrawing I'm seeing happen for each new generation? It's distracting but maybe it needs to be there.

[–]magnora7[S] 3 insightful - 2 fun3 insightful - 1 fun4 insightful - 2 fun -  (0 children)

I'm glad you and your kid like it! haha

So is the skipping/redrawing I'm seeing happen for each new generation?

Yup that's exactly right. It's resetting the food to new random positions, creating all the new fish for the next generation, then placing them.

I can make the generations longer, which is more fun to watch, but it takes longer for the intelligence to evolve because each generation is longer. Maybe I could make that a variable you could change on the intro screen if I made such a thing. There's like 20 variables to mess with at the start