Chadwick Gambit: Software Tools for Game Theory

pygambit.gambit.Game.random_strategy_profile#

Game.random_strategy_profile(denom: int | None = None, gen: Generator | None = None) MixedStrategyProfile#

Create a MixedStrategy on the game, with probabilities drawn from the uniform distribution over the set of mixed strategy profiles.

Parameters:
  • denom (int, optional) – If specified, the probabilities are generated on a grid with denominator denom, and the resulting profile will be a MixedStrategyProfileRational. If not specified, the probabilities will be floating point numbers, and the resulting profile will be a MixedStrategyProfileRational.

  • gen (np.random.Generator, optional) – If specified, uses the numpy random number generator gen to generate uniform random samples. Otherwise, uses the default generation method in numpy.

  • versionadded: (..) – 16.2.0: Replaces the functionality of MixedStrategyProfile.randomize().

See also

mixed_strategy_profile

Create a MixedStrategyProfile with specified probabilities.