Skip to content
Back to skills

Simulation Environments

ASecurity

"Operate built-in HighwayEnv Gymnasium environments, registration,

  • 247 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 8, 2026
toolspythonapi

Works with

  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill simulation-environments --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Simulation Environments?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Simulation Environments
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-simulation-environments/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-simulation-environments)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: simulation-environments
description: "Operate built-in HighwayEnv Gymnasium environments, registration,
  reset-step loops, rendering, vectorization, finite-MDP helpers, and
  multi-agent wrappers."
metadata:
  disco-role: operating
disable-model-invocation: true
license: MIT
---

# Simulation environments

Use this sub-skill when you need to instantiate and operate built-in HighwayEnv Gymnasium environments safely. It covers environment ID selection, registration, `gym.make`, `reset`/`step`/`render` lifecycles, bounded random rollouts, vectorized environments, `RecordVideo`, finite-MDP helper methods, and multi-agent wrapper semantics.

## Route to this sub-skill for

- Choosing a built-in HighwayEnv environment ID or version.
- Fixing Gymnasium registration/name lookup problems.
- Writing short, safe reset/step loops that handle `terminated` and `truncated` correctly.
- Updating runtime config through `gym.make(..., config=...)`, `env.unwrapped.config`, or `reset(options={"config": ...})`.
- Rendering `rgb_array` frames, recording short videos, or avoiding display windows.
- Vectorizing HighwayEnv environments or creating them in spawned subprocesses.
- Understanding `env.unwrapped.to_finite_mdp()`, `simplify()`, `change_vehicles()`, `set_preferred_lane()`, and `set_route_at_intersection()`.
- Using `intersection-multi-agent-*` environments and `MultiAgentWrapper` return semantics.

## Route elsewhere

- Observation, action, reward, space-shape, and `info["rewards"]` details: read `../observations-actions-rewards/SKILL.md`.
- Road networks, lanes, vehicles, dynamics classes, and custom environment implementation: read `../road-vehicle-dynamics/SKILL.md`.
- RL training loops, Stable-Baselines3 integration, long evaluations, and benchmark reporting: read `../training-and-evaluation/SKILL.md`.

## References and scripts

- Read [references/environment-workflows.md](references/environment-workflows.md) when selecting environment IDs/versions, registering HighwayEnv, applying config updates, or using finite-MDP and environment-copy helpers.
- Read [references/gymnasium-api.md](references/gymnasium-api.md) when writing production reset/step/close code, handling Gymnasium return values, seeding, spaces, `info`, and safe episode loops.
- Read [references/rendering-vectorization-multi-agent.md](references/rendering-vectorization-multi-agent.md) when rendering frames, recording videos, vectorizing environments, spawning subprocess workers, or using multi-agent variants.
- Read [references/troubleshooting.md](references/troubleshooting.md) when `gym.make` cannot find an env, rendering fails or returns `None`, vector/multiprocessing fails, helper methods raise optional-dependency errors, or episodes run unexpectedly long.
- Run [scripts/smoke_env_rollout.py](scripts/smoke_env_rollout.py) to verify that an installed HighwayEnv environment can be registered, made, reset, stepped with sampled actions, optionally rendered as `rgb_array`, and summarized as JSON.

## Minimal operating pattern

```python
import gymnasium as gym
import highway_env

gym.register_envs(highway_env)  # harmless when already registered

env = gym.make("highway-v0", config={"duration": 5, "vehicles_count": 10})
try:
    obs, info = env.reset(seed=0)
    terminated = truncated = False
    while not (terminated or truncated):
        action = env.action_space.sample()
        obs, reward, terminated, truncated, info = env.step(action)
finally:
    env.close()
```

Prefer explicit step caps for smoke checks and automation. Some scenarios can run for many decision steps, and `lane-keeping-v0` relies on Gymnasium's registration time limit rather than an internal `duration` termination.

Files in this skill

  • SKILL.md3.6 KB
  • references/environment-workflows.md9.4 KB
  • references/gymnasium-api.md6.4 KB
  • references/rendering-vectorization-multi-agent.md7.7 KB
  • references/troubleshooting.md8.6 KB
  • scripts/smoke_env_rollout.py9.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.