From kai.sauerwald at fernuni-hagen.de Tue Sep 5 05:18:06 2017 From: kai.sauerwald at fernuni-hagen.de (Kai Sauerwald) Date: Tue, 5 Sep 2017 11:18:06 +0200 Subject: [ACT-R-users] ACT-R-users Digest, Vol 52, Issue 4 In-Reply-To: References: Message-ID: <03013318-3ac8-9ae6-95de-ef1909816553@fernuni-hagen.de> Thank you all for the reply's! To be a little more concrete: ACT-R behaves not as i expected. The ACT-R documentation gives the following formula (newutility.pdf, page 2): P_i = e^( U_i/s ) /? \sum_j? e^( U_j/s ) which describes the probability P_i that the production i is chosen in dependence of the s value and all utility values (the U_j values). Now suppose that s=1 and we have only two productions. We want to examine how the utility values U_1 and U_2 have to be chosen so that P_1=0.6 and P_2=0.4. By that we have 0.6=e^U_1 / (e^U_1+e^U_2) and 0.4=e^U_2 / (e^U_1+e^U_2) . We can easily derive e^U_1=e^U_2? * (0.6/0.6) and therefore U_1=log (? e^U_2? * (0.6/0.4)) So by set U_2=10 we get U_1=10.41...?? (see https://www.wolframalpha.com/input/?i=solve+%5B+e%5Ex%3De%5E10++*+(0.4%2F0.6+)+%5D ) Lets make the real world test how often RULE1 is selected with a act-r model. The model appended in this mail performs 40000 selections (run the command "lisp prob.lisp? | grep RULE1 | wc -l"? to count how often RULE1 is selected) and gives to following results: First try: RULE1 is 22671 of 40000 times selected Second try: RULE1 is 22586 of 40000 times selected Third try: RULE1 is 22630 of 40000 times selected Which is every time around 0.56 percent of all selections. Sincerely, Kai Sauerwald --------------------- Knowledge Based Systems University of Hagen Univerisit?tsstr. 1 58097 Hagen > --On Tuesday, August 29, 2017 11:51 PM -0400 Kai Sauerwald > wrote: > >> Hello, >> >> is there a way to archive probabilistic selection of production rules in >> ACT-R? >> >> More concrete:? suppose two productions p1 and p2 with the same condition, >> how do I have to setup the rules and ACT-R such that p1 is selected with >> probability 0.3 and p2 selected with probability 0.7 in conflict resolution? >> >> > To do that you would need to set the utilities of those productions and the > utility noise value. The equation that describes the probability of choosing > a production based on its utility, the utility of the competing productions, > and the utility noise is shown in unit 6 of the ACT-R tutorial. Unit 3 of > the tutorial shows how to set fixed utility values using the spp command, and > the parameter for utility noise is :egs as shown in unit 6. Unit 6 also > describes the process through which a model can learn those utility values > based on the rewards it is given. > > Hope that helps, > Dan > -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- (load "load-act-r.lisp") (start-environment) (clear-all) (define-model probtest (sgp :esc t :egs 1 :show-focus t :trace-detail medium :ul nil) (chunk-type choosestate value) (add-dm (the-goal isa choosestate value 0) ) (p rule1 =goal> isa choosestate value 0 ==> !output! 1) (p rule2 =goal> isa choosestate value 0 ==> !output! 2) (spp rule1 :u 10.41) (spp rule2 :u 10) (goal-focus the-goal) ) (run 2000) -------------- next part -------------- A non-text attachment was scrubbed... Name: kai_sauerwald.vcf Type: text/x-vcard Size: 263 bytes Desc: not available URL: From db30 at andrew.cmu.edu Tue Sep 5 10:18:40 2017 From: db30 at andrew.cmu.edu (db30 at andrew.cmu.edu) Date: Tue, 5 Sep 2017 10:18:40 -0400 Subject: [ACT-R-users] ACT-R-users Digest, Vol 52, Issue 4 In-Reply-To: <03013318-3ac8-9ae6-95de-ef1909816553@fernuni-hagen.de> References: <03013318-3ac8-9ae6-95de-ef1909816553@fernuni-hagen.de> Message-ID: <87EEABDEDE33A3D03DB9C7C0@actr6b.psy.cmu.edu> --On Tuesday, September 05, 2017 5:18 AM -0400 Kai Sauerwald wrote: > > Thank you all for the reply's! > > To be a little more concrete: ACT-R behaves not as i expected. The ACT-R > documentation gives the following formula (newutility.pdf, page 2): > > P_i = e^( U_i/s ) / \sum_j e^( U_j/s ) > > which describes the probability P_i that the production i is chosen in > dependence of the s value and all utility values (the U_j values). > The equation in that document is based on s being the temperature of the noise distribution. However, the parameter :egs in ACT-R sets the s value of the noise distribution where the variance (sigma^2) = (pi^2 * s^2)/3 and the temperature is ((sqrt 6) * sigma)/pi. Thus, the temperature needed for the probability choice equation is (sqrt 2) * :egs, as is shown in Unit 6 of the tutorial. Therefore, if you want :egs = 1 and U_2 = 10, U_1 would need to be ~10.57, and here's a test model showing a run with that setting: (define-model test-p (setf *p1* 0) (setf *p2* 0) (sgp :v nil :esc t :egs 1) (p rule1 ==> !eval! (incf *p1*)) (p rule2 ==> !eval! (incf *p2*)) (spp rule1 :u 10.57) (spp rule2 :u 10)) CG-USER(22): (run 10000) 10000.0 800004 NIL CG-USER(23): (* 1.0 (/ *p1* (+ *p1* *p2*))) 0.59498 Hope that helps, Dan