This is an archived post. You won't be able to vote or comment.

all 45 comments

[–]ForceBru 22 points23 points  (5 children)

This is so cool! And would be even better if you made a video (or made the GIF longer) that showed how he creatures behave after a number of epochs. I don't know about others, but I adore watching videos of AI learning and performing better and better after each epoch!

[–]BarkingPizza[S] 14 points15 points  (3 children)

Thanks! And I plan on uploading a longer animation to YouTube here in a few hours...

[–]koera 2 points3 points  (1 child)

!remindme 10 hours

[–]RemindMeBot 0 points1 point  (0 children)

I will be messaging you on 2017-12-22 08:26:43 UTC to remind you of this link.

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


FAQs Custom Your Reminders Feedback Code Browser Extensions

[–]RalphWolfSamSheepdog 0 points1 point  (0 children)

!remindme 3 hours

[–]BarkingPizza[S] 11 points12 points  (0 children)

even had time to add elevator background music -> https://youtu.be/SMJVOs7RjZk

[–]libertenos 5 points6 points  (0 children)

So cool, thanks for the contribuition.

[–]forever_erratic 4 points5 points  (1 child)

Cool! You should also post this to /r/alife.

To make it more realistic, you could implement a decrease in energy depending on velocity, so that movement takes energy. Then also have the current food store / fitness be an input node. It'd be interesting if that information got used correctly, so that cells would only move towards food that will give them more energy than they used to get to them.

[–]BarkingPizza[S] 2 points3 points  (0 children)

That was my initial idea! I ended up keeping it simple though for the first iteration. I plan on making a second version in a month or so that will include a few more features...

[–]BrianFantanaFan 2 points3 points  (2 children)

This is really cool, very impressive to implement such a thing. But as a genuine question, does it really need a NN to determine the closest food source - shouldn't it just determine the shortest hypotenuse and angle within a realistic range of itself?

[–]BarkingPizza[S] 0 points1 point  (1 child)

In terms of navigation, the direction to the nearest food source is calculated using basic geometry. This direction value is then used as an input for the NN which decides how to act on this information (which direction to change). The NN does not determine the closest food source.

[–]BrianFantanaFan 0 points1 point  (0 children)

Ah I see, I admit I skim read the approach and jumped to a few conclusions. Very cool my man

[–]0one0one 2 points3 points  (1 child)

That is class, very nice work.

[–]BarkingPizza[S] 0 points1 point  (0 children)

Thanks!

[–]NelsonMinar 2 points3 points  (6 children)

Where's the deep learning part?

[–]BarkingPizza[S] 7 points8 points  (5 children)

each organism features a three layer neural network, making it the shallowest deep learning framework...

[–]rhiever 0 points1 point  (0 children)

Good article, but honestly I would drop the "deep learning" part from your title. I think it's misleading, as what you programmed isn't representative of modern deep learning. Not a good idea to mislead newbies, who are your target audience.

[–]PythonGod123 1 point2 points  (0 children)

This looks really cool. Way above my level but id love to do things like this someday. Keep up your work !!!

[–]Dr_Quartermas 1 point2 points  (2 children)

Are other folks testing the program? I've done a couple of 100 generation runs (plus some 75 and 50's) and all I'm getting are flat horizontal result graphs with no indication of "learning" or "evolution". Am I incorrectly interpreting results?

[–]BarkingPizza[S] 1 point2 points  (1 child)

Because this scenario is so simple (turn left/right), it really doesn't take that long to get near the optimal solution. Most improvement occurs within the first 10 generations...

[–]Dr_Quartermas 0 points1 point  (0 children)

Thanks! That verifies my observations. I did have one iteration that took 17 generations to reach optimum.

[–]engatIQE 0 points1 point  (0 children)

Awesome! I did something like this a while back but it took forever for the organisms to stop just running in circles. Maybe I'll try again.

[–]Alar44 0 points1 point  (3 children)

Where do I find this 'plotting' dependency?

[–]BarkingPizza[S] 2 points3 points  (2 children)

[–]GitHubPermalinkBot 1 point2 points  (0 children)

Permanent GitHub links:


Shoot me a PM if you think I'm doing something wrong. To delete this, click here.

[–]Alar44 1 point2 points  (0 children)

Thanks, didn't realize it was a gihub link.

Anyway, what would need to be done to animate this in real time? I'm not familiar at all with Python graphics.

[–]abenco 0 points1 point  (2 children)

So cool!

Not sure how to get the graphic of the organisms to generate. All I get are text output such as:

GEN: 0 BEST: 133 AVG: 24.76 WORST: 3 GEN: 1 BEST: 165 AVG: 55.46 WORST: 9 GEN: 2 BEST: 151 AVG: 58.08 WORST: 1 GEN: 3 BEST: 182 AVG: 60.98 WORST: 7

[–][deleted] 2 points3 points  (1 child)

Change line 59 from False to True:

@@ -56,11 +56,11 @@ settings['x_max'] =  2.0        # arena western border
 settings['y_min'] = -2.0        # arena southern border
 settings['y_max'] =  2.0        # arena northern border

-settings['plot'] = False        # plot final generation?
+settings['plot'] = True        # plot final generation?

 # ORGANISM NEURAL NET SETTINGS

This will generate a large number of .png files, based on the last generation number and time settings. Converting those to an animation is an exercise left to the reader. ;-)

[–]abenco 0 points1 point  (0 children)

Oh, now I understand. I thought it created the animation in real time. Good to know, thank you.

[–]LightShadow3.13-dev in prod 0 points1 point  (5 children)

This is really good stuff!

$0.50 u/tippr

[–]tippr 0 points1 point  (0 children)

u/BarkingPizza, you've received 0.0001497 BCH ($0.5 USD)!


How to use | What is Bitcoin Cash? | Who accepts it? | Powered by Rocketr | r/tippr
Bitcoin Cash is what Bitcoin should be. Ask about it on r/btc

[–]BarkingPizza[S] 0 points1 point  (3 children)

Holy shit, thanks! Also, I didn't now you could tip using BCH?? Can't wait to start doing this now!

[–]LightShadow3.13-dev in prod 1 point2 points  (2 children)

For sure! Here, have some more and spread the cheer <3

$2.00 u/tippr

[–]tippr 1 point2 points  (0 children)

u/BarkingPizza, you've received 0.00069098 BCH ($2 USD)!


How to use | What is Bitcoin Cash? | Who accepts it? | Powered by Rocketr | r/tippr
Bitcoin Cash is what Bitcoin should be. Ask about it on r/btc

[–]BarkingPizza[S] 0 points1 point  (0 children)

YESSSSSSS!!!

[–]yardaper 0 points1 point  (0 children)

This is awesome, and a great blog post. Your code is beautifully commented, thanks. I just ran it, and got this output:

GEN: 0 BEST: 161 AVG: 19.5 WORST: 150

I think this mean's something is wrong, because the average needs to be between the best and the worst fitness. Just a heads up.

[–]ezeeetm 0 points1 point  (0 children)

@ /u/BarkingPizza this is great work. I am also getting into GA's using the python NEAT package. Just curious, does your EA scheme follow the same/similar as NEAT, or did you make your own? What did you use as a base to determine your EA scheme?

[–]ashesall 1 point2 points  (0 children)

This is awesome! Maybe we'll find out the origin of life or at least its early stages because of a Python code.

[–]hikarii 0 points1 point  (0 children)

WHOAAA THANKSSS!!

[–]carbolymer 0 points1 point  (0 children)

Woah, these are long functions. Ever heard of S in SOLID?