pip install -e .
. pysc2 Starcraft II gamecore
. you need add code to the file battle/arena_sc2/agents/init.py e.g. register RandomAgent
register(
id='RandomAgent',
type=BattleType.agent,
entry_point='pysc2.agents.random_agent:RandomAgent',
)
. you need add code to the file battle/arena_sc2/envs/init.py e.g. Register SC2ENV
register(
id='sc2env',
type=BattleType.env,
entry_point='pysc2.env.sc2_env:SC2Env',
map_name='Simple64',
screen_size_px=(84, 84),
minimap_size_px=(64, 64),
agent_race=None,
bot_race=None,
difficulty=None,
step_mul=8,
game_steps_per_episode=0,
visualize=True,
)
. you need add code to the file battle/arena_sc2/envs/init.py e.g. Register AgentVSbuilt-in
register(
id='AgentVSBuiltIn',
type=BattleType.arena,
entry_point='battle.arena_sc2.arenas.sc2_builtin:SC2AgentVSBuildIn',
)
. run Agent VS built-in, e.g..
sc2_battle = make('AgentVSBuiltIn')
sc2_battle.register_agent(SC2WrapperAgent(make('RandomAgent')))
sc2_battle.register_env(make('sc2env'))
sc2_battle.play_game()