assert all([n_c == max_action for (n_c, max_action) in zip(self.num_controls, list(np.max(all_policies, axis =0)+1))]), "Maximum number of actions is not consistent with `num_controls`"
But sometimes certain actions will not be allowed (they will be pruned / absent in policies) and thus even when taking the maximum across all policies, you won't see the maximum action taken within a given control factor.
Therefore, @tverbele suggests to change this to
assert all([n_c >= max_action for (n_c, max_action) in zip(self.num_controls, list(np.max(all_policies, axis =0)+1))]), "Maximum number of actions is not consistent with `num_controls`"
In line 149 of
agent.py
, this assertion statement is used:But sometimes certain actions will not be allowed (they will be pruned / absent in
policies
) and thus even when taking the maximum across all policies, you won't see the maximum action taken within a given control factor.Therefore, @tverbele suggests to change this to