Crates.io | siarne |
lib.rs | siarne |
version | 0.4.0 |
source | src |
created_at | 2021-04-25 10:20:10.936004 |
updated_at | 2021-04-25 10:20:10.936004 |
description | Fast simulation of artificial neurons |
homepage | |
repository | https://github.com/Pjottos/siarne |
max_upload_size | |
id | 389244 |
size | 40,138 |
A library for fast simulation of artificial neurons.
A network is a ring of neurons where each neuron has a connection to itself and 0 or more other neurons neighbouring it.
At each tick
the input of each neuron (32 bit signed integer) is compared to it's treshold, if it's greater then the neuron adds effects (8 bit signed integers)
to the inputs of neurons at the ends of its connections.
The parameters of a network are the effects, tresholds and the index of the neurons from which input and output is extracted. There are utilities for tweaking these parameters (training), currently only an evolution strategy is implemented.
The main evaluation code is automatically vectorized and should therefore run blazing fast on many platforms.
To give an impression, the network_tick
benchmark on an i7-4790 runs at about 370 microseconds per tick for 4096 neurons with 1024 connections per neuron.
If the benchmark is run with target-cpu=native
the time per tick goes down to about 200 microseconds.
Currently the evaluation code is completely single threaded, future work includes looking at multithreading oppurtunities within a single network.
For the training code performance is considered less important and e.g quality of random numbers takes priority.