Jumanji
EnvPool provides native C++ batched implementations for the public task IDs in
jumanji==1.1.2.
SearchAndRescue-v0 returns the sum of the searchers’ rewards as its scalar
cooperative reward. Individual rewards are available in
info["searcher_rewards"] with shape (num_envs, 2).
Alignment tests initialize both implementations with the same reset state, then
run complete episodes using identical external actions. No future observations,
rewards or frames are injected into native stepping. Discrete outputs, active
EMS ordering and termination flags are checked exactly; floating-point outputs
use small numerical budgets. Inactive EMS coordinates are upstream scratch
storage and are excluded from comparison while their masks remain checked.
Search-and-rescue ray distances allow an absolute error of 5e-5 after
400 steps of stochastic motion; visible-event masks remain exact.
SearchAndRescue uses native Gaussian acceleration. Tests independently check
its velocity distribution and speed limit, copy actual native reset state and
target velocities into the oracle, and then compare movement, visibility,
detection, rewards and termination. Matching the oracle’s random stream is
unnecessary.
Game2048, Snake and Tetris also use native sampling. Alignment checks validate
the sampled cell, fruit position or piece before supplying it to the official
transition; reset distributions are checked separately. PacMan exposes the
selected directions in info["ghost_actions"] with shape (num_envs, 4).
The oracle checks these against its movement policy before applying movement
and collision rules. MMST checks each move against all six possible agent
priority orders, with a separate native test for fair tie breaking.
Rendering runs in C++ and reads each environment’s current state for both synchronous and asynchronous APIs. BinPack shows normalized box outlines; JobShop displays the complete schedule as a timeline. The native views use simple task graphics and do not reproduce Matplotlib’s fonts, shading, layout or decorative artwork. Tests check native determinism, frame shape/dtype, scene-content regressions and reordered asynchronous frame selection. The comparisons below provide the official visual reference.
Render Compare
Representative reset-frame renders for all Jumanji tasks. Each panel shows
EnvPool env.render() on the left and the pinned official
jumanji==1.1.2 Matplotlib renderer on the right. The generation script
resets the official oracle first, passes the supported reset-state fields into
EnvPool, and writes the side-by-side comparison image from those synchronized
reset states.
Options
task_id (str): see available tasks below;num_envs (int): how many environments you would like to create;batch_size (int): the expected batch size for return result, default tonum_envs;num_threads (int): the maximum thread number for executing the actualenv.step, default tobatch_size;seed (int | Sequence[int]): the environment seed. When a sequence is provided, it must contain exactly one seed per environment. Default to42;max_episode_steps (int): the maximum number of steps for one episode.
Supported Tasks
BinPack-v2CVRP-v1Cleaner-v0Connector-v3(Connector-v2remains as a compatibility alias)FlatPack-v0Game2048-v1GraphColoring-v1JobShop-v0Knapsack-v1LevelBasedForaging-v0MMST-v0Maze-v0Minesweeper-v0MultiCVRP-v0PacMan-v1RobotWarehouse-v0RubiksCube-partly-scrambled-v0RubiksCube-v0SearchAndRescue-v0SlidingTilePuzzle-v0Snake-v1Sokoban-v0Sudoku-v0Sudoku-very-easy-v0TSP-v1Tetris-v0
Example
import envpool
env = envpool.make_gymnasium("Sokoban-v0", num_envs=8, seed=0)
obs, info = env.reset()