PlaceCellSystemClass

A class of functions for creating a place cell system cognitive map based on (NEAL).

class nmcog.spinnaker.cognitivemap.nealmentalmap.placecellsysClass.PlaceCellSystemClass(simName='spinnaker', spinnVersion=8)
Methods Argument
createObjects() integer numberObjects
createPlaces() integer numberPlaces
createAutomaton()
  • integer tryToBindStates
  • integer bindingStates
  • integer bindDoneStates
connectObjects()
connectPlaces()
connectAutomaton()
setupCogMapRecording()
makeLearningSynapses()
Methods Cell assemblies Available cells (for analysis)
An object to bind cells to bind on to bind done to query on to answer
  • self.objectBindCells
  • self.objectBindOnCells
  • self.objectBindDoneCells
  • self.queryOnObjectCells
  • self.answerObjectCells
A place to bind cells to bind on to bind done to query on to answer
  • self.placeBindCells
  • self.placeBindOnCells
  • self.placeBindDoneCells
  • self.queryOnPlaceCells
  • self.answerPlaceCells
The Automaton 15
  • self.automatonCells
Names of 15 Automaton states State number Methods where state is used
startState 0
tryBindState 1
bindOnState 2
bindFailState 3
bindDoneState 4
retrieveObjectState 5
retrievePlaceState 6
retrieveObjectDoneState 7
retrievePlaceDoneState 8
lastState 8  
onePlaceOneObjectFact lastState + 1
twoPlacesFact lastState + 2
twoObjectsFact lastState + 3
notEnoughPlaceObjectsFact lastState + 4
placeRetrievedFact lastState + 5
objectRetrievedFact lastState + 6
answerObjectStartsObjectRetrievedFact()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

answerPlaceStartsPlaceRetrievedFact()

.

bindFailStopsPlaceObjectOn()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

bindOnPrimesPlaceAndObjectBind()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

connectAutomaton()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

connectBindDoneState()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

connectBindFailState()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

connectBindOnState()

The given state of the automaton (see createAutomaton()) turns-off the self.answerObjectCells for all the places, i.e. over all self.numberPlaces.

Below shows the startState of the automaton turning-off the state represented by self.answerObjectCells of just one place. Note that this will be done for all the places in self.numberPlaces.

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
a                               Automaton                                     a
a                                                                             a
a  oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo  a
a  o startState o   o tryBindState o   o bindFailState o   o bindDoneState o  a
a  oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo  a
a                              x  ^ <OFF>                                     a
a  ooooooooooooooooooooooooooo x  x oooooooooooooooooooooooooo                a
a  o retrieveObjectDoneState o x  x o retrievePlaceDoneState o                a
a  ooooooooooooooooooooooooooo x  x oooooooooooooooooooooooooo                a
a                     <1/2-ON> V  x                                           a
a  ooooooooooooooooooooooooo   ooooooooooooooo                                a
a  o onePlaceOneObjectFact o   o bindOnState o                                a
a  ooooooooooooooooooooooooo   ooooooooooooooo                                a
a                    ^   x        ^  x   ;;;;;                                a
a              <OFF> x   x <STIM> x  x   ;;;;;                                a
a                    x   xxxxxxxxxx  x   ;;;;;                                a
a                    xxxxxxxxxxxxxxxxx   ;;;;;                                a
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                                         ;;;;;
                                         ;;;;;
                                       ..;;;;;..
                                        ':::::'
                                          ':`
ttttttttttttttttttttttttttttttttttttttttttttttttttt
t               tryToBindTimer                    t
t  ooooooooooooo   ooooooooooooo   ooooooooooooo  t
t  o  state-0  o   o state-... o   o  state-k  o  t
t  ooooooooooooo   ooooooooooooo   ooooooooooooo  t
t                                                 t
ttttttttttttttttttttttttttttttttttttttttttttttttttt

Note that for the above illustration to be complete the automaton must be connected to

Also,

connectObjects()

Connects the objects created using createObjects()

Connection for an object is done as follows

                <1/2-ON>           <OFF>
xxxxxxxxx    xxxxxxxxxxxxxx   xxxxxxxxxxxxxxxx
x       x    V            x   V              x
x   oooooooooooooo   oooooooooooooo   oooooooooooooo
x   o    binds   o   o   binds    o   o   binds    o
x   o    cells   o   o  on-cells  o   o done-cells o
x   oooooooooooooo   oooooooooooooo   oooooooooooooo
x       ^    x           <ON>               ^
x       x    xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x       x <1/2-ON>
x   oooooooooooooo   oooooooooooooo
x   o  inquire   o   o   answer   o
x   o  on-cells  o   o about cell o
x   oooooooooooooo   oooooooooooooo
x                           ^
x          <ON>             x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
connectPlaces()

See connectObjects()

connectRetrieveObjectDoneState()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

connectRetrieveObjectState()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

connectRetrievePlaceDoneState()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

connectRetrievePlaceState()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

connectStartState()

Following the creation of self.automatonCells (createAutomaton()) this function connects the states of the automaton.

Connection for an automaton is done as follows

            <OFF>
        xxxxxxxxxxxxxx
        x   <1/2-ON> x
        x    xxxxxx  x         xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
        \/   x   \/  x         x                                            x
oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo   x
o startState o   o tryBindState o   o bindFailState o   o bindDoneState o   x
oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo   x
x   x     x  x         <OFF>        /\                  /\                  x
x   x     x  xxxxxxxxxxxxxxxxxxxxxxxxx       <OFF>       x                  x
x   x     xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                  x
x   xxxxxxxxxxxxxxxxxxxxxxxxxxx                                             x
\/<OFF>                       \/<OFF>                                       x
ooooooooooooooooooooooooooo   oooooooooooooooooooooooooo                    x
o retrieveObjectDoneState o   o retrievePlaceDoneState o                    x
ooooooooooooooooooooooooooo   oooooooooooooooooooooooooo                    x
                                                                            x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
x                                                                   <OFF>
x
\/              tryToBindTimer
ooooooooooooo   ooooooooooooo   ooooooooooooo
o  state-0  o   o state-... o   o  state-k  o
ooooooooooooo   ooooooooooooo   ooooooooooooo

Note that for the above illustration to be complete two more steps are required

Also see

createAutomaton(tryToBindStates=10, bindingStates=10, bindDoneStates=6)

Given the arguments tryToBindStates, bindingStates, and bindDoneStates this function creates,

The cell assemblies are created using FSAHelperFunctions .makeCA. An automaton with five states will therefore have five corresponding cell assemblies as shown below

ooooooooooooo   ooooooooooooo   ooooooooooooo   ooooooooooooo   ooooooooooooo
o Automaton o   o Automaton o   o Automaton o   o Automaton o   o Automaton o
o  state-0  o   o  state-1  o   o  state-2  o   o  state-3  o   o  state-4  o
ooooooooooooo   ooooooooooooo   ooooooooooooo   ooooooooooooo   ooooooooooooo
  • the number of cell assemblies for an automaton is determined by self.numberAutomatonStates (default = 15)
  • the number of neuron populations within a cell assembly is given by FSAHelperFunctions .CA_SIZE (default = 10)
  • the number of neuron units within a population is CA_SIZE * numberAutomatonStates (default = 150)

This function returns the automaton cells, the prototype neuron populations used in constructing the above cell assemblies.

createObjects(numberObjects)

For a given numberObjects this function creates five cell assemblies using FSAHelperFunctions .makeCA

  • functionally, one cell assembly each for

    • binding the cells
    • binding the on-cells (“on” state of the cells)
    • binding the done-cells (“done” state of the cells)
    • inquiring about the on-cells
    • answering about the cells
  • all cell assemblies

Therefore each object is represented by five cell assemblies.

oooooooooooooooooo   oooooooooooooooooo   oooooooooooooooooo
o   CA to bind   o   o   CA to bind   o   o   CA to bind   o
o object's cells o   o  the on-cells  o   o the done-cells o
oooooooooooooooooo   oooooooooooooooooo   oooooooooooooooooo

oooooooooooooooooo   oooooooooooooooooo
o CA to inquire  o   o  CA to answer  o
o    on-cells    o   o about the cell o
oooooooooooooooooo   oooooooooooooooooo

For a population of \(n \times 10\) cells the cell assembly comprises of ten such population.

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

NOTE:

createPlaces(numberPlaces)

See createObjects()

createTimers(tryToBindStates=10, bindingStates=10, bindDoneStates=6)

Given the arguments tryToBindStates, bindingStates, and bindDoneStates this function creates three timers,

  • self.tryToBindTimer for its given number of states tryToBindStates

    • a timer for accounting the time taken for a binding event
  • self.bindingTimer for its given number of states bindingStates

    • a timer for binding
  • self.bindDoneTimer for its given number of states bindDoneStates

    • a timer for when the binding is achieved

A timer is a collection of cell assemblies such that

  • the number of cell assemblies for a timer correspond to the number of possible states of the timer

  • its cell assemblies are connected using TimerClass .makeStopNoRestartTimerSynapses

    • the timer goes from state to state and the last stops on its own
    • if the state that turns it ON remains ON, this timer will not restart until its done

Regardless of the state, i.e. the cell assembly, the

  • self.tryToBindTimer.timerCells,
  • self.bindingTimer.timerCells, and
  • self.bindDoneTimer.timerCells

are its neuron population for the above timers.

getWellConnectedConn(fromSize, toSize, weight)

.

makeLearningSynapses()

See FSAHelperFunctions .CA_SIZE

printCogMapNets()

Legacy.

retrieveObjectPrimesPlaceBind()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

retrievePlacePrimesObjectBind()

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

setupCogMapRecording()

Record spikes for

cell assemblies (i.e. state) within an Object cell assemblies (i.e. state) within a Place
self.objectBindCells self.placeBindCells
self.objectBindOnCells self.placeBindOnCells
self.objectBindDoneCells self.placeBindDoneCells
self.queryOnObjectCells self.queryOnPlaceCells
self.answerObjectCells self.answerPlaceCells

and also for self.automatonCells

setupObjectPlaceFacts()

This function connects objects and places with the automaton (see createAutomaton()).

Below show the connection for one object and one place. But note that the connections are made for all objects and all places with the automaton.

  wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
  w                      An Object                      w
xxwxxxxxxxxxxxxxxxxxxxxxxxxxxx                          w
x w                          x                          w
x w   oooooooooooooo   oooooooooooooo   oooooooooooooo  w
x w   o    binds   o   o   binds    o   o   binds    o  w
x w   o    cells   o   o  on-cells  o   o done-cells o  w
x w   oooooooooooooo   oooooooooooooo   oooooooooooooo  w
x w                                                     w
x w   oooooooooooooo   oooooooooooooo                   w
x w   o  inquire   o   o   answer   o                   w
x w   o  on-cells  o   o about cell o                   w
x w   oooooooooooooo   oooooooooooooo                   w
x w                                                     w
x w                                                     w
x wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
x 
x 
x 
x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
x a                               Automaton                                     a
x a                                                                             a
x a  oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo  a
x a  o startState o   o tryBindState o   o bindFailState o   o bindDoneState o  a
x a  oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo  a
xxaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx                                           a
  a  ooooooooooooooooooooooooooo x  x oooooooooooooooooooooooooo                a
  a  o retrieveObjectDoneState o x  x o retrievePlaceDoneState o                a
  a  ooooooooooooooooooooooooooo x  x oooooooooooooooooooooooooo                a
  a                <1/2-ON> Vxxxxx  V <1/2-ON>                                  a
  a  ooooooooooooooooooooooooo   ooooooooooooooo                                a
  a  o onePlaceOneObjectFact o   o bindOnState o                                a
  a  ooooooooooooooooooooooooo   ooooooooooooooo                                a
  a                         ^       ^                                           a
  a                <1/2-ON> x       x <1/2-ON>                                  a
  a                         xxxxxxxxx                                           a
  a                                 x                                           a
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
                                    x
                                    x
                                    x         
  ppppppppppppppppppppppppppppppppppppppppppppppppppppppp
  p                       A Place   x                   p
  p                                 x                   p
  p   oooooooooooooo   oooooooooooooo   oooooooooooooo  p
  p   o    binds   o   o   binds    o   o   binds    o  p
  p   o    cells   o   o  on-cells  o   o done-cells o  p
  p   oooooooooooooo   oooooooooooooo   oooooooooooooo  p
  p                                                     p
  p   oooooooooooooo   oooooooooooooo                   p
  p   o  inquire   o   o   answer   o                   p
  p   o  on-cells  o   o about cell o                   p
  p   oooooooooooooo   oooooooooooooo                   p
  p                                                     p
  p                                                     p
  ppppppppppppppppppppppppppppppppppppppppppppppppppppppp

NOTE:

  • All the states of an automaton are not shown in the above illustration.
  • See FSAHelperFunctions .stateHalfTurnsOnState
sourceStartsAutomaton(source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnOnRetrieveObjectFromPlace(source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnOnRetrievePlaceFromObject(source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnsOffObject(objectNumber, source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnsOffPlace(placeNumber, source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnsOnBind(source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnsOnObject(objectNumber, source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnsOnObjectOn(objectNumber, source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnsOnObjectQuery(source, objectNumber)

Given a spikeSource , this method turns ON the state of the object cells; the cells are collectively in the form of a PyNN population.

The object cells collectively is part of an object identified by its objectNumber

NOTE:

sourceTurnsOnPlace(placeNumber, source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnsOnPlaceOn(placeNumber, source)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource

sourceTurnsOnPlaceQuery(source, placeNumber)

See FSAHelperFunctions .turnOnStateFromSpikeSource This is meant for place cells unlike sourceTurnsOnObjectQuery()

statePreventsObjectOutput(stateNumber)

The given state of the automaton (see createAutomaton()) turns-off the self.answerObjectCells for all the places, i.e. over all self.numberPlaces.

Below shows the startState of the automaton turning-off the state represented by self.answerObjectCells of just one place. Note that this will be done for all the places in self.numberPlaces.

  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  a                               Automaton                                     a
xxaxxxxxxxx                                                                     a
x a       x                                                                     a
x a  oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo  a
x a  o startState o   o tryBindState o   o bindFailState o   o bindDoneState o  a
x a  oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo  a
x a                                                                             a
x a  ooooooooooooooooooooooooooo   oooooooooooooooooooooooooo                   a
x a  o retrieveObjectDoneState o   o retrievePlaceDoneState o                   a
x a  ooooooooooooooooooooooooooo   oooooooooooooooooooooooooo                   a
x a                                                                             a
x a                                                                             a
x a                                                                             a
x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
                                                             x           
  wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww    x
  w                      An Object                      w    x
  w                                                     w    x
  w   oooooooooooooo   oooooooooooooo   oooooooooooooo  w    x
  w   o    binds   o   o   binds    o   o   binds    o  w    x
  w   o    cells   o   o  on-cells  o   o done-cells o  w    x
  w   oooooooooooooo   oooooooooooooo   oooooooooooooo  w    x
  w                                                     w    x
  w   oooooooooooooo   oooooooooooooo                   w    x
  w   o  inquire   o   o   answer   o <xxxxxxxxxxxxxxxxxpxxxxx  <OFF>
  w   o  on-cells  o   o about cell o                   w
  w   oooooooooooooo   oooooooooooooo                   w
  w                                                     w
  w                                                     w
  wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww

NOTE:

  • All the states of an automaton are not shown in the above illustration.
  • See FSAHelperFunctions .stateTurnsOffState
statePreventsOutput(stateNumber)

See statePreventsPlaceOutput() and statePreventsObjectOutput()

statePreventsPlaceOutput(stateNumber)

See statePreventsObjectOutput() but replace object for place.

stateStopsDone(stateNumber)

See stateStopsPlaceDone() and stateStopsObjectDone()

stateStopsObjectDone(stateNumber)

See stateStopsPlaceDone() but replace place for object.

stateStopsPlaceDone(stateNumber)

The given state of the automaton (see createAutomaton()) turns-off the self.placeBindDoneCells for all the places, i.e. over all self.numberPlaces.

Below shows the startState of the automaton turning-off the state represented by self.placeBindDoneCells of just one place. Note that this will be done for all the places in self.numberPlaces.

  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  a                               Automaton                                     a
xxaxxxxxxxx                                                                     a
x a       x                                                                     a
x a  oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo  a
x a  o startState o   o tryBindState o   o bindFailState o   o bindDoneState o  a
x a  oooooooooooooo   oooooooooooooooo   ooooooooooooooooo   ooooooooooooooooo  a
x a                                                                             a
x a  ooooooooooooooooooooooooooo   oooooooooooooooooooooooooo                   a
x a  o retrieveObjectDoneState o   o retrievePlaceDoneState o                   a
x a  ooooooooooooooooooooooooooo   oooooooooooooooooooooooooo                   a
x a                                                                             a
x a                                                                             a
x a                                                                             a
x aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
x
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <OFF>
                                              x            
  ppppppppppppppppppppppppppppppppppppppppppppppppppppppp
  p                       A Place             x         p
  p                                           V         p
  p   oooooooooooooo   oooooooooooooo   oooooooooooooo  p
  p   o    binds   o   o   binds    o   o   binds    o  p
  p   o    cells   o   o  on-cells  o   o done-cells o  p
  p   oooooooooooooo   oooooooooooooo   oooooooooooooo  p
  p                                                     p
  p   oooooooooooooo   oooooooooooooo                   p
  p   o  inquire   o   o   answer   o                   p
  p   o  on-cells  o   o about cell o                   p
  p   oooooooooooooo   oooooooooooooo                   p
  p                                                     p
  p                                                     p
  ppppppppppppppppppppppppppppppppppppppppppppppppppppppp

NOTE:

  • All the states of an automaton are not shown in the above illustration.
  • See FSAHelperFunctions .stateTurnsOffState
stopPlaceAndObjectBind(stateNumber)

See FSAHelperFunctions .halfTurnOnStateFromSpikeSource