Replaced the check for sequential games with a turn based one. This also
includes the mean-field games that we want to use under Acme.
@@ -23,7 +23,6 @@ import dm_env
import numpy as np
# pytype: disable=import-error
from open_spiel.python import rl_environment
-import pyspiel
# pytype: enable=import-error
@@ -43,9 +42,8 @@ class OpenSpielWrapper(dm_env.Environment):
def __init__(self, environment: rl_environment.Environment):
self._environment = environment
self._reset_next_step = True
- if environment.game.get_type(
- ).dynamics != pyspiel.GameType.Dynamics.SEQUENTIAL:
- raise ValueError("Currently only supports sequential games.")
+ if not environment.is_turn_based:
+ raise ValueError("Currently only supports turn based games.")
def reset(self) -> dm_env.TimeStep:
"""Resets the episode."""
