Skip to content

Commit

Permalink
current best 06_07 params: BLANovelInhib lr=0.005, tested various others
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Jun 7, 2024
1 parent 6dfb078 commit e853e52
Show file tree
Hide file tree
Showing 10 changed files with 93 additions and 32 deletions.
12 changes: 10 additions & 2 deletions examples/choose/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down
10 changes: 7 additions & 3 deletions examples/choose/params.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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
Expand All @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions examples/choose/params_good/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Includes = []
GUI = false
GUI = true
Debug = false
OpenWts = ''

Expand All @@ -21,7 +21,7 @@ OpenWts = ''

[Run]
GPU = false
NData = 8
NData = 1
NThreads = 0
Run = 0
NRuns = 5
Expand Down
10 changes: 8 additions & 2 deletions examples/choose/params_good/params.toml
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
Sel = ".BLAExtToAcq"
Desc = ""
[Base.Params]
"Path.PathScale.Abs" = "1"
"Path.PathScale.Abs" = "1.0"

[[Base]]
Sel = ".CSToBLApos"
Expand All @@ -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 = ""
Expand All @@ -241,7 +247,7 @@
Sel = ".CSToBLANovelInhib"
Desc = ""
[Base.Params]
"Path.Learn.LRate.Base" = "0.02"
"Path.Learn.LRate.Base" = "0.005"

[[Base]]
Sel = ".SuperToThal"
Expand Down
4 changes: 2 additions & 2 deletions examples/choose/params_good/params_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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
} }
Expand Down
3 changes: 2 additions & 1 deletion examples/choose/params_good/params_nondef.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ VMtxGo.OFCnegToVMtxGo.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)<br>
VMtxGo.ILnegToVMtxGo.SWts.Init.Var: 0.4 // (Default: 0.25)<br>
VMtxGo.ILnegToVMtxGo.SWts.Init.Sym: false // (Default: true)<br>
VMtxGo.ILnegToVMtxGo.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)<br>
VMtxGo.ACCcostToVMtxGo.PathScale.Abs: 3 // (Default: 1)<br>
VMtxGo.ACCcostToVMtxGo.SWts.Init.Var: 0.4 // (Default: 0.25)<br>
VMtxGo.ACCcostToVMtxGo.SWts.Init.Sym: false // (Default: true)<br>
VMtxGo.ACCcostToVMtxGo.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)<br>
Expand Down Expand Up @@ -415,7 +416,7 @@ BLANovelCS.CSToBLANovelCS.SWts.Adapt.SigGain: 1 // (Default: 6)<br>
BLANovelCS.CSToBLANovelCS.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)<br>
BLANovelCS.CSToBLANovelCS.SWts.Init.Mean: 0.1 // (Default: 0.5,0.4)<br>
BLANovelCS.CSToBLANovelCS.SWts.Init.Var: 0.05 // (Default: 0.25)<br>
BLANovelCS.CSToBLANovelCS.Learn.LRate.Base: 0.02 // (Default: 0.04,0.1,0.2)<br>
BLANovelCS.CSToBLANovelCS.Learn.LRate.Base: 0.005 // (Default: 0.04,0.1,0.2)<br>
BLANovelCS.CSToBLANovelCS.Learn.Hebb.Down: 0 // (Default: 1)<br>
OFCpos.Inhib.Layer.Gi: 2.2 // (Default: 1,1.1,0.75,0.9)<br>
OFCpos.BLAposAcqD1ToOFCpos.PathScale.Abs: 1.5 // (Default: 1)<br>
Expand Down
36 changes: 18 additions & 18 deletions examples/choose/params_good/params_paths.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -166,27 +166,27 @@ 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
Abs Params: Base:.ToSC: 2

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
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions simscripts/10-Status.cosh
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
3 changes: 1 addition & 2 deletions simscripts/80-Delete.cosh
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
42 changes: 42 additions & 0 deletions simscripts/85-Archive.cosh
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit e853e52

Please sign in to comment.