{"id":17999757,"url":"https://github.com/neoneye/swiftsnakeengine","last_synced_at":"2025-03-26T06:31:47.370Z","repository":{"id":38291806,"uuid":"237633117","full_name":"neoneye/SwiftSnakeEngine","owner":"neoneye","description":"YOU vs AI, in the classic snake game!","archived":false,"fork":false,"pushed_at":"2023-06-06T11:53:21.000Z","size":4481,"stargazers_count":17,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"develop","last_synced_at":"2025-03-21T09:35:19.959Z","etag":null,"topics":["ai","ios-app","macos-app","snake","snake-game","swift"],"latest_commit_sha":null,"homepage":"https://apps.apple.com/us/app/snake-puzzle-game/id1508917634","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/neoneye.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-01T15:16:03.000Z","updated_at":"2024-09-26T02:12:02.000Z","dependencies_parsed_at":"2023-01-19T14:03:04.609Z","dependency_job_id":null,"html_url":"https://github.com/neoneye/SwiftSnakeEngine","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoneye%2FSwiftSnakeEngine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoneye%2FSwiftSnakeEngine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoneye%2FSwiftSnakeEngine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neoneye%2FSwiftSnakeEngine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neoneye","download_url":"https://codeload.github.com/neoneye/SwiftSnakeEngine/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245603849,"owners_count":20642895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["ai","ios-app","macos-app","snake","snake-game","swift"],"created_at":"2024-10-29T22:14:36.699Z","updated_at":"2025-03-26T06:31:44.557Z","avatar_url":"https://github.com/neoneye.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"left\"\u003e\n\u003ca href=\"https://raw.githubusercontent.com/neoneye/SwiftSnakeEngine/develop/screenshots/SwiftSnakeEngine_iOS0.png\" rel=\"nofollow\"\u003e\u003cimg src=\"screenshots/SwiftSnakeEngine_iOS0_Thumb.png\" alt=\"Screenshot 0\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://raw.githubusercontent.com/neoneye/SwiftSnakeEngine/develop/screenshots/SwiftSnakeEngine_iOS1.png\" rel=\"nofollow\"\u003e\u003cimg src=\"screenshots/SwiftSnakeEngine_iOS1_Thumb.png\" alt=\"Screenshot 1\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://raw.githubusercontent.com/neoneye/SwiftSnakeEngine/develop/screenshots/SwiftSnakeEngine_iOS2.png\" rel=\"nofollow\"\u003e\u003cimg src=\"screenshots/SwiftSnakeEngine_iOS2_Thumb.png\" alt=\"Screenshot 2\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://raw.githubusercontent.com/neoneye/SwiftSnakeEngine/develop/screenshots/SwiftSnakeEngine_iOS3.png\" rel=\"nofollow\"\u003e\u003cimg src=\"screenshots/SwiftSnakeEngine_iOS3_Thumb.png\" alt=\"Screenshot 3\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://raw.githubusercontent.com/neoneye/SwiftSnakeEngine/develop/screenshots/SwiftSnakeEngine_macOS4.png\" rel=\"nofollow\"\u003e\u003cimg src=\"screenshots/SwiftSnakeEngine_macOS4_Thumb.png\" alt=\"Screenshot 4\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003ca href=\"https://raw.githubusercontent.com/neoneye/SwiftSnakeEngine/develop/screenshots/SwiftSnakeEngine_macOS5.png\" rel=\"nofollow\"\u003e\u003cimg src=\"screenshots/SwiftSnakeEngine_macOS5_Thumb.png\" alt=\"Screenshot 5\" style=\"max-width:100%;\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n### SwiftSnakeEngine is a snake AI, for iOS and macOS\n\nApp Store link:\n\nhttps://apps.apple.com/us/app/snake-puzzle-game/id1508917634\n\n\nHi, I'm Simon Strandgaard and this is my lab, where I experiment with coding a snake AI.\n\nMy goal is to make an AI that can play the snake video game at a superhuman level.\n\nSee my snake videos:\n\nhttps://www.youtube.com/playlist?list=PLG29Vi-HcRXGTh8z_o1CQp17j0H7FslbP\n\n\n# Single player\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"screenshots/SwiftSnakeEngine_SinglePlayer.gif\" alt=\"Animation of SwiftSnakeEngine in SinglePlayer mode\"/\u003e\n\u003c/p\u003e\n\nThe AI does a decent job at playing the classic snake video game.\n\nI have created 4 bots that are very good at what they do.\n\nThe bots are quick in single player mode, because there is no opponent to consider.\nIt typically takes less than half a second for a bot to make a move.\n\n\n# Two players\n\n\u003cp align=\"left\"\u003e\n\u003cimg src=\"screenshots/SwiftSnakeEngine_TwoPlayers.gif\" alt=\"Animation of SwiftSnakeEngine in TwoPlayer mode\"/\u003e\n\u003c/p\u003e\n\nI'm getting mixed results with 2 bots battling against each other.\n\nIt takes between 1 second and 10 seconds for the bots to make their moves.\nI want to reduce this time, so that the snake bot can play against itself, \nand it's bearable to watch and debug why the bot made a particular decision.\n\nYou can play as a human against the superior AI and feel how it behaves. It's scary!\n\n1. Menu `Player 1`, select `Human - Arrows`.\n2. Menu `Player 2`, select `Bot - Monte Carlo 2`.\n3. Level selector, select the top-left item and hit the `Enter` key.\n\n\n# Usage - Level picker\n\nArrow keys = controls the level picker.\n\nEnter = begin playing.\n\n\n# Usage - In game\n\nClick with mouse = go back to the level picker.\n\nArrow keys = controls player1.\n\nWASD keys = controls player2.\n\n\"Z\" for undo.\n\nSpacebar = pause/resume.\n\nEnter = start over.\n\nESCape = quit game, useful during development for faster feedback cycle.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoneye%2Fswiftsnakeengine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneoneye%2Fswiftsnakeengine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneoneye%2Fswiftsnakeengine/lists"}