Closed GaoZiHong closed 10 months ago
Hi @GaoZiHong,
Laser Tag is available. This is due to a bug in the example, which assumes two things: the InformationStateTensor is implemented for all games (which is not true) and that every game has a "players" parameter which is also not true.
If you disable the line accessing the information state tensor and load it with an empty parameter list, it should work.
We will fix soon, thanks for reporting!
Thank you! i found some other problems. when i run pyspiel.load_game("laser_tag") and use BR as oracle, i get the following errors: File "/home/gaozh/psro-ipdc/psro_ipdc/get_all_states.py", line 75, in _get_subgames_states stop_if_encountered) File "/home/gaozh/psro-ipdc/psro_ipdc/get_all_states.py", line 68, in _get_subgames_states stop_if_encountered) File "/home/gaozh/psro-ipdc/psro_ipdc/get_all_states.py", line 32, in _get_subgames_states is_mean_field = state.current_player() == pyspiel.PlayerId.MEAN_FIELD RecursionError: maximum recursion depth exceeded while calling a Python object
when i use dqn as oracle, i get the following errors:
Using 1000 sims per entry.
Rectifier :
Perturbating oracle outputs : False
Sampling from marginals : True
Using <function alpharank_strategy at 0x7f1175cc1048> as strategy method.
Using <function filter_function_factory.
i found that in the game laser_tag, the state is different with other game, for example, the state.current_player() cannot return correct value. how could i solve these problems? what's the correct way to use laser_tag game?
Hi @GaoZiHong,
Laser Tag is a simultanous move game. So it will return the kSimultaneousPlayerId
(== -2) for current_player() at decisions nodes.
So my guess is that you're using it in a context that assumes the turn-based setting. You can translate any simultaneous game into a turn-based one through a wrapper. Here is an example of how to do that:
pyspiel.load_game("turn_based_simultaneous_game(game=blotto(players=3,coins=5))")
In your case:
pyspiel.load_game("turn_based_simultaneous_game(game=laser_tag())")
I recommend taking a look at the OpenSpiel paper section 3 to read more about how games are formalized in OpenSpiel (specifically how simultaneous-move games compare to turn-based extensive-form games).
Thank you very much!!! I run the code, pyspiel.load_game("turn_based_simultaneous_game(game=laser_tag())"), and make the following changes: In the file rl_policy.py, information_state_tensor should be replaced by observation_tensor. The maximum recursion depth should be set to a larger value, such as 5000, to avoid the problem of exceeding the recursion depth when executing sample_episode. Thanks again for your great contribution!
We will fix soon, thanks for reporting!
Ok.. wasn't "soon" but better late than never? https://github.com/google-deepmind/open_spiel/pull/1161 :)
Is laser_tag not available for this game? When I run example --game=laser_tag, the following message appears: Creating game..
Starting new game... Initial state: State: ....... ....... ..... ... ..... ....... ....... Orientations: 1 1 Chance Node player -1 sampled outcome: (spawned at location #2) State: ....... ....... ..... ... ..... ....... B...... Orientations: 1 1 Chance Node player -1 sampled outcome: (spawned at location #1) State: ......A ....... ..... ... ..... ....... B...... Orientations: 1 1
player -2 Spiel Fatal Error: InformationStateTensorShape unimplemented. When I run pyspiel.load_game("laser_tag",{"players": 2}) I get the following error: pyspiel.SpielError: Unknown parameter 'players'. Available parameters are: grid, horizon, zero_sum