# Path: pysc2/env/mock_sc2_env.py
# DUMMY_MAP_SIZE = point.Point(256, 256)
# class _TestEnvironment(environment.Base):
# class SC2TestEnv(_TestEnvironment):
#   def __init__(self, num_agents, observation_spec, action_spec):
#   def reset(self):
#   def step(self, actions, step_mul=None):
#   def action_spec(self):
#   def observation_spec(self):
#   def _default_observation(self, obs_spec, agent_index):
#   def __init__(self,
#                _only_use_kwargs=None,
#                map_name=None,
#                players=None,
#                agent_interface_format=None,
#                discount=1.,
#                discount_zero_after_timeout=False,
#                visualize=False,
#                step_mul=None,
#                realtime=False,
#                save_replay_episodes=0,
#                replay_dir=None,
#                game_steps_per_episode=None,
#                score_index=None,
#                score_multiplier=None,
#                random_seed=None,
#                disable_fog=False,
#                ensure_available_actions=True,
#                version=None):
#   def save_replay(self, *args, **kwargs):
#   def _default_observation(self, obs_spec, agent_index):
# 
# Path: pysc2/env/sc2_env.py
# class Race(enum.IntEnum):
# class Difficulty(enum.IntEnum):
# class BotBuild(enum.IntEnum):
# class Agent(collections.namedtuple("Agent", ["race", "name"])):
# class Bot(collections.namedtuple("Bot", ["race", "difficulty", "build"])):
# class SC2Env(environment.Base):
# def to_list(arg):
# def get_default(a, b):
#   def __new__(cls, race, name=None):
#   def __new__(cls, race, difficulty, build=None):
#   def __init__(self,  # pylint: disable=invalid-name
#                _only_use_kwargs=None,
#                map_name=None,
#                battle_net_map=False,
#                players=None,
#                agent_interface_format=None,
#                discount=1.,
#                discount_zero_after_timeout=False,
#                visualize=False,
#                step_mul=None,
#                realtime=False,
#                save_replay_episodes=0,
#                replay_dir=None,
#                replay_prefix=None,
#                game_steps_per_episode=None,
#                score_index=None,
#                score_multiplier=None,
#                random_seed=None,
#                disable_fog=False,
#                ensure_available_actions=True,
#                version=None):
#   def _finalize(self, visualize):
#   def _get_interface(agent_interface_format, require_raw):
#   def _launch_game(self):
#   def _create_join(self):
#   def map_name(self):
#   def game_info(self):
#   def static_data(self):
#   def observation_spec(self):
#   def action_spec(self):
#   def action_delays(self):
#   def _restart(self):
#   def reset(self):
#   def step(self, actions, step_mul=None):
#   def _step(self, step_mul=None):
#   def _apply_action_delays(self, actions):
#   def _send_delayed_actions(self, up_to_game_loop, current_game_loop):
#   def _step_to(self, game_loop, current_game_loop):
#   def _get_observations(self, target_game_loop):
#     def parallel_observe(c, f):
#   def _observe(self, target_game_loop):
#     def zero_on_first_step(value):
#   def send_chat_messages(self, messages, broadcast=True):
#   def save_replay(self, replay_dir, prefix=None):
#   def close(self):
# def crop_and_deduplicate_names(names):
# REALTIME_GAME_LOOP_SECONDS = 1 / 22.4
# MAX_STEP_COUNT = 524000  # The game fails above 2^19=524288 steps.
# NUM_ACTION_DELAY_BUCKETS = 10


from absl.testing import absltest
from pysc2.env import mock_sc2_env
from pysc2.env import sc2_env
#!/usr/bin/python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests that mock environment has same shape outputs as true environment."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function




class TestCompareEnvironments(absltest.TestCase):

  @classmethod
  def setUpClass(cls):
    super(TestCompareEnvironments, cls).setUpClass()
    players = [

# Path: pysc2/env/mock_sc2_env.py
# DUMMY_MAP_SIZE = point.Point(256, 256)
# class _TestEnvironment(environment.Base):
# class SC2TestEnv(_TestEnvironment):
#   def __init__(self, num_agents, observation_spec, action_spec):
#   def reset(self):
#   def step(self, actions, step_mul=None):
#   def action_spec(self):
#   def observation_spec(self):
#   def _default_observation(self, obs_spec, agent_index):
#   def __init__(self,
#                _only_use_kwargs=None,
#                map_name=None,
#                players=None,
#                agent_interface_format=None,
#                discount=1.,
#                discount_zero_after_timeout=False,
#                visualize=False,
#                step_mul=None,
#                realtime=False,
#                save_replay_episodes=0,
#                replay_dir=None,
#                game_steps_per_episode=None,
#                score_index=None,
#                score_multiplier=None,
#                random_seed=None,
#                disable_fog=False,
#                ensure_available_actions=True,
#                version=None):
#   def save_replay(self, *args, **kwargs):
#   def _default_observation(self, obs_spec, agent_index):
# 
# Path: pysc2/env/sc2_env.py
# class Race(enum.IntEnum):
# class Difficulty(enum.IntEnum):
# class BotBuild(enum.IntEnum):
# class Agent(collections.namedtuple("Agent", ["race", "name"])):
# class Bot(collections.namedtuple("Bot", ["race", "difficulty", "build"])):
# class SC2Env(environment.Base):
# def to_list(arg):
# def get_default(a, b):
#   def __new__(cls, race, name=None):
#   def __new__(cls, race, difficulty, build=None):
#   def __init__(self,  # pylint: disable=invalid-name
#                _only_use_kwargs=None,
#                map_name=None,
#                battle_net_map=False,
#                players=None,
#                agent_interface_format=None,
#                discount=1.,
#                discount_zero_after_timeout=False,
#                visualize=False,
#                step_mul=None,
#                realtime=False,
#                save_replay_episodes=0,
#                replay_dir=None,
#                replay_prefix=None,
#                game_steps_per_episode=None,
#                score_index=None,
#                score_multiplier=None,
#                random_seed=None,
#                disable_fog=False,
#                ensure_available_actions=True,
#                version=None):
#   def _finalize(self, visualize):
#   def _get_interface(agent_interface_format, require_raw):
#   def _launch_game(self):
#   def _create_join(self):
#   def map_name(self):
#   def game_info(self):
#   def static_data(self):
#   def observation_spec(self):
#   def action_spec(self):
#   def action_delays(self):
#   def _restart(self):
#   def reset(self):
#   def step(self, actions, step_mul=None):
#   def _step(self, step_mul=None):
#   def _apply_action_delays(self, actions):
#   def _send_delayed_actions(self, up_to_game_loop, current_game_loop):
#   def _step_to(self, game_loop, current_game_loop):
#   def _get_observations(self, target_game_loop):
#     def parallel_observe(c, f):
#   def _observe(self, target_game_loop):
#     def zero_on_first_step(value):
#   def send_chat_messages(self, messages, broadcast=True):
#   def save_replay(self, replay_dir, prefix=None):
#   def close(self):
# def crop_and_deduplicate_names(names):
# REALTIME_GAME_LOOP_SECONDS = 1 / 22.4
# MAX_STEP_COUNT = 524000  # The game fails above 2^19=524288 steps.
# NUM_ACTION_DELAY_BUCKETS = 10


# Path: pysc2/env/mock_sc2_env_comparison_test.py
from absl.testing import absltest
from pysc2.env import mock_sc2_env
from pysc2.env import sc2_env

#!/usr/bin/python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS-IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Tests that mock environment has same shape outputs as true environment."""

from __future__ import absolute_import
from __future__ import division
from __future__ import print_function




class TestCompareEnvironments(absltest.TestCase):

  @classmethod
  def setUpClass(cls):
    super(TestCompareEnvironments, cls).setUpClass()
    players = [

        sc2_env.Agent(race=sc2_env.Race.terran),