skills/43-wentorai-research-plugins/skills/domains/ai-ml/vmas-simulator-guide/SKILL.md
Vectorized multi-agent reinforcement learning simulator
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research vmas-simulator-guideInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
VMAS is a vectorized simulator for multi-agent reinforcement learning (MARL) that runs thousands of parallel environments on GPU via PyTorch. It provides a diverse set of 2D cooperative, competitive, and mixed scenarios for benchmarking multi-agent algorithms. Orders of magnitude faster than CPU-based simulators, enabling rapid research iteration on multi-agent coordination problems.
pip install vmas
import vmas
# Create vectorized environment
env = vmas.make_env(
scenario="simple_spread",
num_envs=1024, # Parallel environments
num_agents=3,
device="cuda", # GPU acceleration
continuous_actions=True,
)
# Environment loop
obs = env.reset()
for step in range(100):
# Random actions for demonstration
actions = [env.action_space[i].sample()
for i in range(env.n_agents)]
obs, rewards, dones, infos = env.step(actions)
# obs: list of [num_envs, obs_dim] tensors
# rewards: list of [num_envs] tensors
| Scenario | Type | Agents | Description | |----------|------|--------|-------------| | simple_spread | Cooperative | 3 | Cover N landmarks | | simple_tag | Competitive | 4 | Predator-prey | | transport | Cooperative | 4 | Move package to goal | | wheel | Cooperative | 4 | Coordination on wheel | | flocking | Cooperative | 5+ | Reynolds flocking | | discovery | Cooperative | 3 | Explore and discover | | navigation | Mixed | N | Multi-agent navigation |
# With TorchRL
from torchrl.envs import VmasEnv
env = VmasEnv(
scenario="simple_spread",
num_envs=512,
device="cuda",
)
# With RLlib
from ray.rllib.env import MultiAgentEnv
# VMAS provides RLlib-compatible wrapper
# With CleanRL / custom training
import torch
env = vmas.make_env("transport", num_envs=2048, device="cuda")
obs = env.reset()
# All tensors on GPU — train directly without CPU transfer
policy_output = policy_network(obs[0]) # Agent 0 observations
from vmas import Scenario, Agent, World, Landmark
class MyScenario(Scenario):
def make_world(self, batch_dim, device):
world = World(batch_dim=batch_dim, device=device)
world.add_agent(Agent(name="agent_0"))
world.add_agent(Agent(name="agent_1"))
world.add_landmark(Landmark(name="goal"))
return world
def reset_world(self, env, world):
# Randomize positions
for agent in world.agents:
agent.set_pos(torch.rand(env.batch_dim, 2) * 2 - 1)
def reward(self, agent, world):
# Distance to goal
goal = world.landmarks[0]
return -torch.linalg.norm(agent.state.pos - goal.state.pos,
dim=-1)
# Register and use
env = vmas.make_env(MyScenario(), num_envs=512)
development
Conduct rigorous thematic analysis (TA) of qualitative data following Braun and Clarke's (2006) six-phase framework. Use whenever the user mentions 'thematic analysis', 'TA', 'Braun and Clarke', 'qualitative coding', 'identifying themes', or asks for help analysing interviews, focus groups, open-ended survey responses, or transcripts to identify patterns. Also trigger for questions about inductive vs theoretical coding, semantic vs latent themes, essentialist vs constructionist epistemology, building a thematic map, or writing up a qualitative findings section. Covers all six phases, the four upfront analytic decisions, the 15-point quality checklist, and the five common pitfalls. Produces a Word document write-up and an annotated thematic map. Does NOT cover IPA, grounded theory, discourse analysis, conversation analysis, or narrative analysis — use a different method for those.
development
Guide users through writing a systematic literature review (SLR) following the PRISMA 2020 framework. Use this skill whenever the user mentions 'systematic review', 'systematic literature review', 'SLR', 'PRISMA', 'PRISMA 2020', 'PRISMA flow diagram', 'PRISMA checklist', or asks for help writing, structuring, or auditing a literature review that follows reporting guidelines. Also trigger when the user asks about inclusion/exclusion criteria for a review, search strategies for databases like Scopus/WoS/PubMed, study selection processes, risk of bias assessment, or narrative synthesis for a review paper. This skill covers the full PRISMA 2020 checklist (27 items), produces a Word document manuscript in strict journal article format, generates an annotated PRISMA flow diagram, and enforces APA 7th Edition referencing throughout. It does NOT cover meta-analysis or statistical pooling. By Chuah Kee Man.
testing
Performs placebo-in-time sensitivity analysis with hierarchical null model and optional Bayesian assurance. Use when checking model robustness, verifying lack of pre-intervention effects, or estimating study power.
data-ai
Fit, summarize, plot, and interpret a chosen CausalPy experiment. Use after the causal method has been selected, including when configuring PyMC/sklearn models and scale-aware custom priors.