infer-actively / pymdp

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

Allow direct sampling / selection from posterior over policies, rather than only from posterior over actions #87

Closed conorheins closed 1 year ago

conorheins commented 1 year ago

Add an option to control.sample_action() or perhaps create an entirely new function in control.py, that allows you to directly sample a policy from q_pi and take the action entailed by that policy along each control factor, at the first timestep.

Thanks to @helenegu for requesting this

conorheins commented 1 year ago

This is now fixed in master; will close this after 0.0.6 is released so that this enhancement is applied to the registered version of the package.