← Tactical Air

Tactical Air 0.3.0 — experimental release

This library chooses among tactics your game already implements. Your game supplies legal actions and measured rewards; the library updates bounded preferences. No server, account, model download, or LLM is required at runtime.

Run the browser kit

Extract tactical-air-browser-0.3.0.tar.gz, open a terminal in its folder, and run:

python3 -m http.server 8080 --bind 127.0.0.1

Open http://127.0.0.1:8080. The independent guard example includes the compiled Wasm, generated loader, typed JavaScript client, and MIT license. No npm install or Rust compiler is needed for this kit. Serve over HTTP; browser modules cannot reliably load from a file:// URL.

Click Simulate 40 observations, then Switch which action succeeds, then simulate again. This is a synthetic API demonstration, clearly separate from the combat evidence. The host knows which action succeeds; the library receives only the observed reward.

Use the browser library

Copy sdk/ and wasm/ into your application's static assets:

import { loadPolicy } from './sdk/index.js';
const policy = await loadPolicy(new URL('./wasm/tactical_air.js', import.meta.url).href, {
  seed: 19,
  roles: [{ id: 'guard', actions: ['patrol', 'wait'] }],
  contexts: ['courtyard'],
  learning_rate: .22, exploration: .16, temperature: .3,
  decay: .025, max_update: .16,
});
const decision = policy.choose('guard', 'courtyard', ['patrol', 'wait']);
// Execute decision.action. Measure the actual, legitimately observed result.
policy.feedback(decision.decision_id, 0.5, true); // Example reward, not a universal rule.
policy.commit();
const memory = policy.snapshot();
policy.dispose();

The optional npm tarball installs with npm install ./tactical-air-browser-0.3.0.tgz. It includes dist/ with types and wasm/; copy the Wasm files to your app's public asset directory and pass that URL to loadPolicy. This package is not published on npm. For Node, initialize the generated module from readFile and call TacticalPolicy.fromModule; see scripts/sdk.test.mjs in the source bundle.

Use Rust

Extract tactical-air-source-0.3.0.tar.gz. From that directory:

cargo run --locked --release -p tactical-air-core --example guard_host
cargo test --locked --workspace

For another Rust project, use a path dependency on the extracted crates/tactical-air-core. It has no arena, renderer, browser, or game-engine dependency. The source release is not published on crates.io.

Build the game and repeat experiments

Node 22.12+ and Rust are required. Install the Wasm target and binding generator:

rustup target add wasm32-unknown-unknown
cargo install wasm-bindgen-cli --version 0.2.129 --locked
npm ci
npm run build
npm run preview

The source includes the generated Wasm and historical evidence archive. Verify the old evidence with node scripts/evidence-baseline.mjs, then verify new experiments with node scripts/verify-additive.mjs and node scripts/verify-scenarios.mjs. New experiment runners refuse to overwrite evidence; pass --out with a fresh path prefix. The archived original commands run inside target/evidence-baseline-v1, not against evolved application sources.

Integration contract

Tested support

TargetRelease status
Rust core on macOS arm64Native tests and standalone guard host
Wasm in Node 24 and the desktop Chromium previewReal arena, typed client, snapshot replay, independent browser host
macOS arm64 C ABIReal C caller, shared library, errors and ownership
Linux, Windows, mobile, consolesSource may be portable; this release has no validation claim for those platforms
Unity, Godot, Unreal packagesNo engine adapter included

The timing report is a small-policy microbenchmark on an Apple M4 Max, not a production or mobile capacity guarantee. The evidence reports test scripted combat, not human enjoyment. Keep those distinctions when evaluating this library for your game.