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_A100": { { 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_A100B50": { { 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", }, }, "PosAcq_A100B0": { { 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_NR", Pct: 0.5, Valence: Pos, USProb: 0.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", }, }, "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_A100B50": { { Name: "A_R_re", 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_A100B100": { { 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_A100B25": { { 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", }, }, "PosExt_A0": { { 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", }, }, "PosExt_A0B0": { { 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_D100": { { Name: "D_R", 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", }, }, "NegExt_D0": { { Name: "D_NR", Pct: 1, 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", }, }, "NegAcq_D100E25": { { 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", }, }, "NegExt_D0E0": { { 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_A100": { Desc: "Standard positive valence acquisition: A = 100%", Block: "PosAcq_A100", FixedProb: true, NBlocks: 50, NTrials: 4, Permute: true, }, "PosAcq_A100_Blk10": { Desc: "Standard positive valence acquisition: A = 100% -- 10 blocks", Block: "PosAcq_A100", FixedProb: true, NBlocks: 10, NTrials: 4, Permute: true, }, "PosAcq_A100_Blk20": { Desc: "Standard positive valence acquisition: A = 100% -- 20 blocks", Block: "PosAcq_A100", FixedProb: true, NBlocks: 20, NTrials: 4, Permute: true, }, "PosAcq_A100B50": { Desc: "Standard positive valence acquisition: A = 100%, B = 50%", Block: "PosAcq_A100B50", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosAcq_A50": { Desc: "Positive valence acquisition: A = 50%", Block: "PosAcq_A50", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosAcq_A50_Blk10": { Desc: "Positive valence acquisition: A = 50% -- 10 blocks", Block: "PosAcq_A50", FixedProb: true, NBlocks: 10, NTrials: 8, Permute: true, }, "PosAcq_A50_Blk20": { Desc: "Positive valence acquisition: A = 50% -- 20 blocks", Block: "PosAcq_A50", FixedProb: true, NBlocks: 20, NTrials: 8, Permute: true, }, "US0": { Desc: "No US at all", Block: "US0", FixedProb: true, NBlocks: 50, NTrials: 4, Permute: true, }, "PosAcq_A100B100": { Desc: "Positive valence acquisition: A_R_Pos, B at 100%", Block: "PosAcq_A100B100", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "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_A100B25": { Desc: "Positive valence acquisition: A_R_Pos 100%, B at 25%", Block: "PosAcq_A100B25", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosAcq_A100B0": { Desc: "Positive valence acquisition: A_R_Pos 100%, B at 0%", Block: "PosAcq_A100B0", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosExt_A0": { Desc: "Pavlovian extinction: A_NR_Pos, A = 0%", Block: "PosExt_A0", FixedProb: false, NBlocks: 50, NTrials: 4, Permute: true, }, "PosExt_A0_Blk10": { Desc: "Pavlovian extinction: A_NR_Pos, A = 0% -- 10 blocks", Block: "PosExt_A0", FixedProb: false, NBlocks: 10, NTrials: 4, Permute: true, }, "PosExt_A0_Blk20": { Desc: "Pavlovian extinction: A_NR_Pos, A = 0% -- 20 blocks", Block: "PosExt_A0", FixedProb: false, NBlocks: 20, NTrials: 4, Permute: true, }, "PosExt_A0B0": { Desc: "Pavlovian extinction: A_NR_Pos, B_NR_Pos", Block: "PosExt_A0B0", FixedProb: false, NBlocks: 50, NTrials: 8, Permute: true, }, "NegAcq_D100": { Desc: "Pavlovian conditioning w/ negatively-valenced US: D_R_NEG", Block: "NegAcq_D100", FixedProb: false, NBlocks: 50, NTrials: 4, Permute: true, }, "NegAcq_D100E25": { Desc: "Pavlovian conditioning w/ negatively-valenced US: D_R_NEG, E 25%", Block: "NegAcq_D100E25", FixedProb: false, NBlocks: 50, NTrials: 8, Permute: true, }, "NegExt_D0": { Desc: "Pavlovian conditioning w/ negatively-valenced US: A_R_NEG", Block: "NegExt_D0", FixedProb: false, NBlocks: 50, NTrials: 8, Permute: true, }, "NegExt_D0E0": { Desc: "Pavlovian conditioning w/ negatively-valenced US: A_R_NEG", Block: "NegExt_D0E0", FixedProb: false, NBlocks: 50, NTrials: 8, Permute: true, }, "PosAcqPreSecondOrder": { Desc: "Positive valence acquisition: A_R_Pos, B at 50%", Block: "PosAcqPreSecondOrder", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosReAcq_A100B50": { Desc: "Positive valence acquisition: A_R_Pos, B at 50% reinf, tags further learning as reacq", Block: "PosReAcq_A100B50", FixedProb: true, NBlocks: 50, NTrials: 8, Permute: true, }, "PosAcq_cxA": { Desc: "Positive valence acquisition: A_R_Pos, A_R_Pos_omit trials, interleaved", Block: "PosAcq_cxA", FixedProb: false, NBlocks: 10, NTrials: 10, Permute: false, }, "PosExtinct_cxB": { Desc: "Positive valence acquisition: A_R_Pos, A_R_Pos_omit trials, interleaved", Block: "PosExtinct_cxB", FixedProb: false, NBlocks: 25, NTrials: 10, Permute: false, }, "PosAcqOmit": { Desc: "Positive valence acquisition: A_R_Pos, A_NR_Pos trials, interleaved", Block: "PosAcqOmit", FixedProb: false, NBlocks: 10, NTrials: 8, Permute: true, }, "PosRenewal_cxA": { Desc: "Positive valence acquisition: A_R_Pos, A_R_Pos_omit trials, interleaved", Block: "PosRenewal_cxA", FixedProb: false, NBlocks: 1, NTrials: 2, Permute: false, }, "PosBlocking_A_train": { Desc: "Blocking experiment", Block: "PosBlocking_A_train", FixedProb: false, NBlocks: 20, NTrials: 1, Permute: false, }, "PosBlocking": { Desc: "Blocking experiment", Block: "PosBlocking", FixedProb: false, NBlocks: 20, NTrials: 2, Permute: false, }, "PosBlocking_test": { Desc: "Blocking experiment", Block: "PosBlocking_test", FixedProb: false, NBlocks: 25, NTrials: 1, Permute: false, }, "PosBlocking2_test": { Desc: "Blocking experiment", Block: "PosBlocking2_test", FixedProb: false, NBlocks: 25, NTrials: 2, Permute: false, }, "NegBlocking_E_train": { Desc: "Blocking experiment", Block: "NegBlocking_E_train", FixedProb: false, NBlocks: 300, NTrials: 1, Permute: false, }, "NegBlocking": { Desc: "Blocking experiment", Block: "NegBlocking", FixedProb: false, NBlocks: 200, NTrials: 2, Permute: false, }, "NegBlocking_test": { Desc: "Blocking experiment", Block: "NegBlocking_test", FixedProb: false, NBlocks: 25, NTrials: 1, Permute: false, }, "PosAcqMag": { Desc: "Magnitude experiment", Block: "PosAcqMagnitude", FixedProb: false, NBlocks: 20, NTrials: 8, Permute: false, }, "PosSumAcq": { Desc: "Conditioned Inhibition - A+, C+", Block: "PosSumAcq", FixedProb: false, NBlocks: 450, NTrials: 3, Permute: false, }, "PosSumCondInhib": { Desc: "Conditioned Inhibition - AX-, A+", Block: "PosCondInhib_BY", FixedProb: false, NBlocks: 300, NTrials: 3, Permute: false, }, "PosSum_test": { Desc: "Conditioned Inhibition Summation Test", Block: "PosSumCondInhib_test", FixedProb: false, NBlocks: 5, NTrials: 6, Permute: false, }, "NegSumAcq": { Desc: "Conditioned Inhibition - D-, E-", Block: "NegSumAcq", FixedProb: false, NBlocks: 50, NTrials: 3, Permute: false, }, "NegSumCondInhib": { Desc: "Conditioned Inhibition - DU, D-", Block: "NegCondInhib_FV", FixedProb: false, NBlocks: 100, NTrials: 3, Permute: false, }, "NegSum_test": { Desc: "Conditioned Inhibition Summation Test", Block: "NegSumCondInhib_test", FixedProb: false, NBlocks: 5, NTrials: 6, Permute: false, }, "Unblocking_train": { Desc: "A+++,B+++,C+", Block: "Unblocking_train", FixedProb: false, NBlocks: 50, NTrials: 2, Permute: false, }, "UnblockingValue": { Desc: "AX+++,CZ+++", Block: "UnblockingValue", FixedProb: false, NBlocks: 25, NTrials: 1, Permute: false, }, "UnblockingValue_test": { Desc: "A,X,C,Z", Block: "UnblockingValue_test", FixedProb: false, NBlocks: 5, NTrials: 1, Permute: false, }, "Unblocking_trainUS": { Desc: "A+++ (water) ,B+++ (food)", Block: "Unblocking_trainUS", FixedProb: false, NBlocks: 50, NTrials: 15, Permute: false, }, "UnblockingIdentity": { Desc: "AX+++(water),BY+++(water)", Block: "UnblockingIdentity", FixedProb: false, NBlocks: 25, NTrials: 20, Permute: false, }, "UnblockingIdentity_test": { Desc: "A,X,B,Y", Block: "UnblockingIdentity_test", FixedProb: false, NBlocks: 5, NTrials: 4, Permute: false, }, "PosAcqMagChange": { Desc: "Magnitude experiment", Block: "PosAcqMagnitudeChange", FixedProb: false, NBlocks: 50, NTrials: 4, Permute: false, }, "NegAcqMag": { Desc: "Magnitude experiment", Block: "NegAcqMagnitude", FixedProb: false, NBlocks: 51, NTrials: 8, Permute: false, }, "NegAcqMagChange": { Desc: "Magnitude experiment", Block: "NegAcqMagnitudeChange", FixedProb: false, NBlocks: 50, NTrials: 4, Permute: false, }, "Overexpect_train": { Desc: "Overexpectation training (A+, B+, C+, X+, Y-)", Block: "Overexpectation_train", FixedProb: false, NBlocks: 150, NTrials: 5, Permute: false, }, "OverexpectCompound": { Desc: "Overexpectation compound training (AX+, BY-, CX+, X+, Y-)", Block: "OverexpectationCompound", FixedProb: false, NBlocks: 150, NTrials: 5, Permute: false, }, "Overexpect_test": { Desc: "Overexpectation test ( A-, B-, C-, X-)", Block: "Overexpectation_test", FixedProb: false, NBlocks: 5, NTrials: 5, Permute: false, }, "PosNeg": { Desc: "Positive negative test - W equally reinforced with reward + punishment", Block: "PosNeg", FixedProb: false, NBlocks: 150, NTrials: 6, Permute: false, }, "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, }, "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": { 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, }, "PosCondInhib": { Desc: "conditioned inhibition training: AX_NR_Pos, A_R_Pos interleaved", Block: "PosCondInhib", FixedProb: false, NBlocks: 10, NTrials: 8, Permute: true, }, "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: 20, Permute: true, }, "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, }, }
var AllRuns = map[string]*Run{
"PosAcq_A100": {
Desc: "Standard positive valence acquisition: A = 100%",
Cond1: "PosAcq_A100",
},
"PosExt_A0": {
Desc: "extinguish positive valence: A_NR_Pos -- typically use after some amount of PosAcq_A100",
Cond1: "PosExt_A0",
},
"PosAcqExt_A100Wts": {
Desc: "Load weights of acquisition A 100%, go directly to extinguish -- must save weights from PosAcq_A100 first",
Weights: "PosAcq_A100",
Cond1: "PosExt_A0",
},
"PosAcqExt_A100_A0": {
Desc: "Standard positive valence acquisition: A = 100%, then extinction A0",
Cond1: "PosAcq_A100",
Cond2: "PosExt_A0",
},
"PosAcq_A100B50": {
Desc: "Standard positive valence acquisition: A = 100%, B = 50%",
Cond1: "PosAcq_A100B50",
},
"PosAcq_A100B0": {
Desc: "Standard positive valence acquisition: A = 100%, B = 0%",
Cond1: "PosAcq_A100B0",
},
"PosExt_A0B0": {
Desc: "extinguish positive valence: A_NR_Pos, B_NR_Pos",
Cond1: "PosExt_A0B0",
},
"PosAcq_A50": {
Desc: "A = 50%",
Cond1: "PosAcq_A50",
},
"PosAcq_ACycle100_50_0_Blk10": {
Desc: "A transitions: 100%, 50%, 0%, 50%, 100% for 10 blocks each",
Cond1: "PosAcq_A100",
Cond2: "PosAcq_A50_Blk10",
Cond3: "PosExt_A0_Blk10",
Cond4: "PosAcq_A50_Blk10",
Cond5: "PosAcq_A100_Blk10",
},
"PosAcq_ACycle100_50_0_Blk20": {
Desc: "A transitions: 100%, 50%, 0%, 50%, 100% for 20 blocks each",
Cond1: "PosAcq_A100",
Cond2: "PosAcq_A50_Blk20",
Cond3: "PosExt_A0_Blk20",
Cond4: "PosAcq_A50_Blk20",
Cond5: "PosAcq_A100_Blk20",
},
"PosAcqExt_A100B50_A0B0": {
Desc: "positive valence acquisition A=100%, B=50%, then extinguish A, B = 0%",
Cond1: "PosAcq_A100B50",
Cond2: "PosExt_A0B0",
},
"PosAcqExt_A100B50_Wts": {
Desc: "Load weights of acquisition A = 100%, B = 50%, go directly to extinguish -- must save weights from PosAcq_A100B50",
Weights: "PosAcq_A100B50",
Cond1: "PosExt_A0B0",
},
"PosAcqExtAcq_A100B50_A0B0_A100B50": {
Desc: "Full cycle: acq, ext, acq, A=100%, B=50%, then extinguish, then acq again, marked as ReAcq",
Cond1: "PosAcq_A100B50",
Cond2: "PosExt_A0B0",
Cond3: "PosReAcq_A100B50",
},
"PosAcqExt_A100B100": {
Desc: "",
Cond1: "PosAcq_A100B100",
Cond2: "PosExt_A0B0",
},
"PosAcq_A100B25": {
Desc: "",
Cond1: "PosAcq_A100B25",
},
"NegAcq_D100": {
Desc: "",
Cond1: "NegAcq_D100",
},
"NegAcq_D100E25": {
Desc: "",
Cond1: "NegAcq_D100E25",
},
"NegAcqMag": {
Desc: "",
Cond1: "NegAcqMag",
},
"PosAcqMag": {
Desc: "",
Cond1: "PosAcqMag",
},
"NegAcqExt_D100": {
Desc: "",
Cond1: "NegAcq_D100",
Cond2: "NegExt_D0",
},
"NegExt_D0": {
Desc: "",
Cond1: "NegExt_D0",
},
"NegExt_D100Wts": {
Desc: "Load weights of negative acquisition D 100%, go directly to extinguish -- must save weights from NegAcq_D100 first",
Weights: "NegAcq_D100",
Cond1: "NegExt_D0",
},
"NegAcqExt_D100E25": {
Desc: "",
Cond1: "NegAcq_D100E25",
Cond2: "NegExt_D0E0",
},
"NegExt_D0E0": {
Desc: "",
Cond1: "NegExt_D0E0",
},
"PosCondInhib": {
Desc: "",
Cond1: "PosAcq_cxA",
Cond2: "PosCondInhib",
Cond3: "PosCondInhib_test",
},
"PosSecondOrderCond": {
Desc: "",
Cond1: "PosAcqPreSecondOrder",
Cond2: "PosSecondOrderCond",
},
"PosBlocking": {
Desc: "",
Cond1: "PosBlocking_A_train",
Cond2: "PosBlocking",
Cond3: "PosBlocking_test",
},
"PosBlocking2": {
Desc: "",
Cond1: "PosBlocking_A_train",
Cond2: "PosBlocking",
Cond3: "PosBlocking2_test",
},
"NegCondInhib": {
Desc: "",
Cond1: "NegAcq_D100E25",
Cond2: "NegCondInh",
Cond3: "NegCondInh_test",
},
"AbaRenewal": {
Desc: "",
Cond1: "PosAcq_cxA",
Cond2: "PosExtinct_cxB",
Cond3: "PosRenewal_cxA",
},
"NegBlocking": {
Desc: "",
Cond1: "NegBlocking_E_train",
Cond2: "NegBlocking",
Cond3: "NegBlocking_test",
},
"PosSum_test": {
Desc: "",
Cond1: "PosSumAcq",
Cond2: "PosSumCondInhib",
Cond3: "PosSum_test",
},
"NegSum_test": {
Desc: "",
Cond1: "NegSumAcq",
Cond2: "NegSumCondInhib",
Cond3: "NegSum_test",
},
"UnblockingValue": {
Desc: "",
Cond1: "Unblocking_train",
Cond2: "UnblockingValue",
Cond3: "UnblockingValue_test",
},
"UnblockingIdentity": {
Desc: "",
Cond1: "Unblocking_trainUS",
Cond2: "UnblockingIdentity",
Cond3: "UnblockingIdentity_test",
},
"Overexpect": {
Desc: "",
Cond1: "Overexpect_train",
Cond2: "OverexpectCompound",
Cond3: "Overexpect_test",
},
"PosMagChange": {
Desc: "",
Cond1: "PosAcqMag",
Cond2: "PosAcqMagChange",
Cond3: "Overexpect_test",
},
"NegMagChange": {
Desc: "",
Cond1: "NegAcqMag",
Cond2: "NegAcqMagChange",
},
"PosNeg": {
Desc: "",
Cond1: "PosOrNegAcq",
},
"PosAcqEarlyUSTest": {
Desc: "",
Cond1: "PosAcq_A100B50",
Cond2: "PosAcqEarlyUS_test",
},
"PosOrNegAcq": {
Desc: "",
Cond1: "PosOrNegAcq",
},
"PosCondInhib_test": {
Desc: "For debugging",
Cond1: "PosCondInhib_test",
},
"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 { // name of this environment Nm string `desc:"name of this environment"` // description of this environment Dsc string `desc:"description of this environment"` // number of Y repetitions for localist reps NYReps int `desc:"number of Y repetitions for localist reps"` // current run name RunName string `desc:"current run name"` // description of current run RunDesc string `desc:"description of current run"` // name of current condition CondName string `desc:"name of current condition"` // description of current condition CondDesc string `desc:"description of current condition"` // [view: inline] counter over runs Run env.Ctr `inactive:"+" view:"inline" desc:"counter over runs"` // [view: inline] counter over Condition within a run -- Max depends on number of conditions specified in given Run Condition env.Ctr `` /* 131-byte string literal not displayed */ // [view: inline] counter over full blocks of all trial types within a Condition -- like an Epoch Block env.Ctr `inactive:"+" view:"inline" desc:"counter over full blocks of all trial types within a Condition -- like an Epoch"` // [view: inline] counter of behavioral trials within a Block Trial env.Ctr `inactive:"+" view:"inline" desc:"counter of behavioral trials within a Block"` // [view: inline] counter of discrete steps within a behavioral trial -- typically maps onto Alpha / Theta cycle in network Tick env.Ctr `` /* 139-byte string literal not displayed */ // name of current trial step TrialName string `inactive:"+" desc:"name of current trial step"` // type of current trial step TrialType string `inactive:"+" desc:"type of current trial step"` // decoded value of USTimeIn USTimeInStr string `inactive:"+" desc:"decoded value of USTimeIn"` // current generated set of trials per Block Trials []*Trial `desc:"current generated set of trials per Block"` // copy of current run parameters CurRun Run `desc:"copy of current run parameters"` // copy of info for current trial CurTrial Trial `desc:"copy of info for current trial"` // current rendered state tensors -- extensible map 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 { // identifier for this type of configuration Name string `desc:"identifier for this type of configuration"` // description of this configuration Desc string `desc:"description of this configuration"` // mix of trial types per block to run -- must be listed in AllBlocks Block string `desc:"mix of trial types per block to run -- must be listed in AllBlocks"` // use a permuted list to ensure an exact number of trials have US -- else random draw each time FixedProb bool `desc:"use a permuted list to ensure an exact number of trials have US -- else random draw each time"` // number of full blocks of different trial types to run (like Epochs) NBlocks int `desc:"number of full blocks of different trial types to run (like Epochs)"` // number of behavioral trials per block -- blocks, with the different types of Trials specified in Block allocated across these Trials. More different trial types and greater stochasticity (lower probability) of US presentation requires more trials. NTrials int `` /* 255-byte string literal not displayed */ // permute list of generated trials in random order after generation -- otherwise presented in order specified in the Block type 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 of the run Name string `desc:"Name of the run"` // Description Desc string `desc:"Description"` // name of condition for weights file to load prior to starting -- allows faster testing but weights may be out of date Weights string `desc:"name of condition for weights file to load prior to starting -- allows faster testing but weights may be out of date"` // name of condition 1 Cond1 string `desc:"name of condition 1"` // name of condition 2 Cond2 string `desc:"name of condition 2"` // name of condition 3 Cond3 string `desc:"name of condition 3"` // name of condition 4 Cond4 string `desc:"name of condition 4"` // name of condition 5 Cond5 string `desc:"name of condition 5"` }
Run is a sequence of Conditions to run in order
type Trial ¶
type Trial struct { // conventional suffixes: _R = reward, _NR = non-reward; _test = test trial (no learning) Name string `desc:"conventional suffixes: _R = reward, _NR = non-reward; _test = test trial (no learning)"` // true if testing only -- no learning Test bool `desc:"true if testing only -- no learning"` // Percent of all trials for this type Pct float32 `desc:"Percent of all trials for this type"` // Positive or negative reward valence Valence Valence `desc:"Positive or negative reward valence"` // Probability of US USProb float32 `desc:"Probability of US"` // Mixed US set? MixedUS bool `desc:"Mixed US set?"` // US magnitude USMag float32 `desc:"US magnitude"` // Number of ticks for a trial NTicks int `desc:"Number of ticks for a trial"` // Conditioned stimulus CS string `desc:"Conditioned stimulus"` // Tick of CS start CSStart int `desc:"Tick of CS start"` // Tick of CS end CSEnd int `desc:"Tick of CS end"` // Tick of CS2 start: -1 for none CS2Start int `desc:"Tick of CS2 start: -1 for none"` // Tick of CS2 end: -1 for none CS2End int `desc:"Tick of CS2 end: -1 for none"` // Unconditioned stimulus US int `desc:"Unconditioned stimulus"` // Tick for start of US presentation USStart int `desc:"Tick for start of US presentation"` // Tick for end of US presentation USEnd int `desc:"Tick for end of US presentation"` // Context -- typically same as CS -- if blank CS will be copied -- different in certain extinguishing contexts Context string `desc:"Context -- typically same as CS -- if blank CS will be copied -- different in certain extinguishing contexts"` // for rendered trials, true if US active USOn bool `desc:"for rendered trials, true if US active"` // for rendered trials, true if CS 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