Documentation
¶
Index ¶
- Variables
- func ContextIdx(ctx string) int
- func ContextYX(ctidx int) []int
- func SetContext(tsr *etensor.Float32, nyrep int, ctx string) int
- func SetStim(tsr *etensor.Float32, nyrep int, stm string) int
- func SetTime(tsr *etensor.Float32, nyrep int, tick int)
- func SetUS(tsr *etensor.Float32, nyrep int, pv int, mag float32)
- func SetUSTime(tsr *etensor.Float32, nyrep, stidx, tick, start, end int) bool
- func StimIdx(stm string) int
- func StimYX(stidx int) []int
- func USTimeIdx(stidx, tick, start, end int) []int
- type Block
- type CondEnv
- func (ev *CondEnv) Action(_ string, _ etensor.Tensor)
- func (ev *CondEnv) Config(rmax int, rnm string)
- func (ev *CondEnv) Counter(scale env.TimeScales) (cur, prv int, chg bool)
- func (ev *CondEnv) Desc() string
- func (ev *CondEnv) Init(ridx int)
- func (ev *CondEnv) InitCond()
- func (ev *CondEnv) Name() string
- func (ev *CondEnv) RenderTrial(trli, tick int)
- func (ev *CondEnv) State(element string) etensor.Tensor
- func (ev *CondEnv) Step() bool
- func (ev *CondEnv) Validate() error
- type Condition
- type Run
- type Trial
- type Valence
Constants ¶
This section is empty.
Variables ¶
var ( NUSs = 4 NStims = 12 MaxTime = 6 USShape = []int{1, NUSs} StimShape = []int{3, 4} ContextShape = []int{6, 5} // USTimeShape is overall shape of USTime USTimeShape = []int{StimShape[0], StimShape[1], 1, MaxTime} // USTimeOff is activated when the US goes off USTimeOff = []int{StimShape[0] - 1, StimShape[1] - 1, 0, 5} // Stims maps stimuli to indexes for input layer Stims = map[string]int{ "A": 0, "B": 1, "C": 2, "D": 3, "E": 4, "F": 5, "U": 6, "V": 7, "W": 8, "X": 9, "Y": 10, "Z": 11, } // Contexts maps contexts to indexes for input layer Contexts = map[string]int{ "A": 0, "B": 1, "C": 2, "D": 3, "E": 4, "F": 5, "U": 6, "V": 7, "W": 8, "X": 9, "Y": 10, "Z": 11, "AB": 12, "AC": 13, "AX": 14, "AY": 15, "AZ": 16, "BX": 17, "BY": 18, "BZ": 19, "CX": 20, "CY": 21, "CZ": 22, "DU": 23, "ED": 24, "EU": 25, "EV": 26, "FV": 27, "A_B": 28, } )
var AllBlocks = map[string]Block{ "PosAcq": { { Name: "A_R", Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "PosAcq_B50": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R", Pct: 0.5, Valence: Pos, USProb: 0.5, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "USDebug": { { Name: "A_R", Pct: 1.0, Valence: Pos, USProb: 1.0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "PosAcq_A50": { { Name: "A_R", Pct: 1.0, Valence: Pos, USProb: 0.5, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "US0": { { Name: "A_R", Pct: 1.0, Valence: Pos, USProb: 0.01, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "PosReacq": { { Name: "A_R_reacq", Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R_reacq", Pct: 0, Valence: Pos, USProb: 0.5, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "PosAcqPreSecondOrder": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 7, CS: "A", CSStart: 3, CSEnd: 5, CS2Start: -1, CS2End: -1, US: 0, USStart: 5, USEnd: 5, Context: "A", }, { Name: "B_R", Pct: 0.5, Valence: Pos, USProb: 0.5, MixedUS: false, USMag: 1, NTicks: 7, CS: "B", CSStart: 3, CSEnd: 5, CS2Start: -1, CS2End: -1, US: 0, USStart: 5, USEnd: 5, Context: "B", }, }, "PosAcq_B100": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "PosAcq_B25": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R", Pct: 0.5, Valence: Pos, USProb: 0.250, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "PosAcqOmit": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "A_NR", Pct: 0.5, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "PosNeg": { { Name: "Z_R", Pct: 0.167, Valence: Neg, USProb: 0.250, MixedUS: false, USMag: 1, NTicks: 5, CS: "Z", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Z", }, { Name: "Z_R", Pct: 0.167, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "Z", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Z", }, { Name: "Z_R_tst", Pct: 0.167, Valence: Neg, USProb: 1, MixedUS: false, USMag: 0, NTicks: 5, CS: "Z", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Z", }, { Name: "W_R", Pct: 0.167, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "W", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "W", }, { Name: "W_R", Pct: 0.167, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "W", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "W", }, { Name: "W_R_test", Test: true, Pct: 0.167, Valence: Neg, USProb: 1, MixedUS: false, USMag: 0, NTicks: 5, CS: "W", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "W", }, }, "PosOrNegAcq": { { Name: "Z_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: true, USMag: 1, NTicks: 5, CS: "Z", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Z", }, { Name: "Z_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: true, USMag: 1, NTicks: 5, CS: "Z", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Z", }, }, "Overexpectation_train": { { Name: "A_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, { Name: "C_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "C", }, { Name: "X_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "X", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "X", }, { Name: "Y_NR", Pct: 0.200, Valence: Pos, USProb: 0, MixedUS: false, USMag: 0, NTicks: 5, CS: "Y", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Y", }, }, "OverexpectationCompound": { { Name: "AX_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "AX", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AX", }, { Name: "BY_NR", Pct: 0.200, Valence: Pos, USProb: 0, MixedUS: false, USMag: 0, NTicks: 5, CS: "BY", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "BY", }, { Name: "CY_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "CY", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "CY", }, { Name: "X_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "X", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "X", }, { Name: "Y_NR", Pct: 0.200, Valence: Pos, USProb: 0, MixedUS: false, USMag: 0, NTicks: 5, CS: "Y", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Y", }, }, "Overexpectation_test": { { Name: "A_NR_test", Test: true, Pct: 0.250, Valence: Pos, USProb: 0, MixedUS: false, USMag: 0, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_NR_test", Test: true, Pct: 0.250, Valence: Pos, USProb: 0, MixedUS: false, USMag: 0, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, { Name: "C_NR_test", Test: true, Pct: 0.250, Valence: Pos, USProb: 0, MixedUS: false, USMag: 0, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "C", }, { Name: "X_R_test", Test: true, Pct: 0.250, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "X", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "X", }, }, "PosAcqEarlyUS_test": { { Name: "A_R_late", Test: true, Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 4, USEnd: 4, Context: "A", }, { Name: "A_R_early", Test: true, Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 2, USEnd: 2, Context: "A", }, }, "PosOrienting": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "PosAcqMagnitude": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "PosAcqMagnitudeChange": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "E", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "NegAcqMagnitude": { { Name: "D_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "E_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "E", }, }, "NegAcqMagnitudeChange": { { Name: "D_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "E_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "E", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "E", }, }, "PosExtinct": { { Name: "A_NR", Pct: 1, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "PosExtinct_AB": { { Name: "A_NR", Pct: 0.5, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_NR", Pct: 0.5, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "PosCondInhib": { { Name: "A_R", Pct: 0.650, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "AX_NR", Pct: 0.350, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "AX", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AX", }, }, "PosCondInhib_test": { { Name: "A_NR_test", Test: true, Pct: 0.330, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "AX_NR_test", Test: true, Pct: 0.330, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "AX", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AX", }, { Name: "X_NR_test", Test: true, Pct: 0.330, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "X", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "X", }, }, "PosSecondOrderCond": { { Name: "A_R", Pct: 0.950, Valence: Pos, USProb: 1, MixedUS: true, USMag: 1, NTicks: 7, CS: "A", CSStart: 3, CSEnd: 5, CS2Start: -1, CS2End: -1, US: 0, USStart: 5, USEnd: 5, Context: "A", }, { Name: "AC_NR", Pct: 0.050, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 7, CS: "AC", CSStart: 3, CSEnd: 5, CS2Start: 1, CS2End: 2, US: 0, USStart: 5, USEnd: 5, Context: "AC", }, }, "NegAcq": { { Name: "D_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "E_R", Pct: 0.5, Valence: Neg, USProb: 0.250, MixedUS: false, USMag: 1, NTicks: 5, CS: "E", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "E", }, }, "NegExtinct": { { Name: "D_NR", Pct: 0.5, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "E_R", Pct: 0.5, Valence: Neg, USProb: 0.5, MixedUS: false, USMag: 1, NTicks: 5, CS: "E", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "E", }, }, "NegCondInhib": { { Name: "D_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "DU_NR", Pct: 0.5, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "DU", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "DU", }, }, "NegCondInhib_test": { { Name: "D_NR_test", Test: true, Pct: 0.333, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "DU_NR_test", Test: true, Pct: 0.333, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "DU", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "DU", }, { Name: "U_NR_test", Test: true, Pct: 0.333, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "U", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "U", }, }, "PosAcq_cxA": { { Name: "A_R_cxA", Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "PosExtinct_cxB": { { Name: "A_NR_cxB", Pct: 1, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A_B", }, }, "PosRenewal_cxA": { { Name: "A_NR_cxA", Pct: 0.5, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "A_NR_cxB", Pct: 0.5, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A_B", }, }, "PosBlocking_A_train": { { Name: "A_R", Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "PosBlocking": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "AB_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "AB", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AB", }, }, "PosBlocking_test": { { Name: "B_R_test", Test: true, Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "PosBlocking2_test": { { Name: "A_R_test", Test: true, Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R_test", Test: true, Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "NegBlocking_E_train": { { Name: "E_R", Pct: 1, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "E", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "E", }, }, "NegBlocking": { { Name: "E_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "E", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "E", }, { Name: "ED_R", Pct: 0.5, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "ED", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "ED", }, }, "NegBlocking_test": { { Name: "D_R", Test: true, Pct: 1, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, }, "PosSumAcq": { { Name: "A_R", Pct: 0.333, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "C_R", Pct: 0.333, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "C", }, { Name: "B_NR", Pct: 0.333, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "NegSumAcq": { { Name: "D_R", Pct: 0.333, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "E_R", Pct: 0.333, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "E", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "E", }, { Name: "F_NR", Pct: 0.333, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "F", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "F", }, }, "PosCondInhib_BY": { { Name: "A_R", Pct: 0.333, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "AX_NR", Pct: 0.333, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "AX", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AX", }, { Name: "BY_NR", Pct: 0.333, Valence: Pos, USProb: 0, MixedUS: false, USMag: 0, NTicks: 5, CS: "BY", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "BY", }, }, "NegCondInhib_FV": { { Name: "D_R", Pct: 0.333, Valence: Neg, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "DU_NR", Pct: 0.333, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "DU", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "DU", }, { Name: "FV_NR", Pct: 0.333, Valence: Neg, USProb: 0, MixedUS: false, USMag: 0, NTicks: 5, CS: "FV", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "FV", }, }, "NegSumCondInhib_test": { { Name: "D_NR_test", Test: true, Pct: 0.171, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "D", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "D", }, { Name: "E_NR_test", Test: true, Pct: 0.166, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "E", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "E", }, { Name: "U_NR_test", Test: true, Pct: 0.166, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "U", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "U", }, { Name: "DU_NR_test", Test: true, Pct: 0.166, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "DU", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "DU", }, { Name: "EU_NR_test", Test: true, Pct: 0.166, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "EU", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "EU", }, { Name: "EV_NR_test", Test: true, Pct: 0.166, Valence: Neg, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "EV", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "EV", }, }, "PosSumCondInhib_test": { { Name: "A_NR_test", Test: true, Pct: 0.171, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "C_NR_test", Test: true, Pct: 0.166, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "C", }, { Name: "X_NR_test", Test: true, Pct: 0.166, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "X", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "X", }, { Name: "AX_NR_test", Test: true, Pct: 0.166, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "AX", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AX", }, { Name: "CX_NR_test", Test: true, Pct: 0.166, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "CX", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "CX", }, { Name: "CY_NR_test", Test: true, Pct: 0.166, Valence: Pos, USProb: 0, MixedUS: false, USMag: 1, NTicks: 5, CS: "CY", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "CY", }, }, "Unblocking_train": { { Name: "A_R", Pct: 0, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "C_R", Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "C", }, { Name: "B_R", Pct: 0, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "UnblockingValue": { { Name: "AX_R", Pct: 0, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "AX", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AX", }, { Name: "CZ_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "CZ", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "CZ", }, { Name: "A_R", Pct: 0, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "C_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "C", }, { Name: "B_R", Pct: 0, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "UnblockingValue_test": { { Name: "A_R_test", Test: true, Pct: 0, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "C_R_test", Test: true, Pct: 0, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "C", }, { Name: "X_R_test", Test: true, Pct: 0, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "X", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "X", }, { Name: "Z_R_test", Test: true, Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "Z", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Z", }, }, "Unblocking_trainUS": { { Name: "A_R", Pct: 0.333, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "C_R", Pct: 0.333, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.100, NTicks: 5, CS: "C", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "C", }, { Name: "B_R", Pct: 0.333, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 1, USStart: 3, USEnd: 3, Context: "B", }, }, "UnblockingIdentity": { { Name: "AX_R", Pct: 0.300, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "AX", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AX", }, { Name: "BY_R", Pct: 0.300, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "BY", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "BY", }, { Name: "A_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R", Pct: 0.200, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 1, USStart: 3, USEnd: 3, Context: "B", }, }, "UnblockingIdentity_test": { { Name: "A_R_test", Test: true, Pct: 0.251, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "B_R_test", Test: true, Pct: 0.251, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 1, USStart: 3, USEnd: 3, Context: "B", }, { Name: "X_R_test", Test: true, Pct: 0.251, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "X", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "X", }, { Name: "Y_R_test", Test: true, Pct: 0.248, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "Y", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "Y", }, }, "PosUpUnblocking_A_train": { { Name: "A_R", Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, "PosUpUnblocking": { { Name: "A_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 0.5, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, { Name: "AB_R", Pct: 0.5, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "AB", CSStart: 1, CSEnd: 3, CS2Start: 1, CS2End: 3, US: 0, USStart: 3, USEnd: 3, Context: "AB", }, }, "PosUpUnblocking_test": { { Name: "B_R", Test: true, Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "B", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "B", }, }, "BlankTemplate": { { Name: "", Pct: 1, Valence: Pos, USProb: 1, MixedUS: false, USMag: 1, NTicks: 5, CS: "A", CSStart: 1, CSEnd: 3, CS2Start: -1, CS2End: -1, US: 0, USStart: 3, USEnd: 3, Context: "A", }, }, }
var AllConditions = map[string]*Condition{ "PosAcq": { Name: "PosAcq", Desc: "Standard positive valence acquisition: A = 100%", Block: "PosAcq", FixedProb: true, NBlocks: 51, NTrials: 4, Permute: true, }, "PosAcq_B50": { Name: "PosAcq_B50", Desc: "Standard positive valence acquisition: A = 100%, B = 50%", Block: "PosAcq_B50", FixedProb: true, NBlocks: 51, NTrials: 8, Permute: true, }, "PosAcq_A50": { Name: "PosAcq_A50", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos at 50%", Block: "PosAcq_A50", FixedProb: true, NBlocks: 51, NTrials: 10, Permute: true, }, "US0": { Name: "US0", Desc: "No US at all", Block: "US0", FixedProb: true, NBlocks: 5, NTrials: 100, Permute: true, }, "PosAcqPreSecondOrder": { Name: "PosAcqPreSecondOrder", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos, B at 50%", Block: "PosAcqPreSecondOrder", FixedProb: true, NBlocks: 51, NTrials: 8, Permute: true, }, "PosAcq_B50Cont": { Name: "PosAcq_B50Cont", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos, B at 50% reinf, tags further learning as reacq", Block: "PosReacq", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosAcq_B100": { Name: "PosAcq_B100", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos, B at 100%", Block: "PosAcq_B100", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosAcq_B100Cont": { Name: "PosAcq_B100Cont", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos -- continue w/ wts", Block: "PosAcq_B100", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosAcqEarlyUS_test": { Name: "PosAcqEarlyUS_test", Desc: "Testing session: after pos_acq trng, deliver US early or late", Block: "PosAcqEarlyUS_test", FixedProb: true, NBlocks: 5, NTrials: 2, Permute: false, }, "PosAcq_B25": { Name: "PosAcq_B25", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos", Block: "PosAcq_B25", FixedProb: true, NBlocks: 200, NTrials: 8, Permute: true, }, "PosExtinct": { Name: "PosExtinct", Desc: "Pavlovian extinction: A_NR_Pos", Block: "PosExtinct", FixedProb: false, NBlocks: 50, NTrials: 8, Permute: true, }, "PosExtinct_AB": { Name: "PosExtinct_AB", Desc: "Pavlovian extinction: A_NR_Pos, B_NR_Pos", Block: "PosExtinct_AB", FixedProb: false, NBlocks: 50, NTrials: 8, Permute: true, }, "PosCondInhib": { Name: "PosCondInhib", Desc: "conditioned inhibition training: AX_NR_Pos, A_R_Pos interleaved", Block: "PosCondInhib", FixedProb: false, NBlocks: 10, NTrials: 8, Permute: true, }, "PosSecondOrderCond": { Name: "PosSecondOrderCond", Desc: "second order conditioning training: AB_NR_Pos, A_R_Pos interleaved; A = 1st order, F = 2nd order CS", Block: "PosSecondOrderCond", FixedProb: false, NBlocks: 10, NTrials: 50, Permute: true, }, "PosCondInhib_test": { Name: "PosCondInhib_test", Desc: "Testing session: A_NR_Pos, AX_NR_Pos, and X_NR_Pos cases", Block: "PosCondInhib_test", FixedProb: false, NBlocks: 5, NTrials: 6, Permute: false, }, "NegAcq": { Name: "NegAcq", Desc: "Pavlovian conditioning w/ negatively-valenced US: D_R_NEG", Block: "NegAcq", FixedProb: false, NBlocks: 76, NTrials: 10, Permute: true, }, "NegAcqFixedProb": { Name: "NegAcqFixedProb", Desc: "Pavlovian conditioning w/ negatively-valenced US: A_R_NEG", Block: "NegAcq", FixedProb: true, NBlocks: 150, NTrials: 8, Permute: false, }, "PosAcqOmit": { Name: "PosAcqOmit", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos, A_NR_Pos trials, interleaved", Block: "PosAcqOmit", FixedProb: false, NBlocks: 10, NTrials: 8, Permute: true, }, "NegCondInh": { Name: "NegCondInh", Desc: "condition inhibition w/ negatively-valenced US: CZ_NR_NEG, C_R_NEG interleaved; i.e., Z = security signal", Block: "NegCondInhib", FixedProb: false, NBlocks: 75, NTrials: 10, Permute: true, }, "NegCondInh_test": { Name: "NegCondInh_test", Desc: "condition inhibition w/ negatively-valenced US: CZ_NR_NEG, C_R_NEG interleaved; i.e., Z = security signal", Block: "NegCondInhib_test", FixedProb: false, NBlocks: 5, NTrials: 6, Permute: false, }, "NegExtinct": { Name: "NegExtinct", Desc: "Pavlovian conditioning w/ negatively-valenced US: A_R_NEG", Block: "NegExtinct", FixedProb: false, NBlocks: 75, NTrials: 8, Permute: true, }, "PosAcq_cxA": { Name: "PosAcq_cxA", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos, A_R_Pos_omit trials, interleaved", Block: "PosAcq_cxA", FixedProb: false, NBlocks: 10, NTrials: 10, Permute: false, }, "PosExtinct_cxB": { Name: "PosExtinct_cxB", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos, A_R_Pos_omit trials, interleaved", Block: "PosExtinct_cxB", FixedProb: false, NBlocks: 25, NTrials: 10, Permute: false, }, "PosRenewal_cxA": { Name: "PosRenewal_cxA", Desc: "Pavlovian conditioning w/ positively-valenced US: A_R_Pos, A_R_Pos_omit trials, interleaved", Block: "PosRenewal_cxA", FixedProb: false, NBlocks: 1, NTrials: 2, Permute: false, }, "PosBlocking_A_train": { Name: "PosBlocking_A_train", Desc: "Blocking experiment", Block: "PosBlocking_A_train", FixedProb: false, NBlocks: 50, NTrials: 1, Permute: false, }, "PosBlocking": { Name: "PosBlocking", Desc: "Blocking experiment", Block: "PosBlocking", FixedProb: false, NBlocks: 50, NTrials: 2, Permute: false, }, "PosBlocking_test": { Name: "PosBlocking_test", Desc: "Blocking experiment", Block: "PosBlocking_test", FixedProb: false, NBlocks: 25, NTrials: 1, Permute: false, }, "PosBlocking2_test": { Name: "PosBlocking2_test", Desc: "Blocking experiment", Block: "PosBlocking2_test", FixedProb: false, NBlocks: 25, NTrials: 2, Permute: false, }, "NegBlocking_E_train": { Name: "NegBlocking_E_train", Desc: "Blocking experiment", Block: "NegBlocking_E_train", FixedProb: false, NBlocks: 300, NTrials: 1, Permute: false, }, "NegBlocking": { Name: "NegBlocking", Desc: "Blocking experiment", Block: "NegBlocking", FixedProb: false, NBlocks: 200, NTrials: 2, Permute: false, }, "NegBlocking_test": { Name: "NegBlocking_test", Desc: "Blocking experiment", Block: "NegBlocking_test", FixedProb: false, NBlocks: 25, NTrials: 1, Permute: false, }, "PosAcqMag": { Name: "PosAcqMag", Desc: "Magnitude experiment", Block: "PosAcqMagnitude", FixedProb: false, NBlocks: 50, NTrials: 8, Permute: false, }, "PosSumAcq": { Name: "PosSumAcq", Desc: "Conditioned Inhibition - A+, C+", Block: "PosSumAcq", FixedProb: false, NBlocks: 450, NTrials: 3, Permute: false, }, "PosSumCondInhib": { Name: "PosSumCondInhib", Desc: "Conditioned Inhibition - AX-, A+", Block: "PosCondInhib_BY", FixedProb: false, NBlocks: 300, NTrials: 3, Permute: false, }, "PosSum_test": { Name: "PosSum_test", Desc: "Conditioned Inhibition Summation Test", Block: "PosSumCondInhib_test", FixedProb: false, NBlocks: 5, NTrials: 6, Permute: false, }, "NegSumAcq": { Name: "NegSumAcq", Desc: "Conditioned Inhibition - D-, E-", Block: "NegSumAcq", FixedProb: false, NBlocks: 50, NTrials: 3, Permute: false, }, "NegSumCondInhib": { Name: "NegSumCondInhib", Desc: "Conditioned Inhibition - DU, D-", Block: "NegCondInhib_FV", FixedProb: false, NBlocks: 100, NTrials: 3, Permute: false, }, "NegSum_test": { Name: "NegSum_test", Desc: "Conditioned Inhibition Summation Test", Block: "NegSumCondInhib_test", FixedProb: false, NBlocks: 5, NTrials: 6, Permute: false, }, "Unblocking_train": { Name: "Unblocking_train", Desc: "A+++,B+++,C+", Block: "Unblocking_train", FixedProb: false, NBlocks: 50, NTrials: 2, Permute: false, }, "UnblockingValue": { Name: "UnblockingValue", Desc: "AX+++,CZ+++", Block: "UnblockingValue", FixedProb: false, NBlocks: 25, NTrials: 1, Permute: false, }, "UnblockingValue_test": { Name: "UnblockingValue_test", Desc: "A,X,C,Z", Block: "UnblockingValue_test", FixedProb: false, NBlocks: 5, NTrials: 1, Permute: false, }, "Unblocking_trainUS": { Name: "Unblocking_trainUS", Desc: "A+++ (water) ,B+++ (food)", Block: "Unblocking_trainUS", FixedProb: false, NBlocks: 50, NTrials: 15, Permute: false, }, "UnblockingIdentity": { Name: "UnblockingIdentity", Desc: "AX+++(water),BY+++(water)", Block: "UnblockingIdentity", FixedProb: false, NBlocks: 25, NTrials: 20, Permute: false, }, "UnblockingIdentity_test": { Name: "UnblockingIdentity_test", Desc: "A,X,B,Y", Block: "UnblockingIdentity_test", FixedProb: false, NBlocks: 5, NTrials: 4, Permute: false, }, "PosAcqMagChange": { Name: "PosAcqMagChange", Desc: "Magnitude experiment", Block: "PosAcqMagnitudeChange", FixedProb: false, NBlocks: 50, NTrials: 4, Permute: false, }, "NegAcqMag": { Name: "NegAcqMag", Desc: "Magnitude experiment", Block: "NegAcqMagnitude", FixedProb: false, NBlocks: 51, NTrials: 8, Permute: false, }, "NegAcqMagChange": { Name: "NegAcqMagChange", Desc: "Magnitude experiment", Block: "NegAcqMagnitudeChange", FixedProb: false, NBlocks: 50, NTrials: 4, Permute: false, }, "Overexpect_train": { Name: "Overexpect_train", Desc: "Overexpectation training (A+, B+, C+, X+, Y-)", Block: "Overexpectation_train", FixedProb: false, NBlocks: 150, NTrials: 5, Permute: false, }, "OverexpectCompound": { Name: "OverexpectCompound", Desc: "Overexpectation compound training (AX+, BY-, CX+, X+, Y-)", Block: "OverexpectationCompound", FixedProb: false, NBlocks: 150, NTrials: 5, Permute: false, }, "Overexpect_test": { Name: "Overexpect_test", Desc: "Overexpectation test ( A-, B-, C-, X-)", Block: "Overexpectation_test", FixedProb: false, NBlocks: 5, NTrials: 5, Permute: false, }, "PosNeg": { Name: "PosNeg", Desc: "Positive negative test - W equally reinforced with reward + punishment", Block: "PosNeg", FixedProb: false, NBlocks: 150, NTrials: 6, Permute: false, }, "PosOrNegAcq": { Name: "PosOrNegAcq", Desc: "Positive negative acquisition - with reward or punishment on interleaved trials according to user-set probabilities", Block: "PosOrNegAcq", FixedProb: false, NBlocks: 150, NTrials: 6, Permute: true, }, "USDebug": { Name: "USDebug", Desc: "For debugging, 100% reward, CS A", Block: "USDebug", FixedProb: true, NBlocks: 51, NTrials: 8, Permute: true, }, }
var AllRuns = map[string]*Run{
"PosAcq": {
Name: "PosAcq",
Desc: "Standard positive valence acquisition: A = 100%",
Cond1: "PosAcq",
},
"PosExtinct": {
Name: "PosExtinct",
Desc: "extinguish positive valence: A_NR_Pos -- typically use after some amount of PosAcq",
Cond1: "PosExtinct",
},
"PosAcq_ExtinctWts": {
Name: "PosExtinct_Wts",
Desc: "Load weights of acquisition, go directly to extinguish -- must save weights from PosAcq first as wts/PosAcq.wts.gz",
Weights: "PosAcq",
Cond1: "PosExtinct",
},
"PosAcq_Ext": {
Name: "PosAcq",
Desc: "Standard positive valence acquisition: A = 100%",
Cond1: "PosAcq",
Cond2: "PosExtinct",
},
"PosAcq_B50": {
Name: "PosAcq_B50",
Desc: "Standard positive valence acquisition: A = 100%, B = 50%",
Cond1: "PosAcq_B50",
},
"PosExtinct_AB": {
Name: "PosExtinct_AB",
Desc: "extinguish positive valence: A_NR_Pos, B_NR_Pos",
Cond1: "PosExtinct_AB",
},
"PosAcq_A50": {
Name: "PosAcq_A50",
Desc: "A = 50%, B = 50%",
Cond1: "PosAcq_A50",
},
"PosAcq_B50Ext": {
Name: "PosAcq_B50Ext",
Desc: "Acquire, extinguish",
Cond1: "PosAcq_B50",
Cond2: "PosExtinct",
},
"PosAcq_B50ExtAcq": {
Name: "PosAcq_B50ExtAcq",
Desc: "Full cycle: acq, ext, acq",
Cond1: "PosAcq_B50",
Cond2: "PosExtinct",
Cond3: "PosAcq_B50Cont",
},
"PosAcq_B100Ext": {
Name: "PosAcq_B100Ext",
Desc: "",
Cond1: "PosAcq_B100",
Cond2: "PosExtinct",
},
"PosAcq_B25": {
Name: "PosAcq_B25",
Desc: "",
Cond1: "PosAcq_B25",
},
"NegAcq": {
Name: "NegAcq",
Desc: "",
Cond1: "NegAcq",
},
"NegAcqMag": {
Name: "NegAcqMag",
Desc: "",
Cond1: "NegAcqMag",
},
"PosAcqMag": {
Name: "PosAcqMag",
Desc: "",
Cond1: "PosAcqMag",
},
"NegAcqExt": {
Name: "NegAcqExt",
Desc: "",
Cond1: "NegAcq",
Cond2: "NegExtinct",
},
"PosCondInhib": {
Name: "PosCondInhib",
Desc: "",
Cond1: "PosAcq_cxA",
Cond2: "PosCondInhib",
Cond3: "PosCondInhib_test",
},
"PosSecondOrderCond": {
Name: "PosSecondOrderCond",
Desc: "",
Cond1: "PosAcqPreSecondOrder",
Cond2: "PosSecondOrderCond",
},
"PosBlocking": {
Name: "PosBlocking",
Desc: "",
Cond1: "PosBlocking_A_train",
Cond2: "PosBlocking",
Cond3: "PosBlocking_test",
},
"PosBlocking2": {
Name: "PosBlocking2",
Desc: "",
Cond1: "PosBlocking_A_train",
Cond2: "PosBlocking",
Cond3: "PosBlocking2_test",
},
"NegCondInhib": {
Name: "NegCondInhib",
Desc: "",
Cond1: "NegAcq",
Cond2: "NegCondInh",
Cond3: "NegCondInh_test",
},
"AbaRenewal": {
Name: "AbaRenewal",
Desc: "",
Cond1: "PosAcq_cxA",
Cond2: "PosExtinct_cxB",
Cond3: "PosRenewal_cxA",
},
"NegBlocking": {
Name: "NegBlocking",
Desc: "",
Cond1: "NegBlocking_E_train",
Cond2: "NegBlocking",
Cond3: "NegBlocking_test",
},
"PosSum_test": {
Name: "PosSum_test",
Desc: "",
Cond1: "PosSumAcq",
Cond2: "PosSumCondInhib",
Cond3: "PosSum_test",
},
"NegSum_test": {
Name: "NegSum_test",
Desc: "",
Cond1: "NegSumAcq",
Cond2: "NegSumCondInhib",
Cond3: "NegSum_test",
},
"UnblockingValue": {
Name: "UnblockingValue",
Desc: "",
Cond1: "Unblocking_train",
Cond2: "UnblockingValue",
Cond3: "UnblockingValue_test",
},
"UnblockingIdentity": {
Name: "UnblockingIdentity",
Desc: "",
Cond1: "Unblocking_trainUS",
Cond2: "UnblockingIdentity",
Cond3: "UnblockingIdentity_test",
},
"Overexpect": {
Name: "Overexpect",
Desc: "",
Cond1: "Overexpect_train",
Cond2: "OverexpectCompound",
Cond3: "Overexpect_test",
},
"PosMagChange": {
Name: "PosMagChange",
Desc: "",
Cond1: "PosAcqMag",
Cond2: "PosAcqMagChange",
Cond3: "Overexpect_test",
},
"NegMagChange": {
Name: "NegMagChange",
Desc: "",
Cond1: "NegAcqMag",
Cond2: "NegAcqMagChange",
},
"PosNeg": {
Name: "PosNeg",
Desc: "",
Cond1: "PosOrNegAcq",
},
"PosAcqEarlyUSTest": {
Name: "PosAcqEarlyUSTest",
Desc: "",
Cond1: "PosAcq_B50",
Cond2: "PosAcqEarlyUS_test",
},
"PosOrNegAcq": {
Name: "PosOrNegAcq",
Desc: "",
Cond1: "PosOrNegAcq",
},
"PosCondInhib_test": {
Name: "PosCondInhib_test",
Desc: "For debugging",
Cond1: "PosCondInhib_test",
},
"USDebug": {
Name: "USDebug",
Desc: "",
Cond1: "USDebug",
},
"US0": {
Name: "US0",
Desc: "",
Cond1: "US0",
},
}
var KiT_Valence = kit.Enums.AddEnum(ValenceN, kit.NotBitFlag, nil)
var RunNames []string
Functions ¶
func SetContext ¶
SetContext sets context for given input
Types ¶
type CondEnv ¶
type CondEnv struct { Nm string `desc:"name of this environment"` Dsc string `desc:"description of this environment"` NYReps int `desc:"number of Y repetitions for localist reps"` RunName string `desc:"current run name"` Run env.Ctr `inactive:"+" view:"inline" desc:"counter over runs"` Condition env.Ctr `` /* 131-byte string literal not displayed */ Block env.Ctr `inactive:"+" view:"inline" desc:"counter over full blocks of all trial types within a Condition -- like an Epoch"` Trial env.Ctr `inactive:"+" view:"inline" desc:"counter of behavioral trials within a Block"` Tick env.Ctr `` /* 139-byte string literal not displayed */ TrialName string `inactive:"+" desc:"name of current trial step"` TrialType string `inactive:"+" desc:"type of current trial step"` USTimeInStr string `inactive:"+" desc:"decoded value of USTimeIn"` Trials []*Trial `desc:"current generated set of trials per Block"` CurRun Run `desc:"copy of current run parameters"` CurTrial Trial `desc:"copy of info for current trial"` CurStates map[string]*etensor.Float32 `desc:"current rendered state tensors -- extensible map"` }
CondEnv provides a flexible implementation of standard Pavlovian conditioning experiments involving CS -> US sequences (trials). Has a large database of standard conditioning paradigms parameterized in a controlled manner.
Time hierarchy: * Run = sequence of 1 or more Conditions * Condition = specific mix of trial types, generated at start of Condition * Block = one full pass through all trial types generated for condition (like Epoch) * Trial = one behavioral trial consisting of CS -> US presentation over time steps (Ticks) * Tick = discrete time steps within behavioral Trial, typically one Network update (Alpha / Theta cycle)
func (*CondEnv) InitCond ¶
func (ev *CondEnv) InitCond()
InitCond initializes for current condition index
func (*CondEnv) RenderTrial ¶
type Condition ¶
type Condition struct { Name string `desc:"identifier for this type of configuration"` Desc string `desc:"description of this configuration"` Block string `desc:"mix of trial types per block to run -- must be listed in AllBlocks"` FixedProb bool `desc:"use a permuted list to ensure an exact number of trials have US -- else random draw each time"` NBlocks int `desc:"number of full blocks of different trial types to run (like Epochs)"` NTrials int `` /* 255-byte string literal not displayed */ Permute bool `` /* 132-byte string literal not displayed */ }
Condition defines parameters for running a specific type of conditioning expt
type Run ¶
type Run struct { Name string `desc:"Name of the run"` Desc string `desc:"Description"` Weights string `desc:"name of condition for weights file to load prior to starting -- allows faster testing but weights may be out of date"` Cond1 string `desc:"name of condition 1"` Cond2 string `desc:"name of condition 2"` Cond3 string `desc:"name of condition 3"` Cond4 string `desc:"name of condition 4"` Cond5 string `desc:"name of condition 5"` }
Run is a sequence of Conditions to run in order
type Trial ¶
type Trial struct { Name string `desc:"conventional suffixes: _R = reward, _NR = non-reward; _test = test trial (no learning)"` Test bool `desc:"true if testing only -- no learning"` Pct float32 `desc:"Percent of all trials for this type"` Valence Valence `desc:"Positive or negative reward valence"` USProb float32 `desc:"Probability of US"` MixedUS bool `desc:"Mixed US set?"` USMag float32 `desc:"US magnitude"` NTicks int `desc:"Number of ticks for a trial"` CS string `desc:"Conditioned stimulus"` CSStart int `desc:"Tick of CS start"` CSEnd int `desc:"Tick of CS end"` CS2Start int `desc:"Tick of CS2 start: -1 for none"` CS2End int `desc:"Tick of CS2 end: -1 for none"` US int `desc:"Unconditioned stimulus"` USStart int `desc:"Tick for start of US presentation"` USEnd int `desc:"Tick for end of US presentation"` Context string `desc:"Context -- typically same as CS -- if blank CS will be copied -- different in certain extinguishing contexts"` // The following are set for generated trials: USOn bool `desc:"for rendered trials, true if US active"` CSOn bool `desc:"for rendered trials, true if CS active"` }
Trial represents one behavioral trial, unfolding over NTicks individual time steps, with one or more CS's (conditioned stimuli) and a US (unconditioned stimulus -- outcome).
func GenerateTrials ¶
GenerateTrials generates repetitions of specific trial types for given condition name, based on Pct of total blocks, and sets the USOn flag for proportion of trials based on USProb probability. If Condition.Permute is true, order of all trials is permuted. Gets the block name from the condition name.
type Valence ¶
type Valence int32
Valence