Inspiration

As kids, we played this game in the dust. We'd dig pits in the ground with our hands and play with stones or marbles we found. I learned the deep strategies of Kisolo (a 4-row Mancala variant) from my grandpa, who had an old wooden board at his place. It wasn't just a simple pastime... it was a fierce mental battle, comparable to chess, requiring us to plan traps and captures many moves ahead.

Years later, I searched everywhere online for the exact version we played - specifically the authentic 2-rows-per-player variant... but I couldn't find it. The Mancala community is fragmented, with everyone playing by different local rules.

I realized that if I wanted to play my grandpa's version again, I had to build it myself. This hackathon was the push I needed to finally preserve that memory and digitize the rules I grew up with. MADALE is that effort: an attempt to centralize strategy enthusiasts under one definitive, high-stakes standard.

What it does

MADALE is a profound 2-player strategy game, often called "African Chess," digitized and modernized. At its core, it is a high-skill competitive engine, enriched by a community-driven Daily Challenge layer.

The Strategic Core:

Unlike simpler Mancala versions, Madale uses an authentic 4-row layout (2 rows per player) that demands deep tactical thinking:

  • One-Way Strategy: You can only move on your side of the board; you must "capture" to attack the opponent.
  • The Empty Pit Trap: Landing in an empty spot ends your turn, requiring careful planning to avoid dead-ends.
  • Chain Reactions: Experienced players can trigger "multi-lap" moves where one sowing cycle leads into another, often resulting in devastating triple or quadruple captures in a single turn.

The Daily Twist:

On top of this engine, we built a daily competitive loop:

  • Daily Shared Puzzle: Every 24 hours, the entire world solves the same board state. Since everyone plays the same puzzle, it's perfect for community strategy discussion and "How did you solve it?" threads.
  • Smart Difficulty: Boards aren't just "set" to hard—difficulty is community-rated. If the global win rate is low, the board naturally earns a "Brutal" badge.
  • Professional Metrics: We track Efficiency (how well you protected your pieces) and Precision (how effective each move was), giving the game a professional ELO-like feel.

How we built it

We focused on building a robust strategy engine that could handle both high-level AI play and real-time multiplayer.

  • Smart Strategy Engine: A custom logic layer that handles multi-lap moves, captures, and turn transitions with perfect circular index mapping.
  • Learning Difficulty System: A backend analysis layer that processes community success rates to dynamically rate every board.
  • Real-Time Leaderboards: Powered by Redis sorted sets to handle global rankings and streaks with sub-millisecond latency.
  • State-Synced Animations: A custom system to ensure that every "jump" of a stone and every capture sound is perfectly synchronized with the underlying logic.

Tech Stack

  • Frontend: React + TypeScript + Vite
  • Backend: Express.js on Reddit Devvit serverless
  • Database: Redis (sorted sets for leaderboards, JSON for metrics)
  • Styling: Tailwind CSS with custom "Zanzibar Night" dark mode
  • Game Logic: Pure, deterministic TypeScript shared between client and server.

Challenges we faced

  • The S-Curve Challenge: Animating the movement of stones across four rows in a continuous loop required complex geometric mapping to ensure it felt as natural as moving stones on a physical board.
  • Fair Rankings: Creating a formula that balances move counts and time to reward "Deep Thinking" over just "Fast Clicking."
  • Mobile Performance: Maintaining 60fps animations while the AI simulates thousands of potential moves in the background for high-difficulty levels.
  • Circular Logic Visualization: Translating the abstract 32-pit game state into a mirrored UI for opposing players, ensuring moves always flow "clockwise" from both perspectives.

Accomplishments we're proud of

  • Digitized Heritage: We successfully preserved the "Grandpa's Rules" version of Kisolo that was previously missing from the digital world.
  • Authentic Rules, Zero Compromise: We didn't simplify the game; we embraced its complexity to appeal to strategy purists.
  • Community-Driven Difficulty: A system that trusts the community to determine how hard a challenge is, rather than using arbitrary settings.
  • Mobile-First Professionalism: A web app that feels like a native package, complete with haptic-like sound feedback and responsive design.

What we learned

  • Devvit's Potential: Redis is an incredible tool for building high-stakes leaderboard systems on a serverless architecture.
  • Data as Storytelling: Showing a player they are in the "Top 5% of Precision" for a board that only 12% of people beat creates a powerful sense of accomplishment.
  • Heritage Digitization: There's a profound responsibility in coding oral-tradition rules into a permanent digital format.

What's next for MADALE

The Daily Board was just the beginning—a way to train the community. The future of MADALE is to become the Chess.com of Kisolo:

1. 1v1 Online Arena (The Core)

  • Real-Time Multiplayer: Instant matchmaking for live 1v1 battles.
  • Ranked Play: A permanent ELO system to find the true Grandmasters.

2. Global Leaderboards

  • Persistent Standings: Moving beyond daily resets to all-time rankings.
  • Regional Rankings: See who determines the strategy in your country or city.

3. Challenge Mode

  • "Beat This Board": Send specific, difficult board states to friends to solve.
  • Asynchronous Play: Correspondence games for long-term strategic battles.

Built With

Share this project:

Updates