Wickra.Gym
0.1.2
See the version list below for details.
dotnet add package Wickra.Gym --version 0.1.2
NuGet\Install-Package Wickra.Gym -Version 0.1.2
<PackageReference Include="Wickra.Gym" Version="0.1.2" />
<PackageVersion Include="Wickra.Gym" Version="0.1.2" />
<PackageReference Include="Wickra.Gym" />
paket add Wickra.Gym --version 0.1.2
#r "nuget: Wickra.Gym, 0.1.2"
#:package Wickra.Gym@0.1.2
#addin nuget:?package=Wickra.Gym&version=0.1.2
#tool nuget:?package=Wickra.Gym&version=0.1.2
Wickra Gym — C#
A deterministic, Gymnasium-compatible backtest environment for .NET, over the Wickra C ABI. A rollout is byte-identical to every other language binding.
Install
dotnet add package Wickra.Gym
The native library for your runtime is packed under runtimes/<rid>/native/ and
resolved automatically (a sentinel-export check rejects a wrong or stale
library).
Usage
using System.Text.Json;
using Wickra.Gym;
const string spec = """
{"dataset_ref":"demo","symbol":"BTCUSDT",
"observation":{"features":[{"kind":"price","field":"close"}]},
"action_space":{"type":"discrete","n":3},
"reward":"pnl","episode":{"max_steps":256,"warmup":0}}
""";
using var env = new Env(spec);
var candles = Enumerable.Range(0, 300).Select(i => new
{
ts = i, open = 100.0 + i, high = 100.0 + i, low = 100.0 + i, close = 100.0 + i,
});
env.Command(JsonSerializer.Serialize(new { cmd = "load", candles }));
string reset = env.Command("""{"cmd":"reset","seed":0}""");
string step = env.Command("""{"cmd":"step","action":2}""");
Console.WriteLine(step);
Commands: load, reset, step, spec, version. Domain errors come back as
{"ok":false,"error":...}; a bad spec throws ArgumentException at construction.
License
Dual-licensed under MIT or Apache-2.0, at your option.
| Product | Versions 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 was computed. 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. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.