Skip to content
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

Allow passing a params dictionary into env.step() #165

Open
JohnBoik opened this issue Jan 23, 2025 · 1 comment
Open

Allow passing a params dictionary into env.step() #165

JohnBoik opened this issue Jan 23, 2025 · 1 comment

Comments

@JohnBoik
Copy link

When creating a multi-agent system, it can be useful to pass objects (observations, states, B matrices, etc.) between different environments (if each agent has an environment). However, probably because of jit, one cannot effectively alter the B matrix of an environment using something like:

env.params[“B”][2] = new_B_matrix

Doing so might not change env.params[“B”] as it is used in computations. A possible solution is to pass in an altered env.params[“B”] to env.step(). In that case, the passed version would be used in computations instead of self.params[“B”].

@JohnBoik
Copy link
Author

JohnBoik commented Feb 7, 2025

I expand this issue here to also include the ability to pass A and B matrices into agent functions. This would allow for manual updates to those matrices within a simulation step. In essence, calls to self.A and self.B internal to pymdp would need to be replaced with the A and B parameters that are passed into functions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant