Toymaker Television

Daily content for the geek and DIYer

8 notes &

Simple Neural Networks

Here is an easy way to create a network which can learn:

The network is a collection of nodes. Each node has an input, an energy level, a threshold, an output, a synaptic map, an input map, and an output map.

Inputs are set high via the environment or via feedback loops from other node’s outputs.

When a node’s input goes high, place one threshold worth of energy into it’s energy level.

When a node’s energy level is higher than it’s threshold, it triggers.  When a node triggers, remove one threshold of energy from it’s energy level. Check the node’s synaptic map and add one energy to each of the nodes listed in the synaptic map.  If this node is listed in it’s own map - add one energy to this node’s output.

Outputs control actions in the environment or feedback to the input of other nodes.

This collection of nodes is an Individual.

For learning:

Take a small group of individuals and have them all operate on the same set of inputs - monitor the outputs of each individual and score them based on which individuals have the least errors compared to the intended output pattern you desire.

After each round, replace the poorest scoring individual with a copy of the highest scoring individual - but mutate one mapping in the copy.

Over the course of many generations (and mutations), your population should evolve closer to the correct solution.

This minimalist network can be trained to solve many fascinating and complex problems, enjoy!

@tymkrs / @whixr

Filed under neural network neural net ai artificial intelligence evolution genetic mutation adapt generation programming machine learning

  1. tymkrs posted this