Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embed readmefs in all sims #49

Merged
merged 9 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ch10/dyslexia/dyslexia.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ import (
//go:embed train_pats.tsv semantics.tsv close_orthos.tsv close_sems.tsv trained.wts
var content embed.FS

//go:embed *.png README.md
var readme embed.FS

// LesionTypes is the type of lesion
type LesionTypes int32 //enums:enum

Expand Down Expand Up @@ -855,7 +858,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Dyslexia"
ss.GUI.MakeBody(ss, "dyslexia", title, `Simulates normal and disordered (dyslexic) reading performance in terms of a distributed representation of word-level knowledge across Orthography, Semantics, and Phonology. It is based on a model by Plaut and Shallice (1993). Note that this form of dyslexia is *aquired* (via brain lesions such as stroke) and not the more prevalent developmental variety. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch10/dyslexia/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "dyslexia", title, `Simulates normal and disordered (dyslexic) reading performance in terms of a distributed representation of word-level knowledge across Orthography, Semantics, and Phonology. It is based on a model by Plaut and Shallice (1993). Note that this form of dyslexia is *aquired* (via brain lesions such as stroke) and not the more prevalent developmental variety. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch10/dyslexia/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch10/sem/sem.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ import (
//go:embed cecn_lg_f5.text cecn_lg_f5.words quiz.text trained_rec05.wts.gz
var content embed.FS

//go:embed README.md
var readme embed.FS

func main() {
sim := &Sim{}
sim.New()
Expand Down Expand Up @@ -657,7 +660,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Semantics"
ss.GUI.MakeBody(ss, "sem", title, `sem is trained using Hebbian learning on paragraphs from an early draft of the *Computational Explorations..* textbook, allowing it to learn about the overall statistics of when different words co-occur with other words, and thereby learning a surprisingly capable (though clearly imperfect) level of semantic knowlege about the topics covered in the textbook. This replicates the key results from the Latent Semantic Analysis research by Landauer and Dumais (1997). See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch10/sem/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "sem", title, `sem is trained using Hebbian learning on paragraphs from an early draft of the *Computational Explorations..* textbook, allowing it to learn about the overall statistics of when different words co-occur with other words, and thereby learning a surprisingly capable (though clearly imperfect) level of semantic knowlege about the topics covered in the textbook. This replicates the key results from the Latent Semantic Analysis research by Landauer and Dumais (1997). See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch10/sem/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch10/sg/sg.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ import (
//go:embed trained.wts.gz sg_rules.txt sg_tests.txt sg_probes.txt
var content embed.FS

//go:embed *.png README.md
var readme embed.FS

func main() {
sim := &Sim{}
sim.New()
Expand Down Expand Up @@ -800,7 +803,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Sentence Gestalt"
ss.GUI.MakeBody(ss, "sg", title, `This is the sentence gestalt model, which learns to encode both syntax and semantics of sentences in an integrated "gestalt" hidden layer. The sentences have simple agent-verb-patient structure with optional prepositional or adverb modifier phrase at the end, and can be either in the active or passive form (80% active, 20% passive). There are ambiguous terms that need to be resolved via context, showing a key interaction between syntax and semantics. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch10/sg/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "sg", title, `This is the sentence gestalt model, which learns to encode both syntax and semantics of sentences in an integrated "gestalt" hidden layer. The sentences have simple agent-verb-patient structure with optional prepositional or adverb modifier phrase at the end, and can be either in the active or passive form (80% active, 20% passive). There are ambiguous terms that need to be resolved via context, showing a key interaction between syntax and semantics. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch10/sg/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch10/ss/ss.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ import (
//go:embed train_pats.tsv probe.tsv besner.tsv glushko.tsv taraban.tsv phon_cons.tsv phon_vowel.tsv trained.wts.gz
var content embed.FS

//go:embed *.png README.md
var readme embed.FS

// EnvType is the type of test environment
type EnvType int32 //enums:enum

Expand Down Expand Up @@ -697,7 +700,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Spelling to Sound"
ss.GUI.MakeBody(ss, "ss", title, `explores the way that regularities and exceptions are learned in the mapping between spelling (orthography) and sound (phonology), in the context of a "direct pathway" mapping between these two forms of word representations. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch10/ss/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "ss", title, `explores the way that regularities and exceptions are learned in the mapping between spelling (orthography) and sound (phonology), in the context of a "direct pathway" mapping between these two forms of word representations. See <a href="https://github.com/CompCogNeuro/sims/blob/master/ch10/ss/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch2/detector/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ import (
//go:embed *.tsv
var patsfs embed.FS

//go:embed README.md
var readme embed.FS

func main() {
sim := &Sim{}
sim.New()
Expand Down Expand Up @@ -397,7 +400,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Detector"
ss.GUI.MakeBody(ss, "detector", title, `This simulation shows how an individual neuron can act like a detector, picking out specific patterns from its inputs and responding with varying degrees of selectivity to the match between its synaptic weights and the input activity pattern. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch2/detector/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "detector", title, `This simulation shows how an individual neuron can act like a detector, picking out specific patterns from its inputs and responding with varying degrees of selectivity to the match between its synaptic weights and the input activity pattern. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch2/detector/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
6 changes: 5 additions & 1 deletion ch2/neuron/neuron.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package main
//go:generate core generate -add-types

import (
"embed"
"fmt"
"log"
"reflect"
Expand All @@ -31,6 +32,9 @@ import (
"github.com/emer/leabra/v2/spike"
)

//go:embed README.md
var readme embed.FS

func main() {
sim := &Sim{}
sim.New()
Expand Down Expand Up @@ -423,7 +427,7 @@ func (ss *Sim) ConfigNetView(nv *netview.NetView) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Neuron"
ss.GUI.MakeBody(ss, "neuron", title, `This simulation illustrates the basic properties of neural spiking and rate-code activation, reflecting a balance of excitatory and inhibitory influences (including leak and synaptic inhibition). See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch2/neuron/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "neuron", title, `This simulation illustrates the basic properties of neural spiking and rate-code activation, reflecting a balance of excitatory and inhibitory influences (including leak and synaptic inhibition). See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch2/neuron/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch3/cats_dogs/cats_dogs.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ import (
//go:embed cats_dogs_pats.tsv cats_dogs.wts
var content embed.FS

//go:embed README.md
var readme embed.FS

func main() {
sim := &Sim{}
sim.New()
Expand Down Expand Up @@ -435,7 +438,7 @@ func (ss *Sim) ConfigNetView(nv *netview.NetView) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "CatsAndDogs"
ss.GUI.MakeBody(ss, "cats_dogs", title, `This project explores a simple **semantic network** intended to represent a (very small) set of relationships among different features used to represent a set of entities in the world. In our case, we represent some features of cats and dogs: their color, size, favorite food, and favorite toy. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch3/cats_dogs/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "cats_dogs", title, `This project explores a simple **semantic network** intended to represent a (very small) set of relationships among different features used to represent a set of entities in the world. In our case, we represent some features of cats and dogs: their color, size, favorite food, and favorite toy. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch3/cats_dogs/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch3/faces/faces.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ import (
//go:embed faces.tsv partial_faces.tsv faces.wts
var content embed.FS

//go:embed *.png README.md
var readme embed.FS

func main() {
sim := &Sim{}
sim.New()
Expand Down Expand Up @@ -557,7 +560,7 @@ func (ss *Sim) ConfigNetView(nv *netview.NetView) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Faces"
ss.GUI.MakeBody(ss, "faces", title, `This project explores how sensory inputs (in this case simple cartoon faces) can be categorized in multiple different ways, to extract the relevant information and collapse across the irrelevant. It allows you to explore both bottom-up processing from face image to categories, and top-down processing from category values to face images (imagery), including the ability to dynamically iterate both bottom-up and top-down to cleanup partial inputs (partially occluded face images). See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch3/faces/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "faces", title, `This project explores how sensory inputs (in this case simple cartoon faces) can be categorized in multiple different ways, to extract the relevant information and collapse across the irrelevant. It allows you to explore both bottom-up processing from face image to categories, and top-down processing from category values to face images (imagery), including the ability to dynamically iterate both bottom-up and top-down to cleanup partial inputs (partially occluded face images). See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch3/faces/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
7 changes: 6 additions & 1 deletion ch3/inhib/inhib.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ package main
//go:generate core generate -add-types

import (
"embed"

"cogentcore.org/core/base/errors"
"cogentcore.org/core/core"
"cogentcore.org/core/enums"
Expand All @@ -32,6 +34,9 @@ import (
"github.com/emer/leabra/v2/leabra"
)

//go:embed README.md
var readme embed.FS

func main() {
sim := &Sim{}
sim.New()
Expand Down Expand Up @@ -591,7 +596,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Inhib"
ss.GUI.MakeBody(ss, "inhib", title, `inhib: This simulation explores how inhibitory interneurons can dynamically control overall activity levels within the network, by providing both feedforward and feedback inhibition to excitatory pyramidal neurons. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch3/inhib/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "inhib", title, `inhib: This simulation explores how inhibitory interneurons can dynamically control overall activity levels within the network, by providing both feedforward and feedback inhibition to excitatory pyramidal neurons. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch3/inhib/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("FF Net")
Expand Down
5 changes: 4 additions & 1 deletion ch3/necker_cube/necker_cube.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import (
//go:embed necker_cube.wts
var content embed.FS

//go:embed *.png README.md
var readme embed.FS

func main() {
sim := &Sim{}
sim.New()
Expand Down Expand Up @@ -372,7 +375,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "NeckerCube"
ss.GUI.MakeBody(ss, "necker_cube", title, `necker_cube: This simulation explores the use of constraint satisfaction in processing ambiguous stimuli, in this case the *Necker cube*, which can be viewed as a cube in one of two orientations, where people flip back and forth. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch3/necker_cube/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "necker_cube", title, `necker_cube: This simulation explores the use of constraint satisfaction in processing ambiguous stimuli, in this case the *Necker cube*, which can be viewed as a cube in one of two orientations, where people flip back and forth. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch3/necker_cube/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch4/err_driven_hidden/err_driven_hidden.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ import (
//go:embed easy.tsv hard.tsv impossible.tsv
var content embed.FS

//go:embed README.md
var readme embed.FS

// PatsType is the type of training patterns
type PatsType int32 //enums:enum

Expand Down Expand Up @@ -570,7 +573,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Error Driven Hidden"
ss.GUI.MakeBody(ss, "err_driven_hidden", title, `err_driven_hidden shows how XCal error driven learning can train a hidden layer to solve problems that are otherwise impossible for a simple two layer network (as we saw in the Pattern Associator exploration, which should be completed first before doing this one). See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch4/err_driven_hidden/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "err_driven_hidden", title, `err_driven_hidden shows how XCal error driven learning can train a hidden layer to solve problems that are otherwise impossible for a simple two layer network (as we saw in the Pattern Associator exploration, which should be completed first before doing this one). See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch4/err_driven_hidden/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch4/family_trees/family_trees.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ import (
//go:embed family_trees.tsv
var content embed.FS

//go:embed *.png README.md
var readme embed.FS

// LearnType is the type of learning to use
type LearnType int32 //enums:enum

Expand Down Expand Up @@ -613,7 +616,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Family Trees"
ss.GUI.MakeBody(ss, "family_trees", title, `family_trees shows how learning can recode inputs that have no similarity structure into a hidden layer that captures the *functional* similarity structure of the items. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch4/family_trees/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "family_trees", title, `family_trees shows how learning can recode inputs that have no similarity structure into a hidden layer that captures the *functional* similarity structure of the items. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch4/family_trees/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch4/hebberr_combo/hebberr_combo.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ import (
//go:embed lines2out1.tsv
var content embed.FS

//go:embed README.md
var readme embed.FS

// LearnType is the type of learning to use
type LearnType int32 //enums:enum

Expand Down Expand Up @@ -659,7 +662,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "HebbErr_Combo"
ss.GUI.MakeBody(ss, "hebberr_combo", title, `hebberr_combo shows how XCal hebbian learning in shallower layers of a network can aid an error driven learning network to generalize to unseen combinations of patterns. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch4/hebberr_combo/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "hebberr_combo", title, `hebberr_combo shows how XCal hebbian learning in shallower layers of a network can aid an error driven learning network to generalize to unseen combinations of patterns. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch4/hebberr_combo/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
5 changes: 4 additions & 1 deletion ch4/pat_assoc/pat_assoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ import (
//go:embed easy.tsv hard.tsv impossible.tsv
var content embed.FS

//go:embed README.md
var readme embed.FS

// PatsType is the type of training patterns
type PatsType int32 //enums:enum

Expand Down Expand Up @@ -559,7 +562,7 @@ func (ss *Sim) Log(mode etime.Modes, time etime.Times) {
// ConfigGUI configures the Cogent Core GUI interface for this simulation.
func (ss *Sim) ConfigGUI() {
title := "Pat Assoc"
ss.GUI.MakeBody(ss, "pat_assoc", title, `pat_assoc illustrates how error-driven and hebbian learning can operate within a simple task-driven learning context, with no hidden layers. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch4/pat_assoc/README.md">README.md on GitHub</a>.</p>`)
ss.GUI.MakeBody(ss, "pat_assoc", title, `pat_assoc illustrates how error-driven and hebbian learning can operate within a simple task-driven learning context, with no hidden layers. See <a href="https://github.com/CompCogNeuro/sims/blob/main/ch4/pat_assoc/README.md">README.md on GitHub</a>.</p>`, readme)
ss.GUI.CycleUpdateInterval = 10

nv := ss.GUI.AddNetView("Network")
Expand Down
Loading
Loading