liquidcarrot / carrot

🥕 Evolutionary Neural Networks in JavaScript
https://liquidcarrot.io/carrot/
MIT License
294 stars 34 forks source link

NEAT class documention #25

Closed dan-ryan closed 5 years ago

dan-ryan commented 5 years ago

I may have missed something but I couldn't see any NEAT documentation for Carrot.

Neataptic documenation: https://wagenaartje.github.io/neataptic/docs/neat/

luiscarbonell commented 5 years ago

@dan-ryan Thank you for pointing it out! 👍 @wagenaartje had built the evolutionary greatness of Neat into the network.evolve function - I just went ahead and documented it here.

That said, I 100% agree that we should document the Neat class somehow. @christianechevarria and I had talked about maybe just dealing with "1" network (i.e. Network.evolve) or creating a more descriptive name like Population, Species, etc. to describe the function of the Neat class in Neataptic and using other evolutionary algorithms or populations/multi-network methods in that class.

I will leave this issue open for now, until we converge on some good concept/architecture for this one.

Feedback, opinions, preferences, are 💯 welcome!

dan-ryan commented 5 years ago

I was going to write this in another issue, but since you asked for feedback here...

I have found the Neat class is much more complicated than it needs to be.

My ideal api would be:

luiscarbonell commented 5 years ago

@dan-ryan I would 100% agree with this.

I was going to write this in another issue, but since you asked for feedback here...

I have found the Neat class is much more complicated than it needs to be.

My ideal api would be:

You extend network.evolve. You pass it a score that for the network to hit to finish. You pass in the scoring function. Select the population class. So you can extend and store data if needed. The population has ids. Multi-threading support. Able to give it your data and select what percentage is the training, validation and testing data. A setting that auto adjusts the mutation rate based on the validation results. Regularization support.

christianechevarria commented 5 years ago

Hey guys, I went ahead and exposed a basic NEAT entry in the docs with 2306d3a

Extending network.evolve sounds great and it's something I want to work on in the coming days

dan-ryan commented 5 years ago

Looks like the layout is broken on Chrome. Broken layout

christianechevarria commented 5 years ago

@dan-ryan Just pushed up some changes with 371790b68b496fde08eb574e03835dedaf487ab0

Did some basic tests on my end for different viewports, but want to check with you guys before closing this issue and #32

Let me know what you guys think!

dan-ryan commented 5 years ago

Looks fine on Chrome now. Also tested Edge. If I was being picky... The changes had a number of CSS lines commented out without comments :)

christianechevarria commented 5 years ago

If I was being picky... The changes had a number of CSS lines commented out with

Great catch! Went ahead and cleaned it up with 91fe43a9c9b9bf7a6558baedbead5cada8ce162d

Love the "pickiness" definitely keep it coming lol