google-research/football

Problems about the agent-action mapping in some scenarios

sharinka0715 opened this issue · 0 comments

Hi there, I would like to know the agent-action mapping rule in multi-agent scenarios, and I have no idea about it.

Here are some examples:

  • academy_3_vs_1_with_keeper, number_of_left_players_agent_controls=3, it controls the 3 center midfields.
  • academy_3_vs_1_with_keeper, number_of_left_players_agent_controls=4, it controls the 3 center midfields and the goalkeeper, and agent 0 is the goalkeeper.
  • academy_3_vs_1_with_keeper + AddPlayer(0.4 ,0.0, e_PlayerRole_CM), number_of_left_players_agent_controls=3, it controls 3 center midfields.
  • academy_3_vs_1_with_keeper + AddPlayer(0.4 ,0.0, e_PlayerRole_CM), number_of_left_players_agent_controls=4, it controls 3 center midfields and the goalkeeper, instead of 4 center midfields.
  • academy_3_vs_1_with_keeper + AddPlayer(0.4 ,0.0, e_PlayerRole_CM), number_of_left_players_agent_controls=5, it controls 4 center midfields and the goalkeeper, and agent 0 is the goalkeeper.

This also exists in pass_and_shot_with_keeper, and run_pass_and_shot_with_keeper. I drew some conclusions that might be strange:

  • The mapping order between number_of_left_players_agent_controls!=number_of_left_controllable_agents and number_of_left_players_agent_controls==number_of_left_controllable_agents is different.
  • The goalkeeper will not be controlled following the default setting, but when an extra player is added, I cannot controll all agents except the goalkeeper. (This might be resolved by setting controllable=False, but that is not what I want to figure out.)

By the way, the mapping order seems to be determined in the C++ code of football engine, but I can only understand the Python code. If there is someone can help me to understand the agent-action mapping order?