Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Dann mutateAdd

Matias Vazquez-Levi edited this page Feb 1, 2021 · 7 revisions

Back to Dann

mutateAdd( percent );

This function mutates the weights by taking a percentage of the weight & adding it to the weight. This is for Neuroevolution tasks.

  • percent

    Percentage to add to each weight. In between 0 and 1.

Example

const nn = new Dann(4,2);
nn.makeWeights();

nn.log({weights:true,table:true})

// weights add 5% of themselves.
nn.mutateAdd(0.05);

nn.log({weights:true,table:true})