forked from WikiDeck/wikideck
Engine-agnostic duel bots over a DuelLens, a 40-card deck builder from the 236 sample cards with type/curve-skewed archetypes, a <=4-worker sim runner and DUEL_BALANCE metrics. Runs on a small stand-in duel engine until duel-core's shared/duel alpha lands; then shared/bots/duel-adapter.ts binds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
19 lines
841 B
TypeScript
19 lines
841 B
TypeScript
// What the duel simulation needs from an engine binding (stand-in or shared/duel).
|
|
import type { EngineAdapter } from '../../shared/bots/types.ts';
|
|
import type { DuelLens } from '../../shared/bots/duel-bots.ts';
|
|
import type { PoolCard } from './duel-decks.ts';
|
|
|
|
export interface DuelSim<S, A, C extends PoolCard = any> {
|
|
name: string;
|
|
engine: EngineAdapter<S, A>;
|
|
lens: DuelLens<S, A>;
|
|
/** The card pool decks are drawn from (the 236 sample cards, derived). */
|
|
pool: C[];
|
|
/** DeckSpec.payload for a list of pool cards. */
|
|
deckPayload(cards: C[]): unknown;
|
|
/** Extra per-match numbers from the final state (connected fires, plays, ...). */
|
|
metrics?(final: S): Record<string, number>;
|
|
/** Static Connected test for a pair of pool cards (for the pairwise fire rate). */
|
|
connected?(a: C, b: C): boolean | string | null;
|
|
}
|