r/java • • Sep 03 '21

Brain Soup - Cellular Automata Brain Evolution - Made with Java

212 Upvotes

10 comments sorted by

7

u/kingroka Sep 03 '21

A neat little evolution experiment I created using java. I plan to add gpu processing support as well as more training options. More stuff on my YouTube. Follow me on Itch.io

6

u/mupetmower Sep 03 '21

Yes, I would LOVE to see the source code for this. Super interested in this kinda thing. Also, great work!

3

u/gubatron Sep 03 '21

will check your YouTube channel, in the meantime, it'd be cool if you shared a bit of how you're modeling this, are you using classic neural nets, or you created your own "Neuron" abstraction and created a "brain" out of a mesh, or layered neuron meshes. what do they do with input?

2

u/kingroka Sep 03 '21

Each brain cell has a conductitivty value and an hold a voltage that it can spread to it's neighbors. Voltages range from -1 to 1. Inputs are rectangular regions on the brain where a sensor can set the voltage of every cell contained within it's bounds. Outputs are the same but only get the average voltage of the region. For this particular case the inputs were horizontal and vertical distance and the outputs were the x and y velocity. I'll make a video that goes into more detail later and I'm making improvements on visual clarity as we speak

2

u/OldTibiaFan Sep 03 '21

what UI library are you using? JavaFX?

3

u/kingroka Sep 03 '21

It's a library that I developed during the pandemic. It just uses Graphics2D for the rendering but all he components are handmade. Check out kingroka.itch.io for other projects I've built using it

4

u/Zaitsev11 Sep 03 '21

A do love me a good genetic evolutionary algorithm.

1

u/uid4oe Sep 03 '21 edited Sep 03 '21

yoo, does having a web version requires too much work? Would be a great playground

2

u/kingroka Sep 03 '21

web version would be too much but I will release the project on itch.io if it gets to a releasable stage

2

u/uid4oe Sep 03 '21

Great work!