Skip to content

Box or multidiscrete?

In line 125 of file conservation_game.py, you have: "state": Box(0, grid_size, shape=(2,))

Shouldn't you use Multidiscrete, instead of Box, since coordinates are discrete?

            **{
                ranger: Dict(
                    {
                        "state": Box(
                            0, grid_size, shape=(2,)
                        ),  # ranger state is location
                        "partners": MultiBinary(
                            nrangers
                        ),  # for the list of rangers sharing the cell
                        "poacher_traps": Dict(
                            {
                                poacher: Box(0, self.ntraps_per_poacher, shape=(2,))
                                for poacher in self.poachers
                            }
                        ),  # For the traps and prey recovered from poacher capture
                        "ground_traps": Box(
                            0, self.ntraps_per_poacher, shape=(2,)
                        ),  # For traps recovered from the grid
                    }
                )
                for ranger in self.rangers
            },