SYMBOL INDEX (1456 symbols across 157 files) FILE: pysc2/__init__.py function load_tests (line 19) | def load_tests(loader, standard_tests, unused_pattern): FILE: pysc2/agents/base_agent.py class BaseAgent (line 19) | class BaseAgent(object): method __init__ (line 25) | def __init__(self): method setup (line 32) | def setup(self, obs_spec, action_spec): method reset (line 36) | def reset(self): method step (line 39) | def step(self, obs): FILE: pysc2/agents/no_op_agent.py class NoOpAgent (line 21) | class NoOpAgent(base_agent.BaseAgent): method step (line 24) | def step(self, obs): FILE: pysc2/agents/random_agent.py class RandomAgent (line 22) | class RandomAgent(base_agent.BaseAgent): method step (line 25) | def step(self, obs): FILE: pysc2/agents/scripted_agent.py function _xy_locs (line 30) | def _xy_locs(mask): class MoveToBeacon (line 36) | class MoveToBeacon(base_agent.BaseAgent): method step (line 39) | def step(self, obs): class CollectMineralShards (line 52) | class CollectMineralShards(base_agent.BaseAgent): method step (line 55) | def step(self, obs): class CollectMineralShardsFeatureUnits (line 71) | class CollectMineralShardsFeatureUnits(base_agent.BaseAgent): method setup (line 80) | def setup(self, obs_spec, action_spec): method reset (line 85) | def reset(self): method step (line 90) | def step(self, obs): class CollectMineralShardsRaw (line 128) | class CollectMineralShardsRaw(base_agent.BaseAgent): method setup (line 136) | def setup(self, obs_spec, action_spec): method reset (line 141) | def reset(self): method step (line 146) | def step(self, obs): class DefeatRoaches (line 175) | class DefeatRoaches(base_agent.BaseAgent): method step (line 178) | def step(self, obs): class DefeatRoachesRaw (line 196) | class DefeatRoachesRaw(base_agent.BaseAgent): method setup (line 199) | def setup(self, obs_spec, action_spec): method step (line 204) | def step(self, obs): FILE: pysc2/bin/agent.py function run_thread (line 83) | def run_thread(agent_classes, players, map_name, visualize): function main (line 108) | def main(unused_argv): function entry_point (line 154) | def entry_point(): # Needed so setup.py scripts work. FILE: pysc2/bin/agent_remote.py function main (line 113) | def main(unused_argv): function agent (line 120) | def agent(): function human (line 151) | def human(): function entry_point (line 228) | def entry_point(): # Needed so setup.py scripts work. FILE: pysc2/bin/battle_net_maps.py function main (line 22) | def main(unused_argv): FILE: pysc2/bin/benchmark_observe.py function interface_options (line 38) | def interface_options(score=False, raw=False, features=None, rgb=None, function main (line 83) | def main(unused_argv): FILE: pysc2/bin/benchmark_replay.py function main (line 47) | def main(argv): FILE: pysc2/bin/check_apm.py function get_units (line 31) | def get_units(obs, filter_fn=None, owner=None, unit_type=None, tag=None): function get_unit (line 42) | def get_unit(*args, **kwargs): function _xy_locs (line 50) | def _xy_locs(mask): class Env (line 56) | class Env(object): method __init__ (line 59) | def __init__(self): method close (line 70) | def close(self): method __enter__ (line 78) | def __enter__(self): method __exit__ (line 81) | def __exit__(self, unused_exception_type, unused_exc_value, unused_tra... method __del__ (line 84) | def __del__(self): method step (line 87) | def step(self, count=22): method fl_obs (line 91) | def fl_obs(self, obs): method raw_unit_command (line 94) | def raw_unit_command(self, ability_id, unit_tags, pos=None, target=None): method fl_action (line 114) | def fl_action(self, obs, act, *args): method check_apm (line 118) | def check_apm(self, name): function main (line 152) | def main(unused_argv): FILE: pysc2/bin/compare_binaries.py function _clear_non_deterministic_fields (line 44) | def _clear_non_deterministic_fields(obs): function _is_remote (line 56) | def _is_remote(arg): function main (line 60) | def main(argv): FILE: pysc2/bin/gen_actions.py function get_data (line 36) | def get_data(): function generate_name (line 55) | def generate_name(ability): function sort_key (line 60) | def sort_key(data, ability): function generate_csv (line 69) | def generate_csv(data): function generate_py_abilities (line 124) | def generate_py_abilities(data): function main (line 157) | def main(unused_argv): FILE: pysc2/bin/gen_data.py function get_data (line 28) | def get_data(): function generate_py_units (line 47) | def generate_py_units(data): function generate_py_buffs (line 68) | def generate_py_buffs(data): function generate_py_upgrades (line 79) | def generate_py_upgrades(data): function main (line 90) | def main(unused_argv): FILE: pysc2/bin/gen_versions.py function main (line 25) | def main(argv): FILE: pysc2/bin/map_list.py function main (line 22) | def main(unused_argv): FILE: pysc2/bin/mem_leak_check.py class Timestep (line 60) | class Timestep(collections.namedtuple( method __str__ (line 63) | def __str__(self): function main (line 67) | def main(unused_argv): FILE: pysc2/bin/play.py function main (line 84) | def main(unused_argv): function entry_point (line 225) | def entry_point(): # Needed so setup.py scripts work. FILE: pysc2/bin/play_vs_agent.py function main (line 107) | def main(unused_argv): function agent (line 114) | def agent(): function human (line 153) | def human(): function entry_point (line 284) | def entry_point(): # Needed so setup.py scripts work. FILE: pysc2/bin/reencode_replays.py function main (line 32) | def main(_): FILE: pysc2/bin/replay_actions.py function sorted_dict_str (line 56) | def sorted_dict_str(d): class ReplayStats (line 61) | class ReplayStats(object): method __init__ (line 64) | def __init__(self): method merge (line 84) | def merge(self, other): method __str__ (line 109) | def __str__(self): class ProcessStats (line 143) | class ProcessStats(object): method __init__ (line 146) | def __init__(self, proc_id): method update (line 153) | def update(self, stage): method __str__ (line 157) | def __str__(self): function valid_replay (line 166) | def valid_replay(info, ping): class ReplayProcessor (line 182) | class ReplayProcessor(multiprocessing.Process): method __init__ (line 185) | def __init__(self, proc_id, run_config, replay_queue, stats_queue): method run (line 192) | def run(self): method _print (line 249) | def _print(self, s): method _update_stage (line 253) | def _update_stage(self, stage): method process_replay (line 257) | def process_replay(self, controller, replay_data, map_data, player_id): function stats_printer (line 320) | def stats_printer(stats_queue): function replay_queue_filler (line 351) | def replay_queue_filler(replay_queue, replay_list): function main (line 357) | def main(unused_argv): FILE: pysc2/bin/replay_info.py function _replay_index (line 33) | def _replay_index(replay_dir): function _replay_info (line 104) | def _replay_info(replay_path): function main (line 122) | def main(argv): function entry_point (line 138) | def entry_point(): # Needed so the setup.py scripts work. FILE: pysc2/bin/replay_version.py function main (line 25) | def main(argv): FILE: pysc2/bin/update_battle_net_cache.py function mkdirs (line 38) | def mkdirs(*paths): function test_looks_like_battle_net (line 44) | def test_looks_like_battle_net(path): function replay_paths (line 52) | def replay_paths(paths): function update_battle_net_cache (line 63) | def update_battle_net_cache(replays, bnet_base): function main (line 108) | def main(argv): FILE: pysc2/bin/valid_actions.py function main (line 30) | def main(unused_argv): FILE: pysc2/env/available_actions_printer.py class AvailableActionsPrinter (line 19) | class AvailableActionsPrinter(base_env_wrapper.BaseEnvWrapper): method __init__ (line 22) | def __init__(self, env): method step (line 27) | def step(self, *args, **kwargs): method _print (line 36) | def _print(self, s): FILE: pysc2/env/base_env_wrapper.py class BaseEnvWrapper (line 19) | class BaseEnvWrapper(environment.Base): method __init__ (line 22) | def __init__(self, env): method close (line 25) | def close(self, *args, **kwargs): method action_spec (line 28) | def action_spec(self, *args, **kwargs): method observation_spec (line 31) | def observation_spec(self, *args, **kwargs): method reset (line 34) | def reset(self, *args, **kwargs): method step (line 37) | def step(self, *args, **kwargs): method save_replay (line 40) | def save_replay(self, *args, **kwargs): method state (line 44) | def state(self): FILE: pysc2/env/converted_env.py function squeeze_if_necessary (line 36) | def squeeze_if_necessary(x: np.ndarray) -> np.ndarray: function squeeze_spec_if_necessary (line 44) | def squeeze_spec_if_necessary(x): class ConverterFactory (line 52) | class ConverterFactory(typing_extensions.Protocol): method __call__ (line 54) | def __call__(self, game_info: sc2api_pb2.ResponseGameInfo) -> Any: class ConvertedEnvironment (line 58) | class ConvertedEnvironment(dm_env.Environment): method __init__ (line 72) | def __init__(self, method reset (line 96) | def reset(self) -> dm_env.TimeStep: method step (line 106) | def step(self, actions) -> dm_env.TimeStep: method observation_spec (line 141) | def observation_spec(self): method action_spec (line 144) | def action_spec(self): method close (line 147) | def close(self): method send_chat_messages (line 151) | def send_chat_messages(self, messages: Sequence[str], broadcast: bool ... method save_replay (line 158) | def save_replay(self, replay_dir, prefix=None): method action_delays (line 161) | def action_delays(self): method num_players (line 164) | def num_players(self): method is_player_turn (line 167) | def is_player_turn(self): method _convert_timesteps (line 170) | def _convert_timesteps(self, timesteps): class _Stream (line 190) | class _Stream(dm_env.Environment): method __init__ (line 193) | def __init__(self, player: int, environment: '_StreamedEnvironment'): method reset (line 197) | def reset(self) -> dm_env.TimeStep: method step (line 200) | def step(self, action) -> dm_env.TimeStep: method action_spec (line 203) | def action_spec(self): method observation_spec (line 206) | def observation_spec(self): method close (line 209) | def close(self): method save_replay (line 212) | def save_replay(self, replay_dir, prefix=None): class _StreamedEnvironment (line 216) | class _StreamedEnvironment: method __init__ (line 219) | def __init__(self, underlying_env: ConvertedEnvironment): method reset (line 233) | def reset(self, player: int) -> dm_env.TimeStep: method step (line 241) | def step(self, action, player: int) -> dm_env.TimeStep: method action_spec (line 256) | def action_spec(self, player: int): method observation_spec (line 259) | def observation_spec(self, player: int): method close (line 262) | def close(self, player: int): method save_replay (line 268) | def save_replay(self, replay_dir, prefix=None): method _wait_for_other_player (line 272) | def _wait_for_other_player(self): method _player_timestep (line 281) | def _player_timestep(self, player: int): function make_streams (line 290) | def make_streams(converted_environment: ConvertedEnvironment): function _dummy_game_info (line 312) | def _dummy_game_info() -> sc2api_pb2.ResponseGameInfo: class EnvironmentSpec (line 327) | class EnvironmentSpec(NamedTuple): function get_environment_spec (line 332) | def get_environment_spec( function make_converter_factories (line 349) | def make_converter_factories( FILE: pysc2/env/converted_env_test.py function _action (line 33) | def _action(delay: int): function _converter_factory (line 45) | def _converter_factory(game_info: sc2api_pb2.ResponseGameInfo): function _agent_interface_format (line 60) | def _agent_interface_format(): class StreamedEnvTest (line 65) | class StreamedEnvTest(absltest.TestCase): method _check_episode (line 67) | def _check_episode(self, stream): method test_single_player (line 77) | def test_single_player(self): method test_two_player (line 95) | def test_two_player(self): class StreamedEnvConformanceTest (line 122) | class StreamedEnvConformanceTest(test_utils.EnvironmentTestMixin, method make_object_under_test (line 125) | def make_object_under_test(self): FILE: pysc2/env/converter/cc/castops.h function namespace (line 22) | namespace pysc2 { FILE: pysc2/env/converter/cc/check_protos_equal.h function namespace (line 23) | namespace pysc2 { FILE: pysc2/env/converter/cc/convert_obs.cc type pysc2 (line 30) | namespace pysc2 { function GameLoop (line 85) | dm_env_rpc::v1::Tensor GameLoop( function PlayerCommon (line 91) | dm_env_rpc::v1::Tensor PlayerCommon(const SC2APIProtocol::Observation&... function MapPlayerIdToOne (line 111) | dm_env_rpc::v1::Tensor MapPlayerIdToOne(const dm_env_rpc::v1::Tensor& ... function Upgrades (line 117) | dm_env_rpc::v1::Tensor Upgrades(const SC2APIProtocol::Observation& obs) { function UpgradesUint8FixedLength (line 129) | dm_env_rpc::v1::Tensor UpgradesUint8FixedLength( function RawUnitsSpec (line 140) | dm_env_rpc::v1::TensorSpec RawUnitsSpec(int max_unit_count, int num_un... function RawUnitsFullVec (line 218) | dm_env_rpc::v1::Tensor RawUnitsFullVec( function RawUnitsToUint8 (line 500) | dm_env_rpc::v1::Tensor RawUnitsToUint8(const dm_env_rpc::v1::Tensor& t... function CameraPosition (line 521) | dm_env_rpc::v1::Tensor CameraPosition( function CameraSize (line 544) | dm_env_rpc::v1::Tensor CameraSize(const SC2APIProtocol::Size2DI& raw_r... function SeparateCamera (line 559) | dm_env_rpc::v1::Tensor SeparateCamera( function GetUnitTypeIndex (line 590) | int GetUnitTypeIndex(int unit_type_id, bool using_uint8_unit_ids) { function UnitCounts (line 598) | dm_env_rpc::v1::Tensor UnitCounts(const SC2APIProtocol::Observation& obs, function AddUnitCountsBowData (line 633) | dm_env_rpc::v1::Tensor AddUnitCountsBowData( FILE: pysc2/env/converter/cc/convert_obs.h function namespace (line 33) | namespace pysc2 { FILE: pysc2/env/converter/cc/convert_obs_test.cc type pysc2 (line 31) | namespace pysc2 { function TEST (line 39) | TEST(ConvertObs, FeatureLayerFieldIndicesAreInOrderSpecified) { function TEST (line 47) | TEST(ConvertObsDeathTest, FeatureLayerFieldIndicesDiesIfLayerNotFound) { function TEST (line 54) | TEST(ConvertObs, FeatureLayers8Bit) { function TEST (line 78) | TEST(ConvertObsDeathTest, FeatureLayers8BitDiesIfLayerNameMismatch) { function TEST (line 96) | TEST(ConvertObs, RawUnitsFullVecTerranAddonPopulated) { FILE: pysc2/env/converter/cc/converter.cc type pysc2 (line 37) | namespace pysc2 { function MakeConverter (line 45) | absl::StatusOr MakeConverter( FILE: pysc2/env/converter/cc/converter.h function namespace (line 28) | namespace pysc2 { FILE: pysc2/env/converter/cc/converter_test.cc type pysc2 (line 34) | namespace pysc2 { function GetKeys (line 50) | std::vector GetKeys( function ToVector (line 61) | std::vector ToVector(const google::protobuf::RepeatedField& repe... function ToVector (line 65) | std::vector ToVector(const dm_env_rpc::v1::TensorSpec::Value& val... function EnvironmentInfo (line 79) | EnvironmentInfo MakeEnvironmentInfo() { function ConverterSettings (line 92) | ConverterSettings MakeSettingsRaw() { function ConverterSettings (line 113) | ConverterSettings MakeSettingsVisual() { function MakeTensor (line 132) | dm_env_rpc::v1::Tensor MakeTensor(int value) { function MakeNoOp (line 138) | absl::flat_hash_map MakeNoOp( function Observation (line 146) | Observation MakeObservation() { function TEST (line 180) | TEST(RawConverterTest, ActionSpec) { function TEST (line 212) | TEST(RawConverterTest, ConvertActionMoveCamera) { function TEST (line 241) | TEST(RawConverterTest, ConvertActionSmartUnit) { function TEST (line 274) | TEST(VisualConverterTest, ActionSpec) { function TEST (line 317) | TEST(VisualConverterTest, ConvertActionMoveCamera) { function TEST (line 344) | TEST(VisualConverterTest, ConvertActionSmartScreen) { class ConverterTest (line 373) | class ConverterTest : public testing::TestWithParam {} function TEST_P (line 375) | TEST_P(ConverterTest, Construction) { function TEST_P (line 382) | TEST_P(ConverterTest, ConvertActionDelay) { function TEST_P (line 396) | TEST_P(ConverterTest, ObservationSpec) { function TEST_P (line 485) | TEST_P(ConverterTest, ObservationMatchesSpec) { FILE: pysc2/env/converter/cc/encode_image_data.h function namespace (line 27) | namespace pysc2 { FILE: pysc2/env/converter/cc/features.cc type pysc2 (line 27) | namespace pysc2 { function GetScreenFeatures (line 71) | std::vector GetScreenFeatures() { function GetMinimapFeatures (line 80) | std::vector GetMinimapFeatures() { function GetScreenFeatureScale (line 93) | absl::StatusOr GetScreenFeatureScale(const absl::string_view name) { function GetMinimapFeatureScale (line 102) | absl::StatusOr GetMinimapFeatureScale(const absl::string_view nam... FILE: pysc2/env/converter/cc/features.h function namespace (line 24) | namespace pysc2 { FILE: pysc2/env/converter/cc/file_util.cc type pysc2 (line 26) | namespace pysc2 { function GetBinaryProto (line 28) | absl::Status GetBinaryProto(absl::string_view filename, function GetTextProto (line 45) | absl::Status GetTextProto(absl::string_view filename, google::protobuf... FILE: pysc2/env/converter/cc/file_util.h function namespace (line 22) | namespace pysc2 { FILE: pysc2/env/converter/cc/game_data/python/uint8_lookup.cc function PYBIND11_MODULE (line 19) | PYBIND11_MODULE(uint8_lookup, m) { FILE: pysc2/env/converter/cc/game_data/python/uint8_lookup_test.py class Uint8LookupTest (line 22) | class Uint8LookupTest(absltest.TestCase): method test_pysc2_to_uint8 (line 24) | def test_pysc2_to_uint8(self): method test_pysc2_to_uint8_buffs (line 28) | def test_pysc2_to_uint8_buffs(self): method test_pysc2_to_uint8_upgrades (line 33) | def test_pysc2_to_uint8_upgrades(self): method test_uint8_to_pysc2 (line 37) | def test_uint8_to_pysc2(self): method test_uint8_to_pysc2_upgrades (line 41) | def test_uint8_to_pysc2_upgrades(self): method test_effect_id_identity (line 45) | def test_effect_id_identity(self): FILE: pysc2/env/converter/cc/game_data/raw_actions.cc type pysc2 (line 19) | namespace pysc2 { FILE: pysc2/env/converter/cc/game_data/raw_actions.h function namespace (line 24) | namespace pysc2 { FILE: pysc2/env/converter/cc/game_data/uint8_lookup.cc type pysc2 (line 28) | namespace pysc2 { function BuildTable (line 452) | absl::flat_hash_map BuildTable( function LookUp (line 463) | int LookUp(int data, const std::array list, function PySc2ToUint8 (line 484) | int PySc2ToUint8(int data) { function PySc2ToUint8Buffs (line 488) | int PySc2ToUint8Buffs(int data) { function PySc2ToUint8Upgrades (line 492) | int PySc2ToUint8Upgrades(int data) { function MaximumUnitTypeId (line 496) | int MaximumUnitTypeId() { function MaximumBuffId (line 500) | int MaximumBuffId() { function Uint8ToPySc2 (line 504) | int Uint8ToPySc2(int utype) { function Uint8ToPySc2Upgrades (line 510) | int Uint8ToPySc2Upgrades(int upgrade_type) { function EffectIdIdentity (line 516) | int EffectIdIdentity(int effect_id) { return effect_id; } FILE: pysc2/env/converter/cc/game_data/uint8_lookup.h function namespace (line 18) | namespace pysc2 { FILE: pysc2/env/converter/cc/game_data/visual_actions.cc type pysc2 (line 19) | namespace pysc2 { FILE: pysc2/env/converter/cc/game_data/visual_actions.h function namespace (line 23) | namespace pysc2 { FILE: pysc2/env/converter/cc/general_order_ids.cc type pysc2 (line 24) | namespace pysc2 { class OrderIdToGeneralLookup (line 27) | class OrderIdToGeneralLookup { method OrderIdToGeneralLookup (line 29) | OrderIdToGeneralLookup() { method Lookup (line 61) | int Lookup(int game_id) const { function OrderIdToGeneralLookup (line 76) | const OrderIdToGeneralLookup& OrderIdToGeneral() { method OrderIdToGeneralLookup (line 29) | OrderIdToGeneralLookup() { method Lookup (line 61) | int Lookup(int game_id) const { function GeneralOrderId (line 83) | int GeneralOrderId(int order_id, int num_action_types) { function GeneralOrderIds (line 92) | void GeneralOrderIds(dm_env_rpc::v1::Tensor* raw_units, int num_action... FILE: pysc2/env/converter/cc/general_order_ids.h function namespace (line 20) | namespace pysc2 { FILE: pysc2/env/converter/cc/map_util.cc type pysc2 (line 24) | namespace pysc2 { function WorldToMinimapPx (line 26) | SC2APIProtocol::PointI WorldToMinimapPx( function WorldToMinimapPx (line 42) | SC2APIProtocol::PointI WorldToMinimapPx( function WorldToMinimapDistance (line 51) | int WorldToMinimapDistance(float distance, function MakeSize2DI (line 58) | SC2APIProtocol::Size2DI MakeSize2DI(int x, int y) { FILE: pysc2/env/converter/cc/map_util.h function namespace (line 20) | namespace pysc2 { FILE: pysc2/env/converter/cc/python/converter.cc class ConverterWrapper (line 28) | class ConverterWrapper { method ConverterWrapper (line 36) | ConverterWrapper(pysc2::Converter converter) method ObservationSpec (line 38) | std::map ObservationSpec() { method ActionSpec (line 49) | std::map ActionSpec() { method ConvertObservation (line 60) | std::map ConvertObservation( method ConvertAction (line 76) | pybind11::bytes ConvertAction( function ConverterWrapper (line 96) | ConverterWrapper MakeConverterWrapper(const std::string& settings, method ConverterWrapper (line 36) | ConverterWrapper(pysc2::Converter converter) method ObservationSpec (line 38) | std::map ObservationSpec() { method ActionSpec (line 49) | std::map ActionSpec() { method ConvertObservation (line 60) | std::map ConvertObservation( method ConvertAction (line 76) | pybind11::bytes ConvertAction( function PYBIND11_MODULE (line 112) | PYBIND11_MODULE(converter, m) { FILE: pysc2/env/converter/cc/raw_actions_encoder.cc type pysc2 (line 34) | namespace pysc2 { class AbilityIdToGameIdTable (line 37) | class AbilityIdToGameIdTable { method AbilityIdToGameIdTable (line 39) | AbilityIdToGameIdTable() { method Lookup (line 47) | int Lookup(int ability_id) const { function FindOriginalTag (line 62) | int64_t FindOriginalTag(int position, function LookupSelectedUnitTags (line 74) | std::vector LookupSelectedUnitTags( function FindFunction (line 94) | int FindFunction(int ability_id, RawFunctionType type, function FindSelectionIndices (line 120) | std::vector FindSelectionIndices(const SC2APIProtocol::Observatio... function KeysString (line 137) | std::string KeysString(const absl::flat_hash_map& map) { function PrintAllActions (line 516) | void PrintAllActions() { function RawAbilityToGameId (line 523) | int RawAbilityToGameId(int ability_id) { FILE: pysc2/env/converter/cc/raw_actions_encoder.h function namespace (line 29) | namespace pysc2 { FILE: pysc2/env/converter/cc/raw_actions_encoder_test.cc type dm_env_rpc (line 33) | namespace dm_env_rpc { type v1 (line 34) | namespace v1 { type pysc2 (line 44) | namespace pysc2 { function GetResponseObservation (line 52) | SC2APIProtocol::ResponseObservation GetResponseObservation() { function TEST (line 62) | TEST(RawActionsEncoderTest, RawAutocastActions) { function TEST (line 92) | TEST(RawActionsEncoderTest, ActionRoundTrip) { function TEST (line 132) | TEST(RawActionsEncoderTest, RepeatActionRoundTrip) { FILE: pysc2/env/converter/cc/raw_camera.cc type pysc2 (line 23) | namespace pysc2 { function MakePoint (line 27) | SC2APIProtocol::Point2D MakePoint(float x, float y) { FILE: pysc2/env/converter/cc/raw_camera.h function namespace (line 23) | namespace pysc2 { FILE: pysc2/env/converter/cc/raw_converter.cc type pysc2 (line 30) | namespace pysc2 { FILE: pysc2/env/converter/cc/raw_converter.h function namespace (line 30) | namespace pysc2 { FILE: pysc2/env/converter/cc/tensor_util.cc type pysc2 (line 25) | namespace pysc2 { function TensorSpec (line 27) | dm_env_rpc::v1::TensorSpec TensorSpec(absl::string_view name, function TensorSpec (line 47) | dm_env_rpc::v1::TensorSpec TensorSpec(absl::string_view name, function Int32TensorSpec (line 59) | dm_env_rpc::v1::TensorSpec Int32TensorSpec(absl::string_view name, function Int32ScalarSpec (line 64) | dm_env_rpc::v1::TensorSpec Int32ScalarSpec(absl::string_view name, function Int32ScalarSpec (line 70) | dm_env_rpc::v1::TensorSpec Int32ScalarSpec(absl::string_view name) { function ToScalar (line 77) | int ToScalar(const dm_env_rpc::v1::Tensor& tensor) { function ToVector (line 93) | std::vector ToVector(const dm_env_rpc::v1::Tensor& tensor) { function MakeTensor (line 117) | dm_env_rpc::v1::Tensor MakeTensor(int value) { function MakeTensor (line 123) | dm_env_rpc::v1::Tensor MakeTensor(const std::vector& values) { function GetNumElements (line 174) | int GetNumElements(const google::protobuf::RepeatedField& ten... FILE: pysc2/env/converter/cc/tensor_util.h function namespace (line 25) | namespace pysc2 { FILE: pysc2/env/converter/cc/unit_lookups.cc type pysc2 (line 22) | namespace pysc2 { function UnitTypeToRace (line 58) | SC2APIProtocol::Race UnitTypeToRace(uint32_t unit_type) { function UnitTypeToString (line 65) | std::string UnitTypeToString(uint32_t unit_type) { FILE: pysc2/env/converter/cc/unit_lookups.h function namespace (line 24) | namespace pysc2 { FILE: pysc2/env/converter/cc/unit_lookups_test.cc type pysc2 (line 20) | namespace pysc2 { function TEST (line 23) | TEST(UnitLookupsTest, UnitTypeToRace) { function TEST (line 30) | TEST(UnitLookupsTest, UnitTypeToString) { FILE: pysc2/env/converter/cc/visual_actions.cc type pysc2 (line 30) | namespace pysc2 { function ActionComparator (line 33) | bool ActionComparator(const VisualAction& lhs, const VisualAction& rhs) { class VisualActions (line 37) | class VisualActions { method VisualActions (line 39) | explicit VisualActions(const std::vector& functions) { method VisualAction (line 63) | const VisualAction& GetAction(int action_id) const { method HasAbility (line 74) | bool HasAbility(AbilityId ability_id) const { function VisualActions (line 85) | const VisualActions& GetActions() { method VisualActions (line 39) | explicit VisualActions(const std::vector& functions) { method VisualAction (line 63) | const VisualAction& GetAction(int action_id) const { method HasAbility (line 74) | bool HasAbility(AbilityId ability_id) const { function Val (line 91) | int Val(const dm_env_rpc::v1::Tensor& tensor) { return ToScalar(tensor... function Option (line 93) | int Option(const dm_env_rpc::v1::Tensor& arg) { function MakePoint (line 99) | SC2APIProtocol::PointI MakePoint(int arg, int width) { function PointTo1D (line 106) | int PointTo1D(const SC2APIProtocol::PointI& point, int width) { function MoveCamera (line 120) | SC2APIProtocol::Action MoveCamera( function SelectPoint (line 133) | SC2APIProtocol::Action SelectPoint( function SelectRect (line 149) | SC2APIProtocol::Action SelectRect( function SelectIdleWorker (line 172) | SC2APIProtocol::Action SelectIdleWorker( function SelectArmy (line 183) | SC2APIProtocol::Action SelectArmy( function SelectWarpGates (line 193) | SC2APIProtocol::Action SelectWarpGates( function SelectLarva (line 203) | SC2APIProtocol::Action SelectLarva( function SelectUnit (line 212) | SC2APIProtocol::Action SelectUnit( function SelectControlGroup (line 226) | SC2APIProtocol::Action SelectControlGroup( function Unload (line 242) | SC2APIProtocol::Action Unload( function BuildQueue (line 252) | SC2APIProtocol::Action BuildQueue( function CmdQuick (line 262) | SC2APIProtocol::Action CmdQuick( function CmdScreen (line 275) | SC2APIProtocol::Action CmdScreen( function CmdMinimap (line 290) | SC2APIProtocol::Action CmdMinimap( function Autocast (line 305) | SC2APIProtocol::Action Autocast( function MakeFunctionCall (line 314) | absl::flat_hash_map MakeFunctionC... function NoOp (line 325) | absl::flat_hash_map NoOp() { function Ability (line 329) | absl::flat_hash_map Ability( function VisualAction (line 433) | const VisualAction& GetAction(ActionId action_id) { function Decode (line 441) | absl::flat_hash_map Decode( FILE: pysc2/env/converter/cc/visual_actions.h function namespace (line 25) | namespace pysc2 { FILE: pysc2/env/converter/cc/visual_actions_test.cc type pysc2 (line 26) | namespace pysc2 { class VisualActionsTest (line 29) | class VisualActionsTest : public testing::TestWithParam {} function TEST_P (line 31) | TEST_P(VisualActionsTest, DecodeEncodeTest) { FILE: pysc2/env/converter/cc/visual_converter.cc type pysc2 (line 36) | namespace pysc2 { function AvailableActions (line 43) | dm_env_rpc::v1::Tensor AvailableActions(const SC2APIProtocol::Observat... FILE: pysc2/env/converter/cc/visual_converter.h function namespace (line 28) | namespace pysc2 { FILE: pysc2/env/converter/cc/visual_converter_test.cc type pysc2 (line 28) | namespace pysc2 { function ConverterSettings (line 31) | ConverterSettings MakeSettings() { function MakePlayerObservation (line 41) | pysc2::Observation MakePlayerObservation() { function TEST (line 65) | TEST(VisualConverterTest, Construct) { function TEST (line 69) | TEST(VisualConverterTest, FeaturePlanes) { FILE: pysc2/env/converter/converter.py class Converter (line 33) | class Converter: method __init__ (line 51) | def __init__(self, settings: converter_pb2.ConverterSettings, method observation_spec (line 57) | def observation_spec(self) -> Mapping[str, specs.Array]: method action_spec (line 70) | def action_spec(self) -> Mapping[str, specs.Array]: method convert_observation (line 83) | def convert_observation( method convert_action (line 112) | def convert_action(self, action: Mapping[str, Any]) -> converter_pb2.A... FILE: pysc2/env/converter/converter_test.py function _make_dummy_env_info (line 38) | def _make_dummy_env_info(): function _make_converter_settings_common (line 51) | def _make_converter_settings_common(**kwargs): function _make_converter_settings (line 63) | def _make_converter_settings(mode: str): function _make_observation (line 79) | def _make_observation(): class RawConverterTest (line 107) | class RawConverterTest(absltest.TestCase): method test_action_spec (line 109) | def test_action_spec(self): method test_action_move_camera (line 138) | def test_action_move_camera(self): method test_action_smart_unit (line 158) | def test_action_smart_unit(self): class VisualConverterTest (line 189) | class VisualConverterTest(absltest.TestCase): method test_action_spec (line 191) | def test_action_spec(self): method test_action_move_camera (line 229) | def test_action_move_camera(self): method test_action_smart_screen (line 248) | def test_action_smart_screen(self): class ConverterTest (line 278) | class ConverterTest(parameterized.TestCase): method test_construction (line 280) | def test_construction(self, mode): method test_convert_action_delay (line 285) | def test_convert_action_delay(self, mode): method test_observation_spec (line 294) | def test_observation_spec(self, mode): method test_observation_matches_spec (line 368) | def test_observation_matches_spec(self, mode): FILE: pysc2/env/converter/derive_interface_options.py function from_settings (line 23) | def from_settings(settings: converter_pb2.ConverterSettings): FILE: pysc2/env/enums.py class Race (line 22) | class Race(enum.IntEnum): class Difficulty (line 29) | class Difficulty(enum.IntEnum): class BotBuild (line 43) | class BotBuild(enum.IntEnum): FILE: pysc2/env/environment.py class TimeStep (line 21) | class TimeStep(collections.namedtuple( method first (line 43) | def first(self): method mid (line 46) | def mid(self): method last (line 49) | def last(self): class StepType (line 53) | class StepType(enum.IntEnum): class Base (line 63) | class Base(metaclass=abc.ABCMeta): # pytype: disable=ignored-abstractme... method reset (line 67) | def reset(self): method step (line 80) | def step(self, action): method observation_spec (line 105) | def observation_spec(self): method action_spec (line 114) | def action_spec(self): method close (line 122) | def close(self): method __enter__ (line 144) | def __enter__(self): method __exit__ (line 148) | def __exit__(self, unused_exception_type, unused_exc_value, unused_tra... method __del__ (line 152) | def __del__(self): FILE: pysc2/env/host_remote_agent.py class VsAgent (line 26) | class VsAgent(object): method __init__ (line 44) | def __init__(self): method __enter__ (line 60) | def __enter__(self): method __exit__ (line 63) | def __exit__(self, exception_type, exception_value, traceback): method __del__ (line 66) | def __del__(self): method create_game (line 69) | def create_game(self, map_name): method _disconnect (line 97) | def _disconnect(self): method _reconnect (line 102) | def _reconnect(self, **kwargs): method save_replay (line 108) | def save_replay(self, replay_dir, replay_name): method hosts (line 114) | def hosts(self): method host_ports (line 119) | def host_ports(self): method lan_ports (line 124) | def lan_ports(self): method close (line 128) | def close(self): class VsBot (line 146) | class VsBot(object): method __init__ (line 163) | def __init__(self): method __enter__ (line 170) | def __enter__(self): method __exit__ (line 173) | def __exit__(self, exception_type, exception_value, traceback): method __del__ (line 176) | def __del__(self): method create_game (line 179) | def create_game( method _disconnect (line 221) | def _disconnect(self): method _reconnect (line 225) | def _reconnect(self, **kwargs): method save_replay (line 230) | def save_replay(self, replay_dir, replay_name): method host (line 236) | def host(self): method host_port (line 241) | def host_port(self): method close (line 245) | def close(self): FILE: pysc2/env/lan_sc2_env.py class Addr (line 40) | class Addr(collections.namedtuple("Addr", ["ip", "port"])): method __str__ (line 42) | def __str__(self): function daemon_thread (line 47) | def daemon_thread(target, args): function udp_server (line 54) | def udp_server(addr): function tcp_server (line 61) | def tcp_server(tcp_addr, settings): function tcp_client (line 79) | def tcp_client(tcp_addr): function log_msg (line 105) | def log_msg(prefix, msg): function udp_to_tcp (line 110) | def udp_to_tcp(udp_sock, tcp_conn): function tcp_to_udp (line 119) | def tcp_to_udp(tcp_conn, udp_sock, udp_to_addr): function read_tcp (line 128) | def read_tcp(conn): function read_tcp_size (line 138) | def read_tcp_size(conn, size): function write_tcp (line 153) | def write_tcp(conn, msg): function forward_ports (line 159) | def forward_ports(remote_host, local_host, local_listen_ports, class RestartError (line 195) | class RestartError(Exception): class LanSC2Env (line 199) | class LanSC2Env(sc2_env.SC2Env): method __init__ (line 206) | def __init__(self, method _launch_remote (line 299) | def _launch_remote(self, host, config_port, race, name, interface, method _restart (line 347) | def _restart(self): method close (line 352) | def close(self): FILE: pysc2/env/mock_sc2_env.py class _TestEnvironment (line 30) | class _TestEnvironment(environment.Base): method __init__ (line 53) | def __init__(self, num_agents, observation_spec, action_spec): method reset (line 80) | def reset(self): method step (line 85) | def step(self, actions, step_mul=None): method action_spec (line 122) | def action_spec(self): method observation_spec (line 126) | def observation_spec(self): method _default_observation (line 130) | def _default_observation(self, obs_spec, agent_index): class SC2TestEnv (line 138) | class SC2TestEnv(_TestEnvironment): method __init__ (line 158) | def __init__(self, method game_info (line 258) | def game_info(self): method save_replay (line 261) | def save_replay(self, *args, **kwargs): method _default_observation (line 264) | def _default_observation(self, obs_spec, agent_index): function _make_dummy_game_info (line 300) | def _make_dummy_game_info(players, interface_formats): FILE: pysc2/env/mock_sc2_env_comparison_test.py class TestCompareEnvironments (line 23) | class TestCompareEnvironments(absltest.TestCase): method setUpClass (line 26) | def setUpClass(cls): method tearDownClass (line 56) | def tearDownClass(cls): method test_observation_spec (line 61) | def test_observation_spec(self): method test_action_spec (line 65) | def test_action_spec(self): FILE: pysc2/env/mock_sc2_env_test.py class _TestMixin (line 32) | class _TestMixin(object): method assert_spec (line 34) | def assert_spec(self, array, shape, dtype): method assert_equal (line 38) | def assert_equal(self, actual, expected): method assert_reset (line 41) | def assert_reset(self, env): method assert_first_step (line 47) | def assert_first_step(self, env): method assert_mid_step (line 53) | def assert_mid_step(self, env): method assert_last_step (line 59) | def assert_last_step(self, env): method _test_episode (line 66) | def _test_episode(self, env): method _test_episode_length (line 80) | def _test_episode_length(self, env, length): class TestTestEnvironment (line 92) | class TestTestEnvironment(_TestMixin, absltest.TestCase): method setUp (line 94) | def setUp(self): method test_observation_spec (line 101) | def test_observation_spec(self): method test_action_spec (line 104) | def test_action_spec(self): method test_default_observation (line 107) | def test_default_observation(self): method test_episode (line 112) | def test_episode(self): method test_two_episodes (line 116) | def test_two_episodes(self): method test_episode_length (line 121) | def test_episode_length(self): class TestSC2TestEnv (line 126) | class TestSC2TestEnv(_TestMixin, absltest.TestCase): method test_episode (line 128) | def test_episode(self): method test_episode_length (line 136) | def test_episode_length(self): method test_screen_minimap_size (line 144) | def test_screen_minimap_size(self): method test_feature_units_are_supported (line 158) | def test_feature_units_are_supported(self): method test_game_info (line 167) | def test_game_info(self): FILE: pysc2/env/remote_sc2_env.py class RestartError (line 29) | class RestartError(Exception): class RemoteSC2Env (line 33) | class RemoteSC2Env(sc2_env.SC2Env): method __init__ (line 42) | def __init__(self, method close (line 156) | def close(self): method _connect_remote (line 174) | def _connect_remote(self, host, host_port, lan_ports, race, name, map_... method _restart (line 211) | def _restart(self): FILE: pysc2/env/run_loop.py function run_loop (line 19) | def run_loop(agents, env, max_frames=0, max_episodes=0): FILE: pysc2/env/sc2_env.py function to_list (line 59) | def to_list(arg): function get_default (line 63) | def get_default(a, b): class Agent (line 67) | class Agent(collections.namedtuple("Agent", ["race", "name"])): method __new__ (line 70) | def __new__(cls, race, name=None): class Bot (line 74) | class Bot(collections.namedtuple("Bot", ["race", "difficulty", "build"])): method __new__ (line 77) | def __new__(cls, race, difficulty, build=None): class SC2Env (line 90) | class SC2Env(environment.Base): method __init__ (line 97) | def __init__(self, method _finalize (line 266) | def _finalize(self, visualize): method _get_interface (line 291) | def _get_interface(interface_format, require_raw): method _launch_game (line 328) | def _launch_game(self): method _create_join (line 352) | def _create_join(self): method map_name (line 438) | def map_name(self): method game_info (line 442) | def game_info(self): method static_data (line 446) | def static_data(self): method observation_spec (line 449) | def observation_spec(self): method action_spec (line 453) | def action_spec(self): method action_delays (line 457) | def action_delays(self): method _restart (line 473) | def _restart(self): method reset (line 484) | def reset(self): method step (line 507) | def step(self, actions, step_mul=None): method _step (line 537) | def _step(self, step_mul=None): method _apply_action_delays (line 554) | def _apply_action_delays(self, actions): method _send_delayed_actions (line 580) | def _send_delayed_actions(self, up_to_game_loop, current_game_loop): method _step_to (line 606) | def _step_to(self, game_loop, current_game_loop): method _get_observations (line 615) | def _get_observations(self, target_game_loop): method _observe (line 657) | def _observe(self, target_game_loop): method send_chat_messages (line 723) | def send_chat_messages(self, messages, broadcast=True): method save_replay (line 731) | def save_replay(self, replay_dir, prefix=None): method close (line 739) | def close(self): function crop_and_deduplicate_names (line 769) | def crop_and_deduplicate_names(names): function _get_game_loop (line 811) | def _get_game_loop(agent_obs): function _get_score (line 818) | def _get_score(agent_obs, score_index=0): FILE: pysc2/env/sc2_env_test.py class TestNameCroppingAndDeduplication (line 23) | class TestNameCroppingAndDeduplication(parameterized.TestCase): method test (line 48) | def test(self, names, expected_output): FILE: pysc2/lib/actions.py class ActionSpace (line 27) | class ActionSpace(enum.Enum): function spatial (line 33) | def spatial(action, action_space): function no_op (line 43) | def no_op(action, action_space): function move_camera (line 47) | def move_camera(action, action_space, minimap): function select_point (line 52) | def select_point(action, action_space, select_point_act, screen): function select_rect (line 59) | def select_rect(action, action_space, select_add, screen, screen2): function select_idle_worker (line 69) | def select_idle_worker(action, action_space, select_worker): function select_army (line 75) | def select_army(action, action_space, select_add): function select_warp_gates (line 81) | def select_warp_gates(action, action_space, select_add): function select_larva (line 87) | def select_larva(action, action_space): function select_unit (line 93) | def select_unit(action, action_space, select_unit_act, select_unit_id): function control_group (line 101) | def control_group(action, action_space, control_group_act, control_group... function unload (line 109) | def unload(action, action_space, unload_id): function build_queue (line 115) | def build_queue(action, action_space, build_queue_id): function cmd_quick (line 121) | def cmd_quick(action, action_space, ability_id, queued): function cmd_screen (line 128) | def cmd_screen(action, action_space, ability_id, queued, screen): function cmd_minimap (line 136) | def cmd_minimap(action, action_space, ability_id, queued, minimap): function autocast (line 144) | def autocast(action, action_space, ability_id): function raw_no_op (line 150) | def raw_no_op(action): function raw_move_camera (line 154) | def raw_move_camera(action, world): function raw_cmd (line 160) | def raw_cmd(action, ability_id, queued, unit_tags): function raw_cmd_pt (line 170) | def raw_cmd_pt(action, ability_id, queued, unit_tags, world): function raw_cmd_unit (line 181) | def raw_cmd_unit(action, ability_id, queued, unit_tags, function raw_autocast (line 193) | def raw_autocast(action, ability_id, unit_tags): function numpy_to_python (line 202) | def numpy_to_python(val): class ArgumentType (line 216) | class ArgumentType(collections.namedtuple( method __str__ (line 232) | def __str__(self): method __reduce__ (line 235) | def __reduce__(self): method enum (line 239) | def enum(cls, options, values): method scalar (line 249) | def scalar(cls, value): method point (line 254) | def point(cls): # No range because it's unknown at this time. method spec (line 261) | def spec(cls, id_, name, sizes): method unit_tags (line 266) | def unit_tags(cls, count, size): class Arguments (line 276) | class Arguments(collections.namedtuple("Arguments", [ method types (line 304) | def types(cls, **kwargs): method __reduce__ (line 310) | def __reduce__(self): class RawArguments (line 314) | class RawArguments(collections.namedtuple("RawArguments", [ method types (line 330) | def types(cls, **kwargs): method __reduce__ (line 336) | def __reduce__(self): function _define_position_based_enum (line 340) | def _define_position_based_enum(name, options): class Function (line 463) | class Function(collections.namedtuple( method ui_func (line 484) | def ui_func(cls, id_, name, function_type, avail_fn=always): method ability (line 490) | def ability(cls, id_, name, function_type, ability_id, general_id=0): method raw_ability (line 497) | def raw_ability(cls, id_, name, function_type, ability_id, general_id=0, method raw_ui_func (line 505) | def raw_ui_func(cls, id_, name, function_type, avail_fn=always): method spec (line 511) | def spec(cls, id_, name, args): method __hash__ (line 515) | def __hash__(self): # So it can go in a set(). method __str__ (line 518) | def __str__(self): method __call__ (line 521) | def __call__(self, *args): method __reduce__ (line 525) | def __reduce__(self): method str (line 528) | def str(self, space=False): class Functions (line 535) | class Functions(object): method __init__ (line 542) | def __init__(self, functions): method __getattr__ (line 549) | def __getattr__(self, name): method __getitem__ (line 552) | def __getitem__(self, key): method __getstate__ (line 557) | def __getstate__(self): method __setstate__ (line 561) | def __setstate__(self, functions): method __iter__ (line 565) | def __iter__(self): method __len__ (line 568) | def __len__(self): method __eq__ (line 571) | def __eq__(self, other): class FunctionCall (line 1767) | class FunctionCall(collections.namedtuple( method init_with_validation (line 1779) | def init_with_validation(cls, function, arguments, raw=False): method all_arguments (line 1826) | def all_arguments(cls, function, arguments, raw=False): method __reduce__ (line 1848) | def __reduce__(self): class ValidActions (line 1852) | class ValidActions(collections.namedtuple( method __reduce__ (line 1863) | def __reduce__(self): FILE: pysc2/lib/buffs.py class Buffs (line 20) | class Buffs(enum.IntEnum): FILE: pysc2/lib/colors.py class Color (line 25) | class Color(collections.namedtuple("Color", ["r", "g", "b"])): method set (line 29) | def set(self, r=None, g=None, b=None): method round (line 32) | def round(self): method floor (line 35) | def floor(self): method ceil (line 39) | def ceil(self): method __str__ (line 43) | def __str__(self): method __add__ (line 46) | def __add__(self, o): method __sub__ (line 49) | def __sub__(self, o): method __mul__ (line 52) | def __mul__(self, val): method __truediv__ (line 55) | def __truediv__(self, val): method __floordiv__ (line 58) | def __floordiv__(self, val): function smooth_hue_palette (line 73) | def smooth_hue_palette(scale): function shuffled_hue (line 119) | def shuffled_hue(scale): function piece_wise_linear (line 125) | def piece_wise_linear(scale, points): function winter (line 147) | def winter(scale): function hot (line 152) | def hot(scale): function height_map (line 159) | def height_map(scale): function unit_type (line 211) | def unit_type(scale=None): function buffs (line 216) | def buffs(scale=None): function categorical (line 221) | def categorical(options, scale=None): FILE: pysc2/lib/features.py class FeatureType (line 39) | class FeatureType(enum.Enum): class PlayerRelative (line 44) | class PlayerRelative(enum.IntEnum): class Visibility (line 53) | class Visibility(enum.IntEnum): class Effects (line 60) | class Effects(enum.IntEnum): class ScoreCumulative (line 79) | class ScoreCumulative(enum.IntEnum): class ScoreByCategory (line 96) | class ScoreByCategory(enum.IntEnum): class ScoreCategories (line 111) | class ScoreCategories(enum.IntEnum): class ScoreByVital (line 120) | class ScoreByVital(enum.IntEnum): class ScoreVitals (line 127) | class ScoreVitals(enum.IntEnum): class Player (line 134) | class Player(enum.IntEnum): class UnitLayer (line 149) | class UnitLayer(enum.IntEnum): class UnitCounts (line 160) | class UnitCounts(enum.IntEnum): class FeatureUnit (line 166) | class FeatureUnit(enum.IntEnum): class EffectPos (line 216) | class EffectPos(enum.IntEnum): class Radar (line 226) | class Radar(enum.IntEnum): class ProductionQueue (line 233) | class ProductionQueue(enum.IntEnum): class Feature (line 239) | class Feature(collections.namedtuple( method unpack (line 263) | def unpack(self, obs): method unpack_layer (line 271) | def unpack_layer(plane): method unpack_rgb_image (line 289) | def unpack_rgb_image(plane): method color (line 297) | def color(self, plane): class ScreenFeatures (line 303) | class ScreenFeatures(collections.namedtuple("ScreenFeatures", [ method __new__ (line 313) | def __new__(cls, **kwargs): class MinimapFeatures (line 328) | class MinimapFeatures(collections.namedtuple("MinimapFeatures", [ method __new__ (line 335) | def __new__(cls, **kwargs): function _to_point (line 402) | def _to_point(dims): class Dimensions (line 426) | class Dimensions(object): method __init__ (line 437) | def __init__(self, screen=None, minimap=None): method screen (line 447) | def screen(self): method minimap (line 451) | def minimap(self): method __repr__ (line 454) | def __repr__(self): method __eq__ (line 457) | def __eq__(self, other): method __ne__ (line 461) | def __ne__(self, other): class AgentInterfaceFormat (line 465) | class AgentInterfaceFormat(object): method __init__ (line 468) | def __init__( method feature_dimensions (line 636) | def feature_dimensions(self): method rgb_dimensions (line 640) | def rgb_dimensions(self): method action_space (line 644) | def action_space(self): method camera_width_world_units (line 648) | def camera_width_world_units(self): method use_feature_units (line 652) | def use_feature_units(self): method use_raw_units (line 656) | def use_raw_units(self): method raw_resolution (line 660) | def raw_resolution(self): method raw_resolution (line 664) | def raw_resolution(self, value): method use_raw_actions (line 668) | def use_raw_actions(self): method max_raw_actions (line 672) | def max_raw_actions(self): method max_selected_units (line 676) | def max_selected_units(self): method use_unit_counts (line 680) | def use_unit_counts(self): method use_camera_position (line 684) | def use_camera_position(self): method show_cloaked (line 688) | def show_cloaked(self): method show_burrowed_shadows (line 692) | def show_burrowed_shadows(self): method show_placeholders (line 696) | def show_placeholders(self): method hide_specific_actions (line 700) | def hide_specific_actions(self): method action_delay_fn (line 704) | def action_delay_fn(self): method send_observation_proto (line 708) | def send_observation_proto(self): method add_cargo_to_units (line 712) | def add_cargo_to_units(self): method action_dimensions (line 716) | def action_dimensions(self): method crop_to_playable_area (line 720) | def crop_to_playable_area(self): method raw_crop_to_playable_area (line 724) | def raw_crop_to_playable_area(self): method allow_cheating_layers (line 728) | def allow_cheating_layers(self): function parse_agent_interface_format (line 732) | def parse_agent_interface_format( function features_from_game_info (line 803) | def features_from_game_info(game_info, agent_interface_format=None, function _init_valid_functions (line 884) | def _init_valid_functions(action_dimensions): function _init_valid_raw_functions (line 903) | def _init_valid_raw_functions(raw_resolution, max_selected_units): class Features (line 920) | class Features(object): method __init__ (line 932) | def __init__(self, agent_interface_format=None, map_size=None, method init_camera (line 979) | def init_camera( method _update_camera (line 1027) | def _update_camera(self, camera_center): method observation_spec (line 1033) | def observation_spec(self): method action_spec (line 1113) | def action_spec(self): method map_size (line 1118) | def map_size(self): method requested_races (line 1122) | def requested_races(self): method transform_obs (line 1126) | def transform_obs(self, obs): method available_actions (line 1544) | def available_actions(self, obs): method transform_action (line 1574) | def transform_action(self, obs, func_call, skip_available=False): method reverse_action (line 1678) | def reverse_action(self, action): method reverse_raw_action (line 1779) | def reverse_raw_action(self, action, prev_obs): class Passthrough (line 1870) | class Passthrough: method observation_spec (line 1873) | def observation_spec(self): method transform_obs (line 1876) | def transform_obs(self, observation): method action_spec (line 1879) | def action_spec(self): method transform_action (line 1882) | def transform_action(self, observation, action, skip_available): method available_actions (line 1887) | def available_actions(self, observation): method reverse_action (line 1892) | def reverse_action(self, action): FILE: pysc2/lib/features_test.py class AvailableActionsTest (line 54) | class AvailableActionsTest(absltest.TestCase): method setUp (line 61) | def setUp(self): method hideSpecificActions (line 66) | def hideSpecificActions(self, hide_specific_actions): # pylint: disab... method assertAvail (line 71) | def assertAvail(self, expected): method testAlways (line 76) | def testAlways(self): method testSelectUnit (line 79) | def testSelectUnit(self): method testSelectIdleWorkder (line 83) | def testSelectIdleWorkder(self): method testSelectArmy (line 87) | def testSelectArmy(self): method testSelectWarpGates (line 91) | def testSelectWarpGates(self): method testSelectLarva (line 95) | def testSelectLarva(self): method testQuick (line 99) | def testQuick(self): method testScreen (line 103) | def testScreen(self): method testScreenMinimap (line 107) | def testScreenMinimap(self): method testScreenAutocast (line 111) | def testScreenAutocast(self): method testScreenQuick (line 115) | def testScreenQuick(self): method testGeneral (line 130) | def testGeneral(self): method testGeneralType (line 137) | def testGeneralType(self): method testMany (line 151) | def testMany(self): class ToPointTest (line 209) | class ToPointTest(absltest.TestCase): method testIntAsString (line 211) | def testIntAsString(self): method testIntStringTwoTuple (line 215) | def testIntStringTwoTuple(self): method testNoneInputReturnsNoneOutput (line 219) | def testNoneInputReturnsNoneOutput(self): method testNoneAsFirstElementOfTupleRaises (line 223) | def testNoneAsFirstElementOfTupleRaises(self): method testNoneAsSecondElementOfTupleRaises (line 227) | def testNoneAsSecondElementOfTupleRaises(self): method testSingletonTupleRaises (line 231) | def testSingletonTupleRaises(self): method testThreeTupleRaises (line 235) | def testThreeTupleRaises(self): class DimensionsTest (line 240) | class DimensionsTest(absltest.TestCase): method testScreenSizeWithoutMinimapRaises (line 242) | def testScreenSizeWithoutMinimapRaises(self): method testScreenWidthWithoutHeightRaises (line 246) | def testScreenWidthWithoutHeightRaises(self): method testScreenWidthHeightWithoutMinimapRaises (line 250) | def testScreenWidthHeightWithoutMinimapRaises(self): method testMinimapWidthAndHeightWithoutScreenRaises (line 254) | def testMinimapWidthAndHeightWithoutScreenRaises(self): method testNoneNoneRaises (line 258) | def testNoneNoneRaises(self): method testSingularZeroesRaises (line 262) | def testSingularZeroesRaises(self): method testTwoZeroesRaises (line 266) | def testTwoZeroesRaises(self): method testThreeTupleScreenRaises (line 270) | def testThreeTupleScreenRaises(self): method testThreeTupleMinimapRaises (line 274) | def testThreeTupleMinimapRaises(self): method testNegativeScreenRaises (line 278) | def testNegativeScreenRaises(self): method testNegativeMinimapRaises (line 282) | def testNegativeMinimapRaises(self): method testNegativeScreenTupleRaises (line 286) | def testNegativeScreenTupleRaises(self): method testNegativeMinimapTupleRaises (line 290) | def testNegativeMinimapTupleRaises(self): method testEquality (line 294) | def testEquality(self): class TestParseAgentInterfaceFormat (line 302) | class TestParseAgentInterfaceFormat(parameterized.TestCase): method test_no_arguments_raises (line 304) | def test_no_arguments_raises(self): method test_invalid_feature_combinations_raise (line 309) | def test_invalid_feature_combinations_raise(self, screen, minimap): method test_valid_feature_specification_is_parsed (line 315) | def test_valid_feature_specification_is_parsed(self): method test_invalid_minimap_combinations_raise (line 329) | def test_invalid_minimap_combinations_raise(self, screen, minimap): method test_valid_minimap_specification_is_parsed (line 335) | def test_valid_minimap_specification_is_parsed(self): method test_invalid_action_space_raises (line 348) | def test_invalid_action_space_raises(self): method test_valid_action_space_is_parsed (line 356) | def test_valid_action_space_is_parsed(self, action_space): method test_camera_width_world_units_are_parsed (line 369) | def test_camera_width_world_units_are_parsed(self): method test_use_feature_units_is_parsed (line 377) | def test_use_feature_units_is_parsed(self): class FeaturesTest (line 386) | class FeaturesTest(absltest.TestCase): method testFunctionsIdsAreConsistent (line 388) | def testFunctionsIdsAreConsistent(self): method testAllVersionsOfAnAbilityHaveTheSameGeneral (line 392) | def testAllVersionsOfAnAbilityHaveTheSameGeneral(self): method testValidFunctionsAreConsistent (line 397) | def testValidFunctionsAreConsistent(self): method gen_random_function_call (line 408) | def gen_random_function_call(self, action_spec, func_id): method testIdsMatchIndex (line 413) | def testIdsMatchIndex(self): method testReversingUnknownAction (line 422) | def testReversingUnknownAction(self): method testSpecificActionsAreReversible (line 431) | def testSpecificActionsAreReversible(self): method testRawActionUnitTags (line 463) | def testRawActionUnitTags(self): method testCanPickleSpecs (line 495) | def testCanPickleSpecs(self): method testCanPickleFunctionCall (line 505) | def testCanPickleFunctionCall(self): method testCanDeepcopyNumpyFunctionCall (line 509) | def testCanDeepcopyNumpyFunctionCall(self): method testSizeConstructors (line 516) | def testSizeConstructors(self): method testFlRgbActionSpec (line 556) | def testFlRgbActionSpec(self): method testFlRgbObservationSpec (line 575) | def testFlRgbObservationSpec(self): FILE: pysc2/lib/image_differencer.py function image_differencer (line 24) | def image_differencer(path, proto_a, proto_b): FILE: pysc2/lib/image_differencer_test.py class ImageDifferencerTest (line 27) | class ImageDifferencerTest(absltest.TestCase): method testFilteredOut (line 29) | def testFilteredOut(self): method testFilteredIn (line 36) | def testFilteredIn(self): FILE: pysc2/lib/memoize.py function memoize (line 17) | def memoize(func): FILE: pysc2/lib/metrics.py class _EventTimer (line 17) | class _EventTimer(object): method __enter__ (line 20) | def __enter__(self): method __exit__ (line 23) | def __exit__(self, unused_exception_type, unused_exc_value, unused_tra... class Metrics (line 27) | class Metrics(object): method __init__ (line 30) | def __init__(self, map_name): method increment_instance (line 33) | def increment_instance(self): method increment_episode (line 36) | def increment_episode(self): method measure_step_time (line 39) | def measure_step_time(self, num_steps=1): method measure_observation_time (line 44) | def measure_observation_time(self): method close (line 48) | def close(self): method __del__ (line 51) | def __del__(self): FILE: pysc2/lib/named_array.py class NamedDict (line 27) | class NamedDict(dict): method __init__ (line 30) | def __init__(self, *args, **kwargs): class NamedNumpyArray (line 39) | class NamedNumpyArray(np.ndarray): method __new__ (line 64) | def __new__(cls, values, names, *args, **kwargs): method __array_finalize__ (line 126) | def __array_finalize__(self, obj): method __getattr__ (line 131) | def __getattr__(self, name): method __setattr__ (line 137) | def __setattr__(self, name, value): method __getitem__ (line 143) | def __getitem__(self, indices): method __setitem__ (line 201) | def __setitem__(self, indices, value): method __getslice__ (line 204) | def __getslice__(self, i, j): # deprecated, but still needed... method __setslice__ (line 208) | def __setslice__(self, i, j, seq): # deprecated, but still needed... method __repr__ (line 211) | def __repr__(self): method __reduce__ (line 232) | def __reduce__(self): method __setstate__ (line 238) | def __setstate__(self, state): method _indices (line 243) | def _indices(self, indices): method _get_index (line 261) | def _get_index(self, dim, index): FILE: pysc2/lib/named_array_test.py class NamedDictTest (line 28) | class NamedDictTest(absltest.TestCase): method test_named_dict (line 30) | def test_named_dict(self): class TestEnum (line 40) | class TestEnum(enum.IntEnum): class BadEnum (line 46) | class BadEnum(enum.IntEnum): class TestNamedTuple (line 52) | class TestNamedTuple(collections.namedtuple("TestNamedTuple", ["a", "b",... class BadNamedTuple (line 56) | class BadNamedTuple(collections.namedtuple("BadNamedTuple", ["a", "b"])): class NamedArrayTest (line 60) | class NamedArrayTest(parameterized.TestCase): method assertArrayEqual (line 62) | def assertArrayEqual(self, a, b): method test_bad_names (line 77) | def test_bad_names(self, names): method test_single_dimension (line 92) | def test_single_dimension(self, names): method test_empty_array (line 167) | def test_empty_array(self): method test_named_array_multi_first (line 180) | def test_named_array_multi_first(self): method test_named_array_multi_second (line 224) | def test_named_array_multi_second(self): method test_masking (line 238) | def test_masking(self): method test_slicing (line 246) | def test_slicing(self): method test_string (line 305) | def test_string(self): method test_pickle (line 350) | def test_pickle(self): FILE: pysc2/lib/np_util.py function summarize_array_diffs (line 19) | def summarize_array_diffs(lhs, rhs): FILE: pysc2/lib/np_util_test.py class NpUtilTest (line 23) | class NpUtilTest(parameterized.TestCase): method testSummarizeArrayDiffs (line 32) | def testSummarizeArrayDiffs(self, lhs, rhs, expected): FILE: pysc2/lib/point.py class Point (line 21) | class Point(collections.namedtuple("Point", ["x", "y"])): method build (line 26) | def build(cls, obj): method unit_rand (line 31) | def unit_rand(cls): method assign_to (line 35) | def assign_to(self, obj): method dist (line 40) | def dist(self, other): method dist_sq (line 46) | def dist_sq(self, other): method round (line 52) | def round(self): method floor (line 56) | def floor(self): method ceil (line 60) | def ceil(self): method abs (line 64) | def abs(self): method len (line 68) | def len(self): method scale (line 72) | def scale(self, target_len): method scale_max_size (line 76) | def scale_max_size(self, max_size): method scale_min_size (line 80) | def scale_min_size(self, min_size): method min_dim (line 84) | def min_dim(self): method max_dim (line 87) | def max_dim(self): method transpose (line 90) | def transpose(self): method rotate_deg (line 94) | def rotate_deg(self, angle): method rotate_rad (line 97) | def rotate_rad(self, angle): method rotate_rand (line 101) | def rotate_rand(self, angle=180): method contained_circle (line 104) | def contained_circle(self, pt, radius): method bound (line 108) | def bound(self, p1, p2=None): method __str__ (line 113) | def __str__(self): method __neg__ (line 119) | def __neg__(self): method __add__ (line 122) | def __add__(self, pt_or_val): method __sub__ (line 128) | def __sub__(self, pt_or_val): method __mul__ (line 134) | def __mul__(self, pt_or_val): method __truediv__ (line 140) | def __truediv__(self, pt_or_val): method __floordiv__ (line 146) | def __floordiv__(self, pt_or_val): class Rect (line 158) | class Rect(collections.namedtuple("Rect", ["t", "l", "b", "r"])): method __new__ (line 162) | def __new__(cls, *args): method __str__ (line 183) | def __str__(self): method center (line 190) | def center(self): method top (line 194) | def top(self): method left (line 198) | def left(self): method bottom (line 202) | def bottom(self): method right (line 206) | def right(self): method width (line 210) | def width(self): method height (line 214) | def height(self): method tl (line 218) | def tl(self): method br (line 222) | def br(self): method tr (line 226) | def tr(self): method bl (line 230) | def bl(self): method diagonal (line 234) | def diagonal(self): method size (line 238) | def size(self): method area (line 242) | def area(self): method round (line 246) | def round(self): method floor (line 249) | def floor(self): method ceil (line 252) | def ceil(self): method contains_point (line 255) | def contains_point(self, pt): method contains_circle (line 260) | def contains_circle(self, pt, radius): method intersects_circle (line 265) | def intersects_circle(self, pt, radius): FILE: pysc2/lib/point_flag.py class PointParser (line 24) | class PointParser(flags.ArgumentParser): method parse (line 27) | def parse(self, argument): method flag_type (line 50) | def flag_type(self): class PointSerializer (line 54) | class PointSerializer(flags.ArgumentSerializer): method serialize (line 57) | def serialize(self, value): function DEFINE_point (line 61) | def DEFINE_point(name, default, help_string, flag_values=flags.FLAGS, **... FILE: pysc2/lib/point_test.py class FakePoint (line 22) | class FakePoint(object): method __init__ (line 24) | def __init__(self): class PointTest (line 29) | class PointTest(absltest.TestCase): method testBuild (line 31) | def testBuild(self): method testAssignTo (line 34) | def testAssignTo(self): method testDist (line 42) | def testDist(self): method testDistSq (line 47) | def testDistSq(self): method testLen (line 52) | def testLen(self): method testScale (line 56) | def testScale(self): method testScaleMaxSize (line 60) | def testScaleMaxSize(self): method testScaleMinSize (line 67) | def testScaleMinSize(self): method testMinDim (line 74) | def testMinDim(self): method testMaxDim (line 77) | def testMaxDim(self): method testTranspose (line 80) | def testTranspose(self): method testRound (line 83) | def testRound(self): method testCeil (line 89) | def testCeil(self): method testFloor (line 95) | def testFloor(self): method testRotate (line 101) | def testRotate(self): method testContainedCircle (line 107) | def testContainedCircle(self): method testBound (line 111) | def testBound(self): class RectTest (line 119) | class RectTest(absltest.TestCase): method testInit (line 121) | def testInit(self): method testInitBad (line 132) | def testInitBad(self): method testInitOnePoint (line 142) | def testInitOnePoint(self): method testInitTwoPoints (line 156) | def testInitTwoPoints(self): method testInitTwoPointsReversed (line 170) | def testInitTwoPointsReversed(self): method testArea (line 184) | def testArea(self): method testContains (line 188) | def testContains(self): method testIntersectsCircle (line 195) | def testIntersectsCircle(self): FILE: pysc2/lib/portspicker.py function pick_unused_ports (line 25) | def pick_unused_ports(num_ports, retry_interval_secs=1, retry_attempts=5): function pick_contiguous_unused_ports (line 46) | def pick_contiguous_unused_ports( function return_ports (line 68) | def return_ports(ports): FILE: pysc2/lib/portspicker_test.py class PortsTest (line 22) | class PortsTest(parameterized.TestCase): method testNonContiguousReservation (line 25) | def testNonContiguousReservation(self, num_ports): method testContiguousReservation (line 31) | def testContiguousReservation(self, num_ports): method testInvalidReservation (line 36) | def testInvalidReservation(self): method testInvalidContiguousReservation (line 40) | def testInvalidContiguousReservation(self): FILE: pysc2/lib/proto_diff.py class ProtoPath (line 23) | class ProtoPath(object): method __init__ (line 26) | def __init__(self, path): method get_field (line 34) | def get_field(self, proto): method with_anonymous_array_indices (line 45) | def with_anonymous_array_indices(self): method path (line 52) | def path(self): method __lt__ (line 55) | def __lt__(self, other): method __getitem__ (line 64) | def __getitem__(self, item): method __len__ (line 67) | def __len__(self): method __eq__ (line 70) | def __eq__(self, o): method __hash__ (line 73) | def __hash__(self): method __repr__ (line 76) | def __repr__(self): class ProtoDiffs (line 87) | class ProtoDiffs(object): method __init__ (line 90) | def __init__(self, proto_a, proto_b, changed, added, removed): method proto_a (line 107) | def proto_a(self): method proto_b (line 111) | def proto_b(self): method changed (line 115) | def changed(self): method added (line 119) | def added(self): method removed (line 123) | def removed(self): method all_diffs (line 126) | def all_diffs(self): method report (line 129) | def report(self, differencers=None, truncate_to=0): method __repr__ (line 174) | def __repr__(self): function _truncate (line 179) | def _truncate(val, truncate_to): function _dict_path_to_proto_path (line 187) | def _dict_path_to_proto_path(dict_path): function compute_diff (line 194) | def compute_diff(proto_a, proto_b): FILE: pysc2/lib/proto_diff_test.py class ProtoPathTest (line 24) | class ProtoPathTest(absltest.TestCase): method testCreationFromTuple (line 26) | def testCreationFromTuple(self): method testCreationFromList (line 31) | def testCreationFromList(self): method testCreationFromGenerator (line 36) | def testCreationFromGenerator(self): method testStringRepr (line 41) | def testStringRepr(self): method testOrdering (line 46) | def testOrdering(self): method testEquals (line 59) | def testEquals(self): method testNotEqual (line 65) | def testNotEqual(self): method testIndexing (line 71) | def testIndexing(self): method testGetField (line 78) | def testGetField(self): method testWithAnonymousArrayIndices (line 90) | def testWithAnonymousArrayIndices(self): function _alert_formatter (line 102) | def _alert_formatter(path, proto_a, proto_b): class ProtoDiffTest (line 110) | class ProtoDiffTest(absltest.TestCase): method testNoDiffs (line 112) | def testNoDiffs(self): method testAddedField (line 118) | def testAddedField(self): method testAddedFields (line 129) | def testAddedFields(self): method testRemovedField (line 148) | def testRemovedField(self): method testRemovedFields (line 160) | def testRemovedFields(self): method testChangedField (line 180) | def testChangedField(self): method testChangedFields (line 190) | def testChangedFields(self): method testTruncation (line 211) | def testTruncation(self): FILE: pysc2/lib/protocol.py class ConnectionError (line 48) | class ConnectionError(Exception): # pylint: disable=redefined-builtin class ProtocolError (line 53) | class ProtocolError(Exception): # pylint: disable=g-bad-exception-name function catch_websocket_connection_errors (line 59) | def catch_websocket_connection_errors(): class StarcraftProtocol (line 72) | class StarcraftProtocol(object): method __init__ (line 75) | def __init__(self, sock): method status (line 82) | def status(self): method close (line 85) | def close(self): method read (line 92) | def read(self): method write (line 116) | def write(self, request): method send_req (line 124) | def send_req(self, request): method send (line 129) | def send(self, **kwargs): method _packet_str (line 155) | def _packet_str(self, packet): method _log (line 168) | def _log(self, s, *args): method _read (line 175) | def _read(self): method _write (line 186) | def _write(self, request): FILE: pysc2/lib/remote_controller.py class ConnectError (line 44) | class ConnectError(Exception): class RequestError (line 48) | class RequestError(Exception): method __init__ (line 50) | def __init__(self, description, res): function check_error (line 55) | def check_error(res, error_enum): function decorate_check_error (line 65) | def decorate_check_error(error_enum): function skip_status (line 75) | def skip_status(*skipped): function valid_status (line 86) | def valid_status(*valid): function catch_game_end (line 100) | def catch_game_end(func): class RemoteController (line 128) | class RemoteController(object): method __init__ (line 140) | def __init__(self, host, port, proc=None, timeout_seconds=None): method _connect (line 148) | def _connect(self, host, port, proc, timeout_seconds): method close (line 178) | def close(self): method status_ended (line 182) | def status_ended(self): method create_game (line 188) | def create_game(self, req_create_game): method save_map (line 195) | def save_map(self, map_path, map_data): method join_game (line 203) | def join_game(self, req_join_game): method restart (line 210) | def restart(self): method start_replay (line 217) | def start_replay(self, req_start_replay): method game_info (line 223) | def game_info(self): method data_raw (line 229) | def data_raw(self, ability_id=True, unit_type_id=True, upgrade_id=True, method data (line 236) | def data(self): method observe (line 242) | def observe(self, disable_fog=False, target_game_loop=0): method available_maps (line 275) | def available_maps(self): method step (line 281) | def step(self, count=1): method actions (line 289) | def actions(self, req_action): method act (line 299) | def act(self, action): method observer_actions (line 307) | def observer_actions(self, req_observer_action): method observer_act (line 317) | def observer_act(self, action): method chat (line 323) | def chat(self, message, channel=sc_pb.ActionChat.Broadcast): method leave (line 333) | def leave(self): method save_replay (line 339) | def save_replay(self): method debug (line 346) | def debug(self, debug_commands): method query (line 354) | def query(self, query): method quit (line 360) | def quit(self): method ping (line 371) | def ping(self): method replay_info (line 376) | def replay_info(self, replay_data): method status (line 381) | def status(self): FILE: pysc2/lib/renderer_ascii.py function get_printable_unit_types (line 20) | def get_printable_unit_types(): function _summary (line 58) | def _summary(obs, view, width): function screen (line 65) | def screen(obs): function minimap (line 95) | def minimap(obs): FILE: pysc2/lib/renderer_human.py function with_lock (line 58) | def with_lock(lock): function clamp (line 69) | def clamp(n, smallest, largest): class MouseButtons (line 73) | class MouseButtons(enum.IntEnum): class SurfType (line 82) | class SurfType(enum.IntEnum): class ActionCmd (line 91) | class ActionCmd(enum.Enum): class _Ability (line 97) | class _Ability(collections.namedtuple("_Ability", [ method __new__ (line 101) | def __new__(cls, ability, static_data): class _Surface (line 117) | class _Surface(object): method __init__ (line 120) | def __init__(self, surf, surf_type, surf_rect, world_to_surf, world_to... method draw_line (line 139) | def draw_line(self, color, start_loc, end_loc, thickness=1): method draw_arc (line 146) | def draw_arc(self, color, world_loc, world_radius, start_angle, stop_a... method draw_circle (line 155) | def draw_circle(self, color, world_loc, world_radius, thickness=0): method draw_rect (line 163) | def draw_rect(self, color, world_rect, thickness=0): method blit_np_array (line 170) | def blit_np_array(self, array): method write_screen (line 177) | def write_screen(self, font, color, screen_pos, text, align="left", method write_world (line 193) | def write_world(self, font, color, world_loc, text): class MousePos (line 200) | class MousePos(collections.namedtuple("MousePos", ["world_pos", "surf"])): method surf_pos (line 205) | def surf_pos(self): method obs_pos (line 209) | def obs_pos(self): method action_spatial (line 212) | def action_spatial(self, action): class PastAction (line 222) | class PastAction(collections.namedtuple("PastAction", [ function _get_desktop_size (line 228) | def _get_desktop_size(): function circle_mask (line 244) | def circle_mask(shape, pt, radius): class RendererHuman (line 253) | class RendererHuman(object): method __init__ (line 301) | def __init__(self, fps=22.4, step_mul=1, render_sync=False, method close (line 335) | def close(self): method init (line 345) | def init(self, game_info, static_data): method init_window (line 411) | def init_window(self): method _update_camera (line 702) | def _update_camera(self, camera_center): method zoom (line 717) | def zoom(self, factor): method get_mouse_pos (line 726) | def get_mouse_pos(self, window_pos=None): method clear_queued_action (line 738) | def clear_queued_action(self): method save_replay (line 742) | def save_replay(self, run_config, controller): method get_actions (line 752) | def get_actions(self, run_config, controller): method camera_action (line 887) | def camera_action(self, mouse_pos): method camera_action_raw (line 895) | def camera_action_raw(self, world_pos): method camera_action_observer_pt (line 901) | def camera_action_observer_pt(self, world_pos): method camera_action_observer_player (line 907) | def camera_action_observer_player(self, player_id): method select_action (line 913) | def select_action(self, pos1, pos2, ctrl, shift): method select_idle_worker (line 959) | def select_idle_worker(self, ctrl, shift): method select_army (line 970) | def select_army(self, shift): method select_warp_gates (line 976) | def select_warp_gates(self, shift): method select_larva (line 982) | def select_larva(self): method control_group (line 988) | def control_group(self, control_group_id, ctrl, shift, alt): method unit_action (line 1009) | def unit_action(self, cmd, pos, shift): method _abilities (line 1045) | def _abilities(self, fn=None): method _visible_units (line 1054) | def _visible_units(self): method _units_in_area (line 1062) | def _units_in_area(self, rect): method get_unit_name (line 1068) | def get_unit_name(self, surf, name, radius): method draw_units (line 1082) | def draw_units(self, surf): method draw_effects (line 1188) | def draw_effects(self, surf): method draw_selection (line 1207) | def draw_selection(self, surf): method draw_build_target (line 1218) | def draw_build_target(self, surf): method draw_overlay (line 1236) | def draw_overlay(self, surf): method draw_help (line 1269) | def draw_help(self, surf): method draw_commands (line 1286) | def draw_commands(self, surf): method draw_panel (line 1326) | def draw_panel(self, surf): method draw_actions (line 1429) | def draw_actions(self): method prepare_actions (line 1443) | def prepare_actions(self, obs): method draw_base_map (line 1518) | def draw_base_map(self, surf): method draw_mini_map (line 1556) | def draw_mini_map(self, surf): method check_valid_queued_action (line 1615) | def check_valid_queued_action(self): method draw_rendered_map (line 1625) | def draw_rendered_map(self, surf): method draw_screen (line 1630) | def draw_screen(self, surf): method draw_feature_layer (line 1647) | def draw_feature_layer(self, surf, feature): method draw_raw_layer (line 1656) | def draw_raw_layer(self, surf, from_obs, name, color): method all_surfs (line 1668) | def all_surfs(self, fn, *args, **kwargs): method render (line 1674) | def render(self, obs): method render_thread (line 1688) | def render_thread(self): method render_obs (line 1710) | def render_obs(self, obs): method run (line 1735) | def run(self, run_config, controller, max_game_steps=0, max_episodes=0, method __del__ (line 1807) | def __del__(self): FILE: pysc2/lib/replay.py function get_replay_version (line 24) | def get_replay_version(replay_data): FILE: pysc2/lib/replay/replay_converter.py function _unconverted_observation (line 31) | def _unconverted_observation(observation, actions): function get_flat_action (line 43) | def get_flat_action(obs: Dict[str, Any]) -> Dict[str, Any]: function _convert_observation (line 53) | def _convert_observation(converter, player_observation, force_action_delay, function converted_observations (line 68) | def converted_observations(observations_iterator, converter, accept_step... function converted_observation_stream (line 139) | def converted_observation_stream( function get_step_sequence (line 182) | def get_step_sequence(action_skips: Iterable[int]) -> Sequence[int]: FILE: pysc2/lib/replay/replay_observation_stream.py function _get_replay_version (line 27) | def _get_replay_version(replay_data): class ReplayError (line 41) | class ReplayError(Exception): class ReplayObservationStream (line 45) | class ReplayObservationStream(object): method __init__ (line 68) | def __init__(self, method _get_controllers (line 105) | def _get_controllers(self, version): method _close (line 121) | def _close(self): method start_replay_from_data (line 132) | def start_replay_from_data(self, replay_data, player_id): method replay_info (line 173) | def replay_info(self): method game_info (line 176) | def game_info(self): method static_data (line 179) | def static_data(self): method observations (line 182) | def observations(self, step_sequence=None): method close (line 230) | def close(self): method __enter__ (line 235) | def __enter__(self): method __exit__ (line 238) | def __exit__(self, exception_type, exception_value, traceback): FILE: pysc2/lib/replay/sc2_replay.py function _convert_to_str (line 25) | def _convert_to_str(s): function _convert_all_to_str (line 32) | def _convert_all_to_str(structure): class SC2Replay (line 39) | class SC2Replay(object): method __init__ (line 42) | def __init__(self, replay_data): method details (line 47) | def details(self): method init_data (line 55) | def init_data(self): method tracker_events (line 60) | def tracker_events(self, filter_fn=None): method game_events (line 68) | def game_events(self, filter_fn=None): method message_events (line 76) | def message_events(self, filter_fn=None): method attributes_events (line 84) | def attributes_events(self, filter_fn=None): method metadata (line 93) | def metadata(self): method protocol (line 97) | def protocol(self): function _extract (line 101) | def _extract(contents): FILE: pysc2/lib/replay/sc2_replay_test.py class Sc2ReplayTest (line 26) | class Sc2ReplayTest(absltest.TestCase): method setUp (line 28) | def setUp(self): method testDetails (line 36) | def testDetails(self): method testInitData (line 74) | def testInitData(self): method testTrackerEvents (line 86) | def testTrackerEvents(self): method testGameEvents (line 102) | def testGameEvents(self): method testMessageEvents (line 119) | def testMessageEvents(self): method testAttributesEvents (line 127) | def testAttributesEvents(self): FILE: pysc2/lib/replay/sc2_replay_utils.py function _readable_event_type (line 42) | def _readable_event_type(full_event_type): class EventData (line 47) | class EventData: function raw_action_skips (line 52) | def raw_action_skips(replay: sc2_replay.SC2Replay) -> Mapping[int, List[... FILE: pysc2/lib/replay/sc2_replay_utils_test.py function _read_replay (line 30) | def _read_replay(name): function _read_skips (line 37) | def _read_skips(name): class Sc2ReplayUtilsTest (line 43) | class Sc2ReplayUtilsTest(parameterized.TestCase): method test_raw_action_skips (line 48) | def test_raw_action_skips(self, replay_name, skips_file): FILE: pysc2/lib/resources.py function GetResourceFilename (line 17) | def GetResourceFilename(path): FILE: pysc2/lib/run_parallel.py class RunParallel (line 24) | class RunParallel(object): method __init__ (line 27) | def __init__(self, timeout=None): method run (line 32) | def run(self, funcs): method shutdown (line 79) | def shutdown(self, wait=True): method __del__ (line 85) | def __del__(self): FILE: pysc2/lib/run_parallel_test.py class Barrier (line 23) | class Barrier(object): method __init__ (line 25) | def __init__(self, n): method wait (line 30) | def wait(self): method clear (line 42) | def clear(self): function bad (line 48) | def bad(): class RunParallelTest (line 52) | class RunParallelTest(absltest.TestCase): method test_returns_expected_values (line 54) | def test_returns_expected_values(self): method test_run_in_parallel (line 62) | def test_run_in_parallel(self): method test_avoids_deadlock (line 69) | def test_avoids_deadlock(self): method test_exception (line 78) | def test_exception(self): method test_partial (line 89) | def test_partial(self): FILE: pysc2/lib/sc_process.py class SC2LaunchError (line 44) | class SC2LaunchError(Exception): class StarcraftProcess (line 48) | class StarcraftProcess(object): method __init__ (line 58) | def __init__(self, run_config, exec_path, version, full_screen=False, method close (line 144) | def close(self): method controller (line 159) | def controller(self): method host (line 163) | def host(self): method port (line 167) | def port(self): method version (line 171) | def version(self): method __enter__ (line 174) | def __enter__(self): method __exit__ (line 177) | def __exit__(self, unused_exception_type, unused_exc_value, unused_tra... method __del__ (line 180) | def __del__(self): method _check_exists (line 184) | def _check_exists(self, exec_path): method _launch (line 191) | def _launch(self, run_config, args, **kwargs): method _shutdown (line 201) | def _shutdown(self): method running (line 209) | def running(self): method pid (line 216) | def pid(self): function _shutdown_proc (line 220) | def _shutdown_proc(p, timeout): FILE: pysc2/lib/static_data.py class StaticData (line 17) | class StaticData(object): method __init__ (line 20) | def __init__(self, data): method abilities (line 34) | def abilities(self): method upgrades (line 38) | def upgrades(self): method units (line 42) | def units(self): method unit_stats (line 46) | def unit_stats(self): method general_abilities (line 50) | def general_abilities(self): FILE: pysc2/lib/stopwatch.py class Stat (line 25) | class Stat(object): method __init__ (line 29) | def __init__(self): method reset (line 32) | def reset(self): method add (line 39) | def add(self, val): method avg (line 49) | def avg(self): method dev (line 53) | def dev(self): method merge (line 59) | def merge(self, other): method build (line 67) | def build(summation, average, standard_deviation, minimum, maximum, nu... method parse (line 78) | def parse(s): method __str__ (line 84) | def __str__(self): class StopWatchContext (line 91) | class StopWatchContext(object): method __init__ (line 95) | def __init__(self, stopwatch, name): method __enter__ (line 99) | def __enter__(self): method __exit__ (line 102) | def __exit__(self, unused_exception_type, unused_exc_value, unused_tra... class TracingStopWatchContext (line 106) | class TracingStopWatchContext(StopWatchContext): method __enter__ (line 109) | def __enter__(self): method __exit__ (line 113) | def __exit__(self, *args, **kwargs): method _log (line 118) | def _log(self, s): class FakeStopWatchContext (line 122) | class FakeStopWatchContext(object): method __enter__ (line 126) | def __enter__(self): method __exit__ (line 129) | def __exit__(self, unused_exception_type, unused_exc_value, unused_tra... class StopWatch (line 136) | class StopWatch(object): method __init__ (line 153) | def __init__(self, enabled=True, trace=False): method disable (line 163) | def disable(self): method enable (line 166) | def enable(self): method trace (line 169) | def trace(self): method custom (line 172) | def custom(self, factory): method __call__ (line 175) | def __call__(self, name): method decorate (line 178) | def decorate(self, name_or_func): method push (line 212) | def push(self, name): method pop (line 219) | def pop(self): method cur_stack (line 225) | def cur_stack(self): method clear (line 228) | def clear(self): method add (line 231) | def add(self, name, duration): method __getitem__ (line 234) | def __getitem__(self, name): method times (line 238) | def times(self): method merge (line 241) | def merge(self, other): method parse (line 246) | def parse(s): method str (line 258) | def str(self, threshold=0.1): method __str__ (line 288) | def __str__(self): FILE: pysc2/lib/stopwatch_test.py function ham_dist (line 25) | def ham_dist(str1, str2): class StatTest (line 31) | class StatTest(absltest.TestCase): method testRange (line 33) | def testRange(self): method testParse (line 44) | def testParse(self): class StopwatchTest (line 55) | class StopwatchTest(absltest.TestCase): method testStopwatch (line 58) | def testStopwatch(self, mock_time): method testDivideZero (line 95) | def testDivideZero(self): method testDecoratorDisabled (line 104) | def testDecoratorDisabled(self): method testDecoratorEnabled (line 110) | def testDecoratorEnabled(self): method testSpeed (line 115) | def testSpeed(self): FILE: pysc2/lib/transform.py class Transform (line 31) | class Transform(object): method fwd_dist (line 34) | def fwd_dist(self, dist): method fwd_pt (line 37) | def fwd_pt(self, pt): method back_dist (line 40) | def back_dist(self, dist): method back_pt (line 43) | def back_pt(self, pt): class Linear (line 47) | class Linear(Transform): method __init__ (line 50) | def __init__(self, scale=None, offset=None): method fwd_dist (line 60) | def fwd_dist(self, dist): method fwd_pt (line 63) | def fwd_pt(self, pt): method back_dist (line 66) | def back_dist(self, dist): method back_pt (line 69) | def back_pt(self, pt): method __str__ (line 72) | def __str__(self): class Chain (line 76) | class Chain(Transform): method __init__ (line 79) | def __init__(self, *args): method fwd_dist (line 82) | def fwd_dist(self, dist): method fwd_pt (line 87) | def fwd_pt(self, pt): method back_dist (line 92) | def back_dist(self, dist): method back_pt (line 97) | def back_pt(self, pt): method __str__ (line 102) | def __str__(self): class PixelToCoord (line 106) | class PixelToCoord(Transform): method fwd_dist (line 109) | def fwd_dist(self, dist): method fwd_pt (line 112) | def fwd_pt(self, pt): method back_dist (line 115) | def back_dist(self, dist): method back_pt (line 118) | def back_pt(self, pt): method __str__ (line 121) | def __str__(self): FILE: pysc2/lib/units.py class Neutral (line 20) | class Neutral(enum.IntEnum): class Protoss (line 102) | class Protoss(enum.IntEnum): class Terran (line 151) | class Terran(enum.IntEnum): class Zerg (line 215) | class Zerg(enum.IntEnum): function get_unit_type (line 295) | def get_unit_type(unit_id): FILE: pysc2/lib/upgrades.py class Upgrades (line 20) | class Upgrades(enum.IntEnum): FILE: pysc2/lib/video_writer.py class VideoWriter (line 19) | class VideoWriter(io.FFmpegWriter): method __init__ (line 25) | def __init__(self, filename, frame_rate): method add (line 29) | def add(self, frame): method __del__ (line 33) | def __del__(self): FILE: pysc2/maps/ladder.py class Ladder (line 25) | class Ladder(lib.Map): FILE: pysc2/maps/lib.py class DuplicateMapError (line 36) | class DuplicateMapError(Exception): class NoMapError (line 40) | class NoMapError(Exception): class Map (line 44) | class Map(object): method path (line 73) | def path(self): method data (line 81) | def data(self, run_config): method name (line 92) | def name(self): method __str__ (line 95) | def __str__(self): method all_subclasses (line 107) | def all_subclasses(cls): function get_maps (line 115) | def get_maps(): function get (line 127) | def get(map_name): FILE: pysc2/maps/melee.py class Melee (line 19) | class Melee(lib.Map): FILE: pysc2/maps/mini_games.py class MiniGame (line 19) | class MiniGame(lib.Map): FILE: pysc2/run_configs/__init__.py function get (line 27) | def get(version=None): FILE: pysc2/run_configs/lib.py class Version (line 23) | class Version(collections.namedtuple("Version", [ function version_dict (line 29) | def version_dict(versions): class RunConfig (line 108) | class RunConfig(object): method __init__ (line 111) | def __init__(self, replay_dir, data_dir, tmp_dir, version, method map_data (line 130) | def map_data(self, map_name, players=None): method abs_replay_path (line 144) | def abs_replay_path(self, replay_path): method replay_data (line 148) | def replay_data(self, replay_path): method replay_paths (line 153) | def replay_paths(self, replay_dir): method save_replay (line 163) | def save_replay(self, replay_data, replay_dir, prefix=None): method start (line 194) | def start(self, version=None, **kwargs): method all_subclasses (line 199) | def all_subclasses(cls): method name (line 207) | def name(cls): method priority (line 211) | def priority(cls): method get_versions (line 215) | def get_versions(self, containing=None): method _get_version (line 222) | def _get_version(self, game_version): FILE: pysc2/run_configs/platforms.py function _read_execute_info (line 36) | def _read_execute_info(path, parents): class LocalBase (line 50) | class LocalBase(lib.RunConfig): method __init__ (line 53) | def __init__(self, base_dir, exec_name, version, cwd=None, env=None): method start (line 67) | def start(self, want_rgb=True, **kwargs): method get_versions (line 86) | def get_versions(self, containing=None): class Windows (line 109) | class Windows(LocalBase): method __init__ (line 112) | def __init__(self, version=None): method priority (line 120) | def priority(cls): class Cygwin (line 125) | class Cygwin(LocalBase): method __init__ (line 128) | def __init__(self, version=None): method priority (line 135) | def priority(cls): class MacOS (line 140) | class MacOS(LocalBase): method __init__ (line 143) | def __init__(self, version=None): method priority (line 152) | def priority(cls): class Linux (line 157) | class Linux(LocalBase): method __init__ (line 168) | def __init__(self, version=None): method priority (line 178) | def priority(cls): method start (line 182) | def start(self, want_rgb=True, **kwargs): FILE: pysc2/tests/actions_test.py function raw_ability_ids (line 25) | def raw_ability_ids(obs): class ActionsTest (line 30) | class ActionsTest(utils.GameReplayTestCase): method test_general_attack (line 33) | def test_general_attack(self): FILE: pysc2/tests/debug_test.py class DebugTest (line 28) | class DebugTest(absltest.TestCase): method test_multi_player (line 30) | def test_multi_player(self): FILE: pysc2/tests/dummy_observation.py class Unit (line 30) | class Unit(object): method __init__ (line 33) | def __init__( method fill (line 51) | def fill(self, unit_proto): method as_array (line 61) | def as_array(self): method as_dict (line 73) | def as_dict(self): class FeatureUnit (line 77) | class FeatureUnit(object): method __init__ (line 80) | def __init__( method as_dict (line 136) | def as_dict(self): class Builder (line 140) | class Builder(object): method __init__ (line 143) | def __init__(self, obs_spec): method game_loop (line 182) | def game_loop(self, game_loop): method player_common (line 187) | def player_common( method score (line 208) | def score(self, score): method score_details (line 212) | def score_details( method score_by_category (line 235) | def score_by_category( method score_by_vital (line 247) | def score_by_vital(self, entry_name, life, shields, energy): method single_select (line 255) | def single_select(self, unit): method multi_select (line 259) | def multi_select(self, units): method build_queue (line 263) | def build_queue(self, build_queue, production=None): method feature_units (line 268) | def feature_units(self, feature_units): method build (line 272) | def build(self): FILE: pysc2/tests/dummy_observation_test.py class DummyObservationTest (line 39) | class DummyObservationTest(parameterized.TestCase): method setUp (line 41) | def setUp(self): method testFeatureScreenMatchesSpec (line 57) | def testFeatureScreenMatchesSpec(self): method testFeatureMinimapMatchesSpec (line 63) | def testFeatureMinimapMatchesSpec(self): method testRgbScreenMatchesSpec (line 69) | def testRgbScreenMatchesSpec(self): method testGameLoopCanBeSet (line 73) | def testGameLoopCanBeSet(self): method testPlayerCommonCanBeSet (line 78) | def testPlayerCommonCanBeSet(self): method testScoreCanBeSet (line 103) | def testScoreCanBeSet(self): method testScoreDetailsCanBeSet (line 108) | def testScoreDetailsCanBeSet(self): method testScoreByCategorySpec (line 136) | def testScoreByCategorySpec(self): method testScoreByCategory (line 143) | def testScoreByCategory(self, entry_name): method testScoreByVitalSpec (line 170) | def testScoreByVitalSpec(self): method testScoreByVital (line 177) | def testScoreByVital(self, entry_name): method testRgbMinimapMatchesSpec (line 198) | def testRgbMinimapMatchesSpec(self): method testNoSingleSelect (line 202) | def testNoSingleSelect(self): method testWithSingleSelect (line 206) | def testWithSingleSelect(self): method testNoMultiSelect (line 211) | def testNoMultiSelect(self): method testWithMultiSelect (line 215) | def testWithMultiSelect(self): method testBuildQueue (line 223) | def testBuildQueue(self): method testFeatureUnitsAreAdded (line 243) | def testFeatureUnitsAreAdded(self): method _get_obs (line 277) | def _get_obs(self): method _check_layer (line 280) | def _check_layer(self, layer, x, y, bits): method _check_attributes_match (line 285) | def _check_attributes_match(self, a, b, attributes): method _check_unit (line 289) | def _check_unit(self, proto, builder): method _check_feature_unit (line 292) | def _check_feature_unit(self, proto, builder): FILE: pysc2/tests/easy_scripted_test.py class TestEasy (line 25) | class TestEasy(utils.TestCase): method test_move_to_beacon (line 29) | def test_move_to_beacon(self): method test_collect_mineral_shards (line 46) | def test_collect_mineral_shards(self): method test_collect_mineral_shards_feature_units (line 63) | def test_collect_mineral_shards_feature_units(self): method test_collect_mineral_shards_raw (line 81) | def test_collect_mineral_shards_raw(self): method test_defeat_roaches (line 97) | def test_defeat_roaches(self): method test_defeat_roaches_raw (line 114) | def test_defeat_roaches_raw(self): FILE: pysc2/tests/general_actions_test.py class TestGeneralActions (line 27) | class TestGeneralActions(utils.TestCase): method test_general_actions (line 30) | def test_general_actions(self): FILE: pysc2/tests/host_remote_agent_test.py class TestHostRemoteAgent (line 32) | class TestHostRemoteAgent(utils.TestCase): method testVsBot (line 34) | def testVsBot(self): method testVsAgent (line 59) | def testVsAgent(self): FILE: pysc2/tests/multi_player_env_test.py class TestMultiplayerEnv (line 30) | class TestMultiplayerEnv(parameterized.TestCase, utils.TestCase): method test_multi_player_env (line 57) | def test_multi_player_env(self, agent_interface_format): FILE: pysc2/tests/multi_player_test.py function print_stage (line 33) | def print_stage(stage): class TestMultiplayer (line 37) | class TestMultiplayer(utils.TestCase): method test_multi_player (line 39) | def test_multi_player(self): FILE: pysc2/tests/obs_spec_test.py class TestObservationSpec (line 24) | class TestObservationSpec(utils.TestCase): method test_observation_matches_obs_spec (line 26) | def test_observation_matches_obs_spec(self): method test_heterogeneous_observations (line 62) | def test_heterogeneous_observations(self): method check_observation_matches_spec (line 113) | def check_observation_matches_spec(self, obs, obs_spec): FILE: pysc2/tests/obs_test.py class ObsTest (line 36) | class ObsTest(utils.GameReplayTestCase): method test_hallucination (line 39) | def test_hallucination(self): method test_hide_cloaked (line 82) | def test_hide_cloaked(self): method test_show_cloaked (line 134) | def test_show_cloaked(self): method test_pos (line 187) | def test_pos(self): method test_fog (line 217) | def test_fog(self): method test_effects (line 250) | def test_effects(self): method test_active (line 366) | def test_active(self): method test_disable_fog (line 434) | def test_disable_fog(self): method test_action_delay (line 466) | def test_action_delay(self): method test_camera_movement_delay (line 512) | def test_camera_movement_delay(self): FILE: pysc2/tests/observer_test.py class TestObserver (line 27) | class TestObserver(utils.TestCase): method test_observer (line 29) | def test_observer(self): FILE: pysc2/tests/ping_test.py class TestPing (line 24) | class TestPing(utils.TestCase): method test_ping (line 26) | def test_ping(self): FILE: pysc2/tests/protocol_error_test.py class TestProtocolError (line 29) | class TestProtocolError(utils.TestCase): method test_error (line 32) | def test_error(self): method test_replay_a_replay (line 40) | def test_replay_a_replay(self): FILE: pysc2/tests/random_agent_test.py class TestRandomAgent (line 26) | class TestRandomAgent(parameterized.TestCase, utils.TestCase): method test_random_agent (line 40) | def test_random_agent(self, agent_interface_format): FILE: pysc2/tests/render_test.py class TestRender (line 30) | class TestRender(utils.TestCase): method test_render (line 32) | def test_render(self): FILE: pysc2/tests/replay_obs_test.py function identity_function (line 38) | def identity_function(name, args): function any_point (line 42) | def any_point(unit_type, obs): function avg_point (line 50) | def avg_point(unit_type, obs): function select (line 58) | def select(func, unit_type): class Config (line 62) | class Config(object): method __init__ (line 65) | def __init__(self): class GameController (line 103) | class GameController(object): method __init__ (line 106) | def __init__(self, config): method _initialize (line 118) | def _initialize(self): method start_replay (line 128) | def start_replay(self, replay_data): method create_game (line 137) | def create_game(self): method controller (line 155) | def controller(self): method close (line 158) | def close(self): method __enter__ (line 167) | def __enter__(self): method __exit__ (line 170) | def __exit__(self, exception_type, exception_value, traceback): class ReplayObsTest (line 174) | class ReplayObsTest(utils.TestCase): method _get_replay_data (line 176) | def _get_replay_data(self, controller, config): method _process_replay (line 231) | def _process_replay(self, controller, observations, config): method test_replay_observations_match (line 274) | def test_replay_observations_match(self): FILE: pysc2/tests/step_mul_override_test.py class StepMulOverrideTest (line 29) | class StepMulOverrideTest(utils.TestCase): method test_returns_game_loop_zero_on_first_step_despite_override (line 31) | def test_returns_game_loop_zero_on_first_step_despite_override(self): method test_respects_override (line 45) | def test_respects_override(self): FILE: pysc2/tests/utils.py class TestCase (line 37) | class TestCase(absltest.TestCase): method setUp (line 40) | def setUp(self): method tearDown (line 45) | def tearDown(self): function get_units (line 53) | def get_units(obs, filter_fn=None, owner=None, unit_type=None, tag=None): function get_unit (line 67) | def get_unit(*args, **kwargs): function xy_locs (line 75) | def xy_locs(mask): function only_in_game (line 81) | def only_in_game(func): class GameReplayTestCase (line 89) | class GameReplayTestCase(TestCase): method setup (line 93) | def setup(**kwargs): method start_game (line 116) | def start_game(self, show_cloaked=True, disable_fog=False, players=2): method start_replay (line 175) | def start_replay(self): method close (line 190) | def close(self): # Instead of tearDown. method step (line 209) | def step(self, count=4): method observe (line 212) | def observe(self, disable_fog=False): method move_camera (line 217) | def move_camera(self, x, y): method raw_unit_command (line 224) | def raw_unit_command(self, player, ability_id, unit_tags, pos=None, method debug (line 246) | def debug(self, player=0, **kwargs): method god (line 249) | def god(self): method create_unit (line 254) | def create_unit(self, unit_type, owner, pos, quantity=1): method kill_unit (line 262) | def kill_unit(self, unit_tags): method set_energy (line 267) | def set_energy(self, tag, energy): method assert_point (line 272) | def assert_point(self, proto_pos, pos): method assert_layers (line 276) | def assert_layers(self, layers, pos, **kwargs): method assert_unit (line 282) | def assert_unit(self, unit, **kwargs): FILE: pysc2/tests/versions_test.py function major_version (line 27) | def major_version(v): function log_center (line 31) | def log_center(s, *args): class TestVersions (line 35) | class TestVersions(absltest.TestCase): method test_version_numbers (line 37) | def test_version_numbers(self): method test_versions_create_game (line 62) | def test_versions_create_game(self): FILE: setup.py class BuildCommand (line 37) | class BuildCommand(distutils.command.build.build): method initialize_options (line 39) | def initialize_options(self):