[ACT-R-users] Support needed for using ACT-R RPC

Arun Krishna arunbkris at gmail.com
Sat Jul 11 13:58:16 EDT 2020


Hi Dan,

Thank you very much for the reply.
Now I understand that the evaluate method serves the purpose.
Can you please give me a simple example invoking add chunk using evaluate
if it is not taking too much of your time?
The examples you are referring is ACT-R\examples\connections\python I
assume, but this one gives a reference for invoking act-r-version
"send(sock,'{"method":"evaluate","params":["act-r-version"],"id":1}')"

Thanks & Regards,
Arun


On Fri, Jul 10, 2020 at 4:39 PM Dan Bothell <db30 at andrew.cmu.edu> wrote:

>
> On 7/10/20 7:25 AM, Arun Krishna wrote:
>
> Hi,
> My java application needs to communicate to ACT-R cognition models via RPC.
> In a big picture level
> Java application -> Sent the current context information -> ACT-R run the
> cognition models ->Get back the result from ACT-R .
> I had gone through http://act-r.psy.cmu.edu/actr7.x/remote.pdf as well as
> some examples given in
> \ACT-R\examples\connections\lisp . But I didn't understand enough to use
> the RPC.
> The current examples contain only two method invocations
>
> print("{\"method\":\"set-name\",\"params\":[\"Simple Java Example\"],\"id\":null}");
> // Evaluate the ACT-R "act-r-version" command.print("{\"method\":\"evaluate\",\"params\":[\"act-r-version\"],\"id\":1}");
>
>
> Is there an example which does more han this with RPC, i.e communication to a count model etc?
>
>
> Thanks & Regards,
>
> Arun
>
>
> Given what you describe, it would seem the evaluate method and the
> corresponding result message sent back may be all you need.  The evaluate
> method is used to call commands that are available through the RPC system,
> and the return value(s) are sent back using result.
>
> Thus, you could evaluate ACT-R commands to set the context (add chunks,
> set buffer contents, create visual features, etc), evaluate one of the
> running commands to run the model, and then evaluate commands to get
> information from the model, like the the contents of buffers or the current
> model time.
>
> The ACT-R reference manual contains details of all the commands available
> remotely.  Also, if you haven't done so, I would recommend working through
> the ACT-R tutorial to see practical examples of how many of the commands
> are used to setup and run models.  Included with the tutorial is also an
> implementation of the ACT-R RPC protocol in Python which provides Python
> functions to call specific ACT-R commands, which may be helpful in
> understanding how to use it.
>
> Hope that helps, and let me know if you have further questions,
> Dan
> _______________________________________________
> ACT-R-users mailing list
> ACT-R-users at act-r.psy.cmu.edu
> https://mailman.srv.cs.cmu.edu/mailman/listinfo/act-r-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.srv.cs.cmu.edu/pipermail/act-r-users/attachments/20200711/d085db95/attachment.html>


More information about the ACT-R-users mailing list