Logo Lanfrica

hammondgaga/naija-scattergories

Créateur:
ham
Hôte:
# 🇳🇬 Naija Scattergories — AI-Judged Word Game on GenLayer A multiplayer word game built on **GenLayer Intelligent Contracts**, where AI validators score your answers on-chain using the Equivalence Principle. ## 🎮 How to Play 1. A letter is chosen (e.g. **A**) 2. Players race to name an **Animal, Food, Place, Object, and Crypto Term** starting with that letter 3. Answers are submitted on-chain 4. GenLayer's AI validators independently score every answer: - 🟣 **Unique valid answer** = 10 pts - 🟢 **Shared valid answer** = 5 pts each - 🔴 **Invalid / wrong letter** = 0 pts 5. The leaderboard is finalized on-chain — no one can cheat the judge ## 🧠 Why GenLayer? Traditional smart contracts can't judge whether "Antelope" is a valid animal starting with A — they only handle deterministic logic. GenLayer's **Intelligent Contracts** solve this by letting the contract call an LLM inside a non-deterministic block, with multiple validators reaching consensus via the **Equivalence Principle**. The AI judgment is decentralised and tamper-proof. ## 📁 Files | File | Description | |------|-------------| | `naija_game_v4.py` | GenLayer Intelligent Contract (the on-chain brain) | | `naija_scattergories.html` | Playable frontend (open in any browser) | ## 🚀 Live Contract - **Network:** GenLayer Studionet - **Contract Address:** `0xCA8627bac21f8D379A24Ba59Ff219e5790a8E3c7` - **Play in Studio:** studio.genlayer.com ## 🛠 Contract Methods ```python start_game() # Host starts the game join_game() # Players join submit_answers(animal, food, place, obj, crypto) # Submit 5 answers judge_and_score() # AI validators score all answers on-chain get_state() # Read current game state and scores ``` ## 🏗 Tech Stack - **Smart Contract:** Python on GenLayer (Intelligent Contract) - **AI Judging:** `gl.nondet.exec_prompt()` + `gl.eq_principle.prompt_comparative()` - **Frontend:** Vanilla HTML/CSS/JS …