Skip to main content
Deno 2 is finally here šŸŽ‰ļø
Learn more

NEAT Neural Network for DenoJS

This project is a unique implementation of a neural network based on the NEAT (NeuroEvolution of Augmenting Topologies) algorithm, written in DenoJS using TypeScript.

Feature Highlights

  1. Extendable Observations: The observations can be extended over time as the indexing is done via UUIDs, not numbers. This prevents the need to restart the evolution process as new observations are added, providing flexibility and scalability.

  2. Distributed Training: Training and evolution can be run on multiple independent nodes. The best-of-breed creatures can later be combined on a centralized controller node. This feature allows for distributed computing and potentially faster training times, enhancing the efficiency of the learning process.

  3. Life Long Learning: Unlike many pre-trained neural networks, this project is designed for continuous learning, making it adaptable and potentially more effective in changing environments. This feature ensures the model remains relevant and accurate over time.

  4. Efficient Model Utilization: Once trained, the current best model can be utilized efficiently by calling the activate function. This allows for quick and easy deployment of the trained model.

  5. Unique Squash Functions: The neural network supports unique squash functions such as IF, MAX, MIN, and HYPOT. These functions provide more options for the activation function, which can lead to different network behaviours, offering a wider range of potential solutions. More about Activation Functions.

  6. Neuron Pruning: Neurons whose activations don’t vary during training are removed, and the biases in the associated neurons are adjusted. This feature optimizes the network by reducing redundancy and computational load. More about Pruning (Neural Networks).

  7. CRISPR: Allows injection of genes into a population of creatures during evolution. This feature can introduce new traits and potentially improve the performance of the population. More about CRISPR.

  8. Grafting: If parents aren’t ā€œgenetically compatibleā€, then the ā€œgraftingā€ algorithm from one parent to another parent onto the child will be used. This allows for species from islands to interbreed.

  9. Memetic Evolution: The algorithm can now record and utilize the biases and weights of the fittest creatures to fine-tune future generations. This process, inspired by the concept of memes, allows the system to ā€œrememberā€ and build upon successful traits, enhancing the evolutionary process. Learn more about Memetic Algorithms.

  10. Error-Guided Structural Evolution: Dynamically identifies and creates new synapses by analyzing neuron activations and errors. This targeted structural adaptation improves performance by explicitly reducing neuron-level errors, blending evolutionary topology adjustments with error-driven learning.

  11. Visualization

Usage

This project is designed to be used in a DenoJS environment. Please refer to the DenoJS documentation for setup and usage instructions.

Contributions

Contributions are welcome. Please submit a pull request or open an issue to discuss potential changes/additions.

License

This project is licensed under the terms of the Apache License 2.0. For the full license text, please see LICENSE.

Built with the Deno Standard Library

codecov