$\arg\min_u [ \alpha_i p(u) + q(u)] = 0$. Then although the expected costs for infected agents are still independent from others, their decision is considerate to healthy agents. When the infected agents choose $u =0$, then for healthy agents, the expected cost becomes $\alpha_i p(u_{i,k})$, meaning that they do not need to worry about getting infected. Let us now compute the resulting Nash Equilibrium under the shaped costs using the previous example.

#### Example

In the four-agent example, set $q(u) = u$. Then $\arg\min_u [ \alpha p(u) + u] = 0$. Hence agent 1 will choose $u_{1,k} = 0$. For agents $i= 2,3,4$, they will choose $u_{i,k}=1$ since they are only minimizing $p(u)$. The resulting costs are summarized in \[fig: example cost improved\]. With the shaped costs, the system enters into a better Nash Equilibrium which indeed aligns with the system optimum in . A few remarks:

-   Cost shaping did not increase the overall cost for the multi-agent system.

-   The system optimum remains the same before and after cost shaping.

-   Cost shaping helped agents to arrive at the system optimum without centralized optimization.

   Agent ID   State $x_{i,k}$   Optimal $u_{i,k}$   Optimal $\mathbb{E}[\tilde l_{i,k}]$   Actual $\tilde l_{i,k}$
  ---------- ----------------- 