{"id":13692722,"url":"https://github.com/miroesli/psscscs","last_synced_at":"2025-05-02T19:32:43.826Z","repository":{"id":38432393,"uuid":"240773508","full_name":"miroesli/psscscs","owner":"miroesli","description":"Reinforcement Learning Battlesnake","archived":false,"fork":false,"pushed_at":"2022-06-03T22:46:59.000Z","size":21964,"stargazers_count":2,"open_issues_count":18,"forks_count":1,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2024-11-12T18:42:07.362Z","etag":null,"topics":["ai","battlesnake","game","machine-learning","reinforcement-learning"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/miroesli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-15T19:13:14.000Z","updated_at":"2021-11-15T08:35:50.000Z","dependencies_parsed_at":"2022-07-29T22:39:58.516Z","dependency_job_id":null,"html_url":"https://github.com/miroesli/psscscs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miroesli%2Fpsscscs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miroesli%2Fpsscscs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miroesli%2Fpsscscs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miroesli%2Fpsscscs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miroesli","download_url":"https://codeload.github.com/miroesli/psscscs/tar.gz/refs/heads/dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252095454,"owners_count":21693920,"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","battlesnake","game","machine-learning","reinforcement-learning"],"created_at":"2024-08-02T17:01:01.358Z","updated_at":"2025-05-02T19:32:38.805Z","avatar_url":"https://github.com/miroesli.png","language":"Python","funding_links":[],"categories":["Battlesnakes"],"sub_categories":[],"readme":"*This no longer under development because of outdated/stale code which uses an older version of the battlesnake API. Another version can be viewed [here](https://github.com/Fool-Yang/AlphaSnake-Zero). For other projects like this one see the [awesome-battlesnakes](https://github.com/xtagon/awesome-battlesnake) repository or check out [my profile](https://github.com/miroesli).*\n\n# PSSCSCS\n\nA reinforcement learning [Battlesnake AI](http://battlesnake.com) written in\nPython by a **P**hysics, 2 **S**oftware Engineering, and 2 **C**omputer\n**S**cience undergrads.\n\n## Presentation\n\n- Google Drive presentation [link](https://drive.google.com/drive/folders/1Knb5xECKhTKK9vVSAutyHNOFClFaFf8o)\n- Report [link](https://github.com/Fool-Yang/AlphaSnake-Zero/blob/master/report.pdf)\n\n## Demo\n\n![7000 Iterations DQN Training](./app/gifs/gif-run-7000.gif)\n  \n## Project specific info  \nCurrently a 3 layer nn is used for prediction. While 8 layers are derived from the input, AlphaGo is not being utilized, need to do this.  \n\nVisit [https://github.com/BattlesnakeOfficial/community/blob/master/starter-snakes.md](https://github.com/BattlesnakeOfficial/community/blob/master/starter-snakes.md) for API documentation and instructions for running your AI.\n\nThis AI client uses the [bottle web framework](http://bottlepy.org/docs/dev/index.html) to serve requests and the [gunicorn web server](http://gunicorn.org/) for running bottle on Heroku. Dependencies are listed in [requirements.txt](requirements.txt).\n\n\u003c!-- [![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy) --\u003e\n\n## Requirements\n\n- a working Python 2.7/3.7 development environment ([getting started guide](http://hackercodex.com/guide/python-development-environment-on-mac-osx/))\n- [pip](https://pip.pypa.io/en/latest/installing.html) to install Python dependencies\n\n## Running the Snake Locally\n\n1. [Fork](https://github.com/miroesli/pssscs/fork) (optional) and clone the repo.\n\nUsing SSH\n\n```bash\ngit clone git@github.com:miroesli/pssscs.git\n```\n\nUsing HTTPS\n\n```bash\ngit clone https://github.com/miroesli/pssscs.git\n```\n\n2. create the virtualenv  \n\n```bash\npython -m venv env\nsource env/bin/activate\n```\n \n3. Install dependencies using [pip](https://pip.pypa.io/en/latest/installing.html):\n\n```bash\npip install -r requirements.txt\n```\n\n4. Run local server:\n\n```bash\ncd app\npython main.py\n```\n\n5. Test your snake by sending a curl to the running snake\n\n```bash\ncurl -XPOST -H 'Content-Type: application/json' -d '{ \"hello\": \"world\"}' http://localhost:8080/start\n```\n\n## Running the Engine\n\nVisit\n[https://github.com/BattlesnakeOfficial/engine](https://github.com/BattlesnakeOfficial/engine)\nfor installing the engine to run the AI.\n\nIf you have problems running the engine, make sure you have run make install\n\n```bash\nmake install\n```\n\nand built the board\n\n```bash\n./build_board.sh\n```\n\nIf both `./engine dev` and `engine dev` still do not work, build the engine executable locally\n\n```\ngo build -o engine cmd/engine/main.go\n```\n\nThen try running `./engine dev`\n\n## Deploying to Heroku\n\n1. Create a new Heroku app:\n\n```bash\nheroku create [APP_NAME]\n```\n\n2. Deploy code to Heroku servers:\n\n```bash\ngit push heroku master\n```\n\n3. Open Heroku app in browser:\n\n```bash\nheroku open\n```\n\nor visit [http://APP_NAME.herokuapp.com](http://APP_NAME.herokuapp.com).\n\n4. View server logs with the `heroku logs` command:\n\n```bash\nheroku logs --tail\n```\n\n\u003c!-- ## Questions?\n\nEmail [hello@battlesnake.com](mailto:hello@battlesnake.com), or tweet [@battlesnakeio](http://twitter.com/battlesnakeio). --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiroesli%2Fpsscscs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiroesli%2Fpsscscs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiroesli%2Fpsscscs/lists"}