AchiralAchiral

Concepts · Humans and machines

How ACT-R production rules match the current state, compete for selection, and learn from outcomes, with a worked support-agent example.

Published2026-07-210 reads

Review pending. Report issues to editor@achiral.ai.

Watercolor of a hammer, screwdriver, pliers, spanner, and pry bar, with an ochre line connecting a nut-and-bolt tray to the selected spanner.
Different tools suit different jobs. The nut and bolt cue the spanner, illustrating how the current situation makes an action rule applicable.

Production Rules and Procedural Memory

Procedural memory in ACT-R is knowledge expressed as production rules: conditions paired with actions. A rule can request a memory, change a goal, or ask another module to act when its conditions match the current state. The ACT-R reference manual specifies how these rules work.

The previous chapter retrieved a record of Susan's unresolved password-reset failure. Its failure code is unknown. We now need to choose what the agent should do with that information. Asking for the code may be a sensible next step when no request for it is already pending.

This example uses plain-language pseudocode to explain the mechanism. It is not executable ACT-R code or a description of Achiral's implementation.

Match a rule to the current state

A production needs conditions precise enough to distinguish this case from other cases. A rule that says “ask for the failure code after a failed reset” leaves several questions open. Whose reset failed? Is the failure still unresolved? Has the question already been sent?

An illustrative rule could make those conditions explicit:

text
IF
  the current goal is to resolve a password reset for user U
  and the retrieved record concerns that same user U
  and the record describes an unresolved failed reset
  and the failure code is unknown
  and no request for the code is pending
THEN
  request the failure code from U
  and mark the case as waiting for that code

The shared variable U keeps Susan's goal tied to Susan's record. Updating the waiting state prevents the agent from asking the same question again while she is answering. Those details determine whether the rule behaves usefully.

Read information through buffers

ACT-R productions test information exposed through buffers and module status. A buffer can hold one chunk, a structured unit of information. The goal buffer can carry the task state; the retrieval buffer can hold a chunk returned from declarative memory. Productions can also test whether a module is busy, free, or has encountered an error, as supported by that module.

For the support example, the relevant information might be:

text
Goal buffer
  task: resolve-password-reset
  user: Susan
  stage: diagnose
  code-request-pending: false

Retrieval buffer
  user: Susan
  task: password-reset
  status: failed-unresolved
  failure-code: unknown

The production tests this available state. It does not search every saved record itself. If the needed history has not been retrieved, another step must request it before this rule can match. The distinction between chunks and declarative memory and productions lets a model represent the remembered failure separately from the response to it.

Choose one matching production

Several productions may be applicable: ask for more information, check account status, or escalate the case. ACT-R calls the selection process conflict resolution. One production fires at a time, although other modules can work in parallel. Anderson and colleagues describe this coordination in their ACT-R model of game performance.

In the support example, the selected rule requests the failure code, sets code-request-pending to true, and changes the goal stage to waiting-for-code. Once the response arrives, the model can clear the pending flag, incorporate the code, and select another applicable rule.

The waiting condition does practical work here. Without it, the same unresolved failure could keep matching the same question-asking rule.

Learn which rules to prefer

Utility gives ACT-R a way to prefer some applicable productions over others. Selection can include noise, so the highest stored utility does not always win. When utility learning is enabled, rewards adjust these preferences. A worked example appears in Anderson and colleagues' Discovering skill.

The update has the form:

Uinew=Uiold+α(Gi−Uiold)U_i^{\mathrm{new}} = U_i^{\mathrm{old}} + \alpha\left(G_i - U_i^{\mathrm{old}}\right)

Here, UiU_i is the utility of production ii, α\alpha is the learning rate, and GiG_i is the reward attributed to that production after accounting for the elapsed time cost. The update moves the previous utility toward that value.

Changing a preference among existing rules is distinct from creating a new rule. ACT-R also supports production compilation, which can combine eligible successive productions into a new production. The same study explains how compilation can produce a direct response that bypasses an earlier retrieval step.

For an AI support agent, the reward would need careful definition. Closing Susan's ticket quickly could look successful while leaving her locked out. A useful evaluation would check whether she regained access and whether the required process was followed.

Make the action trace inspectable

The rule and its state changes give a reviewer something concrete to inspect: the record that influenced a decision, the conditions that made a rule applicable, and what changed after it fired.

A matching rule can still encode the wrong policy. A learned preference can reward a shortcut. An AI system needs authorization and policy checks around its actions, regardless of how useful a rule has been in the past.

For Susan's case, a reviewer could start with a concrete check: after the agent asks for the failure code, does it wait for an answer, and does the answer change its next step? We now have both a record of what happened and a trace of a decision. The next chapter, ACT-R and AI Memory, uses that distinction to develop training examples for content and decision models.


Sources

Go back to Chunks and Declarative Memory, continue with ACT-R and AI Memory, or return to the Concepts hub.