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 numberObjectscreatePlaces()integer numberPlacescreateAutomaton()- 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.objectBindCellsself.objectBindOnCellsself.objectBindDoneCellsself.queryOnObjectCellsself.answerObjectCells
A place to bind cells to bind on to bind done to query on to answer self.placeBindCellsself.placeBindOnCellsself.placeBindDoneCellsself.queryOnPlaceCellsself.answerPlaceCells
The Automaton 15 self.automatonCells
Names of 15 Automaton states State number Methods where state is used startState0 tryBindState1 bindOnState2 bindFailState3 bindDoneState4 retrieveObjectState5 retrievePlaceState6 retrieveObjectDoneState7 retrievePlaceDoneState8 lastState8 onePlaceOneObjectFactlastState+ 1twoPlacesFactlastState+ 2twoObjectsFactlastState+ 3notEnoughPlaceObjectsFactlastState+ 4placeRetrievedFactlastState+ 5objectRetrievedFactlastState+ 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 theself.answerObjectCellsfor all the places, i.e. over allself.numberPlaces.Below shows the
startStateof the automaton turning-off the state represented byself.answerObjectCellsof just one place. Note that this will be done for all the places inself.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
- all the objects and places as shown in
setupObjectPlaceFacts() - see
statePreventsOutput()but withself.bindOnStateof the automaton, unlike the example instatePreventsOutput()
Also,
- All the states of an automaton are not shown in the above illustration.
- See FSAHelperFunctions
.stateHalfTurnsOnState - See FSAHelperFunctions
.stateStimulatesState - See FSAHelperFunctions
.stateTurnsOffState - See TimerClass
.stateStopsTimer
- all the objects and places as shown in
-
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
- for <1/2-ON> see FSAHelperFunctions
.stateHalfTurnsOnState - for <ON> see FSAHelperFunctions
.stateTurnsOnState - for <OFF> see FSAHelperFunctions
.stateTurnsOffState
- for <1/2-ON> see FSAHelperFunctions
-
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
- see
stateStopsDone() - see
statePreventsOutput() - All the states of an automaton are not shown in the above illustration.
Also see
- FSAHelperFunctions
.stateHalfTurnsOnState - FSAHelperFunctions
.stateTurnsOffState - TimerClass
.stateStartsTimer
- see
-
createAutomaton(tryToBindStates=10, bindingStates=10, bindDoneStates=6)¶ Given the arguments
tryToBindStates,bindingStates, andbindDoneStatesthis function creates,- cell assemblies, and
- three timers (see
createTimers())
The cell assemblies are created using FSAHelperFunctions
.makeCA. An automaton with five states will therefore have five corresponding cell assemblies as shown belowooooooooooooo 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
numberObjectsthis function creates five cell assemblies using FSAHelperFunctions.makeCAfunctionally, 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
- have
numberObjectstimes FSAHelperFunctions.halfTurnOnStateFromSpikeSourcecells in a population - uses the same cell type, IF_cond_exp
- have
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:
- The value 10 is the default value for FSAHelperFunctions ``.CA_SIZE`
- See FSAHelperFunctions ``.getCAConnectors` for how the ten populations are connected.
-
createPlaces(numberPlaces)¶ See
createObjects()
-
createTimers(tryToBindStates=10, bindingStates=10, bindDoneStates=6)¶ Given the arguments
tryToBindStates,bindingStates, andbindDoneStatesthis function creates three timers,self.tryToBindTimerfor its given number of statestryToBindStates- a timer for accounting the time taken for a binding event
self.bindingTimerfor its given number of statesbindingStates- a timer for binding
self.bindDoneTimerfor its given number of statesbindDoneStates- 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, andself.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.objectBindCellsself.placeBindCellsself.objectBindOnCellsself.placeBindOnCellsself.objectBindDoneCellsself.placeBindDoneCellsself.queryOnObjectCellsself.queryOnPlaceCellsself.answerObjectCellsself.answerPlaceCellsand 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
objectNumberNOTE:
- See FSAHelperFunctions
.turnOnStateFromSpikeSource - Althought
- This is meant for objects unlike
sourceTurnsOnPlaceQuery()
- See FSAHelperFunctions
-
sourceTurnsOnPlace(placeNumber, source)¶ See FSAHelperFunctions
.halfTurnOnStateFromSpikeSource
-
sourceTurnsOnPlaceOn(placeNumber, source)¶ See FSAHelperFunctions
.halfTurnOnStateFromSpikeSource
-
sourceTurnsOnPlaceQuery(source, placeNumber)¶ See FSAHelperFunctions
.turnOnStateFromSpikeSourceThis is meant for place cells unlikesourceTurnsOnObjectQuery()
-
statePreventsObjectOutput(stateNumber)¶ The given state of the automaton (see
createAutomaton()) turns-off theself.answerObjectCellsfor all the places, i.e. over allself.numberPlaces.Below shows the
startStateof the automaton turning-off the state represented byself.answerObjectCellsof just one place. Note that this will be done for all the places inself.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()andstatePreventsObjectOutput()
-
statePreventsPlaceOutput(stateNumber)¶ See
statePreventsObjectOutput()but replace object for place.
-
stateStopsDone(stateNumber)¶
-
stateStopsObjectDone(stateNumber)¶ See
stateStopsPlaceDone()but replace place for object.
-
stateStopsPlaceDone(stateNumber)¶ The given state of the automaton (see
createAutomaton()) turns-off theself.placeBindDoneCellsfor all the places, i.e. over allself.numberPlaces.Below shows the
startStateof the automaton turning-off the state represented byself.placeBindDoneCellsof just one place. Note that this will be done for all the places inself.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
- integer