Inspiration
I wanted to build something simple yet creative to test AI capabilities. 20 Questions seemed perfect as it could simultaneously evaluate both AI's natural language processing and logical reasoning abilities. As my first project with Amazon Q, I wanted to start with something straightforward to evaluate its potential for accelerating development.
What it does
The game follows the classic 20 Questions format with an AI twist:
- Play as either the thinker or guesser AI takes the opposite role
- Traditional rules apply: yes/no questions only
- Clean terminal interface for seamless interaction
How I built it
- Used Amazon Q extension in VS Code for development assistance
- Leveraged AWS Bedrock with Llama 3.2 90B as the AI backend
- Implemented Rich library for terminal UI enhancement
- Iterative development process from Sunday morning to evening
- Found that writing clean code helped Amazon Q provide better suggestions
Challenges we ran into
- One-day time constraint impacted code quality
- First-time learning curve with Amazon Q
- AI occasionally produced logical errors requiring full code review
- Balancing prompt engineering for optimal AI responses
- Managing game state and context throughout the session
Accomplishments that we're proud of
- Completed functional game in a single day
- Successfully integrated AI for both questioning and answering
- Created clean terminal interface
- Wrote most of the documentation/blog alongside development
- Achieved working implementation of game logic and AI interaction
What we learned
- Effective collaboration patterns with AI as a coding partner
- AWS Bedrock integration and management
- Rich module capabilities for terminal UI enhancement
- Prompt engineering techniques
- Balancing AI capabilities with game design
What's next for Twenty Questions
- Implement multiple difficulty levels
- Enhance prompt engineering for better AI responses
- Create model evaluation framework to compare different AI models
The project serves as both a fun implementation of a classic game and a practical exploration of AI capabilities in interactive environments. While simple in concept, it demonstrates the potential of modern AI tools in game development and the importance of thoughtful integration between human and machine intelligence.
Built With
- amazon-q
- bedrock
- python
Log in or sign up for Devpost to join the conversation.