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.
- 🤖 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
├── 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
- Clone the repository:
git clone <your-repo-url>
cd hackathon_2510- Install dependencies:
pip install -r requirements.txt- Set up environment variables:
- Copy
.env.exampleto.env - Add your OpenAI API key for AI article generation (optional)
- Copy
- Start the game:
python main.py- Enter your name when prompted
- Choose a category from the list
- Read the articles carefully - one of them is AI-generated fake news!
- Select which article you think is fake
- See if you can spot all the fakes and become a true Fake News Detective!
- 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
- 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
- Unit tests and test coverage
- Additional article categories
- Score tracking and leaderboards
- Enhanced AI prompt engineering
- Implement caching for Wikipedia API responses
- 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
- 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
We welcome contributions! Here's how you can help:
- Report bugs or suggest features by opening an issue
- Fork the repository and submit a pull request
- Improve documentation or add more article categories
- Help improve the AI prompt engineering
This project is licensed under the MIT License - see the LICENSE file for details.
- 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