شعار Verifying Turn Based Games

Verifying Turn Based Games

المجتمع
abagames
verifying-turn-based-games

Verifies two-player strict-alternating-turn games via a pure-function engine contract and bot-ladder / WP-tension metrics. Use when designing or implementing board/card games that need replay, search, bot ladders, win-rate analysis, tension metrics, or decision-density evaluation. Skip for real-time, simultaneous-action, 3+ player, or single-player puzzle games.

نظرة عامة

الناشرabagames
المستودعagentic-gamedev-skills
اسم المهارةverifying-turn-based-games
النجوم
39
التفريعات
6
الملفات المرفقة
تعليمات فقط
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها abagames على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Verifying Turn Based Games في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/abagames/agentic-gamedev-skills/tree/main/.agents/skills/verifying-turn-based-games
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/abagames/agentic-gamedev-skills.git /tmp/agentic-gamedev-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-gamedev-skills/.agents/skills/verifying-turn-based-games .claude/skills/verifying-turn-based-games
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Verifying Turn Based Games في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Verifying Turn Based Games تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Verifying Turn Based Games بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Turn-Based Game Verification

A reusable contract + measurement methodology for two-player turn-based games.

Two parts:

  1. Engine Interface Contract — pure-function shape any conforming engine must satisfy, enabling search, replay, and quality analysis to be written generically.
  2. Quality Measurement Methodology — vocabulary and metrics for judging game quality beyond raw win-rates.

This skill prescribes the what (contract and metric definitions). It does not prescribe language / runtime / file layout / build system / tooling commands, ideation or tag workflows, player-facing documentation format, or engine code generation — those are project-local choices.


Scope

In scope:

  • Two-player, strict alternating turns
  • Perfect or imperfect information
  • Finite turn cap
  • Deterministic RNG via explicit seed (no side-effect randomness)

Out of scope (do not apply):

  • Simultaneous actions, reaction/interrupt windows
  • 3+ players
  • Real-time / non-turn-based
  • Single-player puzzles

If the target game does not fit the in-scope list, stop and tell the user this skill does not apply rather than forcing the contract.


Part 1: Engine Interface Contract

The engine MUST expose these pure functions. Signatures shown in TypeScript-ish notation; translate to the host language as needed.

init(config?: Config, seed?: number): State
step(state: State, action: Action): { state: State, reward?: number, done: boolean, info: object }
getLegalActions(state: State): Action[]
getObservation(state: State, playerId: PlayerId): State
getResult(state: State): { done: boolean, winners: PlayerId[], reason: string, scores?: Record<PlayerId, number> }
scoreState(state: State, playerId: PlayerId): number
replayLog(state: State): string
cloneState?(state: State): State

Contract notes:

  • getLegalActions and step use state.currentPlayer implicitly. The contract assumes strict alternating turns; do not extend it to simultaneous play.
  • state.history: Event[] MUST exist and MUST be appended to inside step. replayLog is a pure formatter over state.history; no external collector.
  • state.rngSeed MUST exist; all randomness inside step derives from it deterministically. No Math.random(), clock reads, or other side-effect randomness.
  • getObservation returns the same State type with hidden fields nulled or masked, NOT a different observation type. This keeps bots type-compatible with the engine.
  • getResult replaces a simpler getWinner so callers can distinguish win-by-HP / win-by-deck-out / draw-by-turn-cap. The reason string is required.
  • scoreState is required by the measurement layer (Part 2). An engine that omits scoreState cannot be quality-evaluated by this skill.
  • cloneState is only required when State is not fully immutable. If the host language guarantees immutability (or you use structural sharing), omit it.

Required invariants

  • No global mutable state.
  • step does not mutate its input state. Branch search via step(cloneState(s), a) or rely on immutability.
  • Replay determinism: given a fixed seed and a fixed action sequence, init followed by repeated step produces byte-identical states across runs.
  • Single illegal-action policy: choose ONE and document it in the engine — throw, return { state: s, done: false, info: { illegal: true } } without state change, or auto-pass. Do not mix policies.
  • Action and State must be JSON-serializable (replay, persistence, search caching all depend on this).

Pre-implementation checklist

Before writing the engine, the rules document must specify:

  • Exact data model for State (turn, currentPlayer, public board, private state, rngSeed, history)
  • All terminal conditions in priority order, each with its reason string
  • Action schema and preconditions for each action type
  • Pass behavior when getLegalActions returns empty
  • Hidden information policy (which fields are nulled in getObservation)
  • Numeric caps that guarantee finite game length

If any item above is unspecified, do not start engine implementation — return to rule design first.


Part 2: Quality Measurement Methodology

Once the engine satisfies Part 1, evaluate quality on two layers.

Run Part 2 when quality itself is the question: a new or reworked rule set, an explicit balance or bot-strength assessment, or a change to scoreState, action legality, or bot logic. UI, wording, rendering, and pure serialization changes that leave the rule semantics untouched need the Part 1 contract checks only — do not re-run the ladder and metric suite for them.

Layer A: Win-rate ladder

Implement three bots over the contract:

  • Random — uniform sample from getLegalActions
  • Baseline — greedy 1-step argmax of scoreState
  • Strong — shallow search (1–2 ply lookahead) over scoreState

Measure with N ≥ 200 games per matchup, swapping seats to control for first-move advantage.

MetricDefinitionTarget
Baseline vs Random win rateFraction of games the Baseline bot wins against Random, averaged across swapped seats≥ 0.65
Strong vs Baseline win rateFraction of games the Strong bot wins against Baseline, averaged across swapped seats≥ 0.60
First-player advantagewin-rate gap between seats in the same matchup≤ 0.10
Action usage distributionper-action usage rate, per botno core action below 0.05

Layer B: Experience metrics

Per game, snapshot scoreState each turn. Derive WP (win probability) as WP = sigmoid((score0 − score1) / T). Calibrate temperature T per game so that Random-vs-Strong terminal WP for Strong averages ≈ 0.9.

MetricDefinitionTarget
Tension Scorestd-dev of the WP time-series0.15–0.35
Lead Change Counttimes WP crossed 0.5≥ 2 per game
Comeback Ratefraction of games won by a player who had WP ≤ 0.250.05–0.25
Flatness Ratiofraction of games with ≥ 5 consecutive turns of |ΔWP| ≤ 0.03≤ 0.20
Final-Stretch VolatilityWP std-dev in the last 25% of turns≥ 0.8 × Tension Score
Decision Densitymean count of distinct legal actions per turngame-dependent; report distribution

Failure-pattern checklist

When metrics miss targets, look for:

  • Degenerate strong play — Strong wins but uses only 1–2 distinct actions
  • Dead mechanic — a specific action never used by any bot (dominated or over-costed)
  • Seat-order flip — win/loss reverses entirely when seats swap (first-move balance broken)
  • Low-impact loop — long games dominated by repeated near-zero ΔWP turns

Improvement-loop discipline

  • Change either rules OR bots in a single experiment, never both. Attribution dies if both move.
  • Define pass/fail thresholds before the rerun, not after the numbers come back.
  • Keep a per-experiment changelog: hypothesis / changed files / before-after metrics / decision (adopt or revert).

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Verifying Turn Based Games؟

Verifies two-player strict-alternating-turn games via a pure-function engine contract and bot-ladder / WP-tension metrics. Use when designing or implementing board/card games that need replay, search, bot ladders, win-rate analysis, tension metrics, or decision-density evaluation. Skip for real-time, simultaneous-action, 3+ player, or single-player puzzle games.

لماذا تستخدم Verifying Turn Based Games على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Verifying Turn Based Games عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Verifying Turn Based Games في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/abagames/agentic-gamedev-skills/tree/main/.agents/skills/verifying-turn-based-games. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Verifying Turn Based Games؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Verifying Turn Based Games؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Verifying Turn Based Games معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Verifying Turn Based Games مجانية؟

نعم. نشرها abagames على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇