[ACT-R-users] approximate floating point retrieval

Myriam Abramson (contractor) abramson at ait.nrl.navy.mil
Thu Dec 4 11:15:33 EST 2003


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

Here's an example code that gives me an error when not retrieving the
exact value. 

(clear-all)

(chunk-type goal state)
(chunk-type mynum val)

(add-dm (mygoal isa goal state first)
	(mynum0 isa mynum val 1.48)
	(mynum1 isa mynum val 1.54)
	(mynum2 isa mynum val 2.05)
	(mynum3 isa mynum val 3.5555)
	(mynum4 isa mynum val 3.68))

(p one
   =goal>
   isa goal
      state first
   ==>
   +retrieval>
     isa mynum
     val 3.55
   =goal>
     state second


(p two
   =goal>
   isa goal
      state second
   =retrieval>
    isa mynum
    val =val
   ==>
   !output! (=val)
   =goal>
      state stop)

(goal-focus mygoal)

(sgp :er t :v t)




-- 

Myriam Abramson, Ph.D.
ITT Industries, Inc.
202-404-7342





More information about the ACT-R-users mailing list