mirror of
https://github.com/wassname/ray.git
synced 2026-08-11 11:24:51 +08:00
[RLlib] rollout batch, handle rewards that are None (unknown) in a multi-agent env (#11858) (#11911)
This commit is contained in:
+2
-1
@@ -451,7 +451,8 @@ def rollout(agent,
|
||||
|
||||
if multiagent:
|
||||
done = done["__all__"]
|
||||
reward_total += sum(reward.values())
|
||||
reward_total += sum(
|
||||
r for r in reward.values() if r is not None)
|
||||
else:
|
||||
reward_total += reward
|
||||
if not no_render:
|
||||
|
||||
Reference in New Issue
Block a user