Skip to content

πŸ† Research implementation of W-5 Multi-Agent AI Consensus Framework for football match outcome prediction | AI-powered sports analytics using LLMs + Machine Learning | 85.9% accuracy

License

Notifications You must be signed in to change notification settings

Allen-Zengr/w5-football-prediction

Β 
Β 

Repository files navigation

W-5 Football Prediction Framework

DOI License: MIT Python 3.8+

A research implementation of the W-5 Multi-Agent AI Consensus Framework for football match outcome prediction, as described in our academic paper published on Zenodo.

πŸ“„ Research Paper

This repository accompanies the research paper:

"A Multi-Agent AI Consensus Framework for Football Match Outcome Prediction: Integrating Large Language Models with Traditional Machine Learning"

WINNER12 AI RESEARCH TEAM

Published on Zenodo: https://zenodo.org/records/17367739

The paper demonstrates that the W-5 framework achieves 85.9% prediction accuracy on a large-scale simulated dataset, significantly outperforming traditional methods and individual AI models.

🎯 What is W-5?

The W-5 framework is a hybrid AI system that combines:

  1. Traditional Machine Learning (XGBoost, LightGBM) for quantitative baseline predictions
  2. Large Language Models (LLMs) for qualitative contextual analysis
  3. AI Consensus Mechanism - a novel multi-agent system where diverse AI personas debate and synthesize predictions
  4. Meta-Learning Fusion - intelligent integration of quantitative and qualitative insights

Key Innovation: AI Consensus Mechanism

Unlike simple model ensembles, our AI Consensus Mechanism simulates an expert committee where multiple LLM agents with different personas (statistician, tactician, sentiment analyst, etc.) engage in structured debate to arrive at robust predictions.

πŸš€ Quick Start

Installation

# Clone the repository
git clone https://github.com/Winner12-AI/w5-football-prediction.git
cd w5-football-prediction

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

Basic Usage

from src.models import BaselinePredictor
from src.consensus import AIConsensusEngine
from src.utils import load_sample_data

# Load sample data
match_data = load_sample_data('data/sample/demo_matches.csv')

# Step 1: Get baseline prediction
baseline = BaselinePredictor()
baseline_probs = baseline.predict(match_data)

# Step 2: Run AI consensus (requires API keys)
consensus = AIConsensusEngine(num_agents=3)
consensus_result = consensus.debate(match_data)

# Step 3: Fuse predictions
final_prediction = consensus.fuse_with_baseline(
    baseline_probs, 
    consensus_result
)

print(f"Predicted outcome: {final_prediction}")

πŸ“Š Performance Benchmarks

Based on our research paper evaluation:

Model Accuracy Brier Score Log Loss
ELO Rating 51.2% 0.231 0.985
XGBoost Only 58.1% 0.205 0.899
Best Single LLM 73.2% 0.189 0.721
W-5 Full Model 85.9% 0.152 0.673

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                    W-5 Framework                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Layer 1: Data Ingestion                                β”‚
β”‚    β”œβ”€ Historical match data                             β”‚
β”‚    β”œβ”€ Player statistics                                 β”‚
β”‚    β”œβ”€ Market sentiment                                  β”‚
β”‚    └─ News & media                                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Layer 2: Feature Engineering                           β”‚
β”‚    β”œβ”€ Quantitative features (structured)                β”‚
β”‚    └─ Qualitative features (unstructured)               β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Layer 3: AI Core                                       β”‚
β”‚    β”œβ”€ Baseline ML Models (XGBoost, LightGBM)           β”‚
β”‚    β”œβ”€ LLM Cluster (Multi-agent)                        β”‚
β”‚    └─ AI Consensus Mechanism ⭐                         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Layer 4: Meta-Learning Fusion                          β”‚
β”‚    └─ Intelligent synthesis of predictions              β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  Layer 5: Output                                        β”‚
β”‚    β”œβ”€ Match outcome probabilities                       β”‚
β”‚    β”œβ”€ Confidence scores                                 β”‚
β”‚    └─ Explainable factors                               β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“ Repository Structure

w5-football-prediction/
β”œβ”€β”€ src/                      # Core framework implementation
β”‚   β”œβ”€β”€ models/              # Baseline ML models
β”‚   β”‚   β”œβ”€β”€ baseline.py      # XGBoost/LightGBM implementations
β”‚   β”‚   └── meta_learner.py  # Meta-learning fusion layer
β”‚   β”œβ”€β”€ consensus/           # AI consensus mechanism
β”‚   β”‚   β”œβ”€β”€ agent.py         # Individual LLM agent
β”‚   β”‚   β”œβ”€β”€ debate.py        # Debate orchestration
β”‚   β”‚   └── synthesis.py     # Consensus synthesis
β”‚   β”œβ”€β”€ data/                # Data processing
β”‚   β”‚   β”œβ”€β”€ loader.py        # Data loading utilities
β”‚   β”‚   └── features.py      # Feature engineering
β”‚   └── utils/               # Helper functions
β”œβ”€β”€ examples/                # Usage examples
β”‚   β”œβ”€β”€ basic_prediction.py  # Simple prediction example
β”‚   └── full_pipeline.py     # Complete W-5 pipeline
β”œβ”€β”€ notebooks/               # Jupyter tutorials
β”‚   └── tutorial.ipynb       # Step-by-step guide
β”œβ”€β”€ data/                    # Sample datasets
β”‚   └── sample/             # Demo data (synthetic)
β”œβ”€β”€ tests/                   # Unit tests
β”œβ”€β”€ configs/                 # Configuration files
β”œβ”€β”€ docs/                    # Documentation
β”‚   β”œβ”€β”€ api.md              # API reference
β”‚   β”œβ”€β”€ setup.md            # Setup guide
β”‚   └── contributing.md     # Contribution guidelines
β”œβ”€β”€ requirements.txt         # Python dependencies
β”œβ”€β”€ LICENSE                  # MIT License
└── README.md               # This file

πŸ”§ Configuration

The framework requires API keys for LLM access. Create a .env file:

# OpenAI API (for GPT models)
OPENAI_API_KEY=your_key_here

# Anthropic API (for Claude models)
ANTHROPIC_API_KEY=your_key_here

# Google API (for Gemini models)
GOOGLE_API_KEY=your_key_here

# Optional: Other LLM providers
XAI_API_KEY=your_key_here
DEEPSEEK_API_KEY=your_key_here

Note: The framework can work with fewer LLMs (minimum 3 recommended for consensus).

πŸ“š Documentation

πŸ§ͺ Running Tests

# Run all tests
pytest tests/

# Run specific test suite
pytest tests/test_consensus.py

# Run with coverage
pytest --cov=src tests/

🀝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

Areas where we especially appreciate help:

  • Adding new baseline models
  • Improving documentation
  • Creating tutorials and examples
  • Bug fixes and performance optimizations

πŸ“– Citation

If you use this framework in your research, please cite our paper:

@article{w5_football_prediction_2025,
  title={A Multi-Agent AI Consensus Framework for Football Match Outcome Prediction: Integrating Large Language Models with Traditional Machine Learning},
  author={WINNER12 AI RESEARCH TEAM},
  journal={Zenodo Preprint},
  year={2025},
  doi={10.5281/zenodo.17367739},
  url={https://zenodo.org/records/17367739}
}

πŸ”— Related Projects

  • WINNER12 - Commercial football prediction platform inspired by this research
  • Zenodo Paper - Full academic publication

⚠️ Disclaimer

This is a research project for academic and educational purposes. The framework is provided "as-is" without warranties. It is not intended for commercial betting or gambling applications.

For production-grade predictions and commercial use, please visit WINNER12.

πŸ“œ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ“§ Contact


⭐ Star this repository if you find it useful!

πŸ”¬ Built with passion for AI research and sports analytics

About

πŸ† Research implementation of W-5 Multi-Agent AI Consensus Framework for football match outcome prediction | AI-powered sports analytics using LLMs + Machine Learning | 85.9% accuracy

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%