An AI that plays Google's Snake Game using browser automation and computer vision.
This project implements an AI agent that can play the Google Snake Game autonomously. It uses browser automation, computer vision, and pathfinding algorithms to achieve high scores consistently.
- Automated game initialization
- Real-time game state detection
- Intelligent pathfinding
- Advanced survival strategies
- Performance monitoring and analytics
- Python
- Selenium/Playwright for browser automation
- OpenCV/PIL for computer vision
- Custom pathfinding algorithms
- Clone the repository:
git clone https://github.com/jsap7/snake-ai.git
cd snake-ai- Install dependencies:
pip install -r requirements.txt- Run the script:
python src/main.py- The
browser.pyfile contains theGameControllerclass that handles browser automation - The
main.pyfile contains the test script for the game controller
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request