Logo Lanfrica

keystats/ARC-CHALLENGE-AFRICA

Creator:
key
Host:
A logic-based AI system for solving Abstraction and Reasoning (ARC) tasks without training data. Implements rule inference, geometric transformations, and shape analysis to mimic human reasoning. Earned a 5th place finish in the Zindi ARC Challenge Africa competition. # 🧠 ARC Challenge Africa: Abstraction & Reasoning with Logic-Based AI Welcome to my solution for the Zindi ARC Challenge Africa β€” a competition inspired by the ARC-AGI benchmark that tests **true reasoning** over traditional training. This repo contains the exact pipeline that earned me a **5th place finish** πŸ…! --- ## πŸ“¦ Repository Structure ``` πŸ“ ARC-Challenge/ β”œβ”€β”€ ARC_Solution.ipynb ← My final logic-based solution notebook β”œβ”€β”€ train.json ← Training tasks (input/output pairs) β”œβ”€β”€ test.json ← Test tasks to predict β”œβ”€β”€ SampleSubmission.csv ← Submission format to resemble β”œβ”€β”€ requirements.txt ← Required libraries β”œβ”€β”€ README.md ← This file! ``` --- ## 🎯 Problem Overview The ARC (Abstraction and Reasoning Corpus) challenge presents grid-based puzzles, where each task contains: - βœ… **Training examples** (input/output grid pairs) - ❓ **Test input**, where the goal is to produce a matching output grid Each grid uses integers 0–9 to represent colors. There’s no model training β€” the system must reason directly from examples. --- ## πŸš€ My Approach: Human-Like Reasoning with Visual Feedback Instead of machine learning, I built a **logic-driven pipeline** that mimics how a human would solve puzzles. ### 🧩 Step-by-Step Logic Chain 1. **Visualize training and test grids** interactively 2. **Infer the expected output shape** from sample submission 3. **Detect 1-to-1 color mappings** and apply to test input 4. **Apply geometric transformations** (flip, rotate, transpose) 5. **Check shape transformations** (dilation, erosion, outline detection) 6. **Fallback heuristics** (tiling, color shifts, border padding) 7. **Resize output** to match target shape 8. **Flatten and save** as CSV --- ## πŸ‘οΈ Visualization Two interactive viewers were used: - 🧠 **Training Viewer**: See how inputβ†’output transforms - πŸ” **Prediction Viewer**: Inspect test input and generated output This helped quickly debug a …