yaricom / goNEAT

The GOLang implementation of NeuroEvolution of Augmented Topologies (NEAT) method to evolve and train Artificial Neural Networks without error back propagation
MIT License
75 stars 19 forks source link

Automatically tune compatibility threshold for species when training #48

Open qwertyuu opened 2 years ago

qwertyuu commented 2 years ago

Hello! While reading this cool documentation on the technicalities of NEAT, I stumbled upon a Q/A section named:

- Is there a way to automatically set the compatibility threshold for speciation?

image

In their implementation, there seems to be a way to edit the source code and to recompile the NEAT engine so that a certain amount of species is kept when training, so that the number of species does not "explode uncontrollably" when some kind of mutations happen, and even sometimes approach the number of organism in the population, which is by itself very weird (I am the only organism of my species, and so are you! and you.. and you! Is this what extinction feels like?)

I find myself tweaking my threshold beforehand a lot, so that the number of species does not go too high, but it feels like having a set number of species would be desirable.

Have you thought about implementing this in goNEAT? Thanks!

yaricom commented 2 years ago

Hello @qwertyuu

Yes, I was thinking about this. However, there are no easy way to tune this automatically because evolution is a stochastic process.

Regarding tweaking algorithm. It can be more beneficial to tweak the seed of the random number generator. This can lead to better results. The speciation threshold and other parameters is like environmental factors in natural evolution. The power of evolutionary process is that it can find workarounds if organisms found itself in hostile environment. However, it can take more time to produce the winner.

Anyway, this is good idea. I'll keep it in my to-do list.

Meanwhile, I'm not able to maintain this library in full speed due to war in Ukraine, where I'm living.

qwertyuu commented 2 years ago

Meanwhile, I'm not able to maintain this library in full speed due to war in Ukraine, where I'm living.

How is the situation? It is all we talk about here. I have donated before and hope that you will win. I am sorry this happens to you.

yaricom commented 2 years ago

Yes, this is a war which russia cowardly started against independent country in Europe, that you can see on all the media. We are fighting with all means that we have to protect Ukraine, our families, our freedom. As you know we are fighting very good and already surprised the world. However, any help that can be provided by the civilized world is very much appreciated.

Thank for your support!

qwertyuu commented 2 years ago

Just so everyone reading here wants to donate too: https://itch.io/b/1316/bundle-for-ukraine

This is a game bundle that many game dev DONATED their games so people could donate to Ukraine. So far 5M$ were raised and still going.

Take care @yaricom , we need your brillant brain on this earth :)

MHarris021 commented 2 years ago

Link shared across my company slack of 500+ and on my linkedin network of 7k+

yaricom commented 2 years ago

Thank you for support!

Here you can also find official page of National Bank of Ukraine where you can support Ukraine:

https://bank.gov.ua/en/news/all/natsionalniy-bank-vidkriv-rahunok-dlya-gumanitarnoyi-dopomogi-ukrayintsyam-postrajdalim-vid-rosiyskoyi-agresiyi

https://bank.gov.ua/en/about/support-the-armed-forces

qwertyuu commented 1 year ago

@yaricom I had a thought about you and the situation in Ukraine. Just so you know, you are still on my mind. I wonder how you've been and how the situation is.

yaricom commented 1 year ago

@qwertyuu Thank you. I was all the time and still in Kyiv writing code with rockets flying over my head :) Almost every night for more than a month we have an attacks by cruise, ballistic, etc. missiles accompanied by drones. Sometimes we have it also at the morning when people commute. But we are keep doing. Working hard and looking forward for the victory.