# tf_agents.bandits.policies.constraints.compute_feasibility_probability

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/agents/blob/v0.19.0/tf_agents/bandits/policies/constraints.py#L557-L572) |

Helper function to compute the action feasibility probability.

    tf_agents.bandits.policies.constraints.compute_feasibility_probability(
        observation: https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/NestedTensor,
        constraints: Iterable[https://www.tensorflow.org/agents/api_docs/python/tf_agents/bandits/policies/constraints/BaseConstraint],
        batch_size: https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/Int,
        num_actions: int,
        action_mask: Optional[types.Tensor] = None
    ) -> https://www.tensorflow.org/agents/api_docs/python/tf_agents/typing/types/Float