Skip to content

Hackathon Quiz Game - A Python-based trivia/quiz application that supports multiple article sources including local storage and Wikipedia integration. Features a flexible category system and question model for educational gaming experiences.

License

Notifications You must be signed in to change notification settings

DatMayo/MS_Hackathon_2510

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TruthPedia: The Fake News Detection Game

A Python-based game that challenges players to identify fake news articles among real ones. Built during a hackathon coding challenge, this project features AI-generated fake articles, Wikipedia integration, and a fun, engaging interface with a political satire theme.

Features

  • 🤖 AI-Generated Fake News - Uses OpenAI's API to generate convincing fake articles
  • 🌐 Wikipedia Integration - Fetches real articles from Wikipedia for comparison
  • 🏆 Multiple Categories - Play with various topics from Urban Legends to Conspiracy Theories
  • 🎭 Satirical Theme - Fun, political satire theme with humorous responses
  • 📊 Type-Safe Python - Full type hints and comprehensive docstrings for better maintainability
  • 🎮 Interactive CLI - Clean, user-friendly command-line interface

Project Structure

├── src/
│   ├── config/                  # Configuration settings
│   │   ├── __init__.py          # Package initialization
│   │   └── settings.py          # Application configuration and constants
│   │
│   ├── data/                    # Game data and resources
│   │   └── responses.json       # Game responses and messages
│   │
│   └── game/                    # Core game package
│       ├── classes/             # Game logic implementation
│       │   ├── __init__.py      # Package initialization
│       │   ├── ai_gen.py        # AI article generation using OpenAI
│       │   ├── category.py      # Category management and selection
│       │   ├── game_ui.py       # Command-line user interface
│       │   ├── local_article.py # Local article handling and storage
│       │   └── wiki_article.py  # Wikipedia API integration
│       │
│       └── models/              # Data models and types
│           ├── __init__.py      # Package initialization
│           ├── article.py       # Article data structure
│           ├── category.py      # Category data structure
│           └── player.py        # Player data and statistics
│
├── .env.example                 # Environment variables template
├── .gitignore                   # Git ignore patterns
├── main.py                      # Application entry point
├── requirements.txt             # Python dependencies
├── README.md                    # This file
└── ToDo.md                      # Development roadmap and tasks

Installation

  1. Clone the repository:
git clone <your-repo-url>
cd hackathon_2510
  1. Install dependencies:
pip install -r requirements.txt
  1. Set up environment variables:
    • Copy .env.example to .env
    • Add your OpenAI API key for AI article generation (optional)

🎮 How to Play

  1. Start the game:
python main.py
  1. Enter your name when prompted
  2. Choose a category from the list
  3. Read the articles carefully - one of them is AI-generated fake news!
  4. Select which article you think is fake
  5. See if you can spot all the fakes and become a true Fake News Detective!

Game Modes

  • Single Player: Test your fake news detection skills
  • Categories: Various topics from Urban Legends to Conspiracy Theories
  • AI-Generated Fakes: Each game features unique AI-generated fake articles

🛠️ Development Status

Completed Features

  • Core game loop and user interface
  • Wikipedia article fetching and processing
  • Local article storage and management
  • AI-generated fake news with OpenAI integration
  • Comprehensive type hints and documentation
  • Error handling and input validation

In Progress

  • Unit tests and test coverage
  • Additional article categories
  • Score tracking and leaderboards
  • Enhanced AI prompt engineering
  • Implement caching for Wikipedia API responses

Technical Highlights

  • Type Safety: Full Python type hints for better code reliability
  • Modular Design: Clean separation of concerns between components
  • Documentation: Comprehensive docstrings and module documentation
  • Error Handling: Robust error handling and user feedback

🚀 Performance Notes

  • The game makes real-time API calls to Wikipedia, so an active internet connection is required
  • For optimal performance, ensure you have a stable network connection
  • The game includes duplicate prevention for category selection to ensure variety in gameplay

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Report bugs or suggest features by opening an issue
  2. Fork the repository and submit a pull request
  3. Improve documentation or add more article categories
  4. Help improve the AI prompt engineering

📝 License

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

🙏 Acknowledgments

  • Built during the 2025 Hackathon Challenge
  • Uses the Wikipedia-API for article fetching
  • AI capabilities powered by OpenAI's API
  • Inspired by the need for better media literacy in the digital age

About

Hackathon Quiz Game - A Python-based trivia/quiz application that supports multiple article sources including local storage and Wikipedia integration. Features a flexible category system and question model for educational gaming experiences.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages