EyeSpy but with AI
Taking puzzles to new level with Image Generation
Published Nov 21, 2024
EyeSpy AI reimagines the classic "I Spy" game by integrating artificial intelligence to generate visually engaging puzzles. This project is about the game concept with modern AI capabilities, creating an interactive experience that challenges both observation and decision-making skills.
In this blog, I’ll outline how I built EyeSpy AI, the challenges faced during development, and the role AWS services played in its creation.
The essence of EyeSpy AI is simple: players are given a letter and must identify an object starting with that letter from a set of AI-generated images. The goal was to:
- Elevate the gameplay: Use AI-generated images to make each round unique and dynamic.
- Create an engaging interface: Design a game that is easy to pick up and play for users of all ages.
The project relied on several tools and technologies to bring the concept to life:
To keep the gameplay fresh, EyeSpy AI uses an image generation model to create visuals tailored to the game's prompts. This ensures that no two rounds are exactly the same, adding variety and replayability.
AWS played a central role in the backend infrastructure:
- Amazon Q: Used for code generation and setting up the API calls
- AWS Amazon Bedrock: Handled backend operations for generating image requests.
The game interface was built using ReactJS, HTML, CSS, and JavaScript, emphasizing a clean and intuitive design. Responsive image grids and a bright color palette were chosen to make the game visually appealing.
The logic driving EyeSpy AI was implemented using Python and JavaScript, ensuring smooth integration between AI tools, AWS services, and user interaction.
The development of EyeSpy AI followed these key steps:
- Defining the Gameplay
The first step was defining how the game would work: generating prompts, fetching relevant AI-generated images, and validating user selections. - Building the Backend
I created a backend system that could handle image generation requests and user interactions efficiently. - Designing the Interface
A user-friendly interface was critical to the success of the game. I focused on keeping the design simple, with clear instructions and an easy-to-navigate layout. - Integrating AI
Incorporating AI tools to generate images for the prompts was both exciting and challenging. Fine-tuning the model to ensure accuracy and relevance of the images took several different prompts. In the end I ended up with a simple solution.
Developing EyeSpy AI came with its share of challenges:
- Ensuring Image Relevance: One of the primary difficulties was ensuring that AI-generated images matched the prompts accurately. This was addressed by using a word generator and trying different image generation models.
- Performance Optimization: With AI-generated images, loading times were a concern. Caching frequently used assets and optimizing image sizes helped improve performance.
- Scalability: Building a game capable of handling multiple users required a robust architecture. AWS's serverless approach made it easier to scale up or down based on demand.
These challenges provided valuable learning opportunities, particularly in balancing user experience with backend efficiency.
Here’s a quick look at how EyeSpy AI works:
- Players are presented with a letter (e.g., "C") which signifies the starting letter of the hidden word.
- A set of images is displayed, each respenting an aspect or the concept of the hidden word.
- The player selects the correct letters that make up the word.
- Feedback is provided immediately about wether the answer is correct, otherwise they can keep guessing. The player can start a new round whenever they so choose too.
The use of AI adds an element of surprise to the gameplay, as images are generated dynamically for each session.
While the current version of EyeSpy AI is a solid foundation, there are several enhancements I’d like to explore:
- Adding Difficulty Levels: Customizing gameplay for beginners, intermediate, and advanced players.
- Themes and Categories: Expanding prompts to include specific topics like animals, landmarks, or household items.
- Hint Box: In case the word is too diffcult a hint will be provided to help the player.
Building EyeSpy AI was a rewarding experience, offering a chance to experiment with AI and AWS in a creative way. It was a journey filled with challenges, learning opportunities, and moments of excitement as the game took shape.
For anyone considering a similar project, my advice would be to start small, leverage the tools AWS provides, and don’t be afraid to iterate on your ideas.
EyeSpy AI combines the nostalgia of a classic game with the innovation of modern AI. Through this project, I’ve not only created an engaging game but also gained a deeper understanding of AI development and cloud-based solutions. If this inspires you to build something similar, I’d love to hear about your ideas!
Feel free to let me know what you think in the comments below!