{"id":21861771,"url":"https://github.com/mcjkula/battlesnake-python","last_synced_at":"2026-04-18T17:04:40.174Z","repository":{"id":203627348,"uuid":"708210333","full_name":"mcjkula/battlesnake-python","owner":"mcjkula","description":"Python-based Battlesnake bot using A* pathfinding, collision detection, and adaptive strategies for competitive gameplay.","archived":false,"fork":false,"pushed_at":"2023-10-27T23:14:18.000Z","size":174,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-31T13:42:30.530Z","etag":null,"topics":["battlesnake","bot","pathfinding","reinforcement-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mcjkula.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-10-21T21:19:27.000Z","updated_at":"2023-10-28T11:16:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"55b59992-a9fa-43d9-a1b7-bd2c32a314b1","html_url":"https://github.com/mcjkula/battlesnake-python","commit_stats":null,"previous_names":["mcjkula/battlesnake-python"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mcjkula/battlesnake-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcjkula%2Fbattlesnake-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcjkula%2Fbattlesnake-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcjkula%2Fbattlesnake-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcjkula%2Fbattlesnake-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcjkula","download_url":"https://codeload.github.com/mcjkula/battlesnake-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcjkula%2Fbattlesnake-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31976806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T16:27:12.723Z","status":"ssl_error","status_checked_at":"2026-04-18T16:27:11.140Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battlesnake","bot","pathfinding","reinforcement-learning"],"created_at":"2024-11-28T03:12:37.521Z","updated_at":"2026-04-18T17:04:40.168Z","avatar_url":"https://github.com/mcjkula.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Battlesnake Bots/AI in Python\n\nThis repository contains algorithms and bots developed for [Battlesnake](https://play.battlesnake.com/).\n\n## Technologies Used\n\n- Libraries: `dataset`, `fastapi`\n\n## Features\n\n- **A* Algorithm (Pathfinding)**: Efficiently finds the shortest path to food/objectives.\n- **Collision Detection**: Ensures the snake avoids collisions with other snakes or itself.\n- **Head-to-Head Prevention**: Logic to prevent head-to-head collisions.\n- **Out-of-Bounds Detection**: Keeps the snake within the game board boundaries.\n\n## Motivation/Reason\n\nDriven by an interest in competitive programming and game strategies, Battlesnake caught my attention. This project started as a hobby, with the goal of continuously refining the algorithm and bot to climb the Battlesnake rankings.\n\n## Usage\n1. Clone this repository.\n2. Install necessary libraries.\n3. Modify the code to remove database logic:\n    - Navigate to the \"start\" and \"end\" methods in the main script.\n    - Remove the lines involving the DATABASE object.\n4. Run the main script.\n\n```bash\npython main.py\n```\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcjkula%2Fbattlesnake-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcjkula%2Fbattlesnake-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcjkula%2Fbattlesnake-python/lists"}