FSAHelperFunctions

Neuromorphic Embodied Agents that Learn (NEAL) based functions for constructing State Machines.

class nmcog.spinnaker.specialfunction.neal.stateMachineClass.FSAHelperFunctions(simName='spinnaker', spinnVersion=8)

This is the class for constructing State Machines. The individual CAs (both inputs and states) run at 5 ms.

Methods Parameters Used
turnOnStateFromSpikeSource()
halfTurnOnStateFromSpikeSource()
turnOffStateFromSpikeSource()
stimulateStateFromSpikeSource()
inhibitStateFromSpikeSource()
turnOnOneNeuronFromSpikeSource()
turnOffOneNeuronFromSpikeSource()
inhibitOneNeuronFromSpikeSource()
oneNeuronTurnsOnState()
oneNeuronHalfTurnsOnState()
oneNeuronTurnsOffState()
oneNeuronHalfTurnsOffState()
oneNeuronStimulatesState()
oneNeuronStimulatesOneNeuron()
oneNeuronTurnsOnOneNeuron()
  • INPUT_WEIGHT
oneNeuronInhibitsOneNeuron()
oneNeuronHalfTurnsOnOneNeuron()
  • ONE_HALF_ON_ONE_WEIGHT
oneNeuronInhibitsState()
stateTurnsOnOneNeuron()
stateTurnsOnOneRBSNeuron()
stateHalfTurnsOnOneNueron()
stateStimulatesOneNeuron()
stateInhibitsOneNeuron()
stateTurnsOnState()
stateTurnsOnStateSlow()
stateTurnsOffState()
stateHalfTurnsOnState()
stateHalfTurnsOffState()
stateStimulatesState()
stateInhibitsState()
getCAConnectors()
  • CA_SIZE, CA_INHIBS, NealCoverFunctions .DELAY
  • INTRA_CA_WEIGHT, INTRA_CA_TO_INHIB_WEIGHT, INTRA_CA_FROM_INHIB_WEIGHT
getCAConnectors(CA)

Create excitatory connector list and inhibitory connector list for a given cell assembly. The method returns a list such that the first element is the excitatory connector list.

Regardless of excitatory or inhibitory connector lists, the most basic element of a connector list is a PyNN Connector tuple of the form (pre_idx, post_idx, weight, delay) where pre_idx is the index (i.e. order in the Population, not the ID) of the presynaptic neuron, post_idx is the index of the postsynaptic neuron, and weight, delay are the synaptic parameters.

Parameters used CA_SIZE CA_INHIBS INTRA_CA_WEIGHT INTRA_CA_TO_INHIB_WEIGHT INTRA_CA_FROM_INHIB_WEIGHT NealCoverFunctions .DELAY

By default a cell assembly size CA_SIZE = 10, which is the number of neuron units in each assembly.

These ten neuron populations are such that

  • eight of them project excitatory connections, lets call them <<0>> to <<7>>
  • two of them project inhibitory connections, lets call them <<8>> and <<9>>

Three kinds of connections are made,

  1. Excitatory connection from one neuron unit to another unit that projects excitatory connection (but not itself). Below shows projections from <<0>>.
Connection Weight is INTRA_CA_WEIGHT.

 .-.      .-.      .-.      .-.      .-.
( 0 )    ( 2 )    ( 4 )    ( 6 )    ( 8 )
 '-'      '-'      '-'      '-'      '-'
  +        ^        ^        ^
  + ++++++++++++++++++++++++++
  v        v        v        v
 .-.      .-.      .-.      .-.      .-.
( 1 )    ( 3 )    ( 5 )    ( 7 )    ( 9 )
 '-'      '-'      '-'      '-'      '-'
  1. Excitatory connection from neuron unit to another that project inhibitory connection. Below shows projections from <<0>>.
Connection Weight is INTRA_CA_TO_INHIB_WEIGHT.

 .-.      .-.      .-.      .-.      .-.
( 0 )    ( 2 )    ( 4 )    ( 6 )    ( 8 )
 '-'      '-'      '-'      '-'      '-'
  +                                   ^
  +++++++++++++++++++++++++++++++++++++
                                      v
 .-.      .-.      .-.      .-.      .-.
( 1 )    ( 3 )    ( 5 )    ( 7 )    ( 9 )
 '-'      '-'      '-'      '-'      '-'
  1. Inhibitory connection from neuron unit to other unit that project excitatory connection (but not to units that project inhibitory connection including itself). Below shows projections from <<8>>.
Connection Weight is INTRA_CA_FROM_INHIB_WEIGHT.

 .-.      .-.      .-.      .-.      .-.
( 0 )    ( 2 )    ( 4 )    ( 6 )    ( 8 )
 '-'      '-'      '-'      '-'      '-'
  ^        ^        ^        ^        -
  -------------------------------------
  v        v        v        v
 .-.      .-.      .-.      .-.      .-.
( 1 )    ( 3 )    ( 5 )    ( 7 )    ( 9 )
 '-'      '-'      '-'      '-'      '-'

Note:

  • The two kinds of excitatory connections are collected in one list, the excitatory connector list.
halfTurnOnStateFromSpikeSource(spikeSource, toNeurons, toCA)

Given a spikeSource , this method turns 1/2 ON the state of the desired cell assembly. toNeurons specifies the type of PyNN population within the cell assembly.

Parameters used CA_SIZE CA_INHIBS HALF_INPUT_WEIGHT NealCoverFunctions .DELAY
inhibitOneNeuronFromSpikeSource(spikeSource, toNeurons, toNeuron, weight)

Given a spikeSource , this method inhibits the state of a desired neuron unit within a PyNN population with the given weight value.

Parameters used NealCoverFunctions .DELAY
inhibitStateFromSpikeSource(spikeSource, toNeurons, toCA, weight)

Given a spikeSource , this method inhibits the state of the desired cell assembly. toNeurons specifies the type of PyNN population within the cell assembly.

Parameters used CA_SIZE CA_INHIBS NealCoverFunctions .DELAY
initParams()
Constants values comments
CA_SIZE 10
  • This will (almost certainly) not work with a different sized CA.
CA_INHIBS 2
INPUT_WEIGHT 0.12
HALF_INPUT_WEIGHT 0.008
INTRA_CA_TO_INHIB_WEIGHT 0.002
INTRA_CA_FROM_INHIB_WEIGHT 0.15
CA_STOPS_CA_WEIGHT 0.15
ONE_NEURON_STOPS_CA_WEIGHT 1.0
ONE_NEURON_HALF_CA_WEIGHT 0.02
INTRA_CA_WEIGHT 0.025 0.022
FULL_ON_WEIGHT 0.01
FULL_ON_WEIGHT_SLOW 0.0022
HALF_ON_WEIGHT 0.0012
HALF_ON_ONE_WEIGHT 0.002
STATE_TO_ONE_WEIGHT 0.01
ONE_HALF_ON_WEIGHT 0.016
ONE_HALF_ON_ONE_WEIGHT 0.08

CELL_PARAMS

‘v_thresh’

‘v_reset’

‘tau_refrac’

‘tau_syn_E’

‘tau_syn_I’

‘v_rest’

‘i_offset’

dictionary

-48.0

-70.0

2.0

5.0

5.0

-65.0

0.0

makeCA(neurons, CA)

Given a neuron population and cell assembly parameters this method gets excitatory and inhibitory connectors (from getCAConnectors()) for the presumptive cell assembly.

  • Because the default a cell assembly size CA_SIZE = 10, there are ten neuron units
oooooooooooooooooooooooooooooooooooooooooooooooo
o                                              o
o   .-.      .-.      .-.      .-.      .-.    o
o  ( 0 )    ( 2 )    ( 4 )    ( 6 )    ( 8 )   o
o   '-'      '-'      '-'      '-'      '-'    o
o                                              o
o        cell assembly of CA_SIZE = 10         o
o                                              o
o   .-.      .-.      .-.      .-.      .-.    o
o  ( 1 )    ( 3 )    ( 5 )    ( 7 )    ( 9 )   o
o   '-'      '-'      '-'      '-'      '-'    o
o                                              o
oooooooooooooooooooooooooooooooooooooooooooooooo

Therefore, a cell assembly here is

nopMakeCA(neurons, CA)

Legacy.

oneNeuronHalfTurnsOffState(fromNeurons, fromNeuron, toNeurons, toCA)

From a given a neuron unit of a PyNN population, this method turns 1/2 OFF the state of a desired PyNN population within a cell assembly.

Parameters used CA_SIZE CA_INHIBS ONE_HALF_ON_WEIGHT NealCoverFunctions .DELAY
oneNeuronHalfTurnsOnOneNeuron(fromNeurons, fromCA, toNeurons, toCA)

From a given a neuron unit of a PyNN population, this method turns 1/2 ON the state of another neuron unit of a PyNN population within a desired cell assembly.

Parameters used ONE_HALF_ON_ONE_WEIGHT
oneNeuronHalfTurnsOnState(fromNeurons, fromNeuron, toNeurons, toCA)

From a given a neuron unit of a PyNN population, this method turns 1/2 ON the state of a desired PyNN population within a cell assembly.

Parameters used CA_SIZE CA_INHIBS ONE_HALF_ON_WEIGHT NealCoverFunctions .DELAY
oneNeuronInhibitsOneNeuron(fromNeurons, fromNeuron, toNeurons, toNeuron, weight)

From a given a neuron unit of a PyNN population, this method inhibits the state of another neuron unit of a desired PyNN population with the given weight value.

Parameters used NealCoverFunctions .DELAY
oneNeuronInhibitsState(fromNeurons, fromNeuron, toNeurons, toCA, weight)

From a given a neuron unit of a PyNN population, this method inhibits the state of a desired PyNN population within a desired cell assembly with the given weight value.

Parameters used CA_SIZE CA_INHIBS NealCoverFunctions .DELAY
oneNeuronStimulatesOneNeuron(fromNeurons, fromNeuron, toNeurons, toNeuron, weight)

From a given a neuron unit of a PyNN population, this method stimulates the state of another neuron unit of a desired PyNN population with the given weight value.

Parameters used NealCoverFunctions .DELAY
oneNeuronStimulatesState(fromNeurons, fromNeuron, toNeurons, toCA, weight)

From a given a neuron unit of a PyNN population, this method stimulates the state of a desired PyNN population within a cell assembly with the given weight value.

Parameters used CA_SIZE CA_INHIBS NealCoverFunctions .DELAY
oneNeuronTurnsOffState(fromNeurons, fromNeuron, toNeurons, toCA)

From a given a neuron unit of a PyNN population, this method turns OFF the state of a desired PyNN population within a cell assembly.

Parameters used CA_SIZE CA_INHIBS ONE_NEURON_STOPS_CA_WEIGHT NealCoverFunctions .DELAY
oneNeuronTurnsOnOneNeuron(fromNeurons, fromCA, toNeurons, toCA)

From a given a neuron unit of a PyNN population, this method turns ON the state of another neuron unit of a PyNN population within a desired cell assembly.

Parameters used INPUT_WEIGHT
oneNeuronTurnsOnState(fromNeurons, fromNeuron, toNeurons, toCA)

From a given a neuron unit of a PyNN population, this method turns ON the state of a desired PyNN population within a cell assembly.

Parameters used CA_SIZE CA_INHIBS INPUT_WEIGHT NealCoverFunctions .DELAY
stateHalfTurnsOffState(fromNeurons, fromCA, toNeurons, toCA)

From a given PyNN population in a cell assembly, this method turns 1/2 OFF the state of a desired PyNN population within a desired cell assembly.

Parameters used CA_SIZE CA_INHIBS HALF_ON_WEIGHT NealCoverFunctions .DELAY

Note:

stateHalfTurnsOnOneNueron(fromNeurons, fromCA, toNeurons, toNeuron)

From a given PyNN population in a cell assembly, this method turns 1/2 ON the state of another neuron unit of a desired PyNN population.

Parameters used CA_SIZE CA_INHIBS HALF_ON_ONE_WEIGHT NealCoverFunctions .DELAY

Note:

stateHalfTurnsOnState(fromNeurons, fromCA, toNeurons, toCA)

From a given PyNN population in a cell assembly, this method turns 1/2 ON the state of a desired PyNN population within a desired cell assembly.

Parameters used CA_SIZE CA_INHIBS HALF_ON_WEIGHT NealCoverFunctions .DELAY

Connection between the cell assemblies is as shown

        fromCA                                    toCA
ooooooooooooooooooooooo                  ooooooooooooooooooooooo
o                     o                  o                     o
o                     o                  o                     o
o (0) (2) (4) (6) (8) o                  o (0) (2) (4) (6) (8) o
o      +              o  HALF_ON_WEIGHT  o  ^   ^   ^   ^      o
o      +++++++++++++++o++++++++++++++++++o+++++++++++++++      o
o                     o                  o  v   v   v   v      o
o (1) (3) (5) (7) (9) o                  o (1) (3) (5) (7) (9) o
o                     o                  o                     o
o                     o                  o                     o
ooooooooooooooooooooooo                  ooooooooooooooooooooooo

Note:

  • A cell assembly is composed of CA_SIZE number of neuron units such that each unit is of same kind.

  • Therefore, the arguments fromNeurons and toNeurons (plural) refers to the kind of neuron population in the from- and to-assemblies.

  • That is, fromNeurons and toNeurons do not indicate some specific neuron population within respective assemblies.

  • The specification of a unit (from and to) a cell assembly is done by the connector list of tuples.

  • This specification is such that the fromNeuron and toNeuron are only in reference to units with excitatory connections.

    • Referring to illustration in getCAConnectors() then in the above illustration fromNeuron and toNeuron (singular) will be <<0>> to <<7>>
    • <<8>> and <<9>> are neither the source nor the target for the connection.
stateInhibitsOneNeuron(fromNeurons, fromCA, toNeurons, toNeuron, weight)

From a given PyNN population in a cell assembly, this method inhibits the state of another neuron unit of a desired PyNN population with the given weight value.

Parameters used CA_SIZE CA_INHIBS NealCoverFunctions .DELAY

Note:

  • For illustration on how the connections are made see stateTurnsOnOneNeuron() with the exception that this is “inhibitory”.
stateInhibitsState(fromNeurons, fromCA, toNeurons, toCA, wt)

From a given PyNN population in a cell assembly, this method inhibits the state of a desired PyNN population within a desired cell assembly with the given weight value.

Parameters used CA_SIZE NealCoverFunctions .DELAY

Note:

  • For illustration on how the connections are made see stateTurnsOffState() with the exception that this is “inhibitory”.
stateStimulatesOneNeuron(fromNeurons, fromCA, toNeurons, toNeuron, weight)

From a given PyNN population in a cell assembly, this method stimulates the state of another neuron unit of a desired PyNN population with the given weight value.

Parameters used CA_SIZE CA_INHIBS NealCoverFunctions .DELAY

Note:

stateStimulatesState(fromNeurons, fromCA, toNeurons, toCA, weight)

From a given PyNN population in a cell assembly, this method stimulates the state of a desired PyNN population within a desired cell assembly with the given weight value.

Parameters used CA_SIZE CA_INHIBS NealCoverFunctions .DELAY

Note:

stateTurnsOffState(fromNeurons, fromCA, toNeurons, toCA)

From a given PyNN population in a cell assembly, this method turns OFF the state of a desired PyNN population within a desired cell assembly.

Parameters used CA_SIZE CA_INHIBS CA_STOPS_CA_WEIGHT NealCoverFunctions .DELAY

Connection between the cell assemblies is as shown

        fromCA                                        toCA
ooooooooooooooooooooooo                      ooooooooooooooooooooooo
o                     o                      o                     o
o                     o                      o                     o
o (0) (2) (4) (6) (8) o                      o (0) (2) (4) (6) (8) o
o      -              o  CA_STOPS_CA_WEIGHT  o  ^   ^   ^   ^   ^  o
o      ---------------o----------------------o-------------------  o
o                     o                      o  v   v   v   v   v  o
o (1) (3) (5) (7) (9) o                      o (1) (3) (5) (7) (9) o
o                     o                      o                     o
o                     o                      o                     o
ooooooooooooooooooooooo                      ooooooooooooooooooooooo

Note:

  • A cell assembly is composed of CA_SIZE number of neuron units such that each unit is of same kind.

  • Therefore, the arguments fromNeurons and toNeurons (plural) refers to the kind of neuron population in the from- and to-assemblies.

  • That is, fromNeurons and toNeurons do not indicate some specific neuron population within respective assemblies.

  • The specificiation of a unit (from and to) a cell assembly is done by the connector list of tuples.

  • This specification is such that the fromNeuron and toNeuron are from every unit within a cell assembly.

    • Thus, unlike the illustration in stateHalfTurnsOnState() in the above illustration fromNeuron and toNeuron (singular) will be <<0>> to <<9>>
    • See the illustration in getCAConnectors() for referring to <<0>> to <<9>>
stateTurnsOnOneNeuron(fromNeurons, fromCA, toNeurons, toNeuron)

From a given a neuron unit of a PyNN population in a cell assembly, this method turns ON the state of another neuron unit of a desired PyNN population.

Parameters used CA_SIZE CA_INHIBS STATE_TO_ONE_WEIGHT NealCoverFunctions .DELAY

Connection between the cell assemblies is as shown

        fromCA
ooooooooooooooooooooooo
o                     o
o                     o                         toNeuron
o (0) (2) (4) (6) (8) o                          ( x )
o      +              o  STATE_TO_ONE_WEIGHT       ^
o      +++++++++++++++o+++++++++++++++++++++++++++++
o                     o
o (1) (3) (5) (7) (9) o
o                     o
o                     o
ooooooooooooooooooooooo

Note:

  • A cell assembly is composed of CA_SIZE number of neuron units such that each unit is of same kind.

  • Therefore, the arguments fromNeurons and toNeurons (plural) refers to the kind of neuron population in the from- and to-assemblies.

  • That is, fromNeurons and toNeurons do not indicate some specific neuron population within respective assemblies.

  • The specificiation of a unit (from and to) a cell assembly is done by the connector list of tuples.

  • This specification is such that the fromNeuron and toNeuron are only in reference to units with excitatory connections.

    • Referring to illustration in getCAConnectors() then in the above illustration fromNeuron and toNeuron (singular) will be <<0>> to <<7>>
    • <<8>> and <<9>> are not the source for the connection.
    • In theory toNeuron can be in the same cell assembly as those of fromNeuron.
stateTurnsOnOneRBSNeuron(fromNeurons, fromCA, toNeurons, toNeuron)

From a given PyNN population in a cell assembly, this method turns ON the state of another neuron unit of a desired PyNN population with the given weight value 0.015.

Parameters used CA_SIZE CA_INHIBS NealCoverFunctions .DELAY

Note:

stateTurnsOnState(fromNeurons, fromCA, toNeurons, toCA)

From a given PyNN population in a cell assembly, this method turns ON the state of a desired PyNN population within a desired cell assembly.

Parameters used CA_SIZE CA_INHIBS FULL_ON_WEIGHT NealCoverFunctions .DELAY

Note:

stateTurnsOnStateSlow(fromNeurons, fromCA, toNeurons, toCA)

From a given PyNN population in a cell assembly, this method slowly turns ON the state of a desired PyNN population within a desired cell assembly.

Parameters used CA_SIZE CA_INHIBS FULL_ON_WEIGHT_SLOW NealCoverFunctions .DELAY

Note:

stimulateStateFromSpikeSource(spikeSource, toNeurons, toCA, weight)

Given a spikeSource , this method stimulates the state of the desired cell assembly with the given weight value. toNeurons specifies the type of PyNN population within the cell assembly.

Parameters used CA_SIZE CA_INHIBS NealCoverFunctions .DELAY
test3StateFSA(firstSpikeGenerator, secondSpikeGenerator, stateCells)

Legacy.

testCreateNeurons()

Legacy.

testCreateTwoInputs()

Legacy.

testInit()

Legacy.

testPrintPklSpikes(fileName)

Legacy.

testPrintResults(simCells)

Legacy.

testRunFSA(duration)

Legacy.

testSetupRecording(cells)

Legacy.

turnOffOneNeuronFromSpikeSource(spikeSource, toNeurons, toNeuron)

Given a spikeSource , this method turns OFF the state of a desired neuron unit within a PyNN population.

Parameters used CA_STOPS_CA_WEIGHT NealCoverFunctions .DELAY
turnOffStateFromSpikeSource(spikeSource, toNeurons, toCA)

Given a spikeSource , this method turns OFF the state of the desired cell assembly. toNeurons specifies the type of PyNN population within the cell assembly.

Parameters used CA_SIZE CA_INHIBS ONE_NEURON_STOPS_CA_WEIGHT NealCoverFunctions .DELAY
turnOnOneNeuronFromSpikeSource(spikeSource, toNeurons, toNeuron)

Given a spikeSource , this method turns ON the state of a desired neuron unit within a PyNN population.

Parameters used INPUT_WEIGHT NealCoverFunctions .DELAY
turnOnStateFromSpikeSource(spikeSource, toNeurons, toCA)

Given a spikeSource , this method turns ON the state of the desired cell assembly. toNeurons specifies the type of PyNN population within the cell assembly.

Parameters used CA_SIZE CA_INHIBS INPUT_WEIGHT NealCoverFunctions .DELAY