Skip to content

Muzero crashes when choosing spiel/backgammon #225

@artshar

Description

@artshar

Search before asking

  • I have searched the MuZero issues and found no similar bug report.

🐛 Describe the bug

Welcome to MuZero! Here's a list of games:
0. atari

  1. breakout
  2. cartpole
  3. connect4
  4. gomoku
  5. gridworld
  6. lunarlander
  7. simple_grid
  8. spiel
  9. tictactoe
  10. twentyone
    Enter a number to choose the game: 8
    2023-08-29 23:03:34,908 INFO worker.py:1621 -- Started a local Ray instance.
    Traceback (most recent call last):
    File "/home/server/muzero-general/muzero.py", line 650, in
    muzero = MuZero(game_name)
    ^^^^^^^^^^^^^^^^^
    File "/home/server/muzero-general/muzero.py", line 122, in init
    self.checkpoint["weights"], self.summary = copy.deepcopy(ray.get(cpu_weights))
    ^^^^^^^^^^^^^^^^^^^^
    File "/home/server/miniconda3/lib/python3.11/site-packages/ray/_private/auto_init_hook.py", line 24, in auto_init_wrapper
    return fn(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^
    File "/home/server/miniconda3/lib/python3.11/site-packages/ray/_private/client_mode_hook.py", line 103, in wrapper
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "/home/server/miniconda3/lib/python3.11/site-packages/ray/_private/worker.py", line 2524, in get
    raise value.as_instanceof_cause()
    ray.exceptions.RayTaskError(IndexError): ray::CPUActor.get_initial_weights() (pid=14044, ip=192.168.0.206, actor_id=cb6f54b46087791a64e1e24101000000, repr=<muzero.CPUActor object at 0x7fe752d29790>)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/server/muzero-general/muzero.py", line 489, in get_initial_weights
    model = models.MuZeroNetwork(config)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/home/server/muzero-general/models.py", line 23, in new
    return MuZeroResidualNetwork(
    ^^^^^^^^^^^^^^^^^^^^^^
    File "/home/server/muzero-general/models.py", line 463, in init
    else (reduced_channels_reward * observation_shape[1] * observation_shape[2])
    ~~~~~~~~~~~~~~~~~^^^
    IndexError: tuple index out of range

Add an example

image

Environment

Python 3.11.5(3.10.12)
Ubuntu 22.04
tourch 2.0.1+cu117

Minimal Reproducible Example

games/spiel.py line 23
game = pyspiel.load_game("backgammon")

python3.11 muzero.py
choose the game: 8

Additional

the error is reproduced on different hardware

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions