diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..9bafae1 --- /dev/null +++ b/README.en.md @@ -0,0 +1,144 @@ + + +

+ ArkGuardRL-Core — Stronghold Protocol research environment +

+ +

Stronghold Protocol · Reinforcement Learning Environment

+ +

简体中文 · English

+ +

Run complete solo games, connect a learning policy, and inspect each decision.

+ +

+ GPL-3.0-or-later + Python 3.12 + Rust and PyO3 + Gymnasium 1.1+ +

+ +

Quick start · Environment API · Performance · Documentation · License

+ +## Overview + +ArkGuardRL-Core exposes the purchasing, team-building, and deployment decisions of Stronghold Protocol through Gymnasium. +Public observations, candidate actions, rewards, and episode boundaries let a policy drive complete games through `reset` and `step`. +Game rules follow the Stronghold Protocol simulator. [Upstream project](https://github.com/sganggs/Stronghold-Protocol) + +| Core runtime | Policy research | +| --- | --- | +| Game execution, public observations, candidate enumeration, and numeric encoding | Model representations, policy networks, and learning algorithms | +| Seeded reproduction, decision budgets, and vector collection | Trajectory collection, training, and policy evaluation | +| Maintained in this repository | Maintained in [ArkGuardRL](https://github.com/HarcoChen/ArkGuardRL) | + +Maintenance targets solo Desperation mode (`mode_single_abyss`), using the **0.3.3 native Rust runtime**. +Rust executes combat, public bookkeeping, rewards, candidate generation, and numeric encoding. Python provides Gymnasium and collection interfaces. + +## Quick start + +Use Python 3.12, Git, Rust stable, and system linker tools. Prepare the Stronghold Protocol 0.3.3 data directory separately. + +```sh +git clone https://github.com/ArkStrongholdRL/ArkGuardRL-Core.git +cd ArkGuardRL-Core +python -m pip install -e '.[gym]' +PYO3_PYTHON="$(command -v python)" cargo build --release --locked -p arkguard-python +``` + +CI provides Python 3.12 modules for Linux x64, Windows x64, and macOS Intel / Apple Silicon. +The example uses a macOS library path. On Linux, use `target/release/lib_native.so`. On Windows, use the actual path of the `_native*.pyd` CI artifact. [Cross-platform builds](benchmarks/README.md#跨平台构建) + +### Run a game + +```python +import gymnasium as gym +import arkguardrl_core.native_gym + +with gym.make( + "ArkGuardRL-v1", + data_root="/path/to/0.3.3/data", + core="band_sarkazb", + native_library="target/release/lib_native.dylib", +) as env: + env.action_space.seed(42) + obs, info = env.reset(seed=42) + while True: + action = env.action_space.sample(mask=obs["action_mask"]) + obs, reward, terminated, truncated, info = env.step(action) + if terminated or truncated: + break +``` + +The example samples candidates using the mask. Replace `action` with the candidate row selected by your policy. + +## Environment API + +| Interface | Use | +| --- | --- | +| `ArkGuardRL-v1` | A native single-environment Gymnasium decision loop | +| `SyncVectorEnv` / `AsyncVectorEnv` | Vector collection with an independent session per environment | +| Rust slots | 1–64 environments, partial resets, and selective stepping | +| `env.unwrapped.public_spatial()` | Read public maps, current template routes, and enemy preview associations | +| `env.unwrapped.catalog.definitions()` | Read public static definitions | +| `info` | Inspect action acceptance, reward components, engine seeds, and episode reasons | + +Supported cores are Amiya (`band_amiya`), Sarkaz (`band_sarkazb`), Chen (`band_chen`), and Sciurus (`band_sciurus`). +Observations are dictionaries of NumPy arrays. Action indices refer to the current state's candidate rows. The default capacity is 16,384. + +| Field | Shape and type | +| --- | --- | +| `observation` | `(4784,) float32` | +| `candidates` | `(max_candidates, 41) float32` | +| `schedules` / `experts` | `(max_candidates,) int64` | +| `action_mask` | `(max_candidates,) int8` | + +
+Actions, seeds, and rollout semantics + +- Candidates are constructed from public information. Check `info["accepted"]` for execution results. Padding or out-of-range indices raise `InvalidAction`. Candidate overflow raises an error. +- The same Gym seed reproduces the environment. `info["engine_seed"]` exposes the derived seed. `reset(seed=None)` continues the RNG stream. Action sampling uses a separate RNG. +- `NativeProgressCore` computes rewards. Components appear in `info["reward_components"]`. +- Natural endings return `terminated`. Exhausting `max_decisions`, `max_advances`, or `wall_seconds` returns `truncated`, the actual successor observation, and `info["reason"]`. Engine or transport failures raise exceptions. +- Set difficulty and budgets at construction. Single-environment `reset(options=...)` accepts an empty configuration. +- Async collection with `spawn` requires an `if __name__ == "__main__"` entry point. Each environment owns an independent native session. + +
+ +Use `env.unwrapped.public_spatial_update(key)` for incremental spatial reads. The benchmark guide also covers human-record regression and renderable combat trajectories. [Spatial APIs and replay export](benchmarks/README.md) + +
+Node v0 compatibility + +Existing callers can register `ArkGuardRL-v0` through `import arkguardrl_core.gym_env` and pass `engine_root` at construction. +This entry point uses Node.js 22+ and the 0.3.1 engine / data. + +
+ +## Performance + +| Configuration and timing scope | Decisions per second | +| --- | ---: | +| Native Gym, 1 environment, purchase-and-deploy policy | 437.2 | +| Rust slots, 4 environments / 4 threads, including spatial JSON reads | 585.7 | + +These full-game A/B measurements include native candidate preparation and indexed execution, covering environment and interface overhead. +Model inference and training are timed separately. See the benchmark guide for workload definitions, human-record regression, historical measurements, and reproduction commands. [Performance benchmarks](benchmarks/README.md) + +## Documentation + +Detailed development notes are currently in Chinese. + +| Guide | Contents | +| --- | --- | +| [Performance benchmarks](benchmarks/README.md) | Measurements, timing scope, and commands | +| [Rust feature kernels](docs/RUST-ROUTES.md) | Action and observation encoding responsibilities and ABI | +| [Native migration notes](docs/NATIVE-033.md) | Implementation scope and migration history of the 0.3.3 native runtime | +| [Issue tracker](https://github.com/ArkStrongholdRL/ArkGuardRL-Core/issues) | Interface issues and reproducible reports | + +## License and acknowledgments + +Code is licensed under GPL-3.0-or-later. Stronghold Protocol provides the upstream simulator. See the license and attribution notes for game assets and external data. [LICENSE](LICENSE) · [NOTICE](NOTICE.md) + +The landing-page layout draws on AutoTavern. The banner is an original schematic illustration. [AutoTavern](https://github.com/MCG-NJU/AutoTavern) + +

Back to top

diff --git a/README.md b/README.md index ced6d17..91a8004 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,55 @@ -# ArkGuardRL-Core + -[![Python](https://img.shields.io/badge/python-3.10%2B-3776AB?style=flat-square&logo=python&logoColor=white)](https://www.python.org/) -[![Rust](https://img.shields.io/badge/rust-PyO3%200.27-dea584?style=flat-square&logo=rust&logoColor=white)](https://www.rust-lang.org/) -[![Gymnasium](https://img.shields.io/badge/gymnasium-%E2%89%A51.1-4B8BBE?style=flat-square)](https://gymnasium.farama.org/) -[![Engine](https://img.shields.io/badge/engine-app%200.3.3-lightgrey?style=flat-square)](https://github.com/sganggs/Stronghold-Protocol) -[![License](https://img.shields.io/badge/license-GPL--3.0--or--later-blue?style=flat-square)](LICENSE) -[![Status](https://img.shields.io/badge/status-pre--release-orange?style=flat-square)](docs/NATIVE-033.md) +

+ ArkGuardRL-Core — Stronghold Protocol research environment +

-[Stronghold Protocol](https://github.com/sganggs/Stronghold-Protocol) 的 Gymnasium 环境。 +

卫戍协议 · 强化学习环境

-当前维护与原生迁移范围仅限绝境(`mode_single_abyss`),进度见 [迁移文档](docs/NATIVE-033.md)。 +

简体中文 · English

-## 安装与使用 +

复现完整单人对局,接入学习策略,检查每一步的决策结果。

-Python 3.10+、Rust stable,以及另行准备的 Stronghold Protocol 0.3.3 数据目录。 -本仓库不含游戏素材、数据、权重或轨迹。 +

+ GPL-3.0-or-later + Python 3.12 + Rust and PyO3 + Gymnasium 1.1+ +

+ +

快速开始 · 环境接口 · 性能 · 文档 · 许可与致谢

+ +## 概览 + +ArkGuardRL-Core 将《卫戍协议:盟约》的购买、构筑和部署决策接入 Gymnasium。 +环境提供公开状态、候选动作、奖励与结束标志,策略代码可以通过标准 `reset`/`step` 循环驱动完整对局。 +游戏规则基于 Stronghold Protocol 的模拟实现。[上游项目](https://github.com/sganggs/Stronghold-Protocol) + +| Core 环境运行时 | 策略研究 | +| --- | --- | +| 游戏推进、公开观测、候选枚举与数值编码 | 模型表示、策略网络与学习算法 | +| 种子复现、预算控制与多环境采样 | 轨迹采集、训练与策略评估 | +| 在本仓库维护 | 在 [ArkGuardRL](https://github.com/HarcoChen/ArkGuardRL) 维护 | + +维护范围为单人绝境模式(`mode_single_abyss`),当前使用 **0.3.3 Rust 原生运行时**。 +战斗、公开账本、奖励、候选生成和数值编码在 Rust 中执行,Python 提供 Gymnasium 接口和采样入口。 + +## 快速开始 + +使用 Python 3.12、Git、Rust stable 和系统链接工具,另行准备 Stronghold Protocol 0.3.3 数据目录。 ```sh +git clone https://github.com/ArkStrongholdRL/ArkGuardRL-Core.git +cd ArkGuardRL-Core python -m pip install -e '.[gym]' PYO3_PYTHON="$(command -v python)" cargo build --release --locked -p arkguard-python ``` +CI 提供 Python 3.12 的 Linux x64、Windows x64 和 macOS Intel/Apple Silicon 模块。 +下例动态库路径适用于 macOS,Linux 使用 `target/release/lib_native.so`,Windows 使用 CI 产物 `_native*.pyd` 的实际路径。[跨平台构建](benchmarks/README.md#跨平台构建) + +### 运行一局 + ```python import gymnasium as gym import arkguardrl_core.native_gym @@ -28,56 +57,86 @@ import arkguardrl_core.native_gym with gym.make( "ArkGuardRL-v1", data_root="/path/to/0.3.3/data", - core="band_sarkazb", # band_amiya / band_sarkazb / band_chen / band_sciurus + core="band_sarkazb", native_library="target/release/lib_native.dylib", ) as env: + env.action_space.seed(42) obs, info = env.reset(seed=42) - done = False - while not done: + while True: action = env.action_space.sample(mask=obs["action_mask"]) obs, reward, terminated, truncated, info = env.step(action) - done = terminated or truncated + if terminated or truncated: + break ``` -Linux 动态库后缀为 `.so`,CI 提供 Linux x64、Windows x64、macOS Intel/Apple Silicon 的 CPython 3.12 原生模块,详见[构建说明](benchmarks/README.md#跨平台构建)。原生运行时读取数据目录,核心由构造参数指定。`banned` 接受禁用干员 ID,`tick_budget` 控制每次战斗续跑的帧数。 +示例按掩码随机选择候选。将 `action` 替换为策略选出的候选行索引,即可接入自己的决策器。 -观测是 NumPy `Dict`,动作是**当前候选行索引**: +## 环境接口 -| 字段 | 形状 / 类型 | 含义 | -| --- | --- | --- | -| `observation` | `(4784,) float32` | 动态观测 | -| `candidates` | `(max_candidates, 41) float32` | 候选特征,padding 为 0 | -| `schedules` / `experts` | `(max_candidates,) int64` | 候选分组 | -| `action_mask` | `(max_candidates,) int8` | 有效候选行 | +| 接口 | 用途 | +| --- | --- | +| `ArkGuardRL-v1` | 原生单环境 Gymnasium 决策循环 | +| `SyncVectorEnv`/`AsyncVectorEnv` | 多环境采样,每个环境持有独立会话 | +| Rust slots | 1–64 个环境,支持局部重置和部分槽位推进 | +| `env.unwrapped.public_spatial()` | 读取公开地图、当前模板路线及敌人预览关联 | +| `env.unwrapped.catalog.definitions()` | 读取公开静态定义 | +| `info` | 检查动作接受结果、奖励分项、引擎种子及结束原因 | + +核心支持阿米娅(`band_amiya`)、萨卡兹(`band_sarkazb`)、陈(`band_chen`)和休露丝(`band_sciurus`)。 +观测为 NumPy 字典。动作索引引用当前状态的候选行,候选容量默认 16,384。 + +| 字段 | 形状与类型 | +| --- | --- | +| `observation` | `(4784,) float32` | +| `candidates` | `(max_candidates, 41) float32` | +| `schedules`/`experts` | `(max_candidates,) int64` | +| `action_mask` | `(max_candidates,) int8` | + +
+动作、种子与轨迹语义 -- 候选由公开参数域构造,游戏规则可能拒绝提交的动作,结果见 `info["accepted"]`。 -- padding 或越界索引抛 `InvalidAction`,不替换动作、不推进游戏。 -- 候选容量默认 16384,超限报错,不裁剪动作域。 -- 自然结束为 `terminated`;`max_decisions` / `max_advances` / `wall_seconds` 耗尽为 - `truncated`(`info["reason"]`)且返回真实后继观测;引擎/传输错误抛异常。 -- 奖励由 `NativeProgressCore` 计算,分项在 `info["reward_components"]`。 -- 相同 Gym 种子可复现,实际引擎种子见 `info["engine_seed"]`;`reset(seed=None)` 延续 RNG 流。 -- 静态定义通过 `env.unwrapped.catalog.definitions()` 读取。候选依赖游戏状态, - 通用 `check_env()` 的无掩码随机动作会选中 padding,请按掩码采样。 -- 难度与预算只能在构造时配置,`reset(options=...)` 不接受其他选项。 +- 候选根据公开信息构造,动作接受结果见 `info["accepted"]`。padding 或越界索引抛出 `InvalidAction`,候选超限报错。 +- 相同 Gym 种子可复现环境,`info["engine_seed"]` 给出派生种子。`reset(seed=None)` 延续 RNG 流,动作采样使用独立 RNG。 +- 奖励由 `NativeProgressCore` 计算,分项见 `info["reward_components"]`。 +- 自然结束返回 `terminated`。`max_decisions`、`max_advances` 或 `wall_seconds` 耗尽时返回 `truncated`、真实后继观测和 `info["reason"]`。引擎或传输错误抛异常。 +- 难度与预算在构造时设置。单环境 `reset(options=...)` 接受空配置。 +- Async 使用 `spawn` 时,入口需要 `if __name__ == "__main__"`。每个环境持有独立原生会话。 -## 并行与回放 +
-Gym 支持 `SyncVectorEnv`/`AsyncVectorEnv`,每个环境拥有独立原生会话;Async 使用 `spawn` 时需要 `if __name__ == "__main__"` 入口。Rust slots 支持 1–64 个环境、显式局部 reset 和部分槽位推进。 +公开空间增量读取使用 `env.unwrapped.public_spatial_update(key)`。真实记录回归和战斗轨迹导出入口见基准文档。[空间接口与渲染回放](benchmarks/README.md) -公开地图与当前模板路线通过 `env.unwrapped.public_spatial()` 读取,增量入口为 `public_spatial_update(key)`。真实记录回归、渲染回放和吞吐命令见[性能与验收说明](benchmarks/README.md)。 +
+Node v0 兼容入口 -## Node 兼容入口 +旧调用通过 `import arkguardrl_core.gym_env` 注册 `ArkGuardRL-v0`,构造时传入 `engine_root`。 +该入口使用 Node.js 22+ 和 0.3.1 引擎/数据。 -旧研究调用可通过 `import arkguardrl_core.gym_env` 注册 `ArkGuardRL-v0`,构造时传入 `engine_root`。该路径使用 Node 22+ 及对应的 0.3.1 引擎/数据;观测与候选布局见上表。 +
+ +## 性能 + +| 配置与计时范围 | 决策/秒 | +| --- | ---: | +| 原生 Gym 单环境,购买部署 | 437.2 | +| Rust slots,4 环境/4 线程,含空间 JSON 读取 | 585.7 | + +以上为原生候选准备与索引执行后的完整对局 A/B 记录,计时覆盖环境执行与接口开销。 +模型前向与训练另行计时。负载定义、真实记录回归、历史测量与复现命令见性能文档。[性能基准](benchmarks/README.md) ## 文档 | 文档 | 内容 | | --- | --- | -| [性能测量](benchmarks/README.md) | 负载定义、测量边界与基线数据 | -| [Rust 内核](docs/RUST-ROUTES.md) | 动作/观测/路线内核的职责与 ABI | -| [原生迁移状态](docs/NATIVE-033.md) | 0.3.3 Rust 引擎实现范围与开发命令 | +| [性能基准](benchmarks/README.md) | 测量结果、计时边界与运行命令 | +| [Rust 特征内核](docs/RUST-ROUTES.md) | 动作与观测编码的职责及 ABI | +| [原生迁移笔记](docs/NATIVE-033.md) | 0.3.3 原生运行时实现范围与迁移记录 | +| [问题反馈](https://github.com/ArkStrongholdRL/ArkGuardRL-Core/issues) | 接口问题与可复现报告 | + +## 许可与致谢 + +代码采用 GPL-3.0-or-later。Stronghold Protocol 提供上游模拟实现,游戏素材与外部数据的来源和使用边界见许可说明。[LICENSE](LICENSE) · [NOTICE](NOTICE.md) +首页编排参考 AutoTavern,横幅为本项目原创示意图。[AutoTavern](https://github.com/MCG-NJU/AutoTavern) -GPL-3.0-or-later;来源与外部资源边界见 [NOTICE](NOTICE.md) 与 [LICENSE](LICENSE)。 +

回到顶部

diff --git a/benchmarks/README.md b/benchmarks/README.md index c471632..033c04a 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -150,3 +150,12 @@ cargo build --release --locked -p arkguard-python cargo build --release --locked --manifest-path arkguardrl_core/native/Cargo.toml cargo build --release --locked --manifest-path benchmarks/native_slots/Cargo.toml ``` + +## Node v0 历史测量 + +2026-11-02 的 Node 0.3.1 + Rust 特征内核测量记录如下。Apple M5/16 GiB,每环境预热 64 步、测量 1,024 步,各版本六次测量。 +单环境优化后中位数为 494.75 决策/秒,四环境 Async 为 937.19 决策/秒。动作按掩码随机采样,计时包含观测、奖励、Gym 通信与循环内 reset。 + +![Node v0 单环境与四环境的六次测量及中位数](../docs/assets/benchmark-throughput.svg) + +图表从已提交的 JSON 生成,可安装 Matplotlib 后执行 `python benchmarks/plot_throughput.py` 重建。[原始记录](env-hotspots-20261102.json) · [测量说明](HOTSPOTS-20261102.md) diff --git a/benchmarks/plot_throughput.py b/benchmarks/plot_throughput.py new file mode 100644 index 0000000..0403630 --- /dev/null +++ b/benchmarks/plot_throughput.py @@ -0,0 +1,85 @@ +"""Render the recorded throughput results; does not import or run the environment.""" +import json +from pathlib import Path +import xml.etree.ElementTree as ET + +import matplotlib + +matplotlib.use("Agg") +import matplotlib.pyplot as plt +from matplotlib.lines import Line2D + + +root = Path(__file__).resolve().parents[1] +source = root / "benchmarks/env-hotspots-20261102.json" +output = root / "docs/assets/benchmark-throughput.svg" +data = json.loads(source.read_text()) +plt.rcParams.update({"font.family": "DejaVu Sans", "svg.fonttype": "path", + "svg.hashsalt": "arkguardrl-throughput", "font.size": 10}) +fig, ax = plt.subplots(figsize=(11, 5.4), facecolor="white") +fig.subplots_adjust(left=.16, right=.82, bottom=.24, top=.73) +fig.text(.055, .91, "Environment throughput", fontsize=21, weight="bold", color="#0f172a") +fig.text(.055, .85, "0.3.1 engine (Node.js) + Rust action / observation kernels | 2026-11-02", + fontsize=10.5, color="#475569") +colors = {"before": "#64748b", "after": "#0f766e"} +fills = {"before": "#e2e8f0", "after": "#ccfbf1"} +fig.legend(handles=[Line2D([], [], color=colors[key], lw=7, label=label) + for key, label in (("before", "Before"), ("after", "After"))], + loc="upper left", bbox_to_anchor=(.05, .81), frameon=False, ncol=2, fontsize=10) +fig.text(.84, .765, "MEDIAN", fontsize=9, color="#64748b") +jitter = [-.06, .06, -.10, .10, -.03, .03] +for config, title, top in (("sync-1", "1 environment · Sync", 3.25), + ("async-4", "4 environments · Async / shared memory", 1.35)): + item = data["measurements"][config] + ax.text(-.15, top + .48, title, transform=ax.get_yaxis_transform(), + color="#0f172a", weight="bold", fontsize=10.5) + for variant, offset in (("before", 0), ("after", -.65)): + y = top + offset + values, median = item[f"{variant}_rates"], item["medians"][variant] + ax.barh(y, median, height=.24, color=fills[variant], zorder=2) + ax.scatter(values, [y + j for j in jitter], color=colors[variant], + s=31, edgecolor="white", linewidth=.6, zorder=4) + ax.vlines(median, y - .20, y + .20, color=colors[variant], linewidth=2.4, zorder=5) + ax.text(-.025, y, variant.title(), transform=ax.get_yaxis_transform(), + ha="right", va="center", color="#475569", fontsize=9.5) + ax.text(1.035, y, f"{median:,.2f}", transform=ax.get_yaxis_transform(), + va="center", color=colors[variant], fontsize=12, weight="bold") +ax.set(xlim=(0, 1050), ylim=(.15, 3.95), yticks=[], xticks=[0, 250, 500, 750, 1000]) +ax.set_xlabel("Total environment decisions per second", color="#475569", labelpad=10) +ax.grid(axis="x", color="#e2e8f0", linewidth=.8, zorder=0) +ax.tick_params(axis="x", length=0, pad=7, colors="#64748b") +for spine in ax.spines.values(): + spine.set_visible(False) +fig.text(.055, .125, "Dots: all 6 runs per version. Vertical ticks: medians. | Apple M5 / 16 GiB", + fontsize=9.5, color="#475569") +fig.text(.055, .075, "1,024 decisions/env · 64 warm-up steps · loop resets included · no model or training", + fontsize=9, color="#64748b") +fig.text(.055, .03, "Shared-desktop timings vary; small gains do not establish a stable training speedup.", + fontsize=9, color="#64748b") +output.parent.mkdir(parents=True, exist_ok=True) +fig.savefig(output, format="svg", metadata={"Date": None, "Creator": "ArkGuardRL-Core"}) +plt.close(fig) + +ns = "http://www.w3.org/2000/svg" +ET.register_namespace("", ns) +ET.register_namespace("xlink", "http://www.w3.org/1999/xlink") +tree = ET.parse(output) +svg = tree.getroot() +svg.set("role", "img") +svg.set("aria-labelledby", "benchmark-title benchmark-desc") +title = ET.Element(f"{{{ns}}}title", id="benchmark-title") +title.text = "Environment throughput on 2026-11-02: six runs and medians" +desc = ET.Element(f"{{{ns}}}desc", id="benchmark-desc") +desc.text = ("Apple M5, 16 GiB. Engine 0.3.1 on Node.js with Rust action/observation kernels. " + "Uniform candidate sampling, no model or training. The zero-based horizontal axis " + "shows total decisions per second; dots show all six repeated timings per version. " + "Single environment median: 480.57 before, 494.75 after. Four asynchronous environments " + "with shared memory: 899.14 before, 937.19 after. Each run measures 1024 decisions " + "per environment after 64 warm-up steps. Loop resets count; initial reset and setup " + "do not. Shared-desktop variation prevents claiming a stable training speedup. " + "Source: benchmarks/env-hotspots-20261102.json.") +svg.insert(0, title) +svg.insert(1, desc) +tree.write(output, encoding="utf-8", xml_declaration=True) +output.write_text("\n".join(line.rstrip() for line in output.read_text().splitlines()) + "\n") +print(output) diff --git a/docs/assets/benchmark-throughput.svg b/docs/assets/benchmark-throughput.svg new file mode 100644 index 0000000..0f9a60e --- /dev/null +++ b/docs/assets/benchmark-throughput.svg @@ -0,0 +1,900 @@ + + + Environment throughput on 2026-11-02: six runs and mediansApple M5, 16 GiB. Engine 0.3.1 on Node.js with Rust action/observation kernels. Uniform candidate sampling, no model or training. The zero-based horizontal axis shows total decisions per second; dots show all six repeated timings per version. Single environment median: 480.57 before, 494.75 after. Four asynchronous environments with shared memory: 899.14 before, 937.19 after. Each run measures 1024 decisions per environment after 64 warm-up steps. Loop resets count; initial reset and setup do not. Shared-desktop variation prevents claiming a stable training speedup. Source: benchmarks/env-hotspots-20261102.json. + + + + image/svg+xml + + + ArkGuardRL-Core + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/hero.svg b/docs/assets/hero.svg new file mode 100644 index 0000000..1aeca99 --- /dev/null +++ b/docs/assets/hero.svg @@ -0,0 +1,109 @@ + + ArkGuardRL Core — a Gymnasium environment for Stronghold Protocol + A navy blue banner with the ArkGuardRL Core wordmark, structured observations, candidate actions, and parallel rollouts. An original abstract tactical grid on the right illustrates branching decisions and a highlighted route; it is not a game screenshot. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ARKSTRONGHOLDRL + + ArkGuardRL + CORE + Stronghold Protocol · Gymnasium environment + + + + Structured observations + + Candidate actions + + Parallel rollouts + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +