Warning This project is under heavy development and currently the main branch contains numerous breaking changes which may not work and which are not fully documented. Please wait for the forthcoming initial v0.1 release before depending on this project (code from the old tag can also be used to experiment with a more stable version of the codebase). A minimal, complete, Pokémon battle simulation engine optimized for performance and designed for tooling, embedded systems, and artificial intelligence use cases. This engine aims to be a frame-accurate and bug-for-bug compatible implementation of both Pokémon battles as defined by the original game code and the Pokémon Showdown1 simulator which represents Pokémon battling as practically interpreted online. The pkmn engine is more than 1000× faster than the patched Pokémon Showdown simulator code when playing out supported formats in compatibility mode and is extensively tested and documented. Note, however, that the engine is not a fully featured simulator but is instead a low-level library which can be used as a building block for more advanced use cases. Installation This repository hosts both the engine code (written in Zig) and the reference driver code (written in TypeScript). libpkmn Binaries of the engine code can be downloaded from the releases tab on GitHub, or you can download the source code directly and build it with the latest zig compiler, see zig build --help for build options: $ curl https://github.com/pkmn/engine/archive/refs/heads/main.zip -o engine.zip $ unzip engine.zip $ cd engine $ zig build --prefix /usr/local -Doptimize=ReleaseFast The Zig website has installation instructions which walk through how to install Zig on each platform - the engine code should work on Zig v0.11.0, though tracks Zig's master branch so this may change in the future if breaking language changes are introduced. Note that due to a bug in the Zig compiler, compiling with a version of Zig before 0.12.0-dev.876+aaf46187a is ...
First seen: 2025-06-01 10:31
Last seen: 2025-06-01 21:33