[ACT-R-users] approximate floating point retrieval

Dan Bothell db30 at andrew.cmu.edu
Thu Dec 4 16:08:14 EST 2003


--On Thursday, December 04, 2003 11:15 AM -0500 Myriam Abramson 
<abramson at ait.nrl.navy.mil> wrote:

>
> How to you retrieve a chunk with an approximate floating point value?
>

The only way to retrieve a chunk that isn't a perfect match is through the
partial matching mechanism.  Unit 6 
<http://act-r.psy.cmu.edu/tutorials/unit6.htm>
of the tutorial discusses the mechanism but in this case you probably don't 
want
to set  all the similarities by hand. So, you'll need to use the similarity 
hook function.
That is described in the description of the unit 5 model 
<http://act-r.psy.cmu.edu/tutorials/unit5_exp.htm>
of the tutorial because it was used for the demonstration model.

Basically, what you need to do is enable partial matching by setting
the :pm parameter to t:

(sgp :pm t)

Then you need to define a function to compute the similarity between items
that you are interested in.

(defun number-similarity (value1 value2)
     (when (and (numberp value1) (numberp value2))
                ;; some numerical similarity value
     ))

Finally, you need to set that function to be used as the value of the
*similarity-hook-fn*, which should occur after the clear-all because
it gets cleared when the model is reset:

(setf *similarity-hook-fn* #'number-similarity)


Hope that helps, and if you have any questions let me know,
Dan




More information about the ACT-R-users mailing list