infer-actively / pymdp

A Python implementation of active inference for Markov Decision Processes
MIT License
420 stars 83 forks source link

Fix a matrix demos #38

Closed conorheins closed 2 years ago

conorheins commented 2 years ago

In response to @osaaso3's issue with the A matrix demos, I've now added in optional flags that distinguish whether you want to A) read in the excel sheet from a pre-made excel sheet vs. B) create it via assignment operations in numpy/pandas, in the script.

Within option A), you can either : 1) write the A matrix stub to disk and then ask the user to go fill it out and then come back to running the code or 2) pre-load an A matrix from an excel sheet that is now included in the tmp_dir within the examples folder of pymdp.

Additionally, I have fixed the read_A_matrix function in these demos to accommodate the new argument introduced by this commit: https://github.com/infer-actively/pymdp/commit/6b48c00bb6d83930f4a784421bcfb2a27838df0a