๐ฏ The Ultimate Pokรฉmon Mind Reader - Where Information Theory Meets Gaming
"The fundamental problem of communication is that of reproducing at one point either exactly or approximately a message selected at another point." - Claude Shannon
python main.pyThat's it! The game will guide you through an interactive session where it tries to guess your Generation 1 Pokรฉmon.
Pokรฉnator is a sophisticated guessing game that demonstrates the practical application of Claude Shannon's Information Theory in an entertaining format. By asking strategically chosen questions, it can identify any of the 151 original Pokรฉmon with remarkable accuracy.
- ๐ง Intelligent Question Selection: Uses entropy maximization to ask the most informative questions
- ๐ฏ 95%+ Accuracy: Mathematically optimized for reliable identification
- ๐ก๏ธ Anti-Spam Protection: Prevents repetitive questions (max 3 type questions, 2 habitat, 2 color per game)
- ๐ญ Fuzzy Logic Responses: Answer with uncertainty (Yes, Probably, Don't Know, No, Probably Not)
- ๐ผ Professional Interface: Clean ASCII design without emojis for serious gameplay
- โก Fast & Efficient: Optimized algorithms ensure quick response times
- Launch the game: Run
python main.py - Think of a Generation 1 Pokรฉmon: Any of the original 151 (Bulbasaur to Mew)
- Answer questions: Use the numbered menu to respond
- 1: Definitely Yes
- 2: Probably Yes
- 3: Don't Know
- 4: Probably No
- 5: Definitely No
- Watch the magic: The AI narrows down possibilities using mathematical optimization
- Get your result: See if it guessed correctly!
- Definitely Yes/No: You're 100% certain
- Probably Yes/No: You're fairly sure but not completely certain
- Don't Know: You're genuinely unsure or the question doesn't apply
pokenator-cli/
โโโ main.py # Entry point - run this to play
โโโ pokenator.py # Professional CLI interface
โโโ engine.py # Core identification engine
โโโ question_diversity.py # Anti-spam question system
โโโ pokemon.json # Pokรฉmon database (151 Generation 1)
โโโ trait_matrix.json # Binary trait matrix for all Pokรฉmon
โโโ README.md # This comprehensive guide
Pokรฉnator is built on Claude Shannon's Information Theory (1948), which revolutionized our understanding of information transmission and storage. The core principle is that information can be quantified mathematically.
Entropy (H): Measures uncertainty in a system
H(X) = -ฮฃ p(x) logโ p(x)
Information Gain: Reduction in entropy after learning something new
IG = H(before) - H(after)
Optimal Questions: Those that maximize expected information gain
- Initial State: All 151 Pokรฉmon are possible (maximum entropy)
- Question Selection: Algorithm calculates which question would provide the most information
- Response Processing: Your answer eliminates impossible candidates
- Iteration: Process repeats with remaining candidates
- Convergence: When entropy is low enough, make identification
The engine employs several optimization techniques:
- Entropy-Based Question Selection: Questions are chosen to maximize expected information gain
- Confidence-Based Fuzzy Logic: Handles uncertainty in responses
- Anti-Spam Diversity System: Prevents repetitive question patterns
- Efficient Trait Matrix: Optimized binary representation of Pokรฉmon characteristics
Claude Shannon (1916-2001) is considered the father of Information Theory. His 1948 paper "A Mathematical Theory of Communication" laid the foundation for the digital age. Key insights:
- Information can be quantified mathematically
- Optimal strategies exist for information transmission
- Entropy measures uncertainty and information content
- Binary encoding is optimal for digital systems
Pokรฉnator demonstrates these principles in action:
- Binary Questions: Each yes/no question provides 1 bit of information (maximum)
- Entropy Maximization: We always ask the question that reduces uncertainty the most
- Optimal Encoding: Pokรฉmon traits are encoded as binary features
- Information Efficiency: Achieve identification with minimal questions
Information Theory powers modern technology:
- Data Compression (ZIP, MP3, JPEG)
- Error Correction (CDs, DVDs, Internet)
- Cryptography (Secure communications)
- Machine Learning (Feature selection, decision trees)
- Search Engines (Ranking algorithms)
- Generation 1 Only: Limited to original 151 Pokรฉmon
- Binary Traits: Complex characteristics reduced to yes/no
- English Only: No internationalization support
- CLI Interface: Text-based interaction only
- Perfect Memory Assumption: Assumes players know all Pokรฉmon traits
- No Learning: Doesn't adapt based on user patterns
- Static Database: Pokรฉmon data is hardcoded
- 95%+ Accuracy: Very high but not perfect
- User Error Factor: Accuracy depends on honest/accurate responses
- Edge Cases: Some Pokรฉmon are inherently difficult to distinguish
- Trait Ambiguity: Some characteristics are subjective
- Python 3.7+: Modern Python interpreter
- Standard Library Only: No external dependencies required!
# Clone or download the repository
cd pokenator-cli/
# Run the game
python main.pyThat's it! The game uses only Python's standard library for maximum compatibility.
For developers wanting to modify the code:
# Make the main script executable
chmod +x main.py
# Run with python directly
./main.py
# Or through the module system
python -m pokenator$ python main.py
================================================================================
โโโโโโโ โโโโโโโ โโโ โโโโโโโโโโโโโโโ โโโ โโโโโโ โโโโโโโโโ โโโโโโโ โโโโโโโ
โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโ โโโโโโโโโโ โโโโโโ โโโโโโ โโโโโโโโโโโ โโโ โโโ โโโโโโโโโโโ
โโโโโโโ โโโ โโโโโโโโโโ โโโโโโ โโโโโโโโโโโโโโโโโโ โโโ โโโ โโโโโโโโโโโ
โโโ โโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโ โโโ โโโ โโโโโโโโโโโโ โโโ
โโโ โโโโโโโ โโโ โโโโโโโโโโโโโโ โโโโโโโโ โโโ โโโ โโโโโโโ โโโ โโโ
The Ultimate Pokemon Guessing Game
================================================================================
Think of any Generation 1 Pokemon and I'll try to guess it!
Question 1: Is this Pokemon a legendary Pokemon?
Current candidates: 151
1. Definitely Yes
2. Probably Yes
3. Don't Know
4. Probably No
5. Definitely No
Your choice (1-5): 5
[Game continues...]To extend beyond Generation 1:
- Update pokemon.json: Add new Pokรฉmon data
- Update trait_matrix.json: Add corresponding trait vectors
- Test thoroughly: Verify accuracy with larger dataset
MIT License - Feel free to use, modify, and distribute!
- Claude Shannon: Information Theory pioneer
- Alan Turing: Computational thinking
- Donald Knuth: Algorithm analysis
- Judea Pearl: Bayesian reasoning
- Akinator: Web-based guessing game
- 20 Questions: Classic guessing game
- Decision Trees: Machine learning algorithms
- Expert Systems: AI reasoning systems
- Shannon, C. E. (1948). "A Mathematical Theory of Communication"
- Cover, T. M. & Thomas, J. A. (2006). "Elements of Information Theory"
- Russell, S. & Norvig, P. (2020). "Artificial Intelligence: A Modern Approach"
- Pokรฉmon database: The Pokรฉmon Company/Nintendo