[ACT-R-users] ActR multiple Agents

Dan Bothell db30 at andrew.cmu.edu
Wed Aug 24 10:20:22 EDT 2011



--On Wednesday, August 24, 2011 12:04 PM +0000 toebsen b <toebsen at hotmail.com> wrote:

>
> Hello ACT-R Community,
>
> Im currently trying to embed a C++ Simulation with ACT-R. I have a running Async TCP Server (via
> BOOST-ASIO)  for the Communication
> with ACT-R via a device ( like in http://www.zmms.tu-berlin.de/kogmod/tools/hello-java.html
> Framework). The Communication works nicely.
>
> And now comes the not-so easy part: the Modeling in ACT-R:
> Ok, I'm trying to get it right:
> I need multiple "Agents", which communicate with the C++ Simulation (TCP) , and all should have
> the same ACT-R Model.
> How can i do that?
>  My first guess would be to start as many ACT-R environments as I have agents and just set
> different Ports for Communication and
> parse them in C++ to the correct instance of my c++ agent.
> But this seems quite an overkill if the ACT-R Instances go into the 10+
>
> Since I'm quite new to ACT-R, I do not know its complete capabilities.
>
> There has to be another Solution to this sort of problem?
>


It's possible to run multiple models simultaneously within a single instance
of ACT-R.  There is a section in the reference manual (found in the docs
directory of the distribution) which describes how to do so, and there are
some examples found in the examples directory of the distribution.  Since
you mention that you are new to ACT-R, I would also recommend working through
the tutorial if you haven't already.  The tutorial doesn't cover multiple
models, but should give you a solid understanding of how to use ACT-R for
modeling which you won't get from the reference manual.

I can't really offer much in the way of specific advice because exactly
how you want/need to set things up for multiple models depends on a couple
of technical issues with how the simulation and models are expected to interact:

- Will the models communicate over the same channel sharing the device
or does each model need a separate device?

- Are the models always going to be running together synchronously or
will they need to be run individually?

One thing I can offer however is that since you say they are all going to be
the same model, there is a way to create them that doesn't require writing
the code again for each one.  The define-model command can be provided with
a list of code to define the model.  Thus, if you create a list with the
code for the model in it you can just pass that list to define-model to
create more.  Again, the exact details will depend on what you need for
the sim, but generally something like this could be done:

(defvar *model-code* '((sgp :v t) (p test ?goal> buffer empty ==>) ...))
(define-model-fct 'model-1 *model-code*)
(define-model-fct 'model-2 *model-code*)
...


Hope that helps, and if you have other questions feel free to let me
know.

Dan



More information about the ACT-R-users mailing list