View Code? Open in Web Editor
NEW
a neural voting experiment
License: The Unlicense
elixir_ne's Introduction
- Demo structure: lib/demo.ex
- a single "demo" neuron is instantiated
- a
n==1000
neurons are started, knowing their target neuron
- these are connected to the "demo" neuron
- a prediction is requested (artificially), by sending the "demo" neuron a message
- this in turn requests predictions from its connections
- Simulated voting neuron: lib/neuron.ex
- if there are no connections, the neuron just returns a random number and sleeps a bit (
delay
)
- if there are connections, the neuron tries to receive all the predictions, but within a deadline ("metabolic constraint"):
deadline_ms
- returns the maximal value received so far or
-1
if none were received within a timeout
- TODO: return the best prediction if it's above a numeric threshold
- deadline example:
{:prediction, %{delay: 142, input_count: 1000, prediction: [value: 65.30085608551246, reason: :deadline, inputs_used: 496]}}
- all received:
{:prediction, %{delay: 117, input_count: 1000, prediction: [value: 61.81215141710118, reason: :all_received, inputs_used: 1000]}
- none received within time limits:
{:prediction, %{delay: 101, input_count: 1000, prediction: [value: -1, reason: :deadline, inputs_used: 0]}}
- written deliberately without GenServers to demonstrate actual message passing that could be mapped onto neuron signalling
- see the build output:
- I'm not a professional researcher
- this is a spare time project to play around with ideas
elixir_ne's People
Contributors