Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Integration for OpenSpiel environments #2133

Open
1 task done
Brunozml opened this issue Apr 29, 2024 · 1 comment
Open
1 task done

[Feature Request] Integration for OpenSpiel environments #2133

Brunozml opened this issue Apr 29, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Brunozml
Copy link

Motivation

It would be great to be able to use OpenSpiel's environments with TorchRL.

Solution

Its rl_environment interface is basically identical to that of gym, so the integration should relatively straightforward. I'm more than willing to help achieve this.

Alternatives

I'm not sure if it's already possible to do this using GymLikeEnv, but so far my experimentation has failed.

Additional context

Checklist

  • I have checked that there is no similar issue in the repo (required)
@Brunozml Brunozml added the enhancement New feature or request label Apr 29, 2024
@vmoens
Copy link
Contributor

vmoens commented Apr 29, 2024

That would be wonderful!

Never tried it to be completely open about that.

Looking at it the API seems quite different from the one from gym.

IIUC, the steps to achieve this would be:

  • map actions to tensors, map states to tensors
  • find a generic way to generate specs, check that actions and states mapped above are within the specs, and that specs generate valid states and action at random
  • I guess the env will be stateless so we will need a copy of the state specs in state_spec and observation_spec

Concretely, I'd love to see a dummy rollout where we get the state (represented as a single array or multiple arrays or tensors) and the action (idem).

If the games have anything remotely related to "specs" i'd like to see them too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants