docstr: Test for passing in `alpha` (action sampling precision parameter) as argument to `agent.Agent()` constructor.
  Test two cases to make sure alpha scaling is working properly, by comparing entropies of action marginals 
  after computing posterior over actions in cases where alpha is passed in as two different values to the Agent constructor.
docstr_tok: ["Test","for","passing","in","`","alpha","`","(","action","sampling","precision","parameter",")","as","argument","to","`","agent.Agent","(",")","`","constructor",".","Test","two","cases","to","make","sure","alpha","scaling","is","working","properly",",","by","comparing","entropies","of","action","marginals","after","computing","posterior","over","actions","in","cases","where","alpha","is","passed","in","as","two","different","values","to","the","Agent","constructor","."]
code: def test_agent_with_input_alpha(self):
      """
      Test for passing in `alpha` (action sampling precision parameter) as argument to `agent.Agent()` constructor.
      Test two cases to make sure alpha scaling is working properly, by comparing entropies of action marginals
      after computing posterior over actions in cases where alpha is passed in as two different values to the Agent constructor.
      """
  
      num_obs = [2]
      num_states = [2]
      num_controls = [2]
      A = utils.to_obj_array(np.eye(num_obs[0], num_states[0]))
      B = utils.construct_controllable_B(num_states, num_controls)
      C = utils.to_obj_array(np.array([1.01, 1.0]))
  
      agent = Agent(
          A=A, B=B, C=C, alpha=16.0, action_selection="stochastic"
      )
      agent.infer_states(([0]))
      agent.infer_policies()
      chosen_action, p_actions1 = agent._sample_action_test()
  
      agent = Agent(
          A=A, B=B, C=C, alpha=0.0, action_selection="stochastic"
      )
      agent.infer_states(([0]))
      agent.infer_policies()
      chosen_action, p_actions2 = agent._sample_action_test()
  
      entropy_p_actions1 = -maths.spm_log_single(p_actions1[0]).dot(
          p_actions1[0]
      )
      entropy_p_actions2 = -maths.spm_log_single(p_actions2[0]).dot(
          p_actions2[0]
      )
  
      self.assertGreater(entropy_p_actions2, entropy_p_actions1)
  
imports: import os
  import unittest
  import numpy
  from copy import deepcopy
  from pymdp.agent import Agent
  from pymdp import utils, maths
  from pymdp import inference, control, learning
  from pymdp.default_models import generate_grid_world_transitions
label_desc: Use image node_id 10 for calling the TestAgent obj's underlying member method code with example usage: obj.test_agent_with_input_alpha() without return types