Skip to content

Commit 6ce8b39

Browse files
committed
update to latest core, lab etc
1 parent dca8dec commit 6ce8b39

File tree

8 files changed

+42
-47
lines changed

8 files changed

+42
-47
lines changed

content/motor.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,8 @@ Key Powers et al point: you can do all of motor control in sensory space!
3434

3535
What does cerebellum need to handle this?
3636

37+
## Detailed muscle dynamics
38+
39+
[[@^MeyerSmithWright82]] synthesize psychophysical literature on speed and accuracy of motor movements, to develop a symmetric impulse control model that specifies the force and duration parameters as curves with an initial acceleration phase for the first half, followed by a symmetric deceleration phase in the second half. Both the force and time parameters of these curves can be controlled by people. There is evidence that ballistic movements are made below around 260 ms, with multiple iterations of visually-corrected movement updates happening after that, time permitting. See also [[@MeyerSmithKornblumEtAl90]].
40+
3741

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ module github.com/compcogneuro/web
33
go 1.23.4
44

55
require (
6-
cogentcore.org/core v0.3.13-0.20251122080528-7dff9fe2d85b
7-
cogentcore.org/lab v0.1.3-0.20251122082523-2efc956ff003
6+
cogentcore.org/core v0.3.13
7+
cogentcore.org/lab v0.1.3-0.20260114211409-7a11751d0716
88
github.com/cogentcore/yaegi v0.0.0-20250622201820-b7838bdd95eb
9-
github.com/emer/axon/v2 v2.0.0-dev0.2.73
10-
github.com/emer/emergent/v2 v2.0.0-dev0.1.7.0.20251017224053-7004cc176576
9+
github.com/emer/axon/v2 v2.0.0-dev0.2.87
10+
github.com/emer/emergent/v2 v2.0.0-dev0.1.7.0.20260112164245-4090cb871bf0
1111
)
1212

1313
require (

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
cogentcore.org/core v0.3.13-0.20251122080528-7dff9fe2d85b h1:YF5zD4OoObOKKI2C8atfgJ3giEw1ySTOCqxpUq3OyZs=
2-
cogentcore.org/core v0.3.13-0.20251122080528-7dff9fe2d85b/go.mod h1:eDHnTCy1sBhAKN9NPsSCnBW3VAnwQBNA9nbGMo9r+Xs=
3-
cogentcore.org/lab v0.1.3-0.20251122082523-2efc956ff003 h1:i0HGn83JkqKop7CQLpvUwfH6ennJRrE2gzgC99cGyjg=
4-
cogentcore.org/lab v0.1.3-0.20251122082523-2efc956ff003/go.mod h1:Bofm3asYeq4NdKl5STMFSpZh/PBWoK5S0gjS9OZfD9c=
1+
cogentcore.org/core v0.3.13 h1:+e7+SqlywIIcDQO4dP0klqaL0BBTbCjO4AXqROQtJlU=
2+
cogentcore.org/core v0.3.13/go.mod h1:eDHnTCy1sBhAKN9NPsSCnBW3VAnwQBNA9nbGMo9r+Xs=
3+
cogentcore.org/lab v0.1.3-0.20260114211409-7a11751d0716 h1:nYriGn0fsK65yiCXu5WjKmrmgr7iyo+sOVnI8TllyrU=
4+
cogentcore.org/lab v0.1.3-0.20260114211409-7a11751d0716/go.mod h1:lDGnyvokk7YWFBxVwJJVvHxBEbZxBygmVjXichGwOhU=
55
github.com/Bios-Marcel/wastebasket/v2 v2.0.3 h1:TkoDPcSqluhLGE+EssHu7UGmLgUEkWg7kNyHyyJ3Q9g=
66
github.com/Bios-Marcel/wastebasket/v2 v2.0.3/go.mod h1:769oPCv6eH7ugl90DYIsWwjZh4hgNmMS3Zuhe1bH6KU=
77
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
@@ -42,10 +42,10 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
4242
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
4343
github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
4444
github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
45-
github.com/emer/axon/v2 v2.0.0-dev0.2.73 h1:BR8v0uHCWNzSAd9X8m5jcVId4Nj2bzZpU5zNZNdzCug=
46-
github.com/emer/axon/v2 v2.0.0-dev0.2.73/go.mod h1:pLtkvHIr9pTTXEPZmLsHumuflX2DZEA0SwziCCr+qzo=
47-
github.com/emer/emergent/v2 v2.0.0-dev0.1.7.0.20251017224053-7004cc176576 h1:KYoWtwk8ReiC/fLCXD9OHLjH5eT3+QrhhztP6zSS9dA=
48-
github.com/emer/emergent/v2 v2.0.0-dev0.1.7.0.20251017224053-7004cc176576/go.mod h1:fF4MgcBMmTgQ+in6H0TxKHnw3uoF/Jk+LFAxEJalYio=
45+
github.com/emer/axon/v2 v2.0.0-dev0.2.87 h1:Fq/oaXipW2DdSv0fQKcviagZ8Au4HSBeAyRmoEkRxr4=
46+
github.com/emer/axon/v2 v2.0.0-dev0.2.87/go.mod h1:t7lLNQCmNj/246WaDe+0GzdSBijNw8hsj4s/798AC1k=
47+
github.com/emer/emergent/v2 v2.0.0-dev0.1.7.0.20260112164245-4090cb871bf0 h1:5lInnd18wL42MtyFO4BiU41l9BdYoeFxSceO7PgOtiA=
48+
github.com/emer/emergent/v2 v2.0.0-dev0.1.7.0.20260112164245-4090cb871bf0/go.mod h1:dhGVUWIAbMFBowRohqorEEqssbJBFTm6eCNFMfg7uvM=
4949
github.com/ericchiang/css v1.3.0 h1:e0vS+vpujMjtT3/SYu7qTHn1LVzXWcLCCDjlfq3YlLY=
5050
github.com/ericchiang/css v1.3.0/go.mod h1:sVSdL+MFR9Q4cKJMQzpIkHIDOLiK+7Wmjjhq7D+MubA=
5151
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=

main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ func main() {
4545
ct.References = csl.NewKeyList(refs)
4646
}
4747
b.AddTopBar(func(bar *core.Frame) {
48-
core.NewToolbar(bar).Maker(ct.MakeToolbar)
48+
core.NewToolbar(bar).Maker(func(p *tree.Plan) {
49+
ct.MakeToolbar(p)
50+
ct.MakeToolbarPDF(p)
51+
})
4952
})
5053
b.RunMainWindow()
5154
}

sims/stability/config.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,18 @@ type RunConfig struct {
5656
// Trials is the total number of trials of different random patterns to generate.
5757
Trials int `default:"10"`
5858

59-
// Cycles is the total number of cycles per trial: at least 200.
60-
Cycles int `default:"200"`
59+
// MinusCycles is the number of cycles in the minus phase per trial.
60+
MinusCycles int `default:"150"`
6161

62-
// PlusCycles is the total number of plus-phase cycles per trial. For Cycles=300, use 100.
62+
// PlusCycles is the number of cycles in the plus phase per trial.
6363
PlusCycles int `default:"50"`
6464
}
6565

66+
// Cycles returns the total number of cycles per trial: ISI + Minus + Plus.
67+
func (rc *RunConfig) Cycles() int {
68+
return rc.MinusCycles + rc.PlusCycles
69+
}
70+
6671
// LogConfig has config parameters related to logging data.
6772
type LogConfig struct {
6873

sims/stability/stability.go

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ func LayByNm(net *axon.Network, n int) *axon.Layer {
193193

194194
func (ss *Sim) ConfigNet(net *axon.Network) {
195195
net.SetMaxData(1)
196-
net.Context().ThetaCycles = int32(ss.Config.Run.Cycles)
196+
net.Context().ThetaCycles = int32(ss.Config.Run.Cycles())
197197
net.SetRandSeed(ss.RandSeeds[0]) // init new separate random seed, using run = 0
198198

199199
sz := ss.Config.Params.HiddenSize
@@ -271,22 +271,19 @@ func (ss *Sim) NetViewUpdater(mode enums.Enum) *axon.NetViewUpdate {
271271
func (ss *Sim) ConfigLoops() {
272272
ls := looper.NewStacks()
273273

274-
cycles := ss.Config.Run.Cycles
275-
plusPhase := ss.Config.Run.PlusCycles
274+
cycles := ss.Config.Run.Cycles()
276275

277276
ls.AddStack(Test, Trial).
278277
AddLevel(Epoch, 1).
279278
AddLevelIncr(Trial, ss.Config.Run.Trials, 1).
280279
AddLevel(Cycle, cycles)
281280

282-
axon.LooperStandard(ls, ss.Net, ss.NetViewUpdater, cycles-plusPhase, Cycle, Trial, Train)
283-
281+
axon.LooperStandard(ls, ss.Net, ss.NetViewUpdater, Cycle, Trial, Train,
282+
func(mode enums.Enum) { ss.Net.ClearInputs() },
283+
func(mode enums.Enum) { ss.ApplyInputs(mode.(Modes)) },
284+
)
284285
ls.Stacks[Test].OnInit.Add("Init", func() { ss.Init() })
285286

286-
ls.AddOnStartToLoop(Trial, "ApplyInputs", func(mode enums.Enum) {
287-
ss.ApplyInputs(mode.(Modes))
288-
})
289-
290287
ls.AddOnStartToAll("StatsStart", ss.StatsStart)
291288
ls.AddOnEndToAll("StatsStep", ss.StatsStep)
292289

@@ -534,8 +531,8 @@ func (ss *Sim) ConfigGUI(b tree.Node) {
534531
ss.GUI.CycleUpdateInterval = 10
535532

536533
nv := ss.GUI.AddNetView("Network")
537-
nv.Options.MaxRecs = 2 * ss.Config.Run.Cycles
538-
nv.Options.Raster.Max = ss.Config.Run.Cycles
534+
nv.Options.MaxRecs = 2 * ss.Config.Run.Cycles()
535+
nv.Options.Raster.Max = ss.Config.Run.Cycles()
539536
nv.SetNet(ss.Net)
540537
ss.NetUpdate.Config(nv, axon.Theta, ss.StatCounters)
541538
ss.GUI.OnStop = func(mode, level enums.Enum) {

sims/stability/typegen.go

Lines changed: 4 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)