Skip to content

Behaviour of mixed strategy profiles #4

@tturocy

Description

@tturocy

The current behaviour of mixed strategy profiles should be enhanced as follows:

  • __getitem__ and __setitem__ should also accept text labels as indices, indexing into strategies or players as appropriate.
  • __getitem__ returns a list of probabilities when indexing by a player. Instead, this should return a shim class that operates as a "window" onto the profile - so constructions like profile[player][strategy] = prob work as expected.
  • payoff should accept text labels as indices
  • strategy_value should accept text labels as indices
  • Implement strategy_values(player), which should return a list-like object representing the strategy value for each of a player's strategies

A parallel implementation for mixed strategy profiles with rational probabilities should also be implemented, where all numbers are converted to fractions.Fraction in the interface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions