Skip to main content
Formal Specification

Hassaniya poetic riddling and mental duel — Formal Specification

Mauritania · riddle-word · Confidence: medium

← Back to game page

Implementation Suitability

Suitability: engine-readyFidelity: directGap-fills: 1
# At-Tahaji — AI-optimized specification ## General idea A deterministic verbal knowledge and riddle-matching duel. Agents take turns querying from a formal knowledge base of rhymed poetic riddles R={(ri,ai,categoryi)}. The responding agent must select or generate the exact semantic answer ai within a finite attempt budget; failure requires ceding a territory token (*Madina*). The first agent to accumulate 5 territories wins. ## Formal model - **Abstraction taken:** Natural language poetic metaphors are represented as a finite knowledge database of riddle-solution pairs 𝒟={(r1,a1),…,(rM,aM)} (M≥30). Answer matching evaluates semantic equivalence via canonical token matching. - **Player/agent count:** 2 agents (A0,A1). - **Turn model:** Alternating rounds. In round k, one agent is Challenger, the other is Solver. ## Formal rules R1. **Database & Territory Setup:** - Database 𝒟 contains M=30 unique riddle pairs. Available pool Priddles=𝒟. - Territory bank contains K=10 famous Mauritanian desert cities: {Chinguetti,Ouadane,Tichitt,Oualata,Atar,Kiffa,Nema,Rosso,Akjoujt,Zoueratt}. - Each agent begins with 0 owned territories (Territoriesi=∅). R2. **Challenger Action:** - Active Challenger selects riddle (r∗,a∗)∈Priddles: - Priddles←Priddles∖{(r∗,a∗)}. - Transmits text of r∗ to Solver. R3. **Solver Deliberation & Verification:** - Solver has a budget of Ntries=2 attempts: - Solver submits `submit_answer(candidate_text)`. - Canonical evaluation: If candidate_text==a∗: - **Correct!** Solver scores +1 point, role shifts (Solver becomes Challenger for next round). - If candidate_text≠a∗ after 2 tries: - **Failure!** Solver must execute `cede_territory(city_name)`: - 1 city transferred from bank to Challenger: Territorieschal←Territorieschal∪{city}. - Challenger scores +2 points and retains Challenger role for next round. R4. **Victory Condition:** - The game terminates immediately when an agent accumulates |Territoriesi|≥5 cities (or when the riddle pool is exhausted). - The agent with ≥5 cities (or higher total score) is declared the Winner. ## Edge cases - **Tie at the end condition:** If all 30 riddles are exhausted with tied territory counts, the agent with higher point score wins; [gap-fill] if identical, a final tiebreaker riddle is sampled from reserve. - **A player with no legal move:** Selecting an unused riddle or submitting an answer string is always legal. - **Repetition / cycles:** Impossible — each riddle is used at most once from finite pool of 30 riddles; game horizon strictly ≤30 rounds. - **Simultaneous claims on the same resource or position:** Turns within a round are strictly ordered (Challenge → Solution attempts → Territory transfer). - **Player elimination mid-round; turn order repair:** Not applicable — 2-agent symmetric match. - **Resource exhaustion:** Handled strictly by R4 (30-riddle pool exhaustion). - **Termination guarantee:** Guaranteed by finite riddle database and monotonic territory accumulation. ## State representation - **Persistent state:** Owned territory sets (Territories0,Territories1), total point scores (S0,S1), current challenger ID ∈{0,1}, remaining riddle pool Priddles. - **Per-round state:** Active riddle (r∗,a∗), remaining attempts n∈[0,2]. - **Observable information:** Perfect information regarding public riddles and scores; candidate solution is evaluated deterministically. ## Action space - For Challenger: `pose_riddle(riddle_id)`. - For Solver: `submit_answer(text_string)`, `cede_territory(city_name)`. ## Playability notes - **Single-player-vs-AI:** Highly engaging: Large Language Models (LLMs) or retrieval engines excel at parsing metaphors and solving authentic Hassaniya riddles. - **Group games (N>2):** Team format aggregates solver votes into a single collective answer. - **Physical-skill games:** Not applicable (pure cognitive riddle solving and vocabulary memory). - **What is lost in the adaptation:** The poetic cadence of spoken Hassaniya, aroma of brewing mint tea, and crackling desert campfire. ## Implementation hints - Implement as a dictionary lookup and fuzzy/canonical string match with a territory tracker array. - First milestone: Implement 10-riddle test harness verifying 2-try limit, territory transfer, and 5-city victory trigger.

Download as JSON

Download the full game corpus entry for this game as structured JSON.

Download JSON
Cite this page

Hassaniya poetic riddling and mental duel (Mauritania). (n.d.). Games of Countries. https://gamesofcountries.com/games/mr-mauritania/at-tahaji

@misc{gamesofcountries-mr-mauritania-at-tahaji,
  title = {Hassaniya poetic riddling and mental duel (Mauritania)},
  year = {n.d.},
  publisher = {Games of Countries},
  url = {https://gamesofcountries.com/games/mr-mauritania/at-tahaji}
}