text: This can conveniently be used in conjunction with an ActionModels agent, a more abstract 
  structure that is used for running behavioural models in general, and which is used when 
  fitting models to data. We therefore begin with initialising an agent that contains the 
  AIF object: 
  (cid:7)  (cid:4) 
  
  # Initialize ActionModels Agent with active inference agent as a substruct . 
  agent = init_agent ( 
  
  <html>
          <head> <meta charset="UTF-8">
          <style>
          table, th, td {
              border: 1px solid black;
              font-size: 10px;
          }
          </style> </head>
          <body>
          <table frame="hsides" rules="groups" width="100%%">
              [html]<thead><tr><td>substruct</td><td># The ATF object</td></tr></thead><tbody><tr><td>Table</td></tr></tbody>
          </table> </body> </html>
  
  (cid:5) 
  
  The agent object can be used with a set of standard functions. single_input! provides 
  the agent with an observation, updates it is beliefs and returns a sampled action; for non- 
  action-dependent observations, give_inputs! provides a series of observations across time 
  steps and returns actions for each. These can be easily used in an agent-based simulation to 
  have AIF agents evolve and act over time. 