Gym.NET.Rendering 1.0.1

This package has a SemVer 2.0.0 package version: 1.0.1+rc1.
dotnet add package Gym.NET.Rendering --version 1.0.1
                    
NuGet\Install-Package Gym.NET.Rendering -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Gym.NET.Rendering" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Gym.NET.Rendering" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Gym.NET.Rendering" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Gym.NET.Rendering --version 1.0.1
                    
#r "nuget: Gym.NET.Rendering, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Gym.NET.Rendering@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Gym.NET.Rendering&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=Gym.NET.Rendering&version=1.0.1
                    
Install as a Cake Tool

Gym.NET 1.0.1+rc1 is the first 1.0 on nuget.org. It is 1.0.0+rc1, which shipped on GitHub only, plus Gymnasium's five JAX environments, a wrappers list on Gymnasium.Make, steps that allocate up to 406 times less, a page for each environment the showreel plays, and the fixes that checking every open GitHub issue against 1.0.0 turned up. For the same seed and actions, every environment still returns Gymnasium v1.4.0's observations, rewards, flags and infos bit for bit, checked by a parity suite that runs Gymnasium inside the test process. Coming from 0.2.0, read the 1.0.0 release notes and the migration guide first: 1.0 replaced 0.2's API, which followed gym before 0.26, with Gymnasium's.

🧭 Overview

  • 44 environment ids - the 39 of 1.0.0+rc1 and Gymnasium's five JAX environments, tabular (2) and phys2d (3), bit for bit with Gymnasium's jitted programs on JAX 0.12.1; Gym.NET now registers every id Gymnasium v1.4.0 registers with an environment class, and Gymnasium's 19 refusing ids raise its ImportError as Gymnasium's do.
  • 267 of Gymnasium v1.4.0's 301 public names - up from 237, the JAX functional environments' among them; the other 34: 24 Python-only (the JAX/PyTorch conversions' 21, the process workers' 2, pickling's 1), 9 provided another way by design, and AtariPreprocessing, out of scope.
  • Gymnasium.Make(id, wrappers: [...]) and env.Wrap(...) - any wrapper around an env of any type, closed over the env's own types as make closes its own layers.
  • Leaner steps - bytes a step: CarRacing 3,631,032 to 8,931, BipedalWalker 35,071 to 2,651, Pendulum 11,088 to 1,249, LunarLander 8,993 to 4,886, every result unchanged; re-measured, Gym.NET steps x1.9 (CarRacing) to x48.3 (Pendulum) as fast as Gymnasium.
  • Frames - InvertedPendulum's and InvertedDoublePendulum's MuJoCo frames now equal Gymnasium's byte for byte, and the Avalonia and WinForms windows show one screen pixel per frame pixel at any display scaling.
  • 2 fixes from the GitHub issues - #14: a .NET Framework or .NET 6 project gets NuGet's NU1202 at install again, not a build error; #22: closing a human-mode window with its X no longer throws from the next step or ends the app.
  • Documentation - 23 environment pages, every C# sample beside its Gymnasium twin, 25 example projects, and 12 published expert agents.
  • Release candidate 1, 1.0.1+rc1 - labelled as 1.0.0+rc1 was: NuGet ignores the +rc1 build metadata, so to every NuGet client these are the stable 1.0.1 packages.
  • 4,484 unit tests pass on net8.0, net10.0 and net11.0, in Debug and Release.
  • Published through trusted publishing - no API key stored anywhere, and no README embedded, so each version's README tab on nuget.org carries its release notes.
  • 1 new package on nuget.org - Gym.NET.Rendering.
  • 1 breaking change - a binary one: code compiled against 1.0.0+rc1 is rebuilt against 1.0.1+rc1.

📦 New NuGet Packages

  • Gym.NET.Rendering - pygame's drawing in managed C#, which Gym.NET.Environments depends on; on nuget.org for the first time.

Detailed Breakdown

📦 New NuGet Packages

  • Gym.NET.Rendering - the rasterizer behind the rgb_array frames, equal to pygame-ce's pixels, and Gymnasium's play; it shipped with 1.0.0+rc1 on GitHub and reaches nuget.org with 1.0.1+rc1, a dependency of Gym.NET.Environments.
  • Versions - the five packages share 1.0.1+rc1, which NuGet reads as 1.0.1. 1.0.0+rc1, which NuGet reads as 1.0.0, stays on its GitHub release only, so nuget.org goes from 0.2.0 to 1.0.1+rc1.

📊 Dashboards & Docs

  • Environment pages - 23 of them, for the environments the showreel plays and MountainCarContinuous (FrozenLake8x8 and BipedalWalkerHardcore are sections of their siblings' pages), in Gymnasium's order and more: an infobox playing the env's own seeded episode, a quick start, the episode's anatomy, how it works with a labelled frame, the spaces, rewards, start and end, every argument with its Python name, the info keys, rendering, code, agents, variants, parity and performance.
  • The site's Environments section - the gallery beside a sidebar of the pages; the sidebar remembers the sections a reader opens, and a click locks a cartridge so the pointer can cross to NOW PLAYING.
  • Samples in Gymnasium's shape - every reset deconstructs into (observation, info), every declaration names its type, and every C# sample with a Gymnasium counterpart has its Python twin beside it (the guides, the env pages, the landing page) or below it (the README), each run against Gymnasium when written.
  • Examples - 25 projects, one per environment the showreel plays plus MountainCarContinuous; each records its env page's media with --record, plays from the keyboard where a few keys allow, and twelve play published expert agents.
  • Expert agents - Farama's SAC, TQC and PPO experts for the eleven MuJoCo v5 environments and RL Zoo's TQC for BipedalWalkerHardcore, served from the tests as gym.net-agent/1 JSON, each playing an expert episode on Gym.NET's own engines in the unit tests.
  • README - a front page in NumSharp's shape: what Gym.NET is, the features, a still of each environment, a typed example beside its Gymnasium twin, the performance table, the packages.

✨ New APIs & Modules

  • Gymnasium.Make(..., wrappers: [...]) - every Make overload's last parameter: a list of wrappers outside every layer make adds, the first innermost, each closed over the types of the env beneath it; the typed Make<TObs, TAct> returns the outermost wrapper's types.
  • env.Wrap(options) - wraps any IEnv, however it was built, as Python's env = Wrapper(env, **kwargs); a failed wrap leaves the env as it was.
  • EnvOptions and WrapperOptions - every generated options record's base; a wrapper's record names its class, and WrapperOptions.Of(typeof(X<,>), kwargs) names any other, your own included.
  • Jax.Jit and Jax.Vmap - FuncEnv.Transform's JAX transforms for the four functional environments: a batched function maps state records and arrays over their leading axis, with params applied to every row.
  • Functional environments - CliffWalkingFunctional, BlackjackFunctional, CartPoleFunctional and PendulumFunctional on FuncEnv, with their params records (BlackJackParams, CartPoleParams, PendulumParams) and state records.

🧩 Environments

  • tabular/CliffWalking-v0, tabular/Blackjack-v0 - Gymnasium's JAX tabular environments: JAX 0.12.1's threefry2x32 keys, splits and draws, jit's x32 conversions and weak-type promotion written in C#, without JAX.
  • phys2d/CartPole-v0, phys2d/CartPole-v1, phys2d/Pendulum-v0 - Gymnasium's JAX classic control: XLA's compiled float32 programs in C#, fused multiply-adds exactly where XLA fuses, its folded constants, its sin and cos; each with its vector environment, a key per env and Gymnasium's next-step autoreset. XLA compiles for the host CPU, so Gymnasium's last bits match where it compiles as on the reference CPU: with FMA, and for the vector environments AVX2 without AVX-512.
  • Complex actions - phys2d CartPole computes a complex action in complex64, as Gymnasium's jit does, without its ComplexWarning.
  • The 19 refusing ids - the MuJoCo v2 and v3 ids and GymV21Environment-v0/GymV26Environment-v0 are registered as Gymnasium registers them: make warns that a MuJoCo id is out of date where Gymnasium does, then raises Gymnasium's ImportError; Gymnasium.Envs has no constants for them.

⚡ Performance

Ratios are Gymnasium ÷ Gym.NET time per step - higher is better (x2 = twice Gymnasium's speed); xLOW->xHIGH spans the slowest->fastest env of a family. Measured 2026-11-25 on a quiet Linux machine (an Intel Xeon E5-2690 v2, without AVX2 or FMA), each process pinned to two cores: net10.0 Release builds on .NET 10.0.15 against Gymnasium v1.4.0 on CPython 3.12.16 (NumPy 2.4.2, pygame-ce 2.5.8, Box2D 2.3.10), five rounds of Gym.NET and four of Gymnasium, interleaved, medians of benchmark_step after a 2-second warm-up. 1.0.0+rc1's ratios were measured on another machine, so the two releases' ratios do not compare.

  • x6.4->x48.3 - classic_control: Pendulum x48.3, Acrobot x17.9, MountainCar x9.3, CartPole x6.4.
  • x5.7->x6.4 - toy_text: FrozenLake x6.4, Taxi x5.7.
  • x1.9->x3.8 - box2d, on Gym.NET's managed Box2D: BipedalWalker x3.8, LunarLander x3.1, CarRacing x1.9.
  • Bytes a step, the managed allocations of the same loop over 2,000 steps - CarRacing 3,631,032 to 8,931, BipedalWalker 35,071 to 2,651, Pendulum 11,088 to 1,249, LunarLander 8,993 to 4,886: Box.Sample draws without NumSharp's temporaries, Box2D's scratch lives on the stack and in the world, and CarRacing writes its frame in place; every observation, reward and frame is unchanged.

🎯 Parity & Fixes

  • #14, .NET Framework - Gym.NET.Environments 1.0.0 packed its registration targets as a framework-neutral asset, so a net472 or net6.0 project installed it without NU1202, got no library and failed to build (CS0234, CS0400); 1.0.1+rc1 packs them for net8.0 and later, and NuGet refuses older frameworks at install with NU1202, naming the supported ones. .NET Framework stays unsupported.
  • #22, the WinForms window - 0.2.0's freeze (a blank window and a hung app when the env ran on a WinForms UI thread) is gone since 1.0.0; 1.0.1+rc1 fixes the rest: the user's X closes the window, the env keeps stepping, its later frames are dropped without an error, and disposing the env no longer ends the app's own message loop. The Avalonia window drops frames after the X the same way.
  • Deliberate difference - Gymnasium's pygame window ignores its X while an env renders; Gym.NET's windows close on it.
  • MuJoCo frames - the rasterizer's facing test is exact (a float32 area turned slivers of a few thousandths of a pixel around), so InvertedPendulum's and InvertedDoublePendulum's frames, v4 and v5, equal Gymnasium's byte for byte; the other families' frames stay within their measured baseline.
  • Windows at any scaling - the WinForms window is per-monitor DPI aware and the Avalonia window sizes itself in the monitor's scale, so the screen holds the frame's own bytes at 100%, 125%, 150% and 175%.

🧰 Testing & Tooling

  • Trusted publishing - a workflow run by hand for a release's tag builds the five packages as a release is built, checks each version against the tag, attaches them and their SHA-256 files to the GitHub release, and pushes them with a one-hour key from nuget.org's trusted publishing; no key is stored.
  • Package guards - GYMNET0012 fails the pack of a project that embeds a README (each version's README tab stays editable on nuget.org), and GYMNET0013 one that packs a build asset outside a framework folder.
  • The unit suite - 4,484 of 4,509 pass on each framework, in Debug and Release, on CI; the other 25 skip: 24 data rows where Gymnasium's own tests call pytest.skip, and the MP4 writer's test, on a machine without ffmpeg.
  • Window tests - a WinForms and an Avalonia cell click a window's X as a user does and check the app's own message loop survives; on a clean Windows 11 desktop every window test passes (WinForms 45 of 45, Avalonia 45 of 45).

💥 Breaking Changes

  • Recompile against 1.0.1+rc1 - every Gymnasium.Make overload gained a last optional parameter, wrappers: source code compiles unchanged, but a binary built against 1.0.0+rc1 that calls Make stops with MissingMethodException until it is rebuilt.
  • From 0.2.0 - 1.0's breaking changes are in the 1.0.0 release notes: move every Gym.NET package to 1.0.1+rc1 at once, replace NumSharp.Lite with NumSharp 0.81.0, and target .NET 8 or later.

Install via NuGet

dotnet add package Gym.NET --version 1.0.1
dotnet add package Gym.NET.Environments --version 1.0.1
dotnet add package Gym.NET.Rendering --version 1.0.1
dotnet add package Gym.NET.Rendering.Avalonia --version 1.0.1
dotnet add package Gym.NET.Rendering.WinForm --version 1.0.1

Packages

Package NuGet
Gym.NET NuGet
Gym.NET.Environments NuGet
Gym.NET.Rendering NuGet
Gym.NET.Rendering.Avalonia NuGet
Gym.NET.Rendering.WinForm NuGet
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed.  net11.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Gym.NET.Rendering:

Package Downloads
Gym.NET.Environments

Gym.NET's environments, registered for Gymnasium.Make: classic_control (CartPole, MountainCar, MountainCarContinuous, Pendulum, Acrobot), phys2d (Gymnasium's JAX CartPole and Pendulum with their vector envs, XLA's float32 programs in C#), box2d (LunarLander, LunarLanderContinuous, BipedalWalker, BipedalWalkerHardcore, CarRacing, on Box2D 2.3 in managed C#), toy_text (FrozenLake, CliffWalking, Taxi, Blackjack) and tabular (Gymnasium's JAX Blackjack and CliffWalking, JAX's random numbers and arithmetic in C#), each equal to Gymnasium's step for step and frame for frame; mujoco (Ant, HalfCheetah, Hopper, Humanoid, HumanoidStandup, InvertedPendulum, InvertedDoublePendulum, Pusher, Reacher, Swimmer, Walker2d, each v4 and v5) on Gym.NET's own engine, equal to Gymnasium's on MuJoCo 4.0.0 step for step, their frames drawn by Gym.NET and measured against Gymnasium's; and the vector envs of CartPole and the phys2d envs for Gymnasium.MakeVec.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 0 12/2/2026