Logo Lanfrica

hammondgaga/naija-scattergories

Creator:
ham
Host:
# ๐Ÿ‡ณ๐Ÿ‡ฌ 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 โ€ฆ