SlitherBench
Can an AI make a competent bot for a game?
Prompt
# Build an Autonomous Slither.io Bot Create a fully functional AI bot that can independently play Slither.io in a browser. Build it from scratch. Do not attempt to recreate any existing bot, copy a specific architecture, or restrict yourself to historical implementations. ## Main objective Create a bot that can play the game autonomously, survive for long periods, grow its snake, and eventually become large enough to compete aggressively with other players. The bot should make its own decisions continuously without requiring human input. ## Core gameplay ### 1. Navigation - Control the snake's direction automatically. - Move smoothly rather than making constant abrupt turns. - Avoid unnecessary circles and repetitive movement patterns. - Navigate efficiently around the arena. - Detect and avoid arena boundaries. ### 2. Food collection - Detect nearby food. - Identify valuable food clusters. - Prioritize food based on distance, value, and danger. - Avoid inefficient long-distance detours. - Collect food efficiently while maintaining a safe escape route. ### 3. Survival - Detect nearby snakes and their heads. - Predict their likely movement. - Maintain safe distances from other snakes. - Avoid crossing in front of dangerous opponents. - Avoid trapping itself against walls or other snakes. - Recognize dangerous situations and immediately prioritize survival. ### 4. Combat - Identify opportunities to eliminate other snakes. - Predict opponent movement and intercept opportunities. - Attempt safe cut-offs when the opportunity is favorable. - Take advantage of dead snakes and newly available food. - Avoid attacking opponents when the risk is too high. - Switch back to farming when combat becomes unprofitable. ### 5. Boost management - Use boosting strategically. - Boost to escape immediate danger. - Boost when pursuing a valuable opportunity. - Avoid wasting length on unnecessary boosting. - Do not boost blindly into obstacles or enemy snakes. ## AI decision-making Implement a continuous decision-making system. The bot should evaluate possible directions based on: - Collision probability. - Distance to nearby snakes. - Food value. - Available escape routes. - Arena boundaries. - Growth opportunities. - Potential opponents. - Current snake length. Survival should take priority over food collection, and food collection should take priority over low-confidence attacks. Avoid random steering as the primary navigation strategy. Use predictive movement rather than simply reacting after a threat is already nearby. ## User interface Create a small, clean control panel with: - Enable/disable bot. - Current bot status. - Current objective. - Snake length or score, when available. - Nearby threat information. - Food collection status. - Kill count, when available. - Adjustable aggression. - Adjustable risk tolerance. - Adjustable food-seeking behavior. Settings should persist between page reloads. The interface must not obstruct gameplay. ## Technical requirements Build this as a standalone Tampermonkey userscript. Support: - https://slither.io/ - https://slither.com/io/ Requirements: - JavaScript. - No backend requirement. - No paid APIs. - Robust game-state detection. - Reliable mouse and keyboard control. - Automatic startup when the game becomes available. - Graceful handling of missing or changing game objects. - No unnecessary external dependencies. Use legitimate client-side game interaction. Do not manipulate server-side state, exploit vulnerabilities, or interfere with other players' connections. ## Testing Test the bot in actual gameplay. Evaluate: 1. Whether it starts and controls the snake correctly. 2. Whether it collects food. 3. Whether it avoids collisions. 4. Whether it uses boost intelligently. 5. Whether it can survive around multiple opponents. 6. Whether it can recognize and exploit combat opportunities. 7. Whether its behavior remains stable over extended gameplay. Fix problems discovered during testing. ## Deliverables Produce: - Complete working Tampermonkey userscript. - Installation instructions. - Description of the AI architecture. - Testing results. - Known limitations. Do not stop at a design proposal or pseudocode. Implement the actual bot. Prioritize a working, intelligent player over an elaborate interface. The finished product should be capable of playing Slither.io independently with minimal human intervention.
Response not available
Response not available