[ACT-R-users] Question regarding buffer-chunk command via RPC

Dan Bothell db30 at andrew.cmu.edu
Sun Jul 26 21:36:20 EDT 2020


That is the correct return value from buffer-chunk when given a buffer 
name.  It returns a list of the names of the chunks in the buffers 
provided, and that is all that is returned in Lisp as well -- the (D-0) 
at the end.  The output to the command-trace with the buffer's chunk 
information is a side effect of calling buffer-chunk, and you will see 
that when you call it remotely as well.

If you want the text output that is shown, you can use the 
printed-buffer-chunk command.  If you want to know what slots a chunk 
has, then you would use the chunk-filled-slots-list command, and to get 
the value of a slot in the chunk you would use the chunk-slot-value 
command.

Dan

On 7/26/20 1:24 PM, Arun Krishna wrote:
> Hi,
> My java application uses RPC to communicate with ACT-R.
> Mainly uses the evaluate method and is working in many cases.
> But buffer-chunk command is not working via evaluate eventhough 
>  buffer-read command works.
>
> For example
> -----------------------------------------------
> JSONArray jsonArray3 = new JSONArray();
> jsonArray3.put("{\"method\":\"evaluate\",");
> jsonArray3.put("\"params\":");
> jsonArray3.put("[\"buffer-read\",\"maneuver-left\",\"goal\"],");
> jsonArray3.put("\"id\":1}");
>
> Works and I am getting proper out put
> {"result": ["D-0"], "error": null, "id": 1}
> --------------------------------------------------
>
>
> ------------------------------------------------------------
> But when I use buffer-chunk
>  JSONArray jsonArray3 = new JSONArray();
>     jsonArray3.put("{\"method\":\"evaluate\",");
>     jsonArray3.put("\"params\":");
> jsonArray3.put("[\"buffer-chunk\",\"maneuver-left\",\"goal\"],");
>     jsonArray3.put("\"id\":1}");
>
> I am getting {"result": [["D-0"]], "error": null, "id": 1} which does 
> not include the contents in the
> goal buffer.
>
> When I use the same command via ACT-R command line, buffer-chunk works 
> and gives complete output
> (buffer-chunk goal)
> GOAL: D-0
> D-0
>    STATE3  "active"
>
> (D-0)
> ------------------------------------------------------------------
>
> Can you please let me know how to get the full contents in the 
> goal/retrieval buffer via RPC?
> (Note: I am using ACT-R\examples\connections\Java\simpleACTRtest.java 
> for testing)
>
> Thanks & Regards,
> Arun
>
>
>
> _______________________________________________
> 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/20200726/a9aeec28/attachment.html>


More information about the ACT-R-users mailing list