Genome class

Annotations
  • @JsonSerializable(explicitToJson: true)

Constructors

Genome(int inputCount, int outputCount)
Genome.clone(Genome original)
factory
Genome.crossover(Genome fittest, Genome weak)
factory
Genome.fromJson(Map<String, dynamic> json)
factory
Genome.mutate(Genome g)
factory

Properties

bias Bias
no setter
no setter
canAddLoop bool
no setter
canAddNode bool
no setter
canChangeActivation bool
no setter
canChangeWeight bool
no setter
canResetActivation bool
no setter
connections Iterable<Connection>
no setter
fitness num
getter/setter pair
genes List<Gene>
getter/setter pair
hasDormantConnections bool
no setter
hashCode int
The hash code for this object.
no setterinherited
hiddens Iterable<Hidden>
no setter
inputCount int
getter/setter pair
inputs Iterable<Input>
no setter
no setter
loops → dynamic
no setter
nodes Iterable<Node>
no setter
outputCount int
getter/setter pair
outputs Iterable<Output>
no setter
possibleActivationChanges Iterable<Hidden>
no setter
possibleDormantConnections Iterable<Connection>
no setter
no setter
possibleLoops Iterable<Node>
no setter
possibleNodes Iterable<Link>
no setter
possibleWeightChanges Iterable<Connection>
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addLoop(Node loop) Loop
addNode(Link link) Hidden
changeWeight(Connection c, num change) → void
clear() → void
geneticDifference(Genome g2) num
getInputConnections(Node n) Iterable<Connection>
getOutputs() List<num>
getPossibleMutations() Map<Mutation, num>
hasLoop(Node loop) bool
hasNode(Link link) bool
isSameSpecies(Genome g, [num tolerance = 0.26]) bool
mutate() Genome
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerInputs(List<num> inputs) → void
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited
transferToOutputs() → void
update() → void
updateInputs() → void

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

geneFromJson(Map<String, dynamic> json, List<Gene> genes) Gene