Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INVESTIGATION] Adding the agent's IDs to the global state #965

Open
3 of 5 tasks
WiemKhlifi opened this issue Dec 11, 2023 · 0 comments
Open
3 of 5 tasks

[INVESTIGATION] Adding the agent's IDs to the global state #965

WiemKhlifi opened this issue Dec 11, 2023 · 0 comments
Assignees
Labels
maintenance General improvements/optimisations priority/high size/XS

Comments

@WiemKhlifi
Copy link
Contributor

WiemKhlifi commented Dec 11, 2023

What do you want to investigate?

Investigate how the performance of the MAPPO algorithm is affected by adding the agent's ID, the agent's unique identifier, to the global state, that is shared by all agents.

To investigate this, we will use two different ways of initializing the wrappers for the MAPPO systems:

  1. The first way is to apply on the environment's wrapper the AgentIDWrapper first, which adds the agent's ID to the observation of each agent, and then the GlobalStateWrapper, which concatenates the observations of all agents to form the global state.
  2. The second way is to reverse the order of these wrappers, and apply the GlobalStateWrapper first and then the AgentIDWrapper.
  3. Add an embedding layer for encoding the agent's IDs with a fixed size instead of a one-hot encoding vector and try the two above approaches.

NB: In the new make_env.py file we will adopt the second approach since the agent IDs are represented as one-hot encoding vectors, which can become excessively large as the number of agents increases (e.g., in SMAC).

Definition of done

This investigation can be considered complete once experiments have been carried out in the two above-mentioned cases, a decision has been taken on the method to be adopted, and it has been verified which method can contribute to improving the results.

What was the conclusion of your investigation?

  • A primary conclusion: In the first method, where the AgentIDWrapper is applied first, it was observed that adding the agent ID in the local observation before using all agents' observations as a global state introduced significant noise. The agent IDs are represented as one-hot encoding vectors, which can become excessively large as the number of agents increases (e.g., in SMAC). Interestingly, in testing and comparing the two methods, it was found that the second approach, applying the GlobalStateWrapper first, followed by the AgentIDWrapper, yielded better results and this order allowed agents to learn more efficiently. As a result, we have decided to adopt the second approach for our work FOR NOW.

  • Final conclusion and decision: TBD.

Checklist

  • Run experiments with the two above methods.
  • Compare the obtained results with one-hot vector IDs.
  • Implement the third approach.
  • Compare the first results with the third approach.
  • Decide which path to follow.
@WiemKhlifi WiemKhlifi self-assigned this Dec 11, 2023
@WiemKhlifi WiemKhlifi changed the title [INVESTIGATION] [INVESTIGATION] Adding the agent's IDs to the global state Jan 2, 2024
@OmaymaMahjoub OmaymaMahjoub linked a pull request Jan 4, 2024 that will close this issue
5 tasks
@WiemKhlifi WiemKhlifi added size/XS priority/high maintenance General improvements/optimisations labels Jan 7, 2024
@WiemKhlifi WiemKhlifi removed a link to a pull request Jan 12, 2024
5 tasks
@WiemKhlifi WiemKhlifi pinned this issue Jan 12, 2024
@WiemKhlifi WiemKhlifi unpinned this issue Jan 12, 2024
@WiemKhlifi WiemKhlifi reopened this Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance General improvements/optimisations priority/high size/XS
Projects
None yet
Development

No branches or pull requests

1 participant