def run_thread(map_name, visualize): with sc2_env.SC2Env(map_name=map_name, players=[ sc2_env.Agent(sc2_env.Race.protoss), sc2_env.Bot(sc2_env.Race.protoss, sc2_env.Difficulty.very_easy) ], step_mul=FLAGS.step_mul, game_steps_per_episode=FLAGS.game_steps_per_episode, agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions( screen=FLAGS.screen_resolution, minimap=FLAGS.minimap_resolution)), visualize=visualize) as env: env = available_actions_printer.AvailableActionsPrinter(env) if not FLAGS.save_file: save_name = f'./data/{FLAGS.map}/{FLAGS.max_episodes}eps_{FLAGS.agent}' else: save_name = FLAGS.save_file if FLAGS.load_checkpoint: agent = agent_selector(FLAGS.agent, save_name=save_name, load_name=FLAGS.load_file) # agent = Agent(save_name=FLAGS.load_file) agent.load_model_checkpoint(load_params=FLAGS.load_params) else: # save_name = f'./data/{FLAGS.map}/{FLAGS.max_episodes}eps_{FLAGS.agent}' agent = agent_selector(FLAGS.agent, save_name=save_name) # agent = Agent(save_name=save_name) if FLAGS.train: agent.train(env, FLAGS.train, max_episodes=FLAGS.max_episodes) else: agent.evaluate(env)
def test_episode_length(self): env = mock_sc2_env.SC2TestEnv( map_name='nonexistant map', agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=64, minimap=32))) self.assertEqual(env.episode_length, 10) self._test_episode_length(env, length=10)
def main(unused_argv): agent1 = myAgent() try: with sc2_env.SC2Env( map_name="3m_vs_3m", players=[sc2_env.Agent(sc2_env.Race.terran), ], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=config.MAP_SIZE, minimap=config.MAP_SIZE), camera_width_world_units=config.MAP_SIZE * 1, action_space=actions.ActionSpace.RAW, use_raw_units=True, raw_resolution=config.MAP_SIZE, ), score_index=0, step_mul=8, disable_fog=False, visualize=False, realtime=False, ) as env: # env=available_actions_printer.AvailableActionsPrinter(env) run_loop.run_loop([agent1], env, max_episodes=config.EPISODES) except KeyboardInterrupt: pass
def main(unused_argv): agent = MoveToBeacon() try: while True: with sc2_env.SC2Env( map_name="MoveToBeacon", players=[sc2_env.Agent(sc2_env.Race.terran)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), use_feature_units=True), step_mul=16, game_steps_per_episode=0, visualize=True) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent = ArcaneSwarm() try: while True: with sc2_env.SC2Env( map_name="AbyssalReef", players=[sc2_env.Agent(sc2_env.Race.zerg), sc2_env.Bot(sc2_env.Race.random, sc2_env.Difficulty.very_easy)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64),use_feature_units=True), # Size of screen and minimap that the agent see visualize=True ) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent = SmartAgent() mpi_fork(BP.cpu) # run parallel code with mpi # Get the path to the 'output_dir' and 'exp_name' for the given seed logger_kwargs = setup_logger_kwargs(BP.exp_name, BP.seed) try: with sc2_env.SC2Env( map_name="MoveToBeacon", players=[sc2_env.Agent(sc2_env.Race.zerg)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions( screen=BP.map_size[0], minimap=64), use_feature_units=True), step_mul= 16, # Number of step before to ask the next action to from the agent visualize=True, save_replay_episodes=1, replay_dir="/home/thibault/work/rl/starcraft2", ) as env: for i in range(100000): agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent = DefeatRoaches() try: while True: with sc2_env.SC2Env( map_name="DefeatRoaches", players=[sc2_env.Agent(sc2_env.Race.terran)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=64, minimap=64), # use_raw_units=True ), step_mul=1, game_steps_per_episode=0, realtime=False, visualize=True) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent = MarineAgent() i = 0 try: # <editor-fold> desc="Loop running game sessions" while True: i = i + 1 print(i) with sc2_env.SC2Env( map_name="CollectMineralsAndGas", players=[sc2_env.Agent(sc2_env.Race.terran)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=64, minimap=64), use_feature_units=True), step_mul=16, game_steps_per_episode=0, visualize=False) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() # <editor-fold> desc="Loop running the actual game, frame by frame" while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) # </editor-fold> # </editor-fold> except KeyboardInterrupt: pass
def initialize(self): self.agents = SmartAgent() self.env = sc2_env.SC2Env( map_name=self.map_name, players=[ sc2_env.Agent(sc2_env.Race.terran), sc2_env.Bot(sc2_env.Race.terran, sc2_env.Difficulty.very_easy), ], agent_interface_format=features.AgentInterfaceFormat( action_space=actions.ActionSpace.RAW, use_raw_units=True, raw_resolution=self.resolution, ), step_mul=self.step_mul, disable_fog=True, ) observation_spec = self.env.observation_spec() action_spec = self.env.action_spec() # for agent, obs_spec, act_spec in zip(self.agents, observation_spec, action_spec): self.agents.setup(observation_spec, action_spec) self.terminal_state = False self.timesteps = self.env.reset() self.agents.reset()
def main(unused_argv): agent = ProtossAgent() try: while True: with sc2_env.SC2Env( map_name="Catalyst", players=[ sc2_env.Agent(sc2_env.Race.protoss), sc2_env.Bot(sc2_env.Race.random, sc2_env.Difficulty.easy) ], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), use_feature_units=True), step_mul=16, game_steps_per_episode=0, visualize=True, save_replay_episodes=1, replay_dir='E:\Program Files (x86)\StarCraft II\Replays' ) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): max_episodes = 10 episode = 0 try: with sc2_env.SC2Env( map_name="UnitSpawnerMarine", players=[sc2_env.Agent(sc2_env.Race.terran), sc2_env.Bot(sc2_env.Race.random, sc2_env.Difficulty.very_easy)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), use_feature_units=True, ), step_mul=5, game_steps_per_episode=0, visualize=True) as env: while episode < max_episodes: episode += 1 print("Episode "+str(episode)+"/"+str(max_episodes)) agent = TestAttack() agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def run_game_with_agent(agent, mapname, iterations): game_data = [] env = sc2_env.SC2Env( map_name=mapname, agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), use_feature_units=True), step_mul=1, visualize=True, game_steps_per_episode=0) for i in range(1): agent.setup(env.observation_spec(), env.action_spec()) for i in range(iterations): print("Playing game {}".format(i+1)) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): game_data.append(timesteps) break timesteps = env.step(step_actions) return game_data
def main(unused_argv): agent = SmartMineralAgent() #agent = DQNMineralAgent() #agent = MineralAgent() try: while True: with sc2_env.SC2Env( map_name="CollectMineralShards2", players=[sc2_env.Agent(sc2_env.Race.terran)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), use_feature_units=True), step_mul=4, game_steps_per_episode=0, visualize=True) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent = TerranRLAgentWithRawActsAndRawObs() try: while True: with sc2_env.SC2Env( map_name="Simple64", players=[sc2_env.Agent(sc2_env.Race.terran), sc2_env.Bot(sc2_env.Race.terran, sc2_env.Difficulty.easy)], agent_interface_format=features.AgentInterfaceFormat( action_space=actions.ActionSpace.RAW, use_raw_units=True, raw_resolution=64, ), step_mul=8, disable_fog=True, visualize=False ) as env: # run_loop.run_loop([agent], env, max_episodes=1000) agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent1 = myAgent() try: while True: with sc2_env.SC2Env( map_name="Flat96", players=[sc2_env.Agent(race=sc2_env.Race.terran, name='agent1'), sc2_env.Bot(sc2_env.Race.protoss, sc2_env.Difficulty.very_easy)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=macro_operation.screenSize, minimap=macro_operation.minimapSize), action_space=actions.ActionSpace.RAW, camera_width_world_units=macro_operation.screenSize, use_unit_counts=True, use_raw_units=True, raw_resolution=macro_operation.screenSize, ), step_mul=8, game_steps_per_episode=0, realtime=False, visualize=True, ) as env: run_loop.run_loop([agent1], env) except KeyboardInterrupt: pass
def sc2_thread(*args): FLAGS(args) sc2env = sc2_env.SC2Env( map_name="MoveToBeacon", # players=[sc2_env.Agent(sc2_env.Race.terran), # sc2_env.Bot(sc2_env.Race.random, # sc2_env.Difficulty.very_easy)], players=[sc2_env.Agent(sc2_env.Race.terran)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), use_feature_units=True), step_mul=1, game_steps_per_episode=0, #screen_size_px=(128, 128), visualize=True) #visualize=False) sc2agent.setup(sc2env.observation_spec(), sc2env.action_spec()) timesteps = sc2env.reset() sc2agent.reset() # actrAgent.run() while True: step_actions = [sc2agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = sc2env.step(step_actions)
def main(unused_argv): agent1 = myAgent() try: with sc2_env.SC2Env( map_name="Simple96", players=[ sc2_env.Agent(sc2_env.Race.terran), sc2_env.Bot(sc2_env.Race.protoss, sc2_env.Difficulty.very_easy) ], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions( screen=macro_operation.mapSzie, minimap=macro_operation.mapSzie), action_space=actions.ActionSpace.RAW, use_raw_units=True, raw_resolution=macro_operation.mapSzie, use_unit_counts=True), step_mul=8, disable_fog=False, visualize=False, realtime=False) as env: run_loop.run_loop([agent1], env) except KeyboardInterrupt: pass
def sample_frames(action_path): agent_intf = features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=(1, 1), minimap=(1, 1))) feat = features.Features(agent_intf) with open(action_path) as f: actions = json.load(f) frame_id = 0 result_frames = [] for action_step in actions: # Get actions performed since previous observed frame frame_id += FLAGS.step_mul # Advance to current frame action_name = None for action_str in action_step: # Search all actions from step action = Parse(action_str, sc_pb.Action()) try: func_id = feat.reverse_action(action).function func_name = FUNCTIONS[func_id].name if func_name.split('_')[0] in { 'Build', 'Train', 'Research', 'Morph', 'Cancel', 'Halt', 'Stop' }: # Macro action found in step action_name = func_name break # Macro step found, no need to process further actions from this step except: pass if (action_name is not None) or ( (frame_id % FLAGS.skip) == 0): # This is a macro step or fixed recording step result_frames.append(frame_id) return result_frames
def main(unused_argv): agent_baseline = TerranRLAgentWithRawActsAndRawObs() T_09360 = Agent09360() # sc2_env.Race.terran, "09360 조용준" Z_10472 = Agent10472() # sc2_env.Race.zerg, "10472 오수은" T_05026 = Agent05026() # sc2_env.Race.terran, "05026 박상원" P_09287 = Agent09287() # sc2_env.Race.protoss, "09287 서대웅" T_10336 = Agent10336() # sc2_env.Race.terran, "10336 김명환" T_10071 = Agent10071() # sc2_env.Race.terran, "10071 오동훈" P_10395 = Agent10395() # sc2_env.Race.protoss, "10395 이현호" P_10073 = Agent10073() # sc2_env.Race.protoss, "10073 오필훈" T_10274 = Agent10274() # sc2_env.Race.terran, "10274 최지은" try: with sc2_env.SC2Env( map_name="Simple64", players=[ sc2_env.Agent(sc2_env.Race.protoss, "09287 서대웅"), sc2_env.Agent(sc2_env.Race.protoss, "10073 오필훈") ], agent_interface_format=features.AgentInterfaceFormat( action_space=actions.ActionSpace.RAW, use_feature_units=True, feature_dimensions=features.Dimensions(screen=32, minimap=32), use_raw_units=True, use_raw_actions=True, raw_resolution=64, ), step_mul=8, disable_fog=True, visualize=False) as env: run_loop.run_loop([P_09287, P_10073], env, max_episodes=1) env.save_replay("DRLAgentsTournament_FINAL") except KeyboardInterrupt: pass
def main(): agent = honoursAgent() try: while True: with sc2_env.SC2Env( map_name="Simple64", players=[ sc2_env.Agent(sc2_env.Race.zerg), sc2_env.Bot(sc2_env.Race.random, sc2_env.Difficulty.very_easy) ], agent_interface_format=features.AgentInterfaceFormat( action_space=actions.ActionSpace.RAW, use_raw_units=True, raw_resolution=64), step_mul=16, game_steps_per_episode=15000, ) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent = TerranAgent() #Start agent try: while True: #Run function indefinitely with sc2_env.SC2Env( #Setup environment map_name="Simple64", #AbyssalReef players=[sc2_env.Agent(sc2_env.Race.terran), #Player 1 is agent, player 2 is a very easy bot sc2_env.Bot(sc2_env.Race.random, #It's possible to change 'Bot' to 'Agent' for another agent sc2_env.Difficulty.medium)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), #Screen and minimap resolutions use_feature_units=True), #Feature units list step_mul=16, game_steps_per_episode=0, visualize=True) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent1 = myAgent() try: with sc2_env.SC2Env( map_name="DefeatUltralisk", # game_steps_per_episode=200, players=[ sc2_env.Agent(sc2_env.Race.terran), ], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions( screen=config.MAP_SIZE, minimap=config.MAP_SIZE), camera_width_world_units=config.MAP_SIZE * 1, action_space=actions.ActionSpace.RAW, use_raw_units=True, raw_resolution=config.MAP_SIZE, ), score_index=0, step_mul=8, disable_fog=False, visualize=False, realtime=False, ) as env: run_loop.run_loop([agent1], env) except KeyboardInterrupt: pass
def main(unused_argv): agent1 = myAgent() try: with sc2_env.SC2Env( map_name="Flat96", players=[ sc2_env.Agent(sc2_env.Race.terran), sc2_env.Bot(sc2_env.Race.protoss, sc2_env.Difficulty.very_easy) ], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions( screen=config.MAP_SIZE, minimap=config.MAP_SIZE), camera_width_world_units=config.MAP_SIZE * 1, action_space=actions.ActionSpace.RAW, use_raw_units=True, raw_resolution=config.MAP_SIZE, use_unit_counts=True), score_index=-1, step_mul=32, disable_fog=False, visualize=True, realtime=False) as env: run_loop.run_loop([agent1], env) except KeyboardInterrupt: pass
def main(unused): agent = ZergAgent() try: while True: with sc2_env.SC2Env( map_name="AbyssalReef", players=[sc2_env.Agent(sc2_env.Race.zerg), sc2_env.Bot(sc2_env.Race.random, sc2_env.Difficulty.very_easy)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), use_feature_units=True), step_mul=16, # the default value is 8, this is also suggested value from the paper game_steps_per_episode=0, # makes the game for as long as necessary visualize=True) as env: agent.setup(env.observation_spec(), env.action_spec()) time_steps = env.reset() agent.reset() while True: step_actions = [agent.step(time_steps[0])] if time_steps[0].last(): break time_steps = env.step(step_actions) except KeyboardInterrupt: pass
def test_episode(self): env = mock_sc2_env.SC2TestEnv( map_name='nonexistant map', agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=64, minimap=32))) env.episode_length = float('inf') self._test_episode(env)
def __init__(self): maps_dir = os.path.join(os.path.dirname(__file__), '..', 'maps') register_map(maps_dir, MAP_NAME) self.sc2_env = sc2_env.SC2Env( map_name=MAP_NAME, players=[sc2_env.Agent(sc2_env.Race.terran)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), action_space=actions.ActionSpace.FEATURES, ), step_mul=16, game_steps_per_episode=0, score_index=0, visualize=True) self.current_obs = None self.actions_taken = 0 self.last_mineral_count = 0 self.reward = 0 self.zergling_count = 0 self.roach_count = 0 self.last_reward = 0 self.last2_reward = 0 self.rewards = [] self.decomposed_rewards = [0, 0] self.last_losses = 0
def __init__(self): self.register_map('/maps/','FourTowerSequentialDecomposed') self.sc2_env = sc2_env.SC2Env( map_name="FourTowerSequentialDecomposed", players=[sc2_env.Agent(sc2_env.Race.terran)], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), # rgb_dimensions=features.Dimensions(screen=84, minimap=64), # action_space=actions.ActionSpace.FEATURES, use_feature_units=True), step_mul=16, game_steps_per_episode=0, score_index=0, visualize=False) self.current_obs = None self.actions_taken = 0 self.vis = visdom.Visdom() self.last_mineral_count = 0 self.reward = 0 self.zergling_count = 0 self.roach_count = 0 self.last_reward = 0 self.last2_reward = 0 self.rewards = [] self.decomposed_rewards = [0,0] self.last_timestep = None
def main(unused_argv): #agent = ZergAgent() agent = SmartAgent() #agent = TestAgent() try: while True: with sc2_env.SC2Env( map_name="Simple64", players=[sc2_env.Agent(sc2_env.Race.zerg), # our Bot #sc2_env.Agent(sc2_env.Race.zerg)], sc2_env.Bot(sc2_env.Race.protoss,sc2_env.Difficulty.very_easy)], # Blizzard bot agent_interface_format=features.AgentInterfaceFormat( # Interface parameters feature_dimensions=features.Dimensions(screen=64, minimap=64),use_feature_units=True), step_mul=1, # steps before our Agent take a decision 8=300APM, 16=150 game_steps_per_episode=0, #run game as long as necessary visualize=True) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def main(unused_argv): agent = ZergAgent() try: while True: with sc2_env.SC2Env( map_name="Simple64", players=[ sc2_env.Agent(sc2_env.Race.zerg), sc2_env.Bot(sc2_env.Race.random, sc2_env.Difficulty.very_easy) ], agent_interface_format=features.AgentInterfaceFormat( feature_dimensions=features.Dimensions(screen=84, minimap=64), use_feature_units=True), step_mul=16, game_steps_per_episode=0, visualize=True) as env: agent.setup(env.observation_spec(), env.action_spec()) timesteps = env.reset() agent.reset() while True: step_actions = [agent.step(timesteps[0])] if timesteps[0].last(): break timesteps = env.step(step_actions) except KeyboardInterrupt: pass
def __init__(self, map_name = None): if map_name is None: map_name = MAP_NAME maps_dir = os.path.join(os.path.dirname(__file__), '..', 'maps') register_map(maps_dir, map_name) self.sc2_env = sc2_env.SC2Env( map_name = map_name, players = [sc2_env.Agent(sc2_env.Race.protoss)], agent_interface_format = features.AgentInterfaceFormat( feature_dimensions = features.Dimensions(screen = SCREEN_SIZE, minimap = 30), action_space = actions.ActionSpace.FEATURES, camera_width_world_units = 28 ), step_mul = 16, game_steps_per_episode = 0, score_index = 0, visualize = True,) # lib.renderer_human.zoom(1.5) self.current_obs = None self.actions_taken = 0 self.decomposed_rewards_all = [] self.decomposed_rewards = [] self.decomposed_rewards_mark = 0 self.signal_of_finished = 1 self.last_state = None ''' self.enemy_type_number_dict = { 101 : 'damageToMarine', 102 : 'damageByMarine', 103 : 'damageToZergling', 104 : 'damageByZergling', 105 : 'damageToMarauder', 106 : 'damageByMarauder', 107 : 'damageToHydralisk', 108 : 'damageByHydralisk', 109 : 'damageToThor', 110 : 'damageByThor', 111 : 'damageToUltralisk', 112 : 'damageByUltralisk', 113 : 'penalty' } ''' self.decomposed_reward_dict = { 'damageToMarine' : 0, 'damageByMarine' : 0, 'damageToZergling' : 0, 'damageByZergling' : 0, 'damageToMarauder' : 0, 'damageByMarauder' : 0, 'damageToHydralisk' : 0, 'damageByHydralisk' : 0, 'damageToThor' : 0, 'damageByThor' : 0, 'damageToUltralisk' : 0, 'damageByUltralisk' : 0, 'penalty' : 0 }