There was an error while loading. Please reload this page.
1 parent ef3bba6 commit 4d342c3Copy full SHA for 4d342c3
multiagent/core.py
@@ -207,7 +207,7 @@ def apply_action_force(self, p_force):
207
for i,agent in enumerate(self.agents):
208
if agent.movable:
209
noise = np.random.randn(*agent.action.u.shape) * agent.u_noise if agent.u_noise else 0.0
210
- p_force[i] = agent.action.u + noise
+ p_force[i] = (agent.mass * agent.accel if agent.accel is not None else agent.mass) * agent.action.u + noise
211
return p_force
212
213
# gather physical forces acting on entities
0 commit comments