-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple Agents #54
Comments
Hi, Thanks for your interest in pyactr. pyactr was not built with this functionality in mind. However, I think it is possible to mimic multiple agents interacting in one environment. The following code should work. I am also attaching a trace from running this model with extra explanation on the behavior of this model in some detail. The code simulates two agents, both interacting with the screen on which letters A, B and C are printed one after the other. Agent 1 has to press the key A or C when the letter A or C appears on the screen. If Agent 1 does so, the screen will advance to the next letter. If the letter B appears on the screen, Agent 2 has to press the key B, and the screen advances then to the next letter. If Agent 1 presses A or C when B appears on the screen, nothing happens, and if Agent 2 presses B when A or C are on the screen, nothing happens. The environments are not completely shared, but the trick to get it to work is to let the environment advance for one agent whenever the other agent made it advance. See the part in the scope of while True at the final part of the code. Most crucial bits are two lines under the "update stimulus" comments. This is a bit of a hack, I had to access some private instance variables to update the simulation from outside of it. At least for this case, it works but I cannot promise it will not break in more complicated cases.
|
Hey! Thanks a lot for the package. Do you have any idea, how I'm able to let multiple agents interact with each other in the same environment simultaniously? Working on my thesis at the moment.
The text was updated successfully, but these errors were encountered: