Skip to content

Conversation

@l-ouis
Copy link

@l-ouis l-ouis commented Dec 5, 2025

Evolutionary dynamic Markov chains are sparse matrices, so using SciPy sparse matrices and operations can save memory.

Also implements SSD: https://arxiv.org/pdf/1207.1424, which is an exact algorithm that computes the stochastically stable distribution of a Markov chain (and can be used similarly as alpharank)

  • move Kosaraju.py into ssd.py and fix formatting
  • support sparse matrices in the SSD reduce step

@Eric-Ewing

@google-cla
Copy link

google-cla bot commented Dec 5, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@lanctot
Copy link
Collaborator

lanctot commented Dec 6, 2025

Thanks @l-ouis ! Can you sign the CLA?


# Alpharank is a special case here, as it's not supported by the abstract
# meta trainer api, so has to be passed as a function instead of a string.
if not meta_strategy_method or meta_strategy_method == "alpharank":

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should catch the case when meta_strategy_method is None (or not provided) and make it default to alpharank to ensure backwards compatability

Copy link
Collaborator

@lanctot lanctot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you fix the indentation to be consistent? (two-space indent)

E.g kosaraju.py appears to use 4-space indent but there might be others.|

Edit: original_ssd.py as well. Or maybe you don't intend to keep that one in the PR? (i.e. is it the original implementation that you're fitting into OpenSpiel, for instance)

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

Successfully merging this pull request may close these issues.

3 participants