Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing payoff table for strategic games #1

Open
tturocy opened this issue Jun 14, 2011 · 0 comments
Open

Indexing payoff table for strategic games #1

tturocy opened this issue Jun 14, 2011 · 0 comments

Comments

@tturocy
Copy link
Owner

tturocy commented Jun 14, 2011

Strategic game outcomes can be obtained via indexing using the __getitem__ operator. This takes a tuple of entries, one for each player, in the order in which players appear in the list of players, and returns an outcome.

The initial implementation supports indexing via integers, corresponding to the index of the strategy in each player's strategy set.

  • Enhancement: Support indexing by strategy labels (text strings). If a player has a duplicate strategy label, raise a suitable exception. (That is, it is up to the user to keep a player's strategy labels unique.)
  • Enhancement: Support indexing by strategies. Accept a strategy object in place of an integer or text string. The strategy needs to belong to the appropriate player, otherwise an exception should be raised.
  • Additional test cases: Ensure that unexpected input (tuples with the wrong number of arguments, tuples with unexpected object types, etc.) raises appropriate exceptions.
tturocy pushed a commit that referenced this issue Aug 10, 2011
tturocy pushed a commit that referenced this issue Jun 19, 2014
Add back link to player restriction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant