MintPlayer.AI.ReinforcementLearning.Core
0.3.0
See the version list below for details.
dotnet add package MintPlayer.AI.ReinforcementLearning.Core --version 0.3.0
NuGet\Install-Package MintPlayer.AI.ReinforcementLearning.Core -Version 0.3.0
<PackageReference Include="MintPlayer.AI.ReinforcementLearning.Core" Version="0.3.0" />
<PackageVersion Include="MintPlayer.AI.ReinforcementLearning.Core" Version="0.3.0" />
<PackageReference Include="MintPlayer.AI.ReinforcementLearning.Core" />
paket add MintPlayer.AI.ReinforcementLearning.Core --version 0.3.0
#r "nuget: MintPlayer.AI.ReinforcementLearning.Core, 0.3.0"
#:package MintPlayer.AI.ReinforcementLearning.Core@0.3.0
#addin nuget:?package=MintPlayer.AI.ReinforcementLearning.Core&version=0.3.0
#tool nuget:?package=MintPlayer.AI.ReinforcementLearning.Core&version=0.3.0
MintPlayer.AI.ReinforcementLearning.Core
Reinforcement learning for .NET, written from scratch in C# — no Python, no libtorch, no native dependencies. Tensors, SIMD matmul, tape-based autograd, Adam, Gymnasium-faithful environment contracts, and an algorithm ladder from tabular Q-learning through Double DQN and PPO — all readable managed code, verified against golden trajectories from Python Gymnasium and finite-difference gradient checks.
using MintPlayer.AI.ReinforcementLearning.Core.Environments;
using MintPlayer.AI.ReinforcementLearning.Core.Random;
using MintPlayer.AI.ReinforcementLearning.Core.Training;
// Implement IEnvironment<TObs, TAct> for your own problem (Gymnasium-style
// Reset/Step with the terminated/truncated split), then:
var result = DqnTrainer.Train(env, new DqnOptions { SolveThreshold = 475 }, new SeedSequence(42));
Console.WriteLine($"solved after {result.StepsTrained} steps, eval {result.FinalEvalReturn:F1}");
Highlights:
IEnvironment<TObs, TAct>with separateTerminated/Truncated(the most common silent RL bug, made impossible to conflate), spaces, action masking, vectorized envs whose parallel mode is bitwise identical to sequential.- Trainers: tabular Q-learning/SARSA, REINFORCE, Double DQN (masked, with full-resume checkpointing — an interrupted run resumes bitwise identically), PPO with GAE.
- Reproducibility as a feature: own xoshiro256** RNG + master-seed fan-out; one seed reproduces an entire training run.
- Versioned binary checkpoints + a file-based model store (atomic writes).
Pair with MintPlayer.AI.ReinforcementLearning.Environments for ready-made environments (CartPole, GridWorld, FrozenLake, 2048, Rush Hour) and the imitation learning + policy-guided A* toolkit that solves expert Rush Hour boards optimally.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- MintPlayer.SourceGenerators.Attributes (>= 10.20.0)
- System.Numerics.Tensors (>= 10.0.9)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on MintPlayer.AI.ReinforcementLearning.Core:
| Package | Downloads |
|---|---|
|
MintPlayer.AI.ReinforcementLearning.Ilgpu
Optional GPU compute backend for MintPlayer.AI.ReinforcementLearning, implemented with ILGPU (CUDA / OpenCL / CPU accelerators). Implements IComputeBackend so it slots in under the autograd layer without touching algorithm code. Never a dependency of the Core package. |
|
|
MintPlayer.AI.ReinforcementLearning.Environments
Ready-made environments for MintPlayer.AI.ReinforcementLearning: a bit-for-bit faithful CartPole-v1 port, GridWorld, FrozenLake, 2048 (with an n-tuple TD learner, ~84% win rate), and Rush Hour with a BFS oracle, puzzle generator, and an imitation-learning + policy-guided A* toolkit that solves official expert boards optimally. |
|
|
MintPlayer.AI.ReinforcementLearning.Hosting
Hosting + dependency-injection helpers for MintPlayer.AI.ReinforcementLearning: AIHost.CreateBuilder wires a Microsoft.Extensions.Hosting application builder (configuration, logging, DI) preconfigured with the RL model store, system clock and CampaignRunner, so training tools compose with dependency injection like an ASP.NET host. |
GitHub repositories
This package is not used by any popular GitHub repositories.