Files
scopone/src/game/ai-worker-protocol.ts
Giancarmine Salucci 3f74c57665
Some checks failed
Android Build & Publish / android (push) Failing after 2m10s
feat(SCOPONE-0013): PIMC AI rewrite + Gitea Android CI pipeline
- Replace minimax with PIMC (Perfect Information Monte Carlo) search
- Add PIMC_SCOPE_BOOST=150 → effective scopa value 540 (was 390)
  → Master win rate: 67.5% → 72.5% vs legacy AI (target ≥60%)
  → Advanced win rate: 97.5% vs beginner AI (target ≥55%)
  → Scope gap in losses: 6.54 → 3.00 scopa/match
- Add card inference engine for probabilistic hand tracking
- Add ai-strategy, ai-legacy evaluation bridge
- Add .gitea/workflows/android-build.yml: build debug + unsigned
  release APK and publish to Gitea generic package registry
2026-05-24 16:29:04 +02:00

45 lines
1.1 KiB
TypeScript

import type { AIDecisionProgress, AIMove } from './ai';
import type { CardInferenceSnapshot } from './card-inference';
import type { CardTrackerSnapshot } from './card-tracker';
import type { Difficulty, GameState, PlayerIndex } from './types';
export interface AIWorkerChooseMoveRequest {
type: 'choose-move';
requestId: string;
state: GameState;
playerIdx: PlayerIndex;
difficulty: Difficulty;
trackerSnapshot: CardTrackerSnapshot | null;
inferenceSnapshot: CardInferenceSnapshot | null;
}
export interface AIWorkerProgressMessage {
type: 'progress';
requestId: string;
progress: AIDecisionProgress;
}
export interface AIWorkerResultMessage {
type: 'result';
requestId: string;
move: AIMove;
}
export interface AIWorkerSerializedError {
message: string;
name: string;
stack?: string;
}
export interface AIWorkerErrorMessage {
type: 'error';
requestId: string;
error: AIWorkerSerializedError;
}
export type AIWorkerRequestMessage = AIWorkerChooseMoveRequest;
export type AIWorkerResponseMessage =
| AIWorkerProgressMessage
| AIWorkerResultMessage
| AIWorkerErrorMessage;