Skip to content

Commit

Permalink
{pyactr} Fix setting of finst size (#379)
Browse files Browse the repository at this point in the history
- it is set on the retrieval buffer, not on the memory module
- it defaults to 0 in pyactr, but 4 in ACT-R, so change it to match ACT-R if it is not set
  • Loading branch information
asmaloney authored Aug 14, 2023
1 parent d742659 commit f289f4b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion framework/pyactr/pyactr.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ func (p *PyACTR) GenerateCode(initialBuffers framework.InitialBuffers) (code []b
p.Writeln("%s = %s.decmem", memory.ModuleName(), p.className)

if memory.FinstSize != nil {
p.Writeln("%s.finst = %d", memory.ModuleName(), *memory.FinstSize)
p.Writeln("%s.retrieval.finst = %d", p.className, *memory.FinstSize)
} else {
p.Writeln("")
p.Writeln("# finst defaults to 0 in pyactr, so set it to 4 which is the default in ACT-R")
p.Writeln("%s.retrieval.finst = 4", p.className)
p.Writeln("")
}

p.Writeln("goal = %s.set_goal('goal')", p.className)
Expand Down

0 comments on commit f289f4b

Please sign in to comment.