You will find the code associated to the following paper: Pio-Lopez, L., Kuchling, F., Tung, A., Pezzulo, G., & Levin, M. (2022, July 9). Active inference, morphogenesis, and computational psychiatry. https://doi.org/10.31234/osf.io/4gp6c
The spm12 matlab package is required.