UNPKG

@alenaksu/neatjs

Version:

NEAT (Neuroevolution of Augmenting Topologies) implementation in JavaScript

16 lines 470 B
export class ConnectionGene { constructor(innovation = 0, form, to, weight = 1, enabled = true) { this.from = form; this.to = to; this.weight = weight; this.enabled = enabled; this.innovation = innovation; } disable() { this.enabled = false; } copy() { return new ConnectionGene(this.innovation, this.from, this.to, this.weight, this.enabled); } } //# sourceMappingURL=ConnectionGene.js.map