🎮 Cognify 🎮
Cognify is an AI-powered word-guessing game where players compete against a sophisticated AI to guess a daily target word. Set in a futuristic world where AI has taken control of human knowledge, the stakes are high: players must outsmart the AI to reclaim and protect the words that define humanity's culture and history. Cognify challenges players to engage in a battle of wits and creativity, blending fun, education, and strategy. Together, human ingenuity and linguistic prowess become the last hope to save the world from an AI-driven erasure of identity.

🗂️ Table of Contents
- 💡 Features
- 🛠️ Architecture Overview
- 👥 Team
- 🛠️ Challenges We Ran Into
- 🏆 Accomplishments That We're Proud Of
- 🎓 What We Learned
- 🌟 What's Next for Cognify
💡 Features

1. AI-Driven Word Guessing
- Compete against an AI that guesses alongside you using Amazon Bedrock Models.
- Receive similarity feedback based on GloVe embeddings for each guess.
2. Interactive Gameplay

- Real-time updates via a Flask backend and JavaScript frontend.
- A user-friendly interface with visual and audio feedback.
3. Daily Challenges

- A unique target word every day, challenging players to improve over time.
- Leaderboards for competitive ranking.
4. Performance Tracking

- In-depth player statistics including total games played, guesses per game, and average completion time.
- Save and review game history to track improvement.
5. Seamless Cloud Integration

- Hosted on AWS ECS and managed with CloudFormation, ensuring a scalable and secure experience.
🛠️ Architecture Overview
📂 ### Cognify Game Architecture
Frontend
- User Interaction: Web Game UI built with HTML, JavaScript and CSS.
- Key Features:
- Handles word input, feedback display, and leaderboard updates.
- Communicates with the backend API using AJAX.
- Handles word input, feedback display, and leaderboard updates.
Backend
Flask API
- Processes:
- Player inputs.
- Game logic and AI integration.
- Player inputs.
- Handles:
- Semantic similarity calculations.
- Ranking player guesses.
- Semantic similarity calculations.
- Interfaces with DynamoDB for data storage.
AI Integration
- Amazon Bedrock:
- Mistral.mistral-7b-instruct-v0:2: AI-powered guessing logic.
- Titan Embeddings V2: Semantic similarity calculations.
- Mistral.mistral-7b-instruct-v0:2: AI-powered guessing logic.
- Custom Logic: Ranks and optimizes similarity scores.
Dockerized Backend
- Key Components:
- Flask API and AI logic encapsulated into Docker containers.
- Ensures portability and ease of deployment.
- Flask API and AI logic encapsulated into Docker containers.
Hosting and Compute
- Amazon ECR: Stores Docker images for frontend and backend.
- Amazon ECS: Orchestrates containers in production.
- Amazon EC2: Provides compute instances for running containers.
Amazon Q (CodeWhisperer)
- Capabilities:
- Assisted in coding efficient Flask API and Dockerfiles.
- Optimized container configurations and AWS service integration.
- Suggested scalable deployment solutions.
- Assisted in coding efficient Flask API and Dockerfiles.
Database
- Amazon DynamoDB:
- Stores player profiles, game history, and statistics.
- Ensures low-latency data retrieval for smooth gameplay.
- Manages leaderboard and daily challenges.

- Stores player profiles, game history, and statistics.
AI Processing Workflow
- Player Input: Sent to backend for processing.
- AI Guessing:
- Titan Embeddings V2: Embedding similarity calculations.
- Mistral.mistral-7b-instruct-v0:2: AI-generated guesses.
- Titan Embeddings V2: Embedding similarity calculations.
- Ranked Results: Returned to players in real-time.
Game Hosting and Infrastructure
- Docker Containers:
- Frontend and backend services packaged for simplicity.
- Streamlined deployment and scaling.
- Frontend and backend services packaged for simplicity.
- Elastic Container Service (ECS): Auto-scales to handle traffic.
- Elastic Load Balancer: Distributes requests efficiently.
- Amazon EC2: Runs the game server and backend logic.
- Route 53: Manages game domain DNS.
Player Analytics and Statistics
- Tracks:
- Total games played.
- Best rank achieved.
- Completion rate and recent game activity.
- Total games played.
- Visualized on the user dashboard for insights.
Development Automation (Amazon Q)
Key Contributions:
- Generated Flask API routes, logic, and frontend components.
- Facilitated integration with AWS services (Bedrock, ECS, DynamoDB).
Optimization Areas:
- Semantic similarity calculations.
- AI inference pipeline.
- Dockerfile creation and deployment automation.
Security and Scalability
- Security Measures:
- Data encryption for storage and communication.
- Role-based access control for sensitive resources.
- Secure API Gateway interactions.
- Data encryption for storage and communication.
- Scalability:
- Auto-scaling policies ensure high availability.
- Auto-scaling policies ensure high availability.
👥 Team
Cognify was developed by a passionate team of developers and AI enthusiasts committed to creating a fun, educational, and competitive game experience.
🛠️ Challenges We Ran Into

- Embedding Model Limitations: GloVe embeddings' limited vocabulary required additional fallback logic.
- Optimizing AI Performance: Reducing latency for real-time gameplay involved extensive caching and optimization.
- Infrastructure Setup: Deploying and scaling on AWS ECS and integrating Route 53 presented initial challenges.
🏆 Accomplishments That We're Proud Of

- Successfully integrating GloVe embeddings and Amazon Bedrock Models for dynamic word guessing.
- Creating a visually appealing and responsive interface for an engaging user experience.
- Deploying a scalable cloud-based solution that ensures reliability and performance.
🎓 What We Learned

- Natural Language Processing: Gaining insights into embedding techniques and similarity calculations.
- Cloud Infrastructure: Building and managing scalable solutions using AWS services.
- User-Centric Design: Iterating on feedback to refine the gameplay experience.
🌟 What's Next for Cognify
- Multiplayer Mode: Enable real-time competition between friends.
- Mobile App: Launching a mobile version for iOS and Android.
- Enhanced AI: Using more sophisticated NLP models to improve the AI's guessing ability.
- Gamification Features: Adding achievements, rewards, and daily streaks to boost player engagement.
- Language Support: Expanding vocabulary and support for multiple languages to reach a broader audience.
Built With
- ajax
- amazon-bedrock
- amazon-dynamodb
- amazon-ec2
- amazon-ecr
- amazon-ecs
- amazon-elasticache
- amazon-elb
- amazon-q
- amazon-route-53
- amazon-web-services
- bootstrap
- cloudformation
- docker
- flask
- html/css
- javascript
- python



Log in or sign up for Devpost to join the conversation.