docstr: Test `deterministic` action sampling in the case that multiple actions have the same probability. 
  Desired behavior is that actions are randomly sampled from the subset of total actions that have the highest (but equal) probability.
docstr_tok: ["Test","`","deterministic","`","action","sampling","in","the","case","that","multiple","actions","have","the","same","probability",".","Desired","behavior","is","that","actions","are","randomly","sampled","from","the","subset","of","total","actions","that","have","the","highest","(","but","equal",")","probability","."]
code: def test_deterministic_action_sampling_equal_value(self):
      """
      Test `deterministic` action sampling in the case that multiple actions have the same probability.
      Desired behavior is that actions are randomly sampled from the subset of total actions that have the highest (but equal) probability.
      """
  
      num_states = [3]
      num_controls = [3]
      policies = control.construct_policies(
          num_states, num_controls=num_controls, policy_len=1
      )
      q_pi = np.array([0.4, 0.4, 0.2])
  
      seeds = [1923, 48323]
  
      sampled_action = control._sample_action_test(
          q_pi,
          policies,
          num_controls,
          action_selection="deterministic",
          seed=seeds[0],
      )
      self.assertEqual(sampled_action[0], 0)
  
      sampled_action = control._sample_action_test(
          q_pi,
          policies,
          num_controls,
          action_selection="deterministic",
          seed=seeds[1],
      )
      self.assertEqual(sampled_action[0], 1)
  
imports: import os
  import unittest
  import numpy
  from pymdp import utils, maths
  from pymdp import control
label_desc: Use image node_id 16 for calling the TestControl obj's underlying member method code with example usage: obj.test_deterministic_action_sampling_equal_value() without return types