# lry-bupt/maac_drl architecture

> Architecture diagram of the GitHub repository lry-bupt/maac_drl, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lry-bupt/maac_drl
- Repository: https://github.com/lry-bupt/maac_drl

## Overview

MAAC_DRL is a research simulation repository for multi-agent deep reinforcement learning applied to robot trajectory and wireless-communication optimization. Its main workflow is to run one of the documented MA-DRL implementations, which combines policy decisions with modeled movement and communication objectives, then compare results using MATLAB plotting scripts. It also includes TD3 network operators, traditional A* and PSO baselines, and radio-map assets. The README documents the algorithm and plotting capabilities; sampled source confirms selected algorithm internals, but does not establish links between those implementations and the map or plotting scripts.

Main entry points: [`algorithm/MA-TD3_main.py`](https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-TD3_main.py) (MA-TD3), [`radio_map/AABB_plot.m`](https://github.com/lry-bupt/maac_drl/blob/main/radio_map/AABB_plot.m) (Obstacle map construction), [`algorithm/MA-DDPG_main.py`](https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-DDPG_main.py) (MA-DDPG), [`algorithm/MA-PPO_main.py`](https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-PPO_main.py) (MA-PPO)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_algorithms["MA-DRL algorithms"]
  node_ddpg["MA-DDPG<br/>[MA-DDPG_main.py]"]
  node_ppo["MA-PPO<br/>[MA-PPO_main.py]"]
  node_sac["MA-SAC<br/>[MA-SAC_main.py]"]
  node_td3["MA-TD3<br/>[MA-TD3_main.py]"]
  node_td3core["TD3 networks<br/>[MA-TD3_core.py]"]
end

subgraph group_baselines["Traditional baselines"]
  node_astar["A* path search<br/>[A_search.py]"]
  node_pso["PSO optimization<br/>[pso.py]"]
end

subgraph group_mapping["Radio mapping"]
  node_radio[("Radio map assets<br/>[map_data.mat]")]
  node_mapplot["Obstacle map construction<br/>[AABB_plot.m]"]
end

subgraph group_analysis["Result analysis"]
  node_fig1["Reward comparison<br/>[FIGURE_1.m]"]
  node_fig2["Trajectory comparison<br/>[FIGURE_2.m]"]
  node_fig3["Decoding error analysis<br/>[FIGURE_3.m]"]
  node_fig4["Objective comparison<br/>[FIGURE_4.m]"]
  node_fig5["Arrival-time comparison<br/>[FIGURE_5.m]"]
end

node_researcher(("Research user"))

node_researcher -->|"runs simulation"| node_ddpg
node_researcher -->|"runs simulation"| node_ppo
node_researcher -->|"runs simulation"| node_sac
node_researcher -->|"runs simulation"| node_td3
node_td3 -->|"uses operators"| node_td3core
node_researcher -.->|"runs baseline"| node_astar
node_researcher -.->|"runs baseline"| node_pso
node_researcher -->|"constructs map"| node_mapplot
node_mapplot -.->|"builds assets"| node_radio
node_researcher -->|"compares rewards"| node_fig1
node_researcher -->|"compares trajectories"| node_fig2
node_researcher -->|"plots error rates"| node_fig3
node_researcher -->|"compares objectives"| node_fig4
node_researcher -->|"compares arrival times"| node_fig5

click node_ddpg "https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-DDPG_main.py"
click node_ppo "https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-PPO_main.py"
click node_sac "https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-SAC_main.py"
click node_td3 "https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-TD3_main.py"
click node_td3core "https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-TD3_core.py"
click node_astar "https://github.com/lry-bupt/maac_drl/blob/main/tradition_baseline/A_search.py"
click node_pso "https://github.com/lry-bupt/maac_drl/blob/main/tradition_baseline/pso.py"
click node_radio "https://github.com/lry-bupt/maac_drl/blob/main/radio_map/map_data.mat"
click node_mapplot "https://github.com/lry-bupt/maac_drl/blob/main/radio_map/AABB_plot.m"
click node_fig1 "https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_1.m"
click node_fig2 "https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_2.m"
click node_fig3 "https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_3.m"
click node_fig4 "https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_4.m"
click node_fig5 "https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_5.m"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_ddpg,node_ppo,node_sac,node_td3,node_td3core,node_researcher toneBlue
class node_astar,node_pso toneAmber
class node_radio,node_mapplot toneMint
class node_fig1,node_fig2,node_fig3,node_fig4,node_fig5 toneRose
```

## Components

### MA-DRL algorithms

- [MA-DDPG](https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-DDPG_main.py): `algorithm/MA-DDPG_main.py`
- [MA-PPO](https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-PPO_main.py): `algorithm/MA-PPO_main.py`
- [MA-SAC](https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-SAC_main.py): `algorithm/MA-SAC_main.py`
- [MA-TD3](https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-TD3_main.py): `algorithm/MA-TD3_main.py`
- [TD3 networks](https://github.com/lry-bupt/maac_drl/blob/main/algorithm/MA-TD3_core.py): `algorithm/MA-TD3_core.py`

### Traditional baselines

- [A* path search](https://github.com/lry-bupt/maac_drl/blob/main/tradition_baseline/A_search.py): `tradition_baseline/A_search.py`
- [PSO optimization](https://github.com/lry-bupt/maac_drl/blob/main/tradition_baseline/pso.py): `tradition_baseline/pso.py`

### Radio mapping

- [Radio map assets](https://github.com/lry-bupt/maac_drl/blob/main/radio_map/map_data.mat): `radio_map/map_data.mat`
- [Obstacle map construction](https://github.com/lry-bupt/maac_drl/blob/main/radio_map/AABB_plot.m): `radio_map/AABB_plot.m`

### Result analysis

- [Reward comparison](https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_1.m): `plot_figure/FIGURE_1.m`
- [Trajectory comparison](https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_2.m): `plot_figure/FIGURE_2.m`
- [Decoding error analysis](https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_3.m): `plot_figure/FIGURE_3.m`
- [Objective comparison](https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_4.m): `plot_figure/FIGURE_4.m`
- [Arrival-time comparison](https://github.com/lry-bupt/maac_drl/blob/main/plot_figure/FIGURE_5.m): `plot_figure/FIGURE_5.m`

### Other components

- **Research user**

## Connections

- Research user → MA-DDPG: runs simulation (evidence: `README.md`)
- Research user → MA-PPO: runs simulation (evidence: `README.md`)
- Research user → MA-SAC: runs simulation (evidence: `README.md`)
- Research user → MA-TD3: runs simulation (evidence: `README.md`)
- MA-TD3 → TD3 networks: uses operators (evidence: `algorithm/MA-TD3_main.py`)
- Research user → A* path search: runs baseline
- Research user → PSO optimization: runs baseline
- Research user → Obstacle map construction: constructs map (evidence: `README.md`)
- Obstacle map construction → Radio map assets: builds assets
- Research user → Reward comparison: compares rewards (evidence: `README.md`)
- Research user → Trajectory comparison: compares trajectories (evidence: `README.md`)
- Research user → Decoding error analysis: plots error rates (evidence: `README.md`)
- Research user → Objective comparison: compares objectives (evidence: `README.md`)
- Research user → Arrival-time comparison: compares arrival times (evidence: `README.md`)
