jev-chess 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ARCHITECTURE.md +148 -0
- package/README.md +109 -0
- package/dist/chessEngine.d.ts +36 -0
- package/dist/chessEngine.d.ts.map +1 -0
- package/dist/chessEngine.js +173 -0
- package/dist/chessEngine.js.map +1 -0
- package/dist/classicMatches.d.ts +50 -0
- package/dist/classicMatches.d.ts.map +1 -0
- package/dist/classicMatches.js +223 -0
- package/dist/classicMatches.js.map +1 -0
- package/dist/demo.d.ts +2 -0
- package/dist/demo.d.ts.map +1 -0
- package/dist/demo.js +142 -0
- package/dist/demo.js.map +1 -0
- package/dist/gameReviewer.d.ts +11 -0
- package/dist/gameReviewer.d.ts.map +1 -0
- package/dist/gameReviewer.js +89 -0
- package/dist/gameReviewer.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/moveEvaluator.d.ts +11 -0
- package/dist/moveEvaluator.d.ts.map +1 -0
- package/dist/moveEvaluator.js +103 -0
- package/dist/moveEvaluator.js.map +1 -0
- package/dist/moveResolver.d.ts +15 -0
- package/dist/moveResolver.d.ts.map +1 -0
- package/dist/moveResolver.js +97 -0
- package/dist/moveResolver.js.map +1 -0
- package/dist/personaEngine.d.ts +15 -0
- package/dist/personaEngine.d.ts.map +1 -0
- package/dist/personaEngine.js +151 -0
- package/dist/personaEngine.js.map +1 -0
- package/dist/server.d.ts +2 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +1490 -0
- package/dist/server.js.map +1 -0
- package/dist/typeSafeClient.d.ts +13 -0
- package/dist/typeSafeClient.d.ts.map +1 -0
- package/dist/typeSafeClient.js +336 -0
- package/dist/typeSafeClient.js.map +1 -0
- package/dist/types.d.ts +100 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +5 -0
- package/dist/types.js.map +1 -0
- package/dist/web/main.d.ts +2 -0
- package/dist/web/main.d.ts.map +1 -0
- package/dist/web/main.js +620 -0
- package/dist/web/main.js.map +1 -0
- package/package.json +35 -0
- package/public/app.js +45 -0
- package/public/index.html +790 -0
- package/src/chessEngine.ts +191 -0
- package/src/classicMatches.ts +291 -0
- package/src/demo.ts +160 -0
- package/src/gameReviewer.ts +113 -0
- package/src/index.ts +8 -0
- package/src/moveEvaluator.ts +122 -0
- package/src/moveResolver.ts +120 -0
- package/src/personaEngine.ts +193 -0
- package/src/server.ts +1509 -0
- package/src/typeSafeClient.ts +321 -0
- package/src/types.ts +118 -0
- package/src/web/main.ts +615 -0
- package/tests/chess.test.ts +206 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { choice, getTypeSafeClient, noul, score } from "./typeSafeClient.js";
|
|
2
|
+
const SHARPNESS_RUBRIC = [
|
|
3
|
+
"Quiet, solid, or prophylactic maneuver with minimal immediate confrontation",
|
|
4
|
+
"Normal central development or positional consolidation",
|
|
5
|
+
"Sharp or provocative move with direct tactical tension",
|
|
6
|
+
"High-risk sacrifice or explosive tactical clash",
|
|
7
|
+
];
|
|
8
|
+
const STRATEGIC_THEMES = {
|
|
9
|
+
pawn_break: "Advances a pawn to challenge or dissolve opponent pawn structure",
|
|
10
|
+
piece_activation: "Develops or repositions a piece to an active central or attacking square",
|
|
11
|
+
prophylaxis: "Prevents opponent's plan, stabilizes position, or secures king safety",
|
|
12
|
+
tactical_strike: "Direct capture, check, fork, pin, or tactic to win material or mate",
|
|
13
|
+
king_hunt: "Advances pieces or pawns directly against the enemy king",
|
|
14
|
+
simplification: "Trades pieces to consolidate advantage or clarify position",
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Multi-dimensional qualitative evaluator for chess moves using TypeSafe AI.
|
|
18
|
+
* Pattern: Parallel Atomic Judgments + Code-Controlled Badge Synthesis.
|
|
19
|
+
*/
|
|
20
|
+
export class MoveEvaluator {
|
|
21
|
+
get client() {
|
|
22
|
+
return getTypeSafeClient();
|
|
23
|
+
}
|
|
24
|
+
async evaluateMove(engine, move) {
|
|
25
|
+
const boardContext = engine.getBoardContext();
|
|
26
|
+
const state = {
|
|
27
|
+
evaluated_move: {
|
|
28
|
+
san: move.san,
|
|
29
|
+
description: move.description,
|
|
30
|
+
is_capture: move.isCapture,
|
|
31
|
+
is_check: move.isCheck,
|
|
32
|
+
piece: move.piece,
|
|
33
|
+
},
|
|
34
|
+
board_context: {
|
|
35
|
+
fen: boardContext.fen,
|
|
36
|
+
turn: boardContext.turn,
|
|
37
|
+
game_phase: boardContext.gamePhase,
|
|
38
|
+
material: boardContext.materialBalance.description,
|
|
39
|
+
recent_history: boardContext.recentHistory,
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
// Parallel atomic evaluation in a single round-trip
|
|
43
|
+
const response = await this.client.systemOne({
|
|
44
|
+
state,
|
|
45
|
+
questions: {
|
|
46
|
+
tactical_sharpness: score("How sharp, tactical, or double-edged is the move `evaluated_move.san` in this position?", SHARPNESS_RUBRIC),
|
|
47
|
+
strategic_theme: choice("Which primary strategic or tactical theme best characterizes `evaluated_move.san`?", STRATEGIC_THEMES),
|
|
48
|
+
king_attack: noul("Does `evaluated_move.san` initiate or advance a direct attack against the enemy king?"),
|
|
49
|
+
psychological_pressure: noul("Is `evaluated_move.san` a provocative or high-pressure move that challenges the opponent mentally?"),
|
|
50
|
+
},
|
|
51
|
+
});
|
|
52
|
+
const sharpnessAnswer = response.answers.tactical_sharpness;
|
|
53
|
+
const themeAnswer = response.answers.strategic_theme;
|
|
54
|
+
const kingAnswer = response.answers.king_attack;
|
|
55
|
+
const pressureAnswer = response.answers.psychological_pressure;
|
|
56
|
+
const sharpnessScore = sharpnessAnswer.score;
|
|
57
|
+
const sharpnessLevel = SHARPNESS_RUBRIC[Math.min(SHARPNESS_RUBRIC.length - 1, Math.round(sharpnessScore))] ??
|
|
58
|
+
"Standard move";
|
|
59
|
+
// Determine commentary badge in deterministic code (clean, professional text)
|
|
60
|
+
let commentaryBadge = "Standard Move";
|
|
61
|
+
if (sharpnessScore >= 2.2) {
|
|
62
|
+
commentaryBadge = "Sharp Tactical Clash";
|
|
63
|
+
}
|
|
64
|
+
else if (kingAnswer.noul >= 0.7) {
|
|
65
|
+
commentaryBadge = "King Assault Initiated";
|
|
66
|
+
}
|
|
67
|
+
else if (themeAnswer.choice === "prophylaxis") {
|
|
68
|
+
commentaryBadge = "Prophylactic Squeeze";
|
|
69
|
+
}
|
|
70
|
+
else if (themeAnswer.choice === "pawn_break") {
|
|
71
|
+
commentaryBadge = "Central Pawn Break";
|
|
72
|
+
}
|
|
73
|
+
else if (themeAnswer.choice === "simplification") {
|
|
74
|
+
commentaryBadge = "Positional Simplification";
|
|
75
|
+
}
|
|
76
|
+
else if (sharpnessScore <= 0.6) {
|
|
77
|
+
commentaryBadge = "Calm Positional Maneuver";
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
commentaryBadge = "Piece Activation";
|
|
81
|
+
}
|
|
82
|
+
return {
|
|
83
|
+
san: move.san,
|
|
84
|
+
tacticalSharpness: {
|
|
85
|
+
score: sharpnessScore,
|
|
86
|
+
level: sharpnessLevel,
|
|
87
|
+
confidence: sharpnessAnswer.confidence,
|
|
88
|
+
},
|
|
89
|
+
strategicTheme: {
|
|
90
|
+
theme: themeAnswer.choice,
|
|
91
|
+
confidence: themeAnswer.confidence,
|
|
92
|
+
},
|
|
93
|
+
kingAttackRisk: {
|
|
94
|
+
probability: kingAnswer.noul,
|
|
95
|
+
},
|
|
96
|
+
psychologicalPressure: {
|
|
97
|
+
probability: pressureAnswer.noul,
|
|
98
|
+
},
|
|
99
|
+
commentaryBadge,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=moveEvaluator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moveEvaluator.js","sourceRoot":"","sources":["../src/moveEvaluator.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GAAG,EAAE,CAAC;YACjC,eAAe,GAAG,0BAA0B,CAAC;QAC/C,CAAC;aAAM,CAAC;YACN,eAAe,GAAG,kBAAkB,CAAC;QACvC,CAAC;QAED,OAAO;YACL,GAAG,EAAE,IAAI,CAAC,GAAG;YACb,iBAAiB,EAAE;gBACjB,KAAK,EAAE,cAAc;gBACrB,KAAK,EAAE,cAAc;gBACrB,UAAU,EAAE,eAAe,CAAC,UAAU;aACvC;YACD,cAAc,EAAE;gBACd,KAAK,EAAE,WAAW,CAAC,MAAM;gBACzB,UAAU,EAAE,WAAW,CAAC,UAAU;aACnC;YACD,cAAc,EAAE;gBACd,WAAW,EAAE,UAAU,CAAC,IAAI;aAC7B;YACD,qBAAqB,EAAE;gBACrB,WAAW,EAAE,cAAc,CAAC,IAAI;aACjC;YACD,eAAe;SAChB,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChessEngine } from "./chessEngine.js";
|
|
2
|
+
import type { MoveIntentResult } from "./types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Resolves natural language user commands into exact legal chess moves using TypeSafe Choice.
|
|
5
|
+
* Pattern: Select Instead of Generate + Confidence-Gated Ambiguity Resolution.
|
|
6
|
+
*/
|
|
7
|
+
export declare class MoveResolver {
|
|
8
|
+
private get client();
|
|
9
|
+
/**
|
|
10
|
+
* Resolves natural language intent (e.g. "push my e-pawn two squares", "castle kingside")
|
|
11
|
+
* into a verified legal move.
|
|
12
|
+
*/
|
|
13
|
+
resolveIntent(engine: ChessEngine, userQuery: string, confidenceThreshold?: number): Promise<MoveIntentResult>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=moveResolver.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moveResolver.d.ts","sourceRoot":"","sources":["../src/moveResolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAElE;;;GAGG;AACH,qBAAa,YAAY;IACvB,OAAO,KAAK,MAAM,GAEjB;IAED;;;OAGG;IACU,aAAa,CACxB,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,MAAM,EACjB,mBAAmB,SAAO,GACzB,OAAO,CAAC,gBAAgB,CAAC,CAiG3B;CACF"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { choice, getTypeSafeClient } from "./typeSafeClient.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolves natural language user commands into exact legal chess moves using TypeSafe Choice.
|
|
4
|
+
* Pattern: Select Instead of Generate + Confidence-Gated Ambiguity Resolution.
|
|
5
|
+
*/
|
|
6
|
+
export class MoveResolver {
|
|
7
|
+
get client() {
|
|
8
|
+
return getTypeSafeClient();
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Resolves natural language intent (e.g. "push my e-pawn two squares", "castle kingside")
|
|
12
|
+
* into a verified legal move.
|
|
13
|
+
*/
|
|
14
|
+
async resolveIntent(engine, userQuery, confidenceThreshold = 0.55) {
|
|
15
|
+
const candidates = engine.getAnnotatedMoves();
|
|
16
|
+
if (candidates.length === 0) {
|
|
17
|
+
return {
|
|
18
|
+
query: userQuery,
|
|
19
|
+
matchedMove: null,
|
|
20
|
+
san: "none",
|
|
21
|
+
confidence: 1.0,
|
|
22
|
+
probabilities: {},
|
|
23
|
+
clarificationNeeded: false,
|
|
24
|
+
alternativeCandidates: [],
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
// Direct exact match fast-path (e.g. user literally typed "e4" or "Nf3")
|
|
28
|
+
const exactMatch = candidates.find((m) => m.san.toLowerCase() === userQuery.trim().toLowerCase() ||
|
|
29
|
+
`${m.from}${m.to}`.toLowerCase() === userQuery.trim().toLowerCase());
|
|
30
|
+
if (exactMatch) {
|
|
31
|
+
return {
|
|
32
|
+
query: userQuery,
|
|
33
|
+
matchedMove: exactMatch,
|
|
34
|
+
san: exactMatch.san,
|
|
35
|
+
confidence: 1.0,
|
|
36
|
+
probabilities: { [exactMatch.san]: 1.0 },
|
|
37
|
+
clarificationNeeded: false,
|
|
38
|
+
alternativeCandidates: [],
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
// Build Choice criteria from legal moves
|
|
42
|
+
const criteria = {};
|
|
43
|
+
for (const c of candidates) {
|
|
44
|
+
criteria[c.san] = c.description;
|
|
45
|
+
}
|
|
46
|
+
criteria["none"] = "No legal candidate move matches what the player requested";
|
|
47
|
+
const state = {
|
|
48
|
+
user_intent: userQuery,
|
|
49
|
+
board: {
|
|
50
|
+
turn: engine.turn(),
|
|
51
|
+
in_check: engine.isCheck(),
|
|
52
|
+
fen: engine.fen(),
|
|
53
|
+
},
|
|
54
|
+
legal_moves: candidates.map((c) => ({
|
|
55
|
+
san: c.san,
|
|
56
|
+
description: c.description,
|
|
57
|
+
})),
|
|
58
|
+
};
|
|
59
|
+
const response = await this.client.systemOne({
|
|
60
|
+
state,
|
|
61
|
+
questions: {
|
|
62
|
+
matched_move: choice("Which legal chess move in `legal_moves` best fulfills the player's command in `user_intent`?", criteria),
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
const answer = response.answers.matched_move;
|
|
66
|
+
const selectedSan = answer.choice;
|
|
67
|
+
const confidence = answer.confidence;
|
|
68
|
+
const probabilities = answer.probabilities;
|
|
69
|
+
// Sort alternatives by probability
|
|
70
|
+
const sortedOptions = Object.entries(probabilities)
|
|
71
|
+
.filter(([k]) => k !== "none" && k !== selectedSan)
|
|
72
|
+
.sort((a, b) => b[1] - a[1])
|
|
73
|
+
.map(([k]) => k);
|
|
74
|
+
if (selectedSan === "none" || confidence < confidenceThreshold) {
|
|
75
|
+
return {
|
|
76
|
+
query: userQuery,
|
|
77
|
+
matchedMove: null,
|
|
78
|
+
san: selectedSan,
|
|
79
|
+
confidence,
|
|
80
|
+
probabilities,
|
|
81
|
+
clarificationNeeded: true,
|
|
82
|
+
alternativeCandidates: sortedOptions.slice(0, 3),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
const matched = candidates.find((c) => c.san === selectedSan) ?? null;
|
|
86
|
+
return {
|
|
87
|
+
query: userQuery,
|
|
88
|
+
matchedMove: matched,
|
|
89
|
+
san: selectedSan,
|
|
90
|
+
confidence,
|
|
91
|
+
probabilities,
|
|
92
|
+
clarificationNeeded: false,
|
|
93
|
+
alternativeCandidates: sortedOptions.slice(0, 2),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=moveResolver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"moveResolver.js","sourceRoot":"","sources":["../src/moveResolver.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGhE;;;GAGG;AACH,MAAM,OAAO,YAAY;IACvB,IAAY,MAAM;QAChB,OAAO,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,aAAa,CACxB,MAAmB,EACnB,SAAiB,EACjB,mBAAmB,GAAG,IAAI;QAE1B,MAAM,UAAU,GAAG,MAAM,CAAC,iBAAiB,EAAE,CAAC;QAE9C,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC5B,OAAO;gBACL,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,IAAI;gBACjB,GAAG,EAAE,MAAM;gBACX,UAAU,EAAE,GAAG;gBACf,aAAa,EAAE,EAAE;gBACjB,mBAAmB,EAAE,KAAK;gBAC1B,qBAAqB,EAAE,EAAE;aAC1B,CAAC;QACJ,CAAC;QAED,yEAAyE;QACzE,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAChC,CAAC,CAAC,EAAE,EAAE,CACJ,CAAC,CAAC,GAAG,CAAC,WAAW,EAAE,KAAK,SAAS,CAAC,IAAI,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K,CAAC,CAAC,EAAE,CAAC,CAAC;SACjD,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ChessEngine } from "./chessEngine.js";
|
|
2
|
+
import type { PersonaDecision, PersonaId, PersonaProfile } from "./types.js";
|
|
3
|
+
export declare const CHESS_PERSONAS: Record<PersonaId, PersonaProfile>;
|
|
4
|
+
/**
|
|
5
|
+
* AI Opponent decision engine powered by TypeSafe Composite Scoring.
|
|
6
|
+
* Pattern: Atomic Multi-Dimensional Scoring + Client-Side Persona Weights.
|
|
7
|
+
*/
|
|
8
|
+
export declare class PersonaEngine {
|
|
9
|
+
private get client();
|
|
10
|
+
/**
|
|
11
|
+
* Scores candidate moves and selects the top move according to the persona's style.
|
|
12
|
+
*/
|
|
13
|
+
selectMove(engine: ChessEngine, personaId: PersonaId, candidateLimit?: number): Promise<PersonaDecision>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=personaEngine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personaEngine.d.ts","sourceRoot":"","sources":["../src/personaEngine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,KAAK,EAGV,eAAe,EACf,SAAS,EACT,cAAc,EAEf,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,SAAS,EAAE,cAAc,CAmD5D,CAAC;AAuBF;;;GAGG;AACH,qBAAa,aAAa;IACxB,OAAO,KAAK,MAAM,GAEjB;IAED;;OAEG;IACU,UAAU,CACrB,MAAM,EAAE,WAAW,EACnB,SAAS,EAAE,SAAS,EACpB,cAAc,SAAI,GACjB,OAAO,CAAC,eAAe,CAAC,CA0F1B;CACF"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { getTypeSafeClient, noul, score } from "./typeSafeClient.js";
|
|
2
|
+
export const CHESS_PERSONAS = {
|
|
3
|
+
tal: {
|
|
4
|
+
id: "tal",
|
|
5
|
+
name: "Mikhail Tal",
|
|
6
|
+
title: "The Magician from Riga",
|
|
7
|
+
quote: "You must take your opponent into a deep dark forest where 2+2=5, and the path leading out is only wide enough for one.",
|
|
8
|
+
weights: {
|
|
9
|
+
aggression: 0.45,
|
|
10
|
+
prophylaxis: -0.15,
|
|
11
|
+
complexity: 0.5,
|
|
12
|
+
materialGreed: -0.2,
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
petrosian: {
|
|
16
|
+
id: "petrosian",
|
|
17
|
+
name: "Tigran Petrosian",
|
|
18
|
+
title: "Iron Tigran",
|
|
19
|
+
quote: "Nothing can be done against me; my position is so solid.",
|
|
20
|
+
weights: {
|
|
21
|
+
aggression: 0.05,
|
|
22
|
+
prophylaxis: 0.65,
|
|
23
|
+
complexity: -0.3,
|
|
24
|
+
materialGreed: 0.2,
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
capablanca: {
|
|
28
|
+
id: "capablanca",
|
|
29
|
+
name: "José Raúl Capablanca",
|
|
30
|
+
title: "The Chess Machine",
|
|
31
|
+
quote: "A master plays simple chess, puts pieces where they belong, and simplifies into a clean endgame.",
|
|
32
|
+
weights: {
|
|
33
|
+
aggression: 0.2,
|
|
34
|
+
prophylaxis: 0.35,
|
|
35
|
+
complexity: -0.4,
|
|
36
|
+
materialGreed: 0.45,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
coffeehouse: {
|
|
40
|
+
id: "coffeehouse",
|
|
41
|
+
name: "Coffeehouse Gambiteer",
|
|
42
|
+
title: "Romantic Hustler",
|
|
43
|
+
quote: "Checks are free, pawn storms are mandatory, and danger lurks on every rank.",
|
|
44
|
+
weights: {
|
|
45
|
+
aggression: 0.55,
|
|
46
|
+
prophylaxis: -0.35,
|
|
47
|
+
complexity: 0.4,
|
|
48
|
+
materialGreed: -0.1,
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
const AGGRESSION_RUBRIC = [
|
|
53
|
+
"Passive retreat, backward consolidation, or defensive block",
|
|
54
|
+
"Neutral developing maneuver or quiet regrouping",
|
|
55
|
+
"Forward thrust, central pressure, or active threat creation",
|
|
56
|
+
"Direct sacrifice, attack on the king, or fierce tactical challenge",
|
|
57
|
+
];
|
|
58
|
+
const PROPHYLAXIS_RUBRIC = [
|
|
59
|
+
"Completely ignores king safety and opponent counterplay",
|
|
60
|
+
"Standard move with ordinary tactical exposure",
|
|
61
|
+
"Solid, patient reinforcement of weaknesses or squares",
|
|
62
|
+
"Deep prophylactic suppression of opponent counter-ideas",
|
|
63
|
+
];
|
|
64
|
+
const COMPLEXITY_RUBRIC = [
|
|
65
|
+
"Clarifies position, forces trades, or liquidates tension",
|
|
66
|
+
"Steady, orderly position with clear structural goals",
|
|
67
|
+
"Introduces sharp asymmetry, unbalances, and multiple branches",
|
|
68
|
+
"Maximum chaos: highly volatile tactical minefield",
|
|
69
|
+
];
|
|
70
|
+
/**
|
|
71
|
+
* AI Opponent decision engine powered by TypeSafe Composite Scoring.
|
|
72
|
+
* Pattern: Atomic Multi-Dimensional Scoring + Client-Side Persona Weights.
|
|
73
|
+
*/
|
|
74
|
+
export class PersonaEngine {
|
|
75
|
+
get client() {
|
|
76
|
+
return getTypeSafeClient();
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Scores candidate moves and selects the top move according to the persona's style.
|
|
80
|
+
*/
|
|
81
|
+
async selectMove(engine, personaId, candidateLimit = 5) {
|
|
82
|
+
const persona = CHESS_PERSONAS[personaId];
|
|
83
|
+
const allMoves = engine.getAnnotatedMoves();
|
|
84
|
+
if (allMoves.length === 0) {
|
|
85
|
+
throw new Error("No legal moves available in current position.");
|
|
86
|
+
}
|
|
87
|
+
// Candidate selection: curate a diverse pool representing varied styles
|
|
88
|
+
// (tactical strikes, prophylactic castle/pawn moves, central development)
|
|
89
|
+
const tacticalMoves = allMoves.filter((m) => m.isCheck || m.isCapture);
|
|
90
|
+
const quietMoves = allMoves.filter((m) => !m.isCheck && !m.isCapture);
|
|
91
|
+
const pool = [];
|
|
92
|
+
if (tacticalMoves.length > 0)
|
|
93
|
+
pool.push(...tacticalMoves.slice(0, 2));
|
|
94
|
+
if (quietMoves.length > 0)
|
|
95
|
+
pool.push(...quietMoves.slice(0, Math.max(2, candidateLimit - pool.length)));
|
|
96
|
+
const candidates = pool.slice(0, candidateLimit);
|
|
97
|
+
const scoredCandidates = [];
|
|
98
|
+
// Evaluate each candidate move across atomic dimensions
|
|
99
|
+
for (const move of candidates) {
|
|
100
|
+
const state = {
|
|
101
|
+
candidate_move: {
|
|
102
|
+
san: move.san,
|
|
103
|
+
description: move.description,
|
|
104
|
+
is_capture: move.isCapture,
|
|
105
|
+
is_check: move.isCheck,
|
|
106
|
+
},
|
|
107
|
+
board: {
|
|
108
|
+
turn: engine.turn(),
|
|
109
|
+
fen: engine.fen(),
|
|
110
|
+
material: engine.getMaterialBalance().description,
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
const response = await this.client.systemOne({
|
|
114
|
+
state,
|
|
115
|
+
questions: {
|
|
116
|
+
aggression: score("How aggressive and attacking is `candidate_move.san`?", AGGRESSION_RUBRIC),
|
|
117
|
+
prophylaxis: score("How well does `candidate_move.san` ensure safety and stifle opponent counterplay?", PROPHYLAXIS_RUBRIC),
|
|
118
|
+
complexity: score("How much tactical tension and complexity does `candidate_move.san` inject into the board?", COMPLEXITY_RUBRIC),
|
|
119
|
+
material_greed: noul("Is the move `candidate_move.san` primarily motivated by winning or defending material?"),
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
const dimScores = {
|
|
123
|
+
aggression: response.answers.aggression.score,
|
|
124
|
+
prophylaxis: response.answers.prophylaxis.score,
|
|
125
|
+
complexity: response.answers.complexity.score,
|
|
126
|
+
materialGreed: response.answers.material_greed.noul,
|
|
127
|
+
};
|
|
128
|
+
// Composite scoring formula in code
|
|
129
|
+
const compositeScore = persona.weights.aggression * dimScores.aggression +
|
|
130
|
+
persona.weights.prophylaxis * dimScores.prophylaxis +
|
|
131
|
+
persona.weights.complexity * dimScores.complexity +
|
|
132
|
+
persona.weights.materialGreed * dimScores.materialGreed;
|
|
133
|
+
scoredCandidates.push({
|
|
134
|
+
move,
|
|
135
|
+
compositeScore: Math.round(compositeScore * 1000) / 1000,
|
|
136
|
+
dimensionScores: dimScores,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
// Sort by composite score descending
|
|
140
|
+
scoredCandidates.sort((a, b) => b.compositeScore - a.compositeScore);
|
|
141
|
+
const best = scoredCandidates[0];
|
|
142
|
+
const rationale = `${persona.name} (${persona.title}) selected ${best.move.san} with composite score ${best.compositeScore} (Aggression: ${best.dimensionScores.aggression.toFixed(1)}, Prophylaxis: ${best.dimensionScores.prophylaxis.toFixed(1)}, Complexity: ${best.dimensionScores.complexity.toFixed(1)}, Greed: ${best.dimensionScores.materialGreed.toFixed(2)}).`;
|
|
143
|
+
return {
|
|
144
|
+
persona,
|
|
145
|
+
selectedMove: best.move,
|
|
146
|
+
rankedCandidates: scoredCandidates,
|
|
147
|
+
rationale,
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=personaEngine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personaEngine.js","sourceRoot":"","sources":["../src/personaEngine.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAUrE,MAAM,CAAC,MAAM,cAAc,GAAsC;IAC/D,GAAG,EAAE;QACH,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,aAAa;QACnB,KAAK,EAAE,wBAAwB;QAC/B,KAAK,EACH,wHAAwH;QAC1H,OAAO,EAAE;YACP,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,CAAC,IAAI;YAClB,UAAU,EAAE,GAAG;YACf,a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