neuroaihub/brainpilot/act-r-model-builder
Claude Code and agent skill by neuroaihub/brainpilot
- community
Checking that the SKILL.md file is still in the repository.
Guides ACT-R cognitive model construction: chunk types, production rules, subsymbolic parameters, and model validation
Install
npx vskill@latest install neuroaihub/brainpilot/act-r-model-builderSKILL.md
The same SKILL.md was published earlier as neuroaihub/brainpilot/act-r-model-builder.
ACT-R Model Builder
Purpose
This skill encodes expert knowledge for constructing computational cognitive models within the ACT-R (Adaptive Control of Thought -- Rational) architecture. It provides guidance on chunk type definition, production rule authoring, subsymbolic parameter selection with empirically validated defaults, model fitting workflows, and validation procedures. A general-purpose programmer would not know the architecture constraints, parameter defaults, or model validation standards without specialized cognitive modeling training.
When to Use This Skill
- Designing a new ACT-R model for a cognitive task (memory retrieval, decision-making, skill acquisition)
- Setting subsymbolic parameters and understanding their theoretical justification
- Structuring chunk types and production rules for a specific experimental paradigm
- Fitting an ACT-R model to behavioral data (RT, accuracy)
- Validating a model via parameter recovery, cross-validation, or qualitative predictions
- Choosing between ACT-R 7.x (Lisp) and pyactr (Python) for implementation
Research Planning Protocol
Before executing the domain-specific steps below, you MUST:
- State the research question -- What specific question is this analysis/paradigm addressing?
- Justify the method choice -- Why is this approach appropriate? What alternatives were considered?
- Declare expected outcomes -- What results would support vs. refute the hypothesis?
- Note assumptions and limitations -- What does this method assume? Where could it mislead?
- Present the plan to the user and WAIT for confirmation before proceeding.
For detailed methodology guidance, see the research-literacy skill.
⚠️ Verification Notice
This skill was generated by AI from academic literature. All parameters, thresholds, and citations require independent verification before use in research. If you find errors, please open an issue.
ACT-R Architecture Overview
ACT-R is a hybrid cognitive architecture with symbolic and subsymbolic components (Anderson, 2007; Anderson & Lebiere, 1998).
Core Modules and Buffers
| Module | Buffer | Function | Source | |
|---|---|---|---|---|
| Declarative memory | retrieval | Stores and retrieves chunks (facts) | Anderson, 2007, Ch. 2 | |
| Procedural memory | (none; fires productions) | Stores production rules (skills) | Anderson, 2007, Ch. 3 | |
| Goal | goal | Tracks current task state | Anderson, 2007, Ch. 4 | |
| Imaginal | imaginal | Holds intermediate problem representations | Anderson, 2007, Ch. 4 | |
| Visual | visual, visual-location | Attends to and encodes visual objects | Anderson, 2007, Ch. 6 | |
| Motor | manual | Executes motor responses (keypresses) | Anderson, 2007, Ch. 6 | |
| Temporal | temporal | Tracks time intervals | Taatgen et al., 2007 |
Processing Cycle
- Buffers hold one chunk each (the "bottleneck" assumption; Anderson, 2007, Ch. 1)
- Productions match against buffer contents (pattern matching)
- Conflict resolution selects one production per cycle (~50 ms per production firing; Anderson, 2007)
- Selected production modifies buffers or makes requests to modules
- Modules process requests asynchronously
Building the Symbolic Model
Step 1: Define Chunk Types
Chunk types define the structure of declarative knowledge:
Decision rules for chunk type design:
- Each chunk type represents one category of knowledge (Anderson, 2007, Ch. 2)
- Slots should correspond to meaningful features of the domain
- Use inheritance when chunk types share structure (e.g., a "problem" parent type)
- Keep chunks small -- typically 3-6 slots per chunk type (Anderson & Lebiere, 1998)
Step 2: Write Production Rules
Productions follow an IF-THEN structure:
Production rule guidelines:
| Guideline | Rationale | Source | |
|---|---|---|---|
| One request per production | Module bottleneck constraint | Anderson, 2007, Ch. 3 | |
| Test buffer state before requesting | Prevents jamming the module | Bothell, 2023, ACT-R reference manual | |
Use =goal> to maintain goal buffer | Prevents goal harvesting | Bothell, 2023 | |
| Minimize productions per task step | Simpler models are preferred (parsimony) | Anderson, 2007, Ch. 1 |
Step 3: Structure the Goal Stack
Subsymbolic Parameters
These parameters govern memory activation, retrieval, and production selection. See references/parameter-table.yaml for the complete table.
Core Declarative Memory Parameters
| Parameter | Symbol | Default | Typical Range | Source | |
|---|---|---|---|---|---|
| Base-level learning decay | d | 0.5 | 0.1 -- 1.0 | Anderson & Schooler, 1991; Anderson, 2007 | |
| Activation noise | s | 0.4 | 0.1 -- 0.8 | Anderson, 2007 | |
| Latency factor | F | 1.0 | 0.2 -- 5.0 | Anderson, 2007 | |
| Latency exponent | f | 1.0 | Fixed in most models | Anderson, 2007 | |
| Retrieval threshold | tau | -infinity (default) | Set empirically; often 0.0 to -2.0 | Anderson, 2007 | |
| Maximum associative strength | S (mas) | context-dependent | 1.0 -- 5.0 | Anderson & Reder, 1999 | |
| Mismatch penalty | P | application-dependent | 0.5 -- 2.0 | Anderson, 2007 |
Production Utility Parameters
| Parameter | Symbol | Default | Typical Range | Source | |
|---|---|---|---|---|---|
| Utility noise | sigma | 0.0 (deterministic) | 0.1 -- 2.0 when enabled | Anderson, 2007 | |
| Utility learning rate | alpha | 0.2 | 0.01 -- 1.0 | Anderson, 2007 | |
| Initial utility | U0 | 0.0 | Set per production | Anderson, 2007 | |
| Production compilation | enabled/disabled | Disabled by default | -- | Taatgen & Anderson, 2002 |
Timing Parameters
| Parameter | Value | Source | |
|---|---|---|---|
| Production cycle time | 50 ms | Anderson, 2007 | |
| Visual encoding time | 85 ms | Anderson, 2007, Ch. 6 | |
| Motor initiation time | 50 ms | Anderson, 2007, Ch. 6 | |
| Motor execution time | 100 ms (Fitts' law applies) | Anderson, 2007, Ch. 6 | |
| Imaginal delay | 200 ms | Anderson, 2007, Ch. 4 |
Activation Equation
Total activation of chunk i:
A_i = B_i + sum_j(W_j * S_ji) + PM_i + noise
Where:
- B_i = base-level activation (log of weighted recency; decay d; Anderson & Schooler, 1991)
- W_j * S_ji = spreading activation from source j (Anderson, 2007, Ch. 5)
- PM_i = partial matching component (Anderson, 2007)
- noise = logistic noise with scale s (Anderson, 2007)
Retrieval time: RT = F * e^(-f * A_i) (Anderson, 2007)
Model Fitting Workflow
Step 1: Identify Free Parameters
Rule of thumb: The number of free parameters should be substantially less than the number of independent data points being fit (Roberts & Pashler, 2000).
Step 2: Choose Fitting Method
| Method | When to Use | Source | |
|---|---|---|---|
| Grid search | Few parameters (1-3), bounded space | Standard practice | |
| Simplex (Nelder-Mead) | Moderate parameters, smooth landscape | Anderson, 2007 | |
| Differential evolution | Many parameters, multimodal landscape | Storn & Price, 1997 | |
| Bayesian optimization | Expensive evaluations, informed priors | Palestro et al., 2018 |
Step 3: Fit to Multiple Dependent Variables
ACT-R models should simultaneously account for:
- Response times (correct trials, mean or quantiles)
- Accuracy (proportion correct by condition)
- Qualitative patterns (error types, learning curves)
Use weighted sum of squared deviations or log-likelihood across measures (Anderson, 2007, Ch. 4).
Step 4: Parameter Recovery
Before trusting fitted parameter values, conduct a parameter recovery study. See the parameter-recovery-checker skill.
Common Model Patterns
See references/model-patterns.md for detailed implementations of:
- Memory retrieval -- Paired associates, fan effect (Anderson, 2007, Ch. 5)
- Skill acquisition -- Production compilation, power law of practice (Taatgen & Anderson, 2002)
- Decision-making -- Instance-based learning, utility-based selection (Gonzalez et al., 2003)
- Problem solving -- Means-ends analysis, goal stacking (Anderson, 2007, Ch. 8)
Model Validation Checklist
| Validation Step | Method | Minimum Standard | |
|---|---|---|---|
| Parameter recovery | Simulate and refit | r > 0.9 between true and recovered (Heathcote et al., 2015) | |
| Cross-validation | Fit half, predict half | Prediction RMSE within 2x of fitting RMSE | |
| Qualitative predictions | Novel conditions | Model predicts ordinal pattern correctly | |
| Model comparison | AIC/BIC or Bayes factor | Compare against plausible alternatives (Burnham & Anderson, 2002) | |
| Sensitivity analysis | Vary fixed parameters | Conclusions robust to +/-20% variation |
Software and Implementation
| Platform | Language | URL | Notes | |
|---|---|---|---|---|
| ACT-R 7.x | Common Lisp | act-r.psy.cmu.edu | Reference implementation (Bothell, 2023) | |
| pyactr | Python | github.com/jakdot/pyactr | Python interface, good for batch simulations (Dotlacil, 2018) | |
| jACT-R | Java | jactr.org | Java implementation |
Recommendation: Use ACT-R 7.x for model development and validation. Use pyactr when integrating with Python data analysis pipelines or running large parameter sweeps (Dotlacil, 2018).
Common Pitfalls
- Too many free parameters: Fitting more than 5-6 free parameters without strong justification risks overfitting (Roberts & Pashler, 2000). Fix well-established parameters (d = 0.5, production cycle = 50 ms) to defaults.
- Ignoring parameter correlations: Parameters like s (noise) and tau (threshold) trade off. Run parameter recovery to verify identifiability.
- Fitting only means: ACT-R makes distributional predictions. Fitting only mean RT discards information. Use quantile-based fitting where possible (Heathcote et al., 2015).
- Incorrect timing alignment: ACT-R's predicted RT includes perceptual and motor times. Account for these when comparing to behavioral RT.
- Overly complex models: Prefer models with fewer productions and chunk types that still capture the qualitative pattern. Complexity should be motivated by the data (Anderson, 2007, Ch. 1).
- Neglecting model comparison: Always compare your ACT-R model against at least one alternative (simpler ACT-R variant or a different architecture) using formal model comparison (Burnham & Anderson, 2002).
Minimum Reporting Checklist
Based on best practices from Anderson (2007) and Heathcote et al. (2015):
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingpackages/skills/skills/07_Computational_Modeling/act-r-model-builder/SKILL.md
Popularity
- Repository stars
- 884
- Repository forks
- 61
- 7-day trend score
- 34
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/neuroaihub/brainpilot/act-r-model-builder)