Extras ReadMe

Brief guide to the "Extras" directory. To use an extra that is in a single file, load the .lisp file after you have loaded ACT-R/PM.


Cross-platform Extras

scanpath.lisp

David Peebles deserves most of the credit for this as it was his idea and the original implementation was his, I've just done some tuning.

The basic idea is this: RPM should be able show a scanpath, as if it were hooked up to some kind of tracker. Good idea, now implemented. Here's how it works. Let's say you want to see the sequence of attention shifts made by RPM. You need to enable the tracing, then run your model, then you can ask for a text version of the trace or get one drawn on your window. (Drawing on the window is only supported for MCL).

First, enable the tracing:

(pm-enable-path-tracing :attn)

You can specify :attn, :mouse, or if EMMA is installed, :eye. Those should be self-explanatory. Then, when the run is done, get the path with either:

(pm-print-path-trace :attn)

for a text version, or

(pm-draw-scanpath :attn)

to get the scanpath rendered in the window.

Note that if EMMA is not loaded, you'll get some compiler warnings when you load this. Ignore them.

emma.lisp

This is a modified version of Dario Salvucci's EMMA system for modeling eye movements as well as attention shifts.

Note that this version works slightly differently than the version described in Salvucci (2000). In particular, feature preparation is not a fixed 135 ms, but is now variable depending on how many features need to be prepared, just like the motor and speech modules. Thus, a repeat of the exact same saccade (in terms of polar displacement) will require zero preparation, and moves can take up to 150 ms for preparation. They will usually take 100 ms since a the "saccade" feature will usually be the same as the last move, but the direction and distance will have to be prepared anew each time.

Also, note that this changes the semantics of the various state flags in the Vision Module. The "preparation" flag will now reflect whether or not an eye movement is being prepared, independent of the state of visual attention. The "execution" flag will now be BUSY when an eye movement is excuting and FREE otherwise. The "processor" flag now reflects the state of visual attention.

Thus, if you want the next shift to occur as soon as possible, test the state of the "processor" flag before requesting an attention shift. Testing the "modality" flag means the Vision Module will wait for the total eye move to be complete, which will be slower than absolutely necessary.

Finally, there are (at least) three caveats to be aware of here:

First, this won't work correctly if you tell RPM to track moving objects. Tracking isn't done yet.

Second, there is a subtle bug in how visual object chunks get created by EMMA that might allow a model to "cheat" by retrieving chunks before they're ready. If you're referencing VISUAL-OBJECT chunks without using =visual> then you might run into this. Email Mike for more details if you're concerned about this.

This particular problem has sort of gone away since "time now" has gone away. If you access things with the =visual> buffer everything will be OK, but you can ask for (and succeed at) a retrieval of a visual object chunk before you should be able to.

UWI

The "uniform window interface." If you want to build a window that works under MCL, ACL for Windows, or as a "virtual" window that should run under any Lisp, take a look at this. All the credit for this goes to Dan Bothell.

script.lisp

The ACT-R scripting extension. I don't use this, but some people rely on it and some of the UWI examples require it, so here it is.

view-line-*.lisp

A view-based system for drawing lines on the screen so that RPM can "see" the lines. There's a version for MCL, one for ACL, and one for the "virtual" window system. Again, the bulk of the credit here goes to Dan Bothell.

MCL-Specific Extras

color-text.lisp

If you have colored text in static-text-dialog-items, this will generate values other than BLACK in the COLOR slot for the relevant visual locations and visual objects.

mcl-screen.lisp

If you have multiple windows on the screen at the same time with which you want RPM to interact, use this.

virtual-cursor.lisp

One of the problems with running RPM simulations is that the user loses mouse control. You can now get around this problem with the "virtual cursor." It won't work for all interfaces, but it will work for a lot of them.

osx-virtual-cursor.lisp

Same thing for MCL5/OS X.


If you find a bug or have some code you'd like to have distributed as an extra, please let me (Mike) know.

Last modified 01.11.12 by Mike Byrne.