[ACT-R-users] ACT-R-users Digest, Vol 36, Issue 1

Dan Bothell db30 at andrew.cmu.edu
Tue Jul 1 14:28:36 EDT 2008



--On Tuesday, July 01, 2008 11:30 AM -0500 Karri Peterson 
<karri.peterson at gmail.com> wrote:

>
> Dan,
>
> Two questions related to this:
>
> In line with this question, are chunk-types extended during the
> production compilation process?
>

No.  The normal process for chunk-type extension occurs when a
buffer modification action in a dynamic production references a
slot which doesn't currently exist in the chunk.  A simple example
model and run which shows that happening is included below.  You
can also check out the p* command in the reference manual for more
details on the dynamic production mechanisms.

It's also possible to explicitly extend a chunk-type in code, for
instance in the processing of a request by a module, but that
doesn't happen in any of the provided modules or code other than
in dynamic productions as described above.


> I am still learning about the production compilation process but I am
> assuming it can't use dynamic pattern matching functionality (or can it?)
> because of the rules regarding buffers necessary for production
> compilation to take place.  Is this correct?
>

Dynamic productions can undergo production compilation.  The resulting
production from a composition which involves at least one dynamic
production may or may not itself be dynamic.

For the specific case at hand, a chunk-type extension will always be
instantiated in the composed production i.e. a composed production
will not extend a chunk-type.  The primary reason for instantiating it
is because that specific extension must have already occurred when the
original productions fired and the composed production isn't supposed
to do anything other than the originals did.

Here's a very simple model with three productions, the first two of
which are dynamic.  When it is run they will fire in sequence p1, p2,
and then p3 and generate two new productions through compilation.  P1
extends the chunk representation, but p2 and p3 do not.  The production
that results from composing p1 and p2 is not dynamic, but the one that
results from composing p2 and p3 is.

(define-model simple-p*-compilation-demo
  (sgp :esc t :epl t :pct t :trace-detail high :lhst nil)

  (chunk-type simple state slot)
  (goal-focus-fct (car (define-chunks (isa simple slot new-slot)
                                      (new-slot isa chunk))))

  (p* p1
     =goal>
       isa simple
        state nil
        slot =name
     ==>
     =goal>
        =name 10
        state busy)

  (p* p2
     =goal>
       isa simple
        slot =name
        =name =value
        state busy
     ==>
     =goal>
       slot nil
       state free)

  (p p3
     =goal>
      isa simple
       state free
     ==>
     =goal>
      state nil))

Here's the trace of running that model showing the new slot
being created when p1 fires and the definitions of the two
newly composed productions:

CG-USER(66): (run 1)
     0.000   GOAL                   SET-BUFFER-CHUNK GOAL SIMPLE0 REQUESTED 
NIL
     0.000   PROCEDURAL             CONFLICT-RESOLUTION
     0.000   PROCEDURAL             PRODUCTION-SELECTED P1
     0.050   PROCEDURAL             PRODUCTION-FIRED P1
Production Compilation process started for P1
  No previous production to compose with.
  Setting previous production to P1.
     0.050   PROCEDURAL             MOD-BUFFER-CHUNK GOAL
     0.050   PROCEDURAL             EXTENDING-CHUNK-TYPE SIMPLE NEW-SLOT
     0.050   PROCEDURAL             CONFLICT-RESOLUTION
     0.050   PROCEDURAL             PRODUCTION-SELECTED P2
     0.100   PROCEDURAL             PRODUCTION-FIRED P2
Production Compilation process started for P2
  Production P1 and P2 are being composed.
  New production:

(P PRODUCTION0
  "P1 & P2"
   =GOAL>
       ISA SIMPLE
       STATE NIL
       SLOT NEW-SLOT
 ==>
   =GOAL>
       NEW-SLOT 10
       SLOT NIL
       STATE FREE
)
Parameters for production PRODUCTION0:
 :utility    NIL
 :u   0.000
 :at  0.050
  Setting previous production to P2.
     0.100   PROCEDURAL             MOD-BUFFER-CHUNK GOAL
     0.100   PROCEDURAL             CONFLICT-RESOLUTION
     0.100   PROCEDURAL             PRODUCTION-SELECTED P3
     0.150   PROCEDURAL             PRODUCTION-FIRED P3
Production Compilation process started for P3
  Production P2 and P3 are being composed.
  New production:

(P* PRODUCTION1
  "P2 & P3"
   =GOAL>
       ISA SIMPLE
       =NAME =VALUE
       SLOT =NAME
       STATE BUSY
 ==>
   =GOAL>
       SLOT NIL
       STATE NIL
)
Parameters for production PRODUCTION1:
 :utility    NIL
 :u   0.000
 :at  0.050
  Setting previous production to P3.
     0.150   PROCEDURAL             MOD-BUFFER-CHUNK GOAL
     0.150   PROCEDURAL             CONFLICT-RESOLUTION
     0.150   ------                 Stopped because no events left to 
process
0.15
19
NIL



Dan





More information about the ACT-R-users mailing list