Installation
NEAT-JavaScript can be used in both Node.js and browser environments. Choose your environment below to see the full setup.
Installation with npm
npm install neat-javascriptAvailable Imports
Here are the main components you can import from the library:
const {
Config,
ActivationFunction,
Gaussian,
LeakyReLU,
NEATSigmoid,
ReLU,
SELU,
Sigmoid,
Tanh,
ConnectionGene,
ConnectionGeneData,
NodeGeneData,
GeneticEncoding,
BiasNode,
HiddenNode,
InputNode,
NodeGene,
NodeType,
OutputNode,
Genome,
Population,
Species,
FitnessFunction,
XOR,
InnovationData,
InnovationType,
InnovationTracker,
ConfigTracker,
GenomeTracker,
NodeTracker,
PopulationTracker,
StaticManager,
WeightInitialization,
RandomWeightInitialization,
GenomeBuilder
} = require('neat-javascript');Installation for Browsers
Add the NEAT-JavaScript library to your HTML file:
<script src="https://neat-javascript.org/releases/NEAT-JavaScript-1.1.0.js"></script>How the Library is Exported
The library is bundled with webpack using UMD format with the global name NEATJavaScript. When you include the script in your HTML, all the library's components are automatically available under this namespace.
Available Components
Here are the main components available in the browser:
// These can be accessed with the NEATJavaScript prefix
// Or directly if you've used Object.assign(window, NEATJavaScript);
Config,
ActivationFunction,
Gaussian,
LeakyReLU,
NEATSigmoid,
ReLU,
SELU,
Sigmoid,
Tanh,
ConnectionGene,
ConnectionGeneData,
NodeGeneData,
GeneticEncoding,
BiasNode,
HiddenNode,
InputNode,
NodeGene,
NodeType,
OutputNode,
Genome,
Population,
Species,
FitnessFunction,
XOR,
InnovationData,
InnovationType,
InnovationTracker,
ConfigTracker,
GenomeTracker,
NodeTracker,
PopulationTracker,
StaticManager,
WeightInitialization,
RandomWeightInitialization,
GenomeBuilderNext Steps
After installing and configuring the library, check out the following resources to learn more:
- Quick Start Guide — quick examples to get started
- Configuration — detailed configuration options