{"id":19614664,"url":"https://github.com/activestate/neuroblast","last_synced_at":"2025-10-11T04:32:35.744Z","repository":{"id":24496938,"uuid":"89023218","full_name":"ActiveState/neuroblast","owner":"ActiveState","description":"NeuroBlast is a classic arcade space shooter with ML-powered AI.","archived":false,"fork":false,"pushed_at":"2023-02-07T08:06:26.000Z","size":26490,"stargazers_count":112,"open_issues_count":35,"forks_count":17,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-10-11T04:31:55.382Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ActiveState.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":"2017-04-21T20:59:27.000Z","updated_at":"2025-07-16T14:12:47.000Z","dependencies_parsed_at":"2023-02-19T16:00:56.985Z","dependency_job_id":null,"html_url":"https://github.com/ActiveState/neuroblast","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ActiveState/neuroblast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Fneuroblast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Fneuroblast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Fneuroblast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Fneuroblast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ActiveState","download_url":"https://codeload.github.com/ActiveState/neuroblast/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ActiveState%2Fneuroblast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006251,"owners_count":26084061,"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","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2024-11-11T10:53:16.270Z","updated_at":"2025-10-11T04:32:35.698Z","avatar_url":"https://github.com/ActiveState.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![NeuroBlast](neuroblast.jpg)\n# Overview\nNeuroBlast is a classic arcade space shooter with ML-powered AI using TensorFlow. In this short demo intended to demonstrate the accessibility of open source tools for machine learning, you can train an enemy AI using machine learning.\n\n## How it Works\n\nIf you want to learn more about how the game works under the hood, and for a tour of the insides, see these two blog posts:\n\n- [Building an ML-Powered AI Using TensorFlow in Go](http://gopherdata.io/post/build_ml_powered_game_ai_tensorflow/) on GopherData.io\n- [Building Game AI Using Machine Learning: Working With TensorFlow, Keras, and the Intel MKL in Python](https://www.activestate.com/blog/2017/05/building-game-ai-using-machine-learning-working-tensorflow-keras-and-intel-mkl-python)\n\nYou can also [watch](https://www.youtube.com/watch?v=oiorteQg9n0) my GopherCon 2017 Lightning talk about the game or [view the slides](https://github.com/gophercon/2017-talks/tree/master/lightningtalks/PeteGarcin-BuildingMLPoweredGameAIwithTensorFlow).\n\n## Installation - Requirements\n\nBefore you start, you will require the following external libraries/tools:\n\n- Python 3.5 or Go 1.8\n- MongoDB server [Download](https://www.mongodb.com/download-center?jmp=nav#community)\n- TensorFlow C libraries for Go version [Instructions](https://www.tensorflow.org/install/install_go)\n\n*Note: TensorFlow for Go is only available of macOS/Linux. Windows is NOT supported.*\n\nFor any package dependencies, you can either install them via pip/dep or you can also install [ActivePython 3.5.3](https://www.activestate.com/activepython/downloads) or [ActiveGo 1.8](https://www.activestate.com/activego/downloads) to have an environment with nearly all dependencies already pre-installed.\n\n## Windows Setup Instructions\n\nTo setup the game to run on Windows in Python 3:\n\n1. `git clone https://github.com/ActiveState/neuroblast.git`\n2. `pip3 install -r requirements.txt`\n3. Launch `rungame.cmd` (which will launch the Mongo server).\n\n## MacOS/Linux Setup Instructions\n\nTo setup the game to run on MacOS/Linux in Python 3:\n\n1. `git clone https://github.com/ActiveState/neuroblast.git`\n2. `cd neuroblast`\n3. `mkdir db`\n2. `pip3 install -r requirements.txt`\n3. Launch Mongo server: `mongod --dbpath ./db`\n4. Launch the game `python3 game.py`\n\n*Note: If you previously had Keras installed on your machine, and had run it using a different backend, make sure you configure your Keras backend to run using TensorFlow by following these [instructions](https://keras.io/backend/).*\n\nTo setup the game to run on MacOS/Linux in Go 1.8:\n\n*Reminder: You must have the TensorFlow C libraries installed as per these [instructions](https://www.tensorflow.org/install/install_go).*\n\n*Note: You must clone the repo into your GOPATH, or add the folder you clone into to your GOPATH in order for `dep ensure` to work.*\n\n1. `git clone https://github.com/ActiveState/neuroblast.git`\n2. `cd go`\n2. `dep ensure`\n3. `go build`\n4. Launch the game `./go`\n\n## Command Line Arguments\n\nThere are a number of options available when running the game from Python:\n\n- `-n` changes the Neural Network model from using TensorFlow to using the \"home grown\" network model which is useful for prototyping/debugging.\n- `-f` launches the game in full screen.\n- `-v` changes the visualization method to use raw Keras/TensorFlow values. Warning: This is much slower!\n\n*Note: These options are not available in the Go version.*\n\n## Controls\n\n### Movement\n\nControl your ship with the arrow keys or the left-analog stick with a gamepad.\n\n### Firing\n\nUse either `SPACE` or the A button on your gamepad to fire. You can hold the button down for continuous fire.\n\n### Debug Menu Commands\n\nOn the main menu of the Python version, you can use the following commands to export debug data:\n\n`x` - Exports a model using the SavedModelBuilder functionality to use in the Go version  \n`w` - Exports weights.csv which are the trained weights of the current model  \n`d` - Exports traindata.csv which is a dump of the training data points currently in memory  \n\n## Known Issues\n\n- Collision is not pixel-perfect\n- In the Python version, being hit will slow down your rate of movement\n- You can fly through the enemy ships with your ship (no collision between enemy ships/hero ship)\n- Some gamepad configurations may not work\n- Menu navigation with gamepad is inconsistent\n\n## License\n\nCopyright (C) 2017 ActiveState. Licensed under the MIT License. See LICENSE file for details.\n\n## Credits\n\nWritten by Pete Garcin [Twitter](https://twitter.com/rawktron)/[GitHub](https://github.com/rawktron) and Tom Radcliffe.\n\nGopher Artwork appears courtesy of [Ashley McNamara](https://github.com/ashleymcnamara/gophers).\n\n## Contributing\n\nIf you would like to contribute to this project, please visit the Issues tab to see what open issues are available and flagged with Help Wanted. You can also submit a Pull Request with your proposed changes. If they are in response to an issue, please reference the issue in the pull request.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivestate%2Fneuroblast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factivestate%2Fneuroblast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factivestate%2Fneuroblast/lists"}