Ann.Simulation

A module for simulating ANNs.

Summary

Functions

Returns the ammount of data change in the latest step of the simulation

Uses a single frame of inputs repeatedly until it has evaluated max times, or until the summation of data changes is <= to thresh

Creates a new ANN Simulation given an ANN, and a sigmoid function

Steps the simulation forward one frame, provided with the current inputs for this frame. inputs should be a map of node_ids and their values, or a list of {node_id, val} pairs

Functions

change(sim)

Returns the ammount of data change in the latest step of the simulation.

eval(sim, inputs, max \\ 100, thresh \\ 1.0e-5)

Uses a single frame of inputs repeatedly until it has evaluated max times, or until the summation of data changes is <= to thresh.

new(ann, sigmoid \\ fn x -> :math.tanh(2 * x) end)

Creates a new ANN Simulation given an ANN, and a sigmoid function.

step(sim, inputs)

Steps the simulation forward one frame, provided with the current inputs for this frame. inputs should be a map of node_ids and their values, or a list of {node_id, val} pairs.