+ 5

[ ✿ Challenge ✿ ] - Life simulation

Make any kind of life simulation code. Something that tries to simulate biology in some way. It can be a population, a way to walk or grow, your idea, bacterias, plants, bugs, aliens or mammals ... I made my version to give you an idea, but yours can be very different : Crazy, stupid, magic, useless, amazing, serious, funny, technical, short and simple, long and complicated, visual or not, anything is allowed ! https://code.sololearn.com/cR5F006R2XYE/#py Have fun !

11th Feb 2018, 2:42 AM
Cépagrave
Cépagrave - avatar
11 ответов
+ 5
Not exactly the solution but fractals are part of nature so I guess this would qualify....😊 https://code.sololearn.com/Wpp3r2ld80h8/?ref=app
11th Feb 2018, 3:43 AM
Jonathan Pizarra (JS Challenger)
Jonathan Pizarra (JS Challenger) - avatar
+ 2
@Jonathan Pizarra Well, there are actually many fractals in lifeforms, true. Nice idea !
11th Feb 2018, 3:55 AM
Cépagrave
Cépagrave - avatar
+ 2
Nice, thanks for the link. I'll watch it right now ! What about posting a short introducing lesson about G.A. in Sololearn ? With a very simple example ? Is it ok for you to tell (in an understandable way) what you're working on ?
11th Feb 2018, 2:25 PM
Cépagrave
Cépagrave - avatar
+ 2
Blackwinter gave me good motivation ! (thank you !) So I've decide to write my firsrt Genetic Algorithm. Guess what it can do ! We can solve crazy complex problems with G.A. Mine ? : it writes the pyton code : print("Hello World") https://code.sololearn.com/c1588kW12miz/#py
12th Feb 2018, 3:48 AM
Cépagrave
Cépagrave - avatar
+ 2
This code simulates the impact of an epedemic to the population of a city. In the first lines you can define the start conditions. https://code.sololearn.com/cYdewRD1001I/?ref=app
12th Feb 2018, 5:33 AM
Sebastian Keßler
Sebastian Keßler - avatar
+ 2
This program shows the color of flowers at mendel inheritance. https://code.sololearn.com/cTL42jlzIlVj/?ref=app
12th Feb 2018, 7:34 AM
Sebastian Keßler
Sebastian Keßler - avatar
+ 2
Understood !
12th Feb 2018, 6:02 PM
Cépagrave
Cépagrave - avatar
16th Feb 2018, 10:26 AM
Вадим Сухотин (Vadim Sukhotin)
Вадим Сухотин (Vadim Sukhotin) - avatar
+ 1
@blackwinter Genetic algorithm is a very good idea. I'm not there yet. Do you have one ?
11th Feb 2018, 3:51 AM
Cépagrave
Cépagrave - avatar
+ 1
@blackwinter Thank you, I'll add def mutation() to my code ! What do you mean by np in fast np hard problems ? Edit : Mutation added !
13th Feb 2018, 1:35 PM
Cépagrave
Cépagrave - avatar
+ 1
I 've just made a new Genetic Algorithm https://code.sololearn.com/cXUsWUsBEFur/#py It produces and evolves a population of genes coding for polynomials, and the goal for those polynomials to get the closest possible to a function (or some points given) on an interval. The example settings are looking for an approximation of sin(x) on [0, pi/2]. Unfortunately it won't even start to do something on the Code Playground, but I posted it so that you can try it on your computer and see how I made it. I tried to comment it as much as I could. Don't forget to comment !
4th Mar 2018, 1:04 AM
Cépagrave
Cépagrave - avatar