# Path: pysc2/agents/random_agent.py
# class RandomAgent(base_agent.BaseAgent):
#   def step(self, obs):
# 
# 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/tests/utils.py
# class TestCase(absltest.TestCase):
# class GameReplayTestCase(TestCase):
#   def setUp(self):
#   def tearDown(self):
# def get_units(obs, filter_fn=None, owner=None, unit_type=None, tag=None):
# def get_unit(*args, **kwargs):
# def xy_locs(mask):
# def only_in_game(func):
#   def decorator(self, *args, **kwargs):
#   def setup(**kwargs):
#     def decorator(func):  # pylint: disable=missing-docstring
#       def _setup(self):  # pylint: disable=missing-docstring
#         def test_in_game():
#         def test_in_replay():
#   def start_game(self, show_cloaked=True, disable_fog=False, players=2):
#   def start_replay(self):
#   def close(self):  # Instead of tearDown.
#   def step(self, count=4):
#   def observe(self, disable_fog=False):
#   def move_camera(self, x, y):
#   def raw_unit_command(self, player, ability_id, unit_tags, pos=None,
#                        target=None):
#   def debug(self, player=0, **kwargs):
#   def god(self):
#   def create_unit(self, unit_type, owner, pos, quantity=1):
#   def kill_unit(self, unit_tags):
#   def set_energy(self, tag, energy):
#   def assert_point(self, proto_pos, pos):
#   def assert_layers(self, layers, pos, **kwargs):
#   def assert_unit(self, unit, **kwargs):


from absl.testing import absltest
from future.builtins import range  # pylint: disable=redefined-builtin
from pysc2.agents import random_agent
from pysc2.env import sc2_env
from pysc2.tests import utils
import six
        map_name="Simple64",
        players=[
            sc2_env.Agent(sc2_env.Race.random),
            sc2_env.Agent(sc2_env.Race.random)
        ],
        agent_interface_format=[
            sc2_env.AgentInterfaceFormat(
                feature_dimensions=sc2_env.Dimensions(
                    screen=(84, 87),
                    minimap=(64, 67)
                )
            ),
            sc2_env.AgentInterfaceFormat(
                rgb_dimensions=sc2_env.Dimensions(
                    screen=128,
                    minimap=64
                )
            )
        ]) as env:

      obs_specs = env.observation_spec()
      self.assertIsInstance(obs_specs, tuple)
      self.assertLen(obs_specs, 2)

      actions_specs = env.action_spec()
      self.assertIsInstance(actions_specs, tuple)
      self.assertLen(actions_specs, 2)

      agents = []
      for obs_spec, action_spec in zip(obs_specs, actions_specs):

# Path: pysc2/agents/random_agent.py
# class RandomAgent(base_agent.BaseAgent):
#   def step(self, obs):
# 
# 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/tests/utils.py
# class TestCase(absltest.TestCase):
# class GameReplayTestCase(TestCase):
#   def setUp(self):
#   def tearDown(self):
# def get_units(obs, filter_fn=None, owner=None, unit_type=None, tag=None):
# def get_unit(*args, **kwargs):
# def xy_locs(mask):
# def only_in_game(func):
#   def decorator(self, *args, **kwargs):
#   def setup(**kwargs):
#     def decorator(func):  # pylint: disable=missing-docstring
#       def _setup(self):  # pylint: disable=missing-docstring
#         def test_in_game():
#         def test_in_replay():
#   def start_game(self, show_cloaked=True, disable_fog=False, players=2):
#   def start_replay(self):
#   def close(self):  # Instead of tearDown.
#   def step(self, count=4):
#   def observe(self, disable_fog=False):
#   def move_camera(self, x, y):
#   def raw_unit_command(self, player, ability_id, unit_tags, pos=None,
#                        target=None):
#   def debug(self, player=0, **kwargs):
#   def god(self):
#   def create_unit(self, unit_type, owner, pos, quantity=1):
#   def kill_unit(self, unit_tags):
#   def set_energy(self, tag, energy):
#   def assert_point(self, proto_pos, pos):
#   def assert_layers(self, layers, pos, **kwargs):
#   def assert_unit(self, unit, **kwargs):


# Path: pysc2/tests/obs_spec_test.py
from absl.testing import absltest
from future.builtins import range  # pylint: disable=redefined-builtin
from pysc2.agents import random_agent
from pysc2.env import sc2_env
from pysc2.tests import utils
import six

        map_name="Simple64",
        players=[
            sc2_env.Agent(sc2_env.Race.random),
            sc2_env.Agent(sc2_env.Race.random)
        ],
        agent_interface_format=[
            sc2_env.AgentInterfaceFormat(
                feature_dimensions=sc2_env.Dimensions(
                    screen=(84, 87),
                    minimap=(64, 67)
                )
            ),
            sc2_env.AgentInterfaceFormat(
                rgb_dimensions=sc2_env.Dimensions(
                    screen=128,
                    minimap=64
                )
            )
        ]) as env:

      obs_specs = env.observation_spec()
      self.assertIsInstance(obs_specs, tuple)
      self.assertLen(obs_specs, 2)

      actions_specs = env.action_spec()
      self.assertIsInstance(actions_specs, tuple)
      self.assertLen(actions_specs, 2)

      agents = []
      for obs_spec, action_spec in zip(obs_specs, actions_specs):

        agent = random_agent.RandomAgent()