Question about the PSRO.
Dear authors,
I am trying to find some examples of applying DRL as an oracle to the generalized PSRO framework. However, I found that in examples related to PSRO (e.g generalized PSRO and RNR) only an evolutionary-strategy oracle is being used for simplification. So I am wondering if there is an example in which PSRO is combined with DRL as experiments in the corresponding papers. Moreover, I notice that there are implemented actor-critic and DQN in the library. Is there a simple way to combine them with PSRO? Thank you.
Hi @wyz2368 ,
We unfortunately do not have the full PSRO as described in the paper with Deep RL oracles.
It is very much something we would like to have in the code base, though. And yes, there should be a simple way to combine them with PSRO, but we have not had the time to do it.
It would be a very welcome contribution that I could help advise (maybe with help from the original author), if you're interested. It would involve making a custom RL environment that would in the fixed policies of the other players that DQN could train on.
Hi @lanctot,
Thank you for your reply. In fact, I am currently writing the code and trying to make the policy gradient algorithms (the version in OpenSpiel) an oracle for PSRO. I don't know how general the code is going to be because the DRL codes (DQN, A2C, etc.) in OpenSpiel are customed to a multi-agent setting. What I am doing is that suppose PSRO starts with a uniform strategy for each player. In each iteration, I keep the DRL agent in a training model for the current player who is training while fixing other players' agents by setting the flag is_evalution to be True in agent.step(time_step, is_evaluation=True). Obviously, my code is highly specific to the RL code in OpenSpiel.
Moreover, I found that the Nash solver in OpenSpiel now can only solve two-player zero-sum games. Another thing I am doing is to add a more general Nash solver to OpenSpiel, which can be used in the double-oracle algorithm or others that need Nash equilibrium.
That sounds great, and it's exactly what I had in mind. I'm not worried if the PSRO implementation here would be highly specific to the RL code in OpenSpiel; it's in OpenSpiel for that reason, provided as an example. If people want to generalize it to other RL algorithms or frameworks, they are welcome to.
BTW, there is an example of solving a (2-player) general-sum matrix game here (using nashpy): https://github.com/deepmind/open_spiel/blob/master/open_spiel/python/examples/matrix_nash.py but it seems like we never put that into a general library. I agree, it would be good to have that as a general function that can just be called.
Would be great to submit a PR with these additions when you think it's ready!
Hi @wyz2368 , as we have been discussing over email, we are also working on DeepRL oracles for PSRO internally (and by 'we', I mean almost entirely @paulfmmuller!!) Just updating the thread here to let others know that we plan to release the code, but might take several weeks for review since it's a large change.
Quick follow-up, thanks to the work of @PaulFMMuller, Monday's update will include all of his implementations. Quoting an email from him:
"It will introduce a number of breaking changes ; we have for the moment identified the following ones : - Oracles now take in a list of list of dictionaries specifying training parameters, and therefore, all former oracles are now deprecated (But new ones have been added) - EvolutionaryOracle has been removed. - (minor) file name changes, helper functions moved to new files, function name changes
In counterpart, it will introduce: - New oracles (Exact Best Response, RL Oracle supporting Policy Gradient and DQN) - Self-Play training - Symmetric game optimizations - A Policy Aggregator working with Joint Probabilities - An actual example running on Kuhn, Leduc, ..., and computing exploitabilities - Misc. refactorizations and code improvements."
In addition, he has reproduced the original results from Lanctot et al. 2017 on Leduc (even improved it down to NashConv of 0.46!
Hi there ! The internal reviews have taken longer than anticipated, and unfortunately, the whole of the update hasn't made it to this Monday's code update ; only small parts have been included. Nevertheless, things are drawing to a close, and we're anticipating the update to soon be submitted, apologies if you were hoping to start working on it today :/
I believe all of Paul's implementations are in the code base now, so closing this. Please re-open if you want to discuss further! Thanks again, Paul!
Thanks! @lanctot @PaulFMMuller :)))