Skip to main content

ViZDoom is Doom-based AI Research Platform for Reinforcement Learning from Raw Visual Information.

Project description

PyPI version Build pre-commit Code style: black

ViZDoom allows developing AI bots that play Doom using only visual information (the screen buffer). It is primarily intended for research in machine visual learning, and deep reinforcement learning, in particular.

ViZDoom is based on ZDoom to provide the game mechanics.

ViZDoom Demo

Features

  • Multi-platform (Linux, macOS, Windows),
  • API for Python and C++,
  • Gymnasium/OpenAI Gym environment wrappers (thanks to Arjun KG Benjamin Noah Beal, Lawrence Francis, and Mark Towers),
  • Easy-to-create custom scenarios (visual editors, scripting language, and examples available),
  • Async and sync single-player and multiplayer modes,
  • Fast (up to 7000 fps in sync mode, single-threaded),
  • Lightweight (few MBs),
  • Customizable resolution and rendering parameters,
  • Access to the depth buffer (3D vision),
  • Automatic labeling of game objects visible in the frame,
  • Access to the audio buffer (thanks to Shashank Hegde),
  • Access to the list of actors/objects and map geometry,
  • Off-screen rendering,
  • Episodes recording,
  • In-game time scaling in async mode.

ViZDoom API is reinforcement learning friendly (suitable also for learning from demonstration, apprenticeship learning or apprenticeship via inverse reinforcement learning, etc.).

Julia (thanks to Jun Tian), Lua, and Java bindings are available in other branches but are no longer maintained.

Cite as

M Wydmuch, M Kempka & W Jaśkowski, ViZDoom Competitions: Playing Doom from Pixels, IEEE Transactions on Games, vol. 11, no. 3, pp. 248-259, 2019 (arXiv:1809.03470)

@article{Wydmuch2019ViZdoom,
  author  = {Marek Wydmuch and Micha{\l} Kempka and Wojciech Ja\'skowski},
  title   = {{ViZDoom} {C}ompetitions: {P}laying {D}oom from {P}ixels},
  journal = {IEEE Transactions on Games},
  year    = {2019},
  volume  = {11},
  number  = {3},
  pages   = {248--259},
  doi     = {10.1109/TG.2018.2877047},
  note    = {The 2022 IEEE Transactions on Games Outstanding Paper Award}
}

or

M. Kempka, M. Wydmuch, G. Runc, J. Toczek & W. Jaśkowski, ViZDoom: A Doom-based AI Research Platform for Visual Reinforcement Learning, IEEE Conference on Computational Intelligence and Games, pp. 341-348, Santorini, Greece, 2016 (arXiv:1605.02097)

@inproceedings{Kempka2016ViZDoom,
  author    = {Micha{\l} Kempka and Marek Wydmuch and Grzegorz Runc and Jakub Toczek and Wojciech Ja\'skowski},
  title     = {{ViZDoom}: A {D}oom-based {AI} Research Platform for Visual Reinforcement Learning},
  booktitle = {IEEE Conference on Computational Intelligence and Games},
  year      = {2016},
  address   = {Santorini, Greece},
  month     = {Sep},
  pages     = {341--348},
  publisher = {IEEE},
  doi       = {10.1109/CIG.2016.7860433},
  note      = {The Best Paper Award}
}

Python quick start

Linux

To install the latest release of ViZDoom, just run:

pip install vizdoom

Both x86-64 and AArch64 (ARM64) architectures are supported.

If Python wheel is not available for your platform (Python version <3.8, distros below manylinux_2_28 standard), pip will try to install (build) ViZDoom from source. ViZDoom requires C++11 compiler, CMake 3.12+, Boost 1.54+ SDL2, OpenAL (optional) and Python 3.7+. Below you will find instructrion how to install these dependencies.

apt-based distros (Ubuntu, Debian, Linux Mint, etc.)

To build ViZDoom run (it may take few minutes):

apt install cmake git libboost-all-dev libsdl2-dev libopenal-dev
pip install vizdoom

We recommend using at least Ubuntu 18.04+ or Debian 10+ with Python 3.7+.

dnf/yum-based distros (Fedora, RHEL, CentOS, Alma/Rocky Linux, etc.)

To install ViZDoom run (it may take few minutes):

dnf install cmake git boost-devel SDL2-devel openal-soft-devel
pip install vizdoom

We recommend using at least Fedora 35+ or RHEL/CentOS/Alma/Rocky Linux 9+ with Python 3.7+. To install openal-soft-devel on RHEL/CentOS/Alma/Rocky Linux 9, one needs to use dnf --enablerepo=crb install.

macOS

To install the latest release of ViZDoom just run (it may take few minutes as it will build ViZDoom from source on M1/M2 chips):

brew install cmake git boost openal-soft sdl2
pip install vizdoom

Both Intel and Apple Silicon CPUs are supported. We recommend using at least macOS High Sierra 10.13+ with Python 3.7+. On Apple Silicon (M1 and M2), make sure you are using Python/Pip for Apple Silicon.

Windows

To install the latest release of ViZDoom, just run:

pip install vizdoom

At the moment only x86-64 architecture is supported on Windows.

Please note that the Windows version is not as well-tested as Linux and macOS versions. It can be used for development and testing but if you want to conduct serious (time and resource-extensive) experiments on Windows, please consider using Docker or WSL with Linux version.

Gymnasium/Gym wrappers

Gymnasium environments are installed along with ViZDoom. See documentation and examples on the use of Gymnasium API.

OpenAI-Gym wrappers are also available, to install them run:

pip install vizdoom[gym]

See documentation and examples on the use of Gym API. OpenAI-Gym wrappers are deprecated and will be removed in future versions in favour of Gymnasium.

Examples

  • Python (contain learning examples implemented in PyTorch, TensorFlow and Theano)
  • C++

Python examples are currently the richest, so we recommend to look at them, even if you plan to use other language. The API is almost identical for all languages.

See also the tutorial.

Original Doom graphics

Unfortunately, we cannot distribute ViZDoom with original Doom graphics. If you own original Doom or Doom 2 games, you can replace Freedoom graphics by placing doom.wad or doom2.wad into your working directory or vizdoom package directory.

Alternatively, any base game WAD (including other Doom engine-based games and custom/community games) can be used by pointing to it with the set_doom_game_path/setDoomGamePath method.

Documentation

Detailed description of all types and methods:

Additional documents:

Full documentation of the Doom engine and ACS scripting language can be found on ZDoom Wiki.

Useful articles:

Awesome Doom tools/projects

  • SLADE3 - Great Doom map (scenario) editor for Linux, MacOS and Windows.
  • Doom Builder 2 - Another great Doom map editor for Windows.
  • OBLIGE - Doom random map generator and PyOblige is a simple Python wrapper for it.
  • Omgifol - Nice Python library for manipulating Doom maps.
  • NavDoom - Maze navigation generator for ViZDoom (similar to DeepMind Lab).
  • MazeExplorer - More sophisticated maze navigation generator for ViZDoom.
  • Sample Factory - A high-performance reinforcement learning framework for ViZDoom.
  • EnvPool - A high-performance vectorized environment for ViZDoom.
  • Obsidian - Doom random map generator, a continuation of OBLIGE.

Contributions

This project is maintained and developed in our free time. All bug fixes, new examples, scenarios, and other contributions are welcome! We are also open to feature ideas and design suggestions.

We have a roadmap for future development work for ViZDoom available here.

License

The code original to ViZDoom is under MIT license. ZDoom uses code from several sources with varying licensing schemes.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vizdoom-1.2.1.tar.gz (15.0 MB view details)

Uploaded Source

Built Distributions

vizdoom-1.2.1-cp311-cp311-win_amd64.whl (15.5 MB view details)

Uploaded CPython 3.11 Windows x86-64

vizdoom-1.2.1-cp311-cp311-manylinux_2_28_x86_64.whl (28.0 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ x86-64

vizdoom-1.2.1-cp311-cp311-manylinux_2_28_aarch64.whl (27.8 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.28+ ARM64

vizdoom-1.2.1-cp311-cp311-macosx_10_9_x86_64.whl (31.1 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

vizdoom-1.2.1-cp310-cp310-win_amd64.whl (15.5 MB view details)

Uploaded CPython 3.10 Windows x86-64

vizdoom-1.2.1-cp310-cp310-manylinux_2_28_x86_64.whl (28.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ x86-64

vizdoom-1.2.1-cp310-cp310-manylinux_2_28_aarch64.whl (27.8 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.28+ ARM64

vizdoom-1.2.1-cp310-cp310-macosx_10_9_x86_64.whl (31.1 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

vizdoom-1.2.1-cp39-cp39-win_amd64.whl (15.5 MB view details)

Uploaded CPython 3.9 Windows x86-64

vizdoom-1.2.1-cp39-cp39-manylinux_2_28_x86_64.whl (28.0 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ x86-64

vizdoom-1.2.1-cp39-cp39-manylinux_2_28_aarch64.whl (27.8 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.28+ ARM64

vizdoom-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl (31.1 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

vizdoom-1.2.1-cp38-cp38-win_amd64.whl (15.5 MB view details)

Uploaded CPython 3.8 Windows x86-64

vizdoom-1.2.1-cp38-cp38-manylinux_2_28_x86_64.whl (28.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ x86-64

vizdoom-1.2.1-cp38-cp38-manylinux_2_28_aarch64.whl (27.8 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.28+ ARM64

vizdoom-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl (31.1 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file vizdoom-1.2.1.tar.gz.

File metadata

  • Download URL: vizdoom-1.2.1.tar.gz
  • Upload date:
  • Size: 15.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for vizdoom-1.2.1.tar.gz
Algorithm Hash digest
SHA256 b97e308618847621d8e7baf22ad9babea927fb6c66dc02ba086415f0e5a1971e
MD5 2ab7da7dc445bed218c1b29ed38c0cd4
BLAKE2b-256 0c0a4973e49b4cf08559705c7a0bf5b67d95570b11c3925d0e381656eff854ac

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: vizdoom-1.2.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 15.5 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for vizdoom-1.2.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 6edf0b95daeab14fb11d02923bee32285f1cb5cf3a134c6ad8083e2e9a6c218a
MD5 e25e190afa86c423d60baf719b869f26
BLAKE2b-256 f3e67490388013ace460e3d4ddb63da1de21df166ba85d4f4d1e40d64908c598

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c9bdb42ff07fb0f3e29f716f0879f7f65fe992c58d8ebe2d981c386040d8ea12
MD5 276ce9b00ae01b8f6673f53cdd9dbd52
BLAKE2b-256 430d344761261a111ee354d71f907a03815c43c59e6cdd5c67361a85fbf5f4ab

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 1206f7f9e1ba79ff142964cc5a02f88620a83cd83873eefca6479a82122f63a6
MD5 29d04770e0914c0bf6320f6b2ebbd48b
BLAKE2b-256 7cdcbc791d689409193ba30fac2f3e4adaa8c26a4b31da86edfed733b15f5e10

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 eddc98d3e49c9d2132bf55a287a187770cd199189f367dd7bf3ed4b6bec3a675
MD5 c75e57c436afbc9c0ddd8b3f8b3f656f
BLAKE2b-256 b169fa4b5b143d600bc55fbbaef04b4c07d6455b2503de947517294bff4cf19f

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: vizdoom-1.2.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 15.5 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for vizdoom-1.2.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 10f32ffd7166fc409ca1d807b748716dec35b1aae810ce1cea7a2589b7cc206d
MD5 57d065a47071c8a058818aa77fb581a3
BLAKE2b-256 df1ba3ec846635da3b8364220becac7bea78818cdd91968b8b441bf406ee9d85

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd35132a64666b70acc138b20c3f77d01127d77df994594778606cac630c3fd7
MD5 ceb3b680dd0ba426438f0d818f2d5913
BLAKE2b-256 562714775f3096121208fb1c5e865ffc32c421c535c72572ca7a9b2e3602ba3f

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b9dde50ca687521408ca2a0165e43092704093b01e4eff5c68f26b362d37679c
MD5 7a4a6207412106580bd66e602e6d9adb
BLAKE2b-256 95f7035f5ba1ff87733df3b9f5125a36842418efa122c732b1da994444a2ba7b

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d86f082e9f0d3b3684c12b6f09174afed88224264d9bdecf7475800b348774c3
MD5 62429e6418a335ce712fa9a1d900410a
BLAKE2b-256 0010c81e6fb378d4b9df2a615d0210851bedace926409311cd0b553bdadb4636

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: vizdoom-1.2.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 15.5 MB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for vizdoom-1.2.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 ce339c8ef8e77f89bf90111dca3aaf1a324e2beb04f9dfeeb3a30f026ab16548
MD5 f4e8b07d060b7b2204a90aee7f19d46f
BLAKE2b-256 2c490c6ce2719595914d06f35fb8fe3b434c4495a367ae9aeaf1b1a326a6a3d1

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6aa64a235c7cf8d4ed7d9568ec4d50a37a9db961f66854bd7696e18d0272d04f
MD5 2c23e05ab092406822fb899957891875
BLAKE2b-256 1eb30181c0ee33eb80e3ab45f59d347105ac9b17a6e6db95b96048395ae63e2d

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp39-cp39-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp39-cp39-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 df24942e2755881c7f13a67e77787bb6e4955e34ef370043172cfee16554329c
MD5 c3881b26c02186e2fa458c9525f6f94f
BLAKE2b-256 c29d312fec1228593f84a1e0b07983243a6b50859f71846667a598abcccf6100

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 60e7cc7ae37ddd13f417a0b9d49d5d01266d454a243d1f4330e3b17f3c3e903b
MD5 30e4770bbed19e8f85100087e792262f
BLAKE2b-256 bf21a1e95f537ae789ed694b08e04b364176574fbccbc671b09bb199c4bacee2

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: vizdoom-1.2.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 15.5 MB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.0

File hashes

Hashes for vizdoom-1.2.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 25576f6443e30719cfeb58a9d20d09ca6737865602ac23b0040ae3b1cc50b417
MD5 201c9452bf3464c45770a0410fc58da3
BLAKE2b-256 6b6e6c24a72ce27841078d19e6f7467076352c0ce7b8447b5faa3614e56128d4

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp38-cp38-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp38-cp38-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4299f341e4cfc9d68686ab791f6488a1fef5c74f5d7f19e099646ffdf34da851
MD5 1ffb2f34a1f936cc87c096463e26a810
BLAKE2b-256 9432fc36158e617bb13afd7cbbd88019183644a68554e1107ad62b951bb5635a

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp38-cp38-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp38-cp38-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c94285908dc15f7acfd392ede553e354cdb8474a1c9d8f7c45414ede76f6a87e
MD5 a8ef43ab684994d5f2a2986903815e1d
BLAKE2b-256 5f9c792375ad817bfe40a78007e36623727a6071f3699ad705653bba28a6146b

See more details on using hashes here.

File details

Details for the file vizdoom-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for vizdoom-1.2.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 11543633424e0a47a507179b680b180689ac917d7bd3ea8dd6b3db958623c8f4
MD5 66063d0d027bd4d02d42e69091431475
BLAKE2b-256 a6f4f42143bb42ee2dc2b02c22a812fee3fd3e418325ad92dca0fcfddf10d6cc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page