Formal Specification
Traditional Moroccan marketplace memory game — Formal Specification
Morocco · riddle-word · Confidence: medium
← Back to game pageImplementation Suitability
Suitability: engine-readyFidelity: directGap-fills: 1
# Labet es-Souk — AI-optimized specification
## General idea
A deterministic cumulative memory and sequence recall game. An ordered sequence of symbolic dictionary tokens grows by one unique element on each turn. The active agent must reproduce the exact sequence from memory within a finite time budget and append a legal, previously unused token . Any omission, permutation, invalid token, or timeout results in immediate elimination.
## Formal model
- **Abstraction taken:** Natural language phrases are mapped directly into a finite categorical vocabulary of market commodities (). Turn submissions are validated via string/token sequence equality.
- **Player/agent count:** players in active rotation queue (, default ).
- **Turn model:** Sequential elimination queue.
## Formal rules
R1. **Vocabulary & Setup:**
- Finite vocabulary of unique market items.
- Active cumulative sequence starts empty: .
- Active players list . Active player index .
R2. **Turn Submission & Verification:**
- On active turn, player must submit action `recite_and_append(recalled_sequence, new_item)` within time limit :
- **Recall Verification:** (exact length, ordering, and token identity).
- **New Item Legality:** .
R3. **Resolution of Success & Faults:**
- **Success:**
- Sequence updates: .
- Active turn advances to next player: .
- **Fault Event:**
- If recall mismatch, invalid/duplicate item, or timeout ():
- Agent is eliminated: .
- Sequence remains intact at its current state.
- Active index updates to next surviving player: .
R4. **Victory Condition:**
- The game terminates immediately when (single surviving player).
- The surviving agent is declared the Winner.
## Edge cases
- **Tie at the end condition:** Not applicable — players are eliminated sequentially; exactly one survivor remains.
- **A player with no legal move:** If the vocabulary is completely exhausted (), [gap-fill] the sequence is cleared, all remaining active players receive point, and a new round begins.
- **Repetition / cycles:** Impossible — each turn strictly increases by 1, and agent memory limits or vocabulary bounds guarantee failure within finite turns.
- **Simultaneous claims on the same resource or position:** Turns are strictly sequential in queue .
- **Player elimination mid-round; turn order repair:** Handled strictly by R3 ( removes failing agent, active index modulo-clamped).
- **Resource exhaustion:** Vocabulary is bounded ( tokens); handled by R4.
- **Termination guarantee:** Guaranteed by monotonic player elimination until .
## State representation
- **Persistent state:** Vocabulary set , surviving player queue , active player index , cumulative sequence list .
- **Ephemeral state:** Turn start timestamp , submitted recall tokens.
- **Observable information:** Perfect information — full sequence history is publicly broadcast upon each successful turn.
## Action space
- `recite_and_append(recalled_list, new_token)`:
- `recalled_list`: Array of string tokens.
- `new_token`: String token .
## Playability notes
- **Single-player-vs-AI:** Highly playable: human tests working memory capacity against AI agents programmed with varying memory decay models (e.g. Recurrent Neural Networks or forgetting curves).
- **Group games ():** Scales naturally with multi-agent elimination.
- **Physical-skill games:** Not applicable (pure cognitive working memory and verbal agility).
- **What is lost in the adaptation:** The lively family banter, funny throat-clearing, and aromatic Moroccan mint tea served between turns.
## Implementation hints
- Implement as a simple list append and array comparison check with a timer wrapper.
- First milestone: Implement 2-player game loop verifying sequence accumulation and mismatch elimination triggers.
Download as JSON
Download the full game corpus entry for this game as structured JSON.
Download JSONCite this page
Traditional Moroccan marketplace memory game (Morocco). (n.d.). Games of Countries. https://gamesofcountries.com/games/ma-morocco/souk
@misc{gamesofcountries-ma-morocco-souk,
title = {Traditional Moroccan marketplace memory game (Morocco)},
year = {n.d.},
publisher = {Games of Countries},
url = {https://gamesofcountries.com/games/ma-morocco/souk}
}