pyactr icon indicating copy to clipboard operation
pyactr copied to clipboard

Confusion about lisp

Open DexterVex87 opened this issue 1 year ago • 2 comments

Dear,

thank you for your package! I currently struggle with building the agents in lisp syntax. Do you provide a full documentation on that? Because you've linked the official ACT-R website and manual in your tutorial, but it doesn't seem to be the same. In particulair, I struggle with different issues:

=goal>
ISA		goal
state   	whats-my-color
intention	production3
=visual-location>
screen-x    	=x

==>

 +visual-location>
color		yellow
kind		line
value		90
screen-y	lowest
:attended	nil

!bind! =new-x (+ =x 12) =goal> intention production4 links =new-x

this code works in the official ACT-R version, but in pyactr, it has a problem with !, +, : and -.

I'd be gladful, if you could help me out!

DexterVex87 avatar Jul 14 '24 16:07 DexterVex87

Having exactly the same Issue at the moment. Found your workaround of !eval! in another closed topic but looking forward to your answer here :)

Also calling a function with !bind!, prior defined would be awesome

Something like this (defun mitte (x1 x2) (+ x1 (/(- x2 x1)2))) !bind! =z (mitte =links =rechts)

Thanks Maxi

maxiplitt avatar Aug 01 '24 11:08 maxiplitt

!bind! (or using ! in general) is not possible in pyactr. I do not plan to add this functionality because it leads to what I find a confusing code - one that injects programming into cognitive modeling. If you want to manipulate some cognitive parameters in a (Python) program, it's better to do that explicitly: running a simulation and then by particular steps, including Python code that does whatever you want.

An example of a simulation that mixes ACT-R agent simulation with Python code is in tutorials/u8_estimating_using_pymc3.py, lines 126 - 137.

jakdot avatar Sep 04 '24 12:09 jakdot