Native-vector Gymnasium environments for high-throughput ViZDoom rollouts
Project description
vizdoom-turbo
vizdoom-turbo is a Python library for reinforcement-learning researchers who need fast, parallel ViZDoom environments. It provides a Gymnasium vector environment that can be used directly or selected as an isolated environment provider in rlab.
Each vector lane owns an independent DoomGame. Lanes advance concurrently through ViZDoom's native API, while Rust processes frames in batches for policy-ready observations.
Install
git clone git@github.com:tsilva/ViZDoom-turbo.git
cd ViZDoom-turbo
uv sync --all-extras
Run Python and project commands through uv run.
Use
import numpy as np
from vizdoom_turbo import VizdoomTurboVecEnv
env = VizdoomTurboVecEnv(
"VizdoomBasic-v1",
num_envs=16,
num_threads=8,
obs_resize=(84, 84),
obs_grayscale=True,
obs_layout="chw",
frame_skip=4,
frame_stack=4,
use_restricted_actions="minimal",
)
try:
observations, infos = env.reset(seed=7)
actions = np.zeros(env.num_envs, dtype=np.int64)
observations, rewards, terminated, truncated, infos = env.step(actions)
done = terminated | truncated
if np.any(done):
observations, infos = env.reset(
options={
"reset_mask": done,
"state_indices": np.zeros(env.num_envs, dtype=np.int32),
}
)
finally:
env.close()
The package accepts registered Vizdoom... Gymnasium IDs and ViZDoom .cfg paths. It also registers ...-Turbo-v0 vector aliases for the built-in visual scenarios.
Use with rlab
Install this distribution in the rlab runtime, then select its provider:
environment:
env_provider: vizdoom-turbo
env_config:
game: VizdoomBasic-v1
state: default
n_envs: 16
env_args:
num_threads: 8
use_restricted_actions: minimal
obs_grayscale: true
obs_layout: chw
frame_stack: 4
preprocessing:
frame_skip: 4
max_pool_frames: true
observation_size: 84
obs_resize_algorithm: area
task:
id: identity
action: {set: native}
signals: {}
events: {}
termination: {}
reward: {reward_mode: native}
Commands
uv sync --all-extras # install project and dev dependencies
uv run pytest -q # run Python and live-environment tests
uv run ruff check . # lint Python
cargo fmt --check # check Rust formatting
cargo clippy --all-targets --all-features -- -D warnings # lint Rust
uv build --wheel # build the distributable wheel
Notes
- Python 3.11–3.14 is supported. Source builds require Rust 1.85 or newer.
- ViZDoom 1.3.0 supplies built-in scenarios and Freedoom assets. Commercial Doom IWADs are not included; pass one with
rom_pathwhen required. - Autoreset is disabled. Terminal lanes retain their final observation and must be selected explicitly with a masked reset.
- Preprocessing supports crop removal or masking, max-pooling, nearest/bilinear/area resize, grayscale or RGB, frame skip, frame stacking, and CHW or HWC layouts.
- The native vector path supports image observations,
rgb_arrayrendering, and one player. Recording is not supported.
Architecture
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vizdoom_turbo-0.1.1.tar.gz.
File metadata
- Download URL: vizdoom_turbo-0.1.1.tar.gz
- Upload date:
- Size: 2.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20304c941e46936fd99f4975af78350a1099975489cc1d84a013d4b50a0b4495
|
|
| MD5 |
84cd20bc6af3f4a5d175e5ec8c7e866e
|
|
| BLAKE2b-256 |
40f65097f3997e887007ec1216b7791bfaf3371ac6d7076abc073a594b59e2e2
|
Provenance
The following attestation bundles were made for vizdoom_turbo-0.1.1.tar.gz:
Publisher:
release.yml on tsilva/ViZDoom-turbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizdoom_turbo-0.1.1.tar.gz -
Subject digest:
20304c941e46936fd99f4975af78350a1099975489cc1d84a013d4b50a0b4495 - Sigstore transparency entry: 2256486743
- Sigstore integration time:
-
Permalink:
tsilva/ViZDoom-turbo@b7af317db5a5e7e19781dbf6471588e39517b809 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tsilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b7af317db5a5e7e19781dbf6471588e39517b809 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vizdoom_turbo-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: vizdoom_turbo-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 245.9 kB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d43b7f7d282618d6f494fe0004dfd4867cea7ca1151710d39a114b20a87e79c3
|
|
| MD5 |
fd699ebc5096586dafcd95417af90fc4
|
|
| BLAKE2b-256 |
5d0b991984fe03abe8e77eec7cd59f002e01472dd2f7f7e891d3ca79908517fd
|
Provenance
The following attestation bundles were made for vizdoom_turbo-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on tsilva/ViZDoom-turbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizdoom_turbo-0.1.1-cp311-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
d43b7f7d282618d6f494fe0004dfd4867cea7ca1151710d39a114b20a87e79c3 - Sigstore transparency entry: 2256486777
- Sigstore integration time:
-
Permalink:
tsilva/ViZDoom-turbo@b7af317db5a5e7e19781dbf6471588e39517b809 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tsilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b7af317db5a5e7e19781dbf6471588e39517b809 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vizdoom_turbo-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: vizdoom_turbo-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 235.3 kB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1b47c8e3df9b1a5bfd9367ff742eee8cc2df58faccae73e61a90d18c4c4a109
|
|
| MD5 |
911d62aa284d628c89c3da635e553958
|
|
| BLAKE2b-256 |
925cf2495807206a68a859c0fb5d0ee957da742042a1275402116b7d0097cad9
|
Provenance
The following attestation bundles were made for vizdoom_turbo-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl:
Publisher:
release.yml on tsilva/ViZDoom-turbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizdoom_turbo-0.1.1-cp311-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
a1b47c8e3df9b1a5bfd9367ff742eee8cc2df58faccae73e61a90d18c4c4a109 - Sigstore transparency entry: 2256486793
- Sigstore integration time:
-
Permalink:
tsilva/ViZDoom-turbo@b7af317db5a5e7e19781dbf6471588e39517b809 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tsilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b7af317db5a5e7e19781dbf6471588e39517b809 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vizdoom_turbo-0.1.1-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: vizdoom_turbo-0.1.1-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 220.9 kB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
307ea2b8af99012b76e2e4538b2b6b805f98bc66bd95dd699bda389fba4adde5
|
|
| MD5 |
990b9205e19834af2c23a8d55e88c139
|
|
| BLAKE2b-256 |
6e4898581f7cf67fcac7b1698c3ebb0940142573e01e08e34442e239805119a2
|
Provenance
The following attestation bundles were made for vizdoom_turbo-0.1.1-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on tsilva/ViZDoom-turbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizdoom_turbo-0.1.1-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
307ea2b8af99012b76e2e4538b2b6b805f98bc66bd95dd699bda389fba4adde5 - Sigstore transparency entry: 2256486761
- Sigstore integration time:
-
Permalink:
tsilva/ViZDoom-turbo@b7af317db5a5e7e19781dbf6471588e39517b809 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tsilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b7af317db5a5e7e19781dbf6471588e39517b809 -
Trigger Event:
push
-
Statement type:
File details
Details for the file vizdoom_turbo-0.1.1-cp311-abi3-macosx_10_15_x86_64.whl.
File metadata
- Download URL: vizdoom_turbo-0.1.1-cp311-abi3-macosx_10_15_x86_64.whl
- Upload date:
- Size: 231.1 kB
- Tags: CPython 3.11+, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3085469a171767161e3045ff81238ddd936a04ff9d9adb22482ff7f6311f855e
|
|
| MD5 |
d87378d01c94102609575b6298897b4c
|
|
| BLAKE2b-256 |
15990bf94b0ed027bd36cdc9cfbf95c87673ba9351eba06359e75b95c4caca10
|
Provenance
The following attestation bundles were made for vizdoom_turbo-0.1.1-cp311-abi3-macosx_10_15_x86_64.whl:
Publisher:
release.yml on tsilva/ViZDoom-turbo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
vizdoom_turbo-0.1.1-cp311-abi3-macosx_10_15_x86_64.whl -
Subject digest:
3085469a171767161e3045ff81238ddd936a04ff9d9adb22482ff7f6311f855e - Sigstore transparency entry: 2256486750
- Sigstore integration time:
-
Permalink:
tsilva/ViZDoom-turbo@b7af317db5a5e7e19781dbf6471588e39517b809 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/tsilva
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b7af317db5a5e7e19781dbf6471588e39517b809 -
Trigger Event:
push
-
Statement type: