Optimisation for NormalFormGame + move to pyproject.toml
- Changed from
setup.pytopyproject.toml. - Main changes in
gtnash.game.normalformgame:
-
generate_joint_actionshas a simplified definition using generators. This skips generating individual joint actions by hand. -
expected_utilitiessimply callsexpected_utilities_of_nn_playersnumber of times, once for each player. The old code was doing this with code duplication. -
expected_utilities_of_nnow uses NumPy code instead of working with pure Python - time spent in the callback accounts for 20% of total time, as opposed to 87%😄
- I also ran
blackon the entire codebase, due to my editor setup (désolé!)