Skip to content

Commit

Permalink
link
Browse files Browse the repository at this point in the history
  • Loading branch information
matteobettini committed Apr 22, 2024
1 parent 682c4f7 commit b3f7d70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tutorials/sphinx-tutorials/multiagent_competitive_ddpg.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# This kind of algorithm is typicall trained off-policy. For more info on off-policy learning see
# *Sutton, Richard S., and Andrew G. Barto. Reinforcement learning: An introduction. MIT press, 2018*.
#
# .. figure:: https://github.com/matteobettini/vmas-media/blob/main/media/off-policy-vmas-loop.png?raw=true
# .. figure:: https://pytorch.s3.amazonaws.com/torchrl/github-artifacts/img/off-policy-vmas-loop-min.png
# :alt: Off-policy learning
#
# Off-policy learning
Expand Down Expand Up @@ -232,7 +232,7 @@
n_evaders = 1
n_obstacles = 2

use_vmas = False # Set this to True for a great performance speedup
use_vmas = True # Set this to True for a great performance speedup

if not use_vmas:
env = PettingZooEnv(
Expand Down Expand Up @@ -775,6 +775,7 @@ def process_batch(batch: TensorDictBase) -> TensorDictBase:

# Training/collection iterations
for iteration, batch in enumerate(collector):
break
current_frames = batch.numel()
batch = process_batch(batch) # Util to expand done keys if needed
# Loop over groups
Expand Down

0 comments on commit b3f7d70

Please sign in to comment.