Skip to content

[Feature] OpenSpiel integration/support #80

@lanctot

Description

@lanctot

There has been some initial discussion regarding integration between ACME and OpenSpiel to enable large-scale RL in games. I'm tagging everyone who has been involved, hopefully we can use this thread to coordinate: @jhtschultz @fastturtle @mwhoffman @bshahr.

My first questions usually concern the use cases for games, things like legal versus illegal actions (more generally, a subset of actions being available at state s, A(s) \in A, from a larger "full set" A), and handling of things multiple agents receiving observations and submitting actions, maybe using turn-based dynamics over states etc.

Regarding, legal actions, since OpenSpiel includes the legal actions in its observations, at first glance one solution seems like changing the policy network (e.g. here: https://github.com/deepmind/acme/blob/9dd7058e1ca3b21721f0f10ad0d8a15fbbcb1cee/acme/agents/tf/mpo/agent.py#L49) to one that knows about illegal moves actions and handles them accordingly. One thing has been problematic in the past: it's over the algorithm itself that needs to know about the legal actions, for example DQN when it computes its target value, it needs to apply its max_{a' \in A(s')) Q(s',a') which requires the legal actions. @fastturtle this seems like it might require customizing the individual agents. Do you agree? If so, do you see an easy way out of hand-customizing all the agents?

Regarding the agent interactions with the environment, it seems like we could write a custom Environment Loop that would call into the underlying OpenSpiel state and apply actions as necessary, distribute rewards and observations. This seems similar to what is currently done in the OpenSpiel rl_environment and example learning loop.

I will start there. I would be delighted if we can achieve some smooth integration across these projects!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions