Optimisation for NormalFormGame + move to pyproject.toml
- Changed from
setup.py
topyproject.toml
. - 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 callsexpected_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%
- I also ran
black
on the entire codebase, due to my editor setup (désolé!)
Merge request reports
Activity
Filter activity
added 1 commit
- c92e0abd - Made test/test_normalformgame.py independent of execution directory.
requested review from @regis.sabbadin
assigned to @regis.sabbadin
added 1 commit
- 14f81b5c - Detecting the right length of the prob_vector
added 1 commit
- e63957f5 - HGG.write_GameFile no longer converts rewards to int.
added 1 commit
- e40c71f3 - gtnash/game/normalformgame.py: removed np.mat since it is deprecated
Please register or sign in to reply