text: which is the value we intend to minimise. Various methods exist for minimising the 
  VFE; the one used in pymdp, from which we drew much of our inspiration, is Coordinate 
  Ascent Variational Inference (CAVI) [35], where the fixed points of the VFE are solved for 
  with coordinate descent (also known as fixed-point iteration (FPI) [23]). This is also the 
  algorithm currently available in ActiveInference.jl. We correspondingly use a coordinate 
  descent update to find the factorised approximate posterior q(s f 
  t ) that minimises the time- 
  dependent VFE Ft, and therefore optimises for the time-specific variational posterior q(st). 
  To obtain the coordinate descent update, we start by taking the derivative of Ft with respect 
  to q(s f 
  t ) and setting the derivative to zero [23]: 
  
  (cid:18) 
  (cid:105)(cid:19)  (cid:104) 
  = ln q(s f  P(s f 
  t | s f  t−1, u f  t ) + 1 − E 
  E 
  qi\ f [ln P(ot | st)] − ln  t−1) 
  = 0 (14) 
  f 
  t−1,u  f 
  t−1) 
  P(s 