diff --git a/examples/choose/README.md b/examples/choose/README.md index d4a1f8bc6..1ce866178 100644 --- a/examples/choose/README.md +++ b/examples/choose/README.md @@ -2,7 +2,11 @@ This model implements the [Rubicon](../../Rubicon.md) model for goal-driven motivated behavior, in a decision-making task that requires choosing among options with different cost-benefit tradeoffs. This exercises the core cost and benefit representations and goal selection and goal maintenance components of the Rubicon model -* TODO: compute us prob at start -- otherwise keeps doing again and again +# TODO: +* cleanup rest of this readme to just have task-specific items +* stat for GeMax at gating for VsMtxGo/No +* rew is not discounted properly. + ## Arm Maze Bandit task @@ -72,6 +76,9 @@ If layer NOT gated: <- exploration opportunity cost # Stats in the logs +* `BadCSGate` is gating to approach the wrong CS (one that does not satisfy the current drive) -- this can happen if the BG happens to get activated via OFC and ACC patterns even if the CS is not associated with the drive-relevant US. It will be punished by negative DA and should not keep happening. + + * `AllGood` = summary stat representing the average of several of the following stats. If this is around 1, then the model should be performing well, both behaviorally and in terms of what each of the key layers is doing. * `ActMatch` = match between network's action and the instinct-driven "correct" action. Usually the `LeftCor` action -- tracking % of time it correctly does the Left action (in zoolander mode where it only goes left to search) -- is the most indicative @@ -82,7 +89,8 @@ If layer NOT gated: <- exploration opportunity cost * `MaintEarly` means the PT layer is getting active prior to BG gating -- need to turn down `.SuperToPT` -- see below. -* `WrongCSGate` is gating to approach the wrong CS (one that does not satisfy the current drive) -- this can happen if the BG happens to get activated via OFC and ACC patterns even if the CS is not associated with the drive-relevant US. It will be punished by negative DA and should not keep happening. + +* Time and Effort restart with Goal engage gating; typically runs straight down the arm, so it doesn't differ unless arms have different params. # Parameter tuning diff --git a/examples/choose/params.go b/examples/choose/params.go index bb00bb003..87df196e5 100644 --- a/examples/choose/params.go +++ b/examples/choose/params.go @@ -187,7 +187,7 @@ var ParamSets = netparams.Sets{ {Sel: ".BLAAcqToGo", Desc: "must dominate", Params: params.Params{ "Path.PathScale.Rel": "1", - "Path.PathScale.Abs": "4", // 4 > 2 for urgency early + "Path.PathScale.Abs": "4", // 4 > 3 > 2 for urgency early }}, {Sel: ".BLAExtToAcq", Desc: "", Params: params.Params{ @@ -210,6 +210,10 @@ var ParamSets = netparams.Sets{ Params: params.Params{ "Path.PathScale.Abs": "3", }}, + {Sel: "#ACCcostToVMtxGo", Desc: "costs..", + Params: params.Params{ + "Path.PathScale.Abs": "3", + }}, {Sel: ".VSPatchPath", Desc: "", Params: params.Params{ "Path.PathScale.Abs": "4", // 4 > 3 > 2 -- key for rapid learning @@ -218,11 +222,11 @@ var ParamSets = netparams.Sets{ }}, {Sel: ".CSToBLANovelInhib", Desc: "", Params: params.Params{ - "Path.Learn.LRate.Base": "0.005", // 0.005 > 0.002 > 0.001 > 0.02 + "Path.Learn.LRate.Base": "0.005", // 0.005 > 0.002 > 0.01 > 0.001 > 0.02 }}, {Sel: ".SuperToThal", Desc: "", Params: params.Params{ - "Path.PathScale.Abs": "4", // 4 def + "Path.PathScale.Abs": "4", // 4 = 3, 2 worse }}, {Sel: ".SuperToPT", Desc: "", Params: params.Params{ diff --git a/examples/choose/params_good/config.toml b/examples/choose/params_good/config.toml index a86f58126..0fecf04d4 100644 --- a/examples/choose/params_good/config.toml +++ b/examples/choose/params_good/config.toml @@ -1,5 +1,5 @@ Includes = [] -GUI = false +GUI = true Debug = false OpenWts = '' @@ -21,7 +21,7 @@ OpenWts = '' [Run] GPU = false - NData = 8 + NData = 1 NThreads = 0 Run = 0 NRuns = 5 diff --git a/examples/choose/params_good/params.toml b/examples/choose/params_good/params.toml index f0540173b..57edd8044 100644 --- a/examples/choose/params_good/params.toml +++ b/examples/choose/params_good/params.toml @@ -202,7 +202,7 @@ Sel = ".BLAExtToAcq" Desc = "" [Base.Params] - "Path.PathScale.Abs" = "1" + "Path.PathScale.Abs" = "1.0" [[Base]] Sel = ".CSToBLApos" @@ -229,6 +229,12 @@ [Base.Params] "Path.PathScale.Abs" = "3" +[[Base]] + Sel = "#ACCcostToVMtxGo" + Desc = "costs.." + [Base.Params] + "Path.PathScale.Abs" = "3" + [[Base]] Sel = ".VSPatchPath" Desc = "" @@ -241,7 +247,7 @@ Sel = ".CSToBLANovelInhib" Desc = "" [Base.Params] - "Path.Learn.LRate.Base" = "0.02" + "Path.Learn.LRate.Base" = "0.005" [[Base]] Sel = ".SuperToThal" diff --git a/examples/choose/params_good/params_all.txt b/examples/choose/params_good/params_all.txt index f4a37dba3..618daf158 100644 --- a/examples/choose/params_good/params_all.txt +++ b/examples/choose/params_good/params_all.txt @@ -2015,7 +2015,7 @@ Com: { GType: ExcitatoryG Delay: 2 MaxDelay: 2 PFail: 0 PFailSWt: false DelLen: 3 } PathScale: { - Rel: 0.1 Abs: 1 + Rel: 0.1 Abs: 3 } SWt: { Init: { SPct: 0 Mean: 0.5 Var: 0.4 Sym: false } @@ -3758,7 +3758,7 @@ SWt: { } Learn: { Learn: true - LRate: { Base: 0.02 Sched: 1 Mod: 1 Eff: 0.02 } + LRate: { Base: 0.005 Sched: 1 Mod: 1 Eff: 0.005 } Trace: { Tau: 1 SubMean: 0 LearnThr: 0 } KinaseCa: { SpikeG: 12 MaxISI: 100 Dt: { MTau: 5 PTau: 39 DTau: 41 ExpAdj: true } } diff --git a/examples/choose/params_good/params_nondef.txt b/examples/choose/params_good/params_nondef.txt index a05ce5afc..45653a20b 100644 --- a/examples/choose/params_good/params_nondef.txt +++ b/examples/choose/params_good/params_nondef.txt @@ -163,6 +163,7 @@ VMtxGo.OFCnegToVMtxGo.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)
VMtxGo.ILnegToVMtxGo.SWts.Init.Var: 0.4 // (Default: 0.25)
VMtxGo.ILnegToVMtxGo.SWts.Init.Sym: false // (Default: true)
VMtxGo.ILnegToVMtxGo.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)
+VMtxGo.ACCcostToVMtxGo.PathScale.Abs: 3 // (Default: 1)
VMtxGo.ACCcostToVMtxGo.SWts.Init.Var: 0.4 // (Default: 0.25)
VMtxGo.ACCcostToVMtxGo.SWts.Init.Sym: false // (Default: true)
VMtxGo.ACCcostToVMtxGo.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)
@@ -415,7 +416,7 @@ BLANovelCS.CSToBLANovelCS.SWts.Adapt.SigGain: 1 // (Default: 6)
BLANovelCS.CSToBLANovelCS.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)
BLANovelCS.CSToBLANovelCS.SWts.Init.Mean: 0.1 // (Default: 0.5,0.4)
BLANovelCS.CSToBLANovelCS.SWts.Init.Var: 0.05 // (Default: 0.25)
-BLANovelCS.CSToBLANovelCS.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)
+BLANovelCS.CSToBLANovelCS.Learn.LRate.Base: 0.005 // (Default: 0.04,0.1,0.2)
BLANovelCS.CSToBLANovelCS.Learn.Hebb.Down: 0 // (Default: 1)
OFCpos.Inhib.Layer.Gi: 2.2 // (Default: 1,1.1,0.75,0.9)
OFCpos.BLAposAcqD1ToOFCpos.PathScale.Abs: 1.5 // (Default: 1)
diff --git a/examples/choose/params_good/params_paths.txt b/examples/choose/params_good/params_paths.txt index 9c6f4305d..e5b59dbac 100644 --- a/examples/choose/params_good/params_paths.txt +++ b/examples/choose/params_good/params_paths.txt @@ -86,24 +86,24 @@ Layer: VMtxGo USpos VSMatrixPath Abs: 1.50 Rel: 1.00 GScale: 0.19 Rel: 0.38 Abs Params: Base:.VSMatrixPath: 1.5 BLAposAcqD1 VSMatrixPath Abs: 4.00 Rel: 1.00 GScale: 0.51 Rel: 0.38 - Abs Params: .BLAAcqToGo: 4 | .VSMatrixPath: 1.5 + Abs Params: .BLAAcqToGo: 4 | Base:.VSMatrixPath: 1.5 Rel Params: .BLAAcqToGo: 1 Drives VSMatrixPath Abs: 1.00 Rel: 1.00 GScale: 1.00 Rel: 1.00 - Abs Params: .DrivesToMtx: 1 | .VSMatrixPath: 1.5 + Abs Params: .DrivesToMtx: 1 | Base:.VSMatrixPath: 1.5 OFCpos VSMatrixPath Abs: 3.00 Rel: 0.10 GScale: 0.04 Rel: 0.04 - Abs Params: #OFCposToVMtxGo: 3 | .PFCToVSMtx: 1 | Base:.VSMatrixPath: 1.5 + Abs Params: #OFCposToVMtxGo: 3 | .PFCToVSMtx: 1 | .VSMatrixPath: 1.5 Rel Params: .PFCToVSMtx: 0.1 ILpos VSMatrixPath Abs: 3.00 Rel: 0.10 GScale: 0.03 Rel: 0.04 Abs Params: #ILposToVMtxGo: 3 | .PFCToVSMtx: 1 | Base:.VSMatrixPath: 1.5 Rel Params: .PFCToVSMtx: 0.1 OFCneg VSMatrixPath Abs: 1.00 Rel: 0.10 GScale: 0.01 Rel: 0.04 - Abs Params: .PFCToVSMtx: 1 | Base:.VSMatrixPath: 1.5 + Abs Params: .PFCToVSMtx: 1 | .VSMatrixPath: 1.5 Rel Params: .PFCToVSMtx: 0.1 ILneg VSMatrixPath Abs: 1.00 Rel: 0.10 GScale: 0.01 Rel: 0.04 Abs Params: .PFCToVSMtx: 1 | Base:.VSMatrixPath: 1.5 Rel Params: .PFCToVSMtx: 0.1 - ACCcost VSMatrixPath Abs: 1.00 Rel: 0.10 GScale: 0.01 Rel: 0.04 - Abs Params: .PFCToVSMtx: 1 | Base:.VSMatrixPath: 1.5 + ACCcost VSMatrixPath Abs: 3.00 Rel: 0.10 GScale: 0.02 Rel: 0.04 + Abs Params: #ACCcostToVMtxGo: 3 | .PFCToVSMtx: 1 | Base:.VSMatrixPath: 1.5 Rel Params: .PFCToVSMtx: 0.1 PLutil VSMatrixPath Abs: 1.00 Rel: 0.10 GScale: 0.01 Rel: 0.04 Abs Params: .PFCToVSMtx: 1 | Base:.VSMatrixPath: 1.5 @@ -112,15 +112,15 @@ Layer: VMtxGo Layer: VMtxNo VGPeAk InhibPath Abs: 3.00 Rel: 1.00 GScale: 0.12 Rel: 1.00 ILneg VSMatrixPath Abs: 1.00 Rel: 0.10 GScale: 0.01 Rel: 0.03 - Abs Params: .PFCToVSMtx: 1 | .VSMatrixPath: 1.5 + Abs Params: .PFCToVSMtx: 1 | Base:.VSMatrixPath: 1.5 Rel Params: .PFCToVSMtx: 0.1 BLAposAcqD1 VSMatrixPath Abs: 1.50 Rel: 1.00 GScale: 0.14 Rel: 0.27 Abs Params: Base:.VSMatrixPath: 1.5 BLAnegAcqD2 VSMatrixPath Abs: 4.00 Rel: 1.00 GScale: 1.08 Rel: 0.27 - Abs Params: .BLAAcqToGo: 4 | .VSMatrixPath: 1.5 + Abs Params: .BLAAcqToGo: 4 | Base:.VSMatrixPath: 1.5 Rel Params: .BLAAcqToGo: 1 BLAposExtD2 VSMatrixPath Abs: 1.50 Rel: 1.00 GScale: 0.14 Rel: 0.27 - Abs Params: .VSMatrixPath: 1.5 + Abs Params: Base:.VSMatrixPath: 1.5 Drives VSMatrixPath Abs: 1.00 Rel: 1.00 GScale: 1.00 Rel: 1.00 Abs Params: .DrivesToMtx: 1 | Base:.VSMatrixPath: 1.5 OFCpos VSMatrixPath Abs: 1.00 Rel: 0.10 GScale: 0.01 Rel: 0.03 @@ -148,11 +148,11 @@ Layer: VsPatchD1 ILnegPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 Abs Params: Base:.VSPatchPath: 4 Drives VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 4.00 Rel: 1.00 - Abs Params: Base:.VSPatchPath: 4 + Abs Params: .VSPatchPath: 4 OFCposPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.10 Rel: 0.14 Abs Params: Base:.VSPatchPath: 4 ILposPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 - Abs Params: .VSPatchPath: 4 + Abs Params: Base:.VSPatchPath: 4 OFCnegPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 Abs Params: Base:.VSPatchPath: 4 ILnegPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 @@ -166,19 +166,19 @@ Layer: VsPatchD2 ILnegPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 Abs Params: Base:.VSPatchPath: 4 Drives VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 4.00 Rel: 1.00 - Abs Params: Base:.VSPatchPath: 4 - OFCposPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.10 Rel: 0.14 Abs Params: .VSPatchPath: 4 + OFCposPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.10 Rel: 0.14 + Abs Params: Base:.VSPatchPath: 4 ILposPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 Abs Params: Base:.VSPatchPath: 4 OFCnegPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 - Abs Params: .VSPatchPath: 4 - ILnegPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 Abs Params: Base:.VSPatchPath: 4 + ILnegPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 + Abs Params: .VSPatchPath: 4 PVposP VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.19 Rel: 0.14 Abs Params: Base:.VSPatchPath: 4 PLutilPTp VSPatchPath Abs: 4.00 Rel: 1.00 GScale: 0.14 Rel: 0.14 - Abs Params: Base:.VSPatchPath: 4 + Abs Params: .VSPatchPath: 4 Layer: SC CS ForwardPath Abs: 2.00 Rel: 1.00 GScale: 2.00 Rel: 1.00 @@ -186,7 +186,7 @@ Layer: SC Layer: BLAposAcqD1 BLAposExtD2 InhibPath Abs: 1.00 Rel: 1.00 GScale: 0.11 Rel: 0.33 - Abs Params: Base:.BLAExtToAcq: 1 + Abs Params: Base:.BLAExtToAcq: 1.0 BLAposAcqD1 InhibPath Abs: 0.50 Rel: 1.00 GScale: 0.06 Rel: 0.33 BLAposExtD2 InhibPath Abs: 0.50 Rel: 1.00 GScale: 0.06 Rel: 0.33 BLANovelCS ForwardPath Abs: 2.90 Rel: 0.10 GScale: 0.18 Rel: 0.06 @@ -210,7 +210,7 @@ Layer: BLAnegExtD1 Layer: BLAnegAcqD2 BLAnegExtD1 InhibPath Abs: 1.00 Rel: 1.00 GScale: 0.33 Rel: 0.33 - Abs Params: Base:.BLAExtToAcq: 1 + Abs Params: Base:.BLAExtToAcq: 1.0 BLAnegAcqD2 InhibPath Abs: 0.50 Rel: 1.00 GScale: 0.17 Rel: 0.33 BLAnegExtD1 InhibPath Abs: 0.50 Rel: 1.00 GScale: 0.17 Rel: 0.33 USneg BLAPath Abs: 6.00 Rel: 0.50 GScale: 2.00 Rel: 0.33 diff --git a/simscripts/10-Status.cosh b/simscripts/10-Status.cosh index 87b0faa4c..8d74017c6 100644 --- a/simscripts/10-Status.cosh +++ b/simscripts/10-Status.cosh @@ -85,6 +85,7 @@ func JobStatus(jid string, force bool) { func JobsStatus(path string) { @0 + br.UpdateFiles() dpath := filepath.Join(br.DataRoot, path) ds := dirs.Dirs(dpath) for _, jid := range ds { diff --git a/simscripts/80-Delete.cosh b/simscripts/80-Delete.cosh index 292c05589..79c7e6371 100644 --- a/simscripts/80-Delete.cosh +++ b/simscripts/80-Delete.cosh @@ -1,5 +1,4 @@ -// Delete deletes the jobs selected in the Jobs table, -// with a confirmation prompt. +// Delete deletes the selected Jobs, with a confirmation prompt. // DeleteJobs deletes the given jobs func DeleteJobs(jobs []string, path string) { diff --git a/simscripts/85-Archive.cosh b/simscripts/85-Archive.cosh new file mode 100644 index 000000000..6785060c6 --- /dev/null +++ b/simscripts/85-Archive.cosh @@ -0,0 +1,42 @@ +// Archive moves the selected Jobs to the Archive directory, +// locally, and deletes them from the server, +// for results that are useful but not immediately relevant. + +// ArchiveJobs archives the given jobs +func ArchiveJobs(jobs []string, path string) { + @0 + dpath := filepath.Join(br.DataRoot, path) + apath := filepath.Join(br.DataRoot, "archive", path) + mkdir -p {apath} + spath := filepath.Join(Config.ServerRoot, path) + for _, jid := range jobs { + @1 + cd + cd {spath} + [/bin/rm -rf {jid}] + @0 + dj := filepath.Join(dpath, jid) + aj := filepath.Join(apath, jid) + /bin/mv {dj} {aj} + } + @1 + cd + @0 + core.MessageSnackbar(br, "Done archiving jobs") +} + +func ArchiveJobsPrompt(path string) { + tv := JobsTableView + jobs := tv.SelectedColumnStrings("JobID") + if len(jobs) == 0 { + core.MessageSnackbar(br, "No jobs selected for archiving") + return + } + databrowser.PromptOKCancel(br, "Ok to archive these jobs: " + strings.Join(jobs, " "), func() { + ArchiveJobs(jobs, path) + Update() + }) +} + +ArchiveJobsPrompt(Config.Version) +