Skip to content

Conversation

@oyamad
Copy link
Member

@oyamad oyamad commented May 18, 2025

I let ChatGPT read the existing code of vertex_enumeration.py and got the following suggestion:

  • The current _vertex_enumeration_gen has complexity O(V_0 * V_1), where V_i is the number of vertices of the best response polytope of player i.
  • One should use Dict in place of the inner loop, which will reduce the complexity to O(V_0 + V_1).

Benchmarks with random n x n games showed significant speedups, and larger speedups for larger games: about 1.3x faster for n=12, 2x faster for n=14, 15, and 4x faster for n=17. (And no additional overheads for small size games.)

@mmcky
Copy link
Contributor

mmcky commented Jun 5, 2025

thanks @oyamad

@mmcky mmcky merged commit a23985e into main Jun 5, 2025
11 checks passed
@mmcky mmcky deleted the vert_enum branch June 5, 2025 05:21
@mmcky
Copy link
Contributor

mmcky commented Jun 6, 2025

thanks @oyamad I have now release v0.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants