A retro-styled Snake game enhanced with artificial intelligence, featuring adaptive difficulty, smart food placement, and player behavior analysis. Built with vanilla JavaScript and styled to look like a classic Windows 95 application.
- Retro Win95 UI - Authentic Windows 95 styling with working window controls
- Smooth Controls - Responsive keyboard and touch controls
- Classic Mechanics - Grow by eating food, avoid walls and yourself
- Adaptive Difficulty - Game speed adjusts based on your performance
- Smart Food Placement - AI strategically places food to create interesting challenges
- Player Analytics - Real-time analysis of movement patterns and skill level
- Behavioral Adaptation - AI learns from your playstyle and adapts accordingly
- AI Predictions - See predicted next moves with yellow highlights
- Performance Metrics - Live difficulty bar and strategy display
- Game Over Analysis - Detailed AI assessment of your gameplay
- Touch Controls - On-screen D-pad for mobile devices
- Swipe Gestures - Intuitive swipe-to-move controls
- Responsive Design - Adapts to different screen sizes
- Haptic Feedback - Vibration feedback on supported devices
Or run locally:
- Clone this repository
- Open
index.htmlin your web browser - Start playing!
- Use arrow keys to control the snake
- Click Start to begin a new game
- Use Pause to pause/resume
- Click Reset to restart
- Swipe anywhere on the game canvas to move
- Use the on-screen D-pad for precise control
- Tap the screen to start a new game
- Toggle AI Predictions to see suggested moves
- Enable Adaptive Difficulty for dynamic challenge scaling
- Turn on Smart Food Placement for strategic food positioning
The AI engine analyzes your gameplay in real-time:
- Movement Patterns - Detects repetitive behaviors and preferred directions
- Skill Assessment - Evaluates performance on a 1-5 scale
- Dynamic Adaptation - Adjusts game parameters based on your skill level
- Strategic Challenges - Places obstacles and food to encourage varied gameplay
- Vanilla JavaScript - No frameworks, pure JS
- HTML5 Canvas - Smooth 2D graphics rendering
- CSS3 - Authentic Win95 styling with modern responsive design
- Web APIs - Touch events, vibration, and performance timing
- Modular Design - Separate game engine, AI engine, and renderer
- Real-time Analytics - Live player behavior analysis
- Responsive Controls - Unified input handling for keyboard and touch
- Error Recovery - Graceful handling of failures and edge cases
- Pattern Recognition - Identifies common movement sequences
- Performance Metrics - Tracks success rates and reaction times
- Adaptive Algorithms - Dynamic difficulty and food placement
- Behavioral Modeling - Predicts player actions based on history
- Desktop: Chrome, Firefox, Safari, Edge
- Mobile: iOS Safari, Chrome Mobile, Samsung Internet
- Features: Touch events, vibration API, canvas 2D
ai-snake-95/
├── index.html # Main HTML file
├── game.js # Game engine and logic
├── ai-engine.js # AI system and analytics
├── styles.css # Win95 styling and responsive design
├── .kiro/ # Development specs and documentation
└── README.md # This file
- Clone the repository
- Open
index.htmlin a web browser - No build process required - it's vanilla JavaScript!
- Fork the repository
- Create a feature branch
- Make your changes
- Test on both desktop and mobile
- Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the classic Snake game
- Windows 95 UI design patterns
- Modern AI and machine learning concepts
- Retro gaming aesthetics
Found a bug or have a suggestion? Please open an issue on GitHub.
Enjoy playing AI Snake '95! 🎮✨



