Skip to content
Snippets Groups Projects

Optimisation for NormalFormGame + move to pyproject.toml

Open Maddila Siva Sri Prasanna requested to merge siva-sri-prasanna.maddila/gtnash:main into main
  1. Changed from setup.py to pyproject.toml.
  2. Main changes in gtnash.game.normalformgame:
  • generate_joint_actions has a simplified definition using generators. This skips generating individual joint actions by hand.
  • expected_utilities simply calls expected_utilities_of_n n_players number of times, once for each player. The old code was doing this with code duplication.
  • expected_utilities_of_n now uses NumPy code instead of working with pure Python - time spent in the callback accounts for 20% of total time, as opposed to 87% :smile:
  1. I also ran black on the entire codebase, due to my editor setup (désolé!)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading