-
Implement the step function in distar/agent/template/agent.py. This function should receive an observation and return a list of actions.
the observation is a dict with 3 fields:
-
raw_obs: contains observation in form of protobuf (details).
-
opponent_obs: contains opponent's observation similar to raw_obs.
-
action_result: action result of last action the agent made(details).
the action is a dict with 6 fields:
-
func_id: ability id from pysc2(details).
-
skip_steps: how many frames in game the agent doesn't need an observation, count from current frame.
-
queued: whether to put this action into queue(like human use shift).
-
unit_tags: a list contains unit tags which are selected units in this action.
-
target_unit_tag: a unit tag which is targetd unit in this action.
-
location: the target location in this action.
-
-
Change the agent's name from
default
totemplate
at user_config.yaml -
python -m distar.bin.play --game_type agent_vs_agent --model2 <agent you want to play against>
- Create a new branch named :
git checkout -b <dev>
- Modify any part of the default agent, here are some examples:
- Change the model size at distar/agent/default/model/actor_critic_default_config.yaml
- Change input features at distar/agent/default/lib/features.py
- Overwrite the agent's action in any certain situation at distar/agent/default/agent.py
- Copy the directory of default agent from main branch and rename it main.
- Change the agent's name from
default
tomain
at user_config.yaml python -m distar.bin.play --game_type agent_vs_agent --model1 <agent you want to play against> --model2 <your own agent>