(WIP) Creating Environments: Testing Your Environment#
Now that our environment is complete, we can test it to make sure it works as intended. PettingZoo has a built-in testing suite that can be used to test your environment.
(add this code below the rest of the code in the file)
return MultiDiscrete([7 * 7 - 1] * 3) @functools.lru_cache(maxsize=None) def action_space(self, agent): return Discrete(4) from pettingzoo.test import parallel_api_test # noqa: E402 if __name__ == "__main__": parallel_api_test(CustomEnvironment(), num_cycles=1_000_000)