# Kessler
## Getting started
Kessler is a simulation environment loosely modeled after our internal project PsiBee and the external project [Fuzzy Asteroids](https://github.com/xfuzzycomp/FuzzyAsteroids).
The game features ships that can shoot bullets, or drop mines to destroy asteroids and gain score.
Ships can also be destroyed by colliding with asteroids or getting caught in mine explosions, causing them to lose lives. When a ship runs out of lives, the game ends.
In multi-ship scenarios, they can't shoot one another, but they can drop mines or crash into the other ship to take each other's lives.
This game is used for the [Explainable Fuzzy Competition](https://xfuzzycomp.github.io/XFC/)
Kessler can be used as a local Python package by copying the `src/kessler_game` directory into your project, or installed as a Python extension via `pip`.
It is available on PyPI and can be installed with:
```
pip install KesslerGame
```
Both **pure Python** wheels (e.g. KesslerGame-1.2.3-py3-none-any.whl) and **compiled** wheels built with [mypyc](https://mypyc.readthedocs.io/en/latest/) (e.g. KesslerGame-1.2.3-cp310-cp310-win_amd64.whl) are provided on [PyPI](https://pypi.org/project/KesslerGame/#files) and on the [GitHub releases page](https://github.com/ThalesGroup/kessler-game/releases).
`pip install` will automatically select the compiled version if it is compatible with your system. You can also install a wheel manually by downloading the wheel file and running:
```
pip install <path to wheel file>
```
The compiled version can be 4X+ faster than the pure Python version and can simulate the game at 1000X+ real-time speed. It is especially recommended for performance-sensitive use cases, such as reinforcement learning. All releases (on PyPI and GitHub) now include:
* Pure Python wheels
* Compiled wheels (for supported platforms)
* Source distributions
If you prefer, you can compile your own `.whl` file using:
```
python setup_mypyc.py bdist_wheel
```
This requires a compatible Python version, `mypyc`, and a compatible C compiler (e.g., MSVC on Windows). If successful, the generated wheel will be located in the `dist/` directory.
Kessler has two primary graphics modules. The first uses Python's Tkinter UI library to display the game. The second
utilizes a separate executable process called kessler_graphics made in Unreal Engine 5. Data is sent to the
kessler_graphics instance using UDP protocol on a local machine.
## Using the UE5 graphics engine
Under kessler_graphics is an Unreal Engine 5 project for receiving simulation data from the Kessler Python process and
displaying it in a 3d environment. To contribute to the UE5 project, you will need to do the following.
- Install Visual Studio 2019 v16.11.5 or later with "Game Development with C++" selected on install
- Install the .NET Core 3.1 Runtime from [here](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-3.1.30-windows-x64-installer?cid=getdotnetcore)
- Install Unreal Engine 5.0.x from the [Epic Games Launcher](https://store.epicgames.com/en-US/download)
- Grab the latest release of the UDP-Unreal plugin from [here](https://github.com/getnamo/UDP-Unreal/releases)
- Follow installation instructions for UDP-Unreal from its included README
- Right click `kessler_graphics.uproject` under the `kessler_graphics` directory and select "Generate Visual Studio Project Files" from the context menu
- Launch the project by double-clicking on `kessler_graphics.uproject`, and select "Yes" if prompted to rebuild engine modules
NOTE: UE5 graphics currently do not support the display of mines, and it also has other bugs. It is not currently recommended to be used.
## Documentation
See docs/ for a guide to the game's API, and how to instantiate, configure, and run Kessler!
## Contributing
If you are interested in contributing to the Kessler project, start by reading the [Contributing guide](/CONTRIBUTING.md).
## License
Kessler is licensed under the Apache 2.0 license. Please read [LICENSE](LICENSE) for more information.
Raw data
{
"_id": null,
"home_page": "https://github.com/ThalesGroup/kessler-game",
"name": "KesslerGame",
"maintainer": "Timothy Arnett",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "tim.arnett@defense.us.thalesgroup.com",
"keywords": "artificial intelligence, asteroids, machine learning",
"author": "Zachariah Phillips",
"author_email": "zach.phillips@defense.us.thalesgroup.com",
"download_url": "https://files.pythonhosted.org/packages/7d/6b/1e32c3a78669220f4402f6ea2c74eb0ac512ce2c13a80a200cad735c795e/kesslergame-2.4.0.tar.gz",
"platform": null,
"description": "# Kessler\r\n\r\n## Getting started\r\n\r\nKessler is a simulation environment loosely modeled after our internal project PsiBee and the external project [Fuzzy Asteroids](https://github.com/xfuzzycomp/FuzzyAsteroids).\r\nThe game features ships that can shoot bullets, or drop mines to destroy asteroids and gain score.\r\nShips can also be destroyed by colliding with asteroids or getting caught in mine explosions, causing them to lose lives. When a ship runs out of lives, the game ends.\r\nIn multi-ship scenarios, they can't shoot one another, but they can drop mines or crash into the other ship to take each other's lives.\r\n\r\nThis game is used for the [Explainable Fuzzy Competition](https://xfuzzycomp.github.io/XFC/)\r\n\r\nKessler can be used as a local Python package by copying the `src/kessler_game` directory into your project, or installed as a Python extension via `pip`.\r\nIt is available on PyPI and can be installed with:\r\n```\r\npip install KesslerGame\r\n```\r\n\r\nBoth **pure Python** wheels (e.g. KesslerGame-1.2.3-py3-none-any.whl) and **compiled** wheels built with [mypyc](https://mypyc.readthedocs.io/en/latest/) (e.g. KesslerGame-1.2.3-cp310-cp310-win_amd64.whl) are provided on [PyPI](https://pypi.org/project/KesslerGame/#files) and on the [GitHub releases page](https://github.com/ThalesGroup/kessler-game/releases).\r\n\r\n`pip install` will automatically select the compiled version if it is compatible with your system. You can also install a wheel manually by downloading the wheel file and running:\r\n``` \r\npip install <path to wheel file>\r\n```\r\n\r\nThe compiled version can be 4X+ faster than the pure Python version and can simulate the game at 1000X+ real-time speed. It is especially recommended for performance-sensitive use cases, such as reinforcement learning. All releases (on PyPI and GitHub) now include:\r\n\r\n* Pure Python wheels\r\n* Compiled wheels (for supported platforms)\r\n* Source distributions\r\n\r\nIf you prefer, you can compile your own `.whl` file using:\r\n\r\n``` \r\npython setup_mypyc.py bdist_wheel\r\n```\r\n\r\nThis requires a compatible Python version, `mypyc`, and a compatible C compiler (e.g., MSVC on Windows). If successful, the generated wheel will be located in the `dist/` directory.\r\n\r\nKessler has two primary graphics modules. The first uses Python's Tkinter UI library to display the game. The second\r\nutilizes a separate executable process called kessler_graphics made in Unreal Engine 5. Data is sent to the\r\nkessler_graphics instance using UDP protocol on a local machine.\r\n\r\n## Using the UE5 graphics engine\r\nUnder kessler_graphics is an Unreal Engine 5 project for receiving simulation data from the Kessler Python process and\r\ndisplaying it in a 3d environment. To contribute to the UE5 project, you will need to do the following.\r\n- Install Visual Studio 2019 v16.11.5 or later with \"Game Development with C++\" selected on install\r\n- Install the .NET Core 3.1 Runtime from [here](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-3.1.30-windows-x64-installer?cid=getdotnetcore)\r\n- Install Unreal Engine 5.0.x from the [Epic Games Launcher](https://store.epicgames.com/en-US/download)\r\n- Grab the latest release of the UDP-Unreal plugin from [here](https://github.com/getnamo/UDP-Unreal/releases)\r\n- Follow installation instructions for UDP-Unreal from its included README\r\n- Right click `kessler_graphics.uproject` under the `kessler_graphics` directory and select \"Generate Visual Studio Project Files\" from the context menu\r\n- Launch the project by double-clicking on `kessler_graphics.uproject`, and select \"Yes\" if prompted to rebuild engine modules\r\nNOTE: UE5 graphics currently do not support the display of mines, and it also has other bugs. It is not currently recommended to be used.\r\n\r\n## Documentation\r\n\r\nSee docs/ for a guide to the game's API, and how to instantiate, configure, and run Kessler!\r\n\r\n## Contributing\r\n\r\nIf you are interested in contributing to the Kessler project, start by reading the [Contributing guide](/CONTRIBUTING.md).\r\n\r\n## License\r\n\r\nKessler is licensed under the Apache 2.0 license. Please read [LICENSE](LICENSE) for more information.\r\n",
"bugtrack_url": null,
"license": "Apache 2.0 License",
"summary": "Asteroids game simulation environment for ML and AI applications",
"version": "2.4.0",
"project_urls": {
"Homepage": "https://github.com/ThalesGroup/kessler-game"
},
"split_keywords": [
"artificial intelligence",
" asteroids",
" machine learning"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5dde0dd1ecc69a5269cd653853063cedb110fa50672f5158f790e0df2483bc9a",
"md5": "0fabd8c7d96269cefdc234bf121bcf92",
"sha256": "35e7a56a1981e46f0bf636ec07ae91e7b0d1d12228372276a72e93591a5f2ec6"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp310-cp310-win32.whl",
"has_sig": false,
"md5_digest": "0fabd8c7d96269cefdc234bf121bcf92",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.10",
"size": 396048,
"upload_time": "2025-07-28T14:49:44",
"upload_time_iso_8601": "2025-07-28T14:49:44.431579Z",
"url": "https://files.pythonhosted.org/packages/5d/de/0dd1ecc69a5269cd653853063cedb110fa50672f5158f790e0df2483bc9a/kesslergame-2.4.0-cp310-cp310-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9a292f0e0113dff391c0da1a3f55fc4d83cd25c04facac535a3e2410eb9522fc",
"md5": "7e19e2ff4a9c88d20af38b45fe24a1c4",
"sha256": "192ba25f853954228138475f564ad31b9e756cfe6016eb80cb790e59e51b3805"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "7e19e2ff4a9c88d20af38b45fe24a1c4",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.10",
"size": 445084,
"upload_time": "2025-07-28T14:49:45",
"upload_time_iso_8601": "2025-07-28T14:49:45.551105Z",
"url": "https://files.pythonhosted.org/packages/9a/29/2f0e0113dff391c0da1a3f55fc4d83cd25c04facac535a3e2410eb9522fc/kesslergame-2.4.0-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "348a3d7f73b4d24bfcd33d36bf68ba6672e1b48a93afe330b4320fce84a99f37",
"md5": "51ca77343e9023b822efe9e2806935b0",
"sha256": "ce936dfccd48c1e03c2ac493bf22a374c0ac66f338e833a3674fbc0a6f81c4ad"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp311-cp311-win32.whl",
"has_sig": false,
"md5_digest": "51ca77343e9023b822efe9e2806935b0",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.10",
"size": 395494,
"upload_time": "2025-07-28T14:49:46",
"upload_time_iso_8601": "2025-07-28T14:49:46.526608Z",
"url": "https://files.pythonhosted.org/packages/34/8a/3d7f73b4d24bfcd33d36bf68ba6672e1b48a93afe330b4320fce84a99f37/kesslergame-2.4.0-cp311-cp311-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "955e72133d4622951ff0de427b886ebde07fcc868b9e62b63e92bdd141b78877",
"md5": "258f9531f81cdb7bee37a0f3318149b9",
"sha256": "845f7009c1c098a349504e37dde45ba184eadef9fa2233292022688c6705cf40"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "258f9531f81cdb7bee37a0f3318149b9",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.10",
"size": 444667,
"upload_time": "2025-07-28T14:49:47",
"upload_time_iso_8601": "2025-07-28T14:49:47.409996Z",
"url": "https://files.pythonhosted.org/packages/95/5e/72133d4622951ff0de427b886ebde07fcc868b9e62b63e92bdd141b78877/kesslergame-2.4.0-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bcd6efab783ed2474f7edba8c65d79479eb801785f7ff82b4d65f0b94b3597ba",
"md5": "a21a67c425c0fb7334925a846b2ff315",
"sha256": "159c003195cced92b6565705fc4aa116bc03c697f6556a3087a694e309c2b368"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp312-cp312-win32.whl",
"has_sig": false,
"md5_digest": "a21a67c425c0fb7334925a846b2ff315",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.10",
"size": 399620,
"upload_time": "2025-07-28T14:49:48",
"upload_time_iso_8601": "2025-07-28T14:49:48.395840Z",
"url": "https://files.pythonhosted.org/packages/bc/d6/efab783ed2474f7edba8c65d79479eb801785f7ff82b4d65f0b94b3597ba/kesslergame-2.4.0-cp312-cp312-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c544c7c3b42f8ada9a028087519fa8142e589db1eab69fdfc7fb38cf96864210",
"md5": "0d24296444c62ff8e3dede7987d1d50e",
"sha256": "088be144cb159c1afcb04be93aeb87105e8d9beea6c3810ff381513b20940d21"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "0d24296444c62ff8e3dede7987d1d50e",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.10",
"size": 448351,
"upload_time": "2025-07-28T14:49:49",
"upload_time_iso_8601": "2025-07-28T14:49:49.342203Z",
"url": "https://files.pythonhosted.org/packages/c5/44/c7c3b42f8ada9a028087519fa8142e589db1eab69fdfc7fb38cf96864210/kesslergame-2.4.0-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6caf46e0b07c69967227dba52df3c96a284b4386d8e7a51208059eea5439dd2b",
"md5": "b0b78744849c5b825d93161f348fe88f",
"sha256": "b75358a87c7d1e442d0a1396003a26d268d1708c0c2a86f02cb6f2987aedb9ae"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp313-cp313-win32.whl",
"has_sig": false,
"md5_digest": "b0b78744849c5b825d93161f348fe88f",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.10",
"size": 399313,
"upload_time": "2025-07-28T14:49:50",
"upload_time_iso_8601": "2025-07-28T14:49:50.573768Z",
"url": "https://files.pythonhosted.org/packages/6c/af/46e0b07c69967227dba52df3c96a284b4386d8e7a51208059eea5439dd2b/kesslergame-2.4.0-cp313-cp313-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "18f472d4bc101915f696c0b3f144f626e27ac45ac7b1237d056845272e3f95dc",
"md5": "e09d3ccb512f09a06517161993f457a3",
"sha256": "590bdb82cac54015c66e1807a8019b9792e479c8e6f89afd05a5a9317021ab4c"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp313-cp313-win_amd64.whl",
"has_sig": false,
"md5_digest": "e09d3ccb512f09a06517161993f457a3",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.10",
"size": 448732,
"upload_time": "2025-07-28T14:49:51",
"upload_time_iso_8601": "2025-07-28T14:49:51.712137Z",
"url": "https://files.pythonhosted.org/packages/18/f4/72d4bc101915f696c0b3f144f626e27ac45ac7b1237d056845272e3f95dc/kesslergame-2.4.0-cp313-cp313-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8d39a934e9e0769e8eebf784bef4a65b159934bb08f05b79cb6924b18011b279",
"md5": "acf0041f8a42e8d3c2c1fce3a5e2b78a",
"sha256": "9f7218f4d91ff45b0a977ee2e5dbf549c6c888f682b44670e5bdc4dbed3eb2b3"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp314-cp314t-win32.whl",
"has_sig": false,
"md5_digest": "acf0041f8a42e8d3c2c1fce3a5e2b78a",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.10",
"size": 432298,
"upload_time": "2025-07-28T14:49:54",
"upload_time_iso_8601": "2025-07-28T14:49:54.495960Z",
"url": "https://files.pythonhosted.org/packages/8d/39/a934e9e0769e8eebf784bef4a65b159934bb08f05b79cb6924b18011b279/kesslergame-2.4.0-cp314-cp314t-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a0cc5372fb8753a7c480e2b4fcb25a23148aa2dae0281e55700f287fcbb20336",
"md5": "ac86270b6a7388fde76976f659e87269",
"sha256": "5fa4b818d786a14b4fffeb12a4d44dd8abfb32f6d0f883ab4197eef974f9d46c"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp314-cp314t-win_amd64.whl",
"has_sig": false,
"md5_digest": "ac86270b6a7388fde76976f659e87269",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.10",
"size": 491602,
"upload_time": "2025-07-28T14:49:55",
"upload_time_iso_8601": "2025-07-28T14:49:55.388488Z",
"url": "https://files.pythonhosted.org/packages/a0/cc/5372fb8753a7c480e2b4fcb25a23148aa2dae0281e55700f287fcbb20336/kesslergame-2.4.0-cp314-cp314t-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e0fd93fd32c7e4feab0cec889ebd2f02752aada37df647ab4c7647c3430cf2b9",
"md5": "4641ccba53cddc430410b2480332d63e",
"sha256": "d1e38475cd46feb0c2622845e502d2e309a38c9217456ba0ae32f6f9894a5b44"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp314-cp314-win32.whl",
"has_sig": false,
"md5_digest": "4641ccba53cddc430410b2480332d63e",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.10",
"size": 404472,
"upload_time": "2025-07-28T14:49:52",
"upload_time_iso_8601": "2025-07-28T14:49:52.724434Z",
"url": "https://files.pythonhosted.org/packages/e0/fd/93fd32c7e4feab0cec889ebd2f02752aada37df647ab4c7647c3430cf2b9/kesslergame-2.4.0-cp314-cp314-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "55679253caa0f8470690b94a71a4c748d8876623f0ead0aae827e0a7a09fb9e2",
"md5": "a3c61db140764a74ec40f83aae373eb3",
"sha256": "639344276f4cfc5fe15cf2e98a3910720e718b82ec14bb5ff298d645817a810c"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-cp314-cp314-win_amd64.whl",
"has_sig": false,
"md5_digest": "a3c61db140764a74ec40f83aae373eb3",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.10",
"size": 456613,
"upload_time": "2025-07-28T14:49:53",
"upload_time_iso_8601": "2025-07-28T14:49:53.555261Z",
"url": "https://files.pythonhosted.org/packages/55/67/9253caa0f8470690b94a71a4c748d8876623f0ead0aae827e0a7a09fb9e2/kesslergame-2.4.0-cp314-cp314-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "58403b7c3ffe1f8f16e9b323b8c6420facd54d4c80b0bceafdf9464fd6496dfd",
"md5": "21d37e88a9d4c68ebfd572cb5480b8fb",
"sha256": "62730c9c671fa47d05fe5636cb23fd90249931f2cd2483f565977516d92e37fb"
},
"downloads": -1,
"filename": "kesslergame-2.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "21d37e88a9d4c68ebfd572cb5480b8fb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 73425,
"upload_time": "2025-07-28T14:49:56",
"upload_time_iso_8601": "2025-07-28T14:49:56.326640Z",
"url": "https://files.pythonhosted.org/packages/58/40/3b7c3ffe1f8f16e9b323b8c6420facd54d4c80b0bceafdf9464fd6496dfd/kesslergame-2.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7d6b1e32c3a78669220f4402f6ea2c74eb0ac512ce2c13a80a200cad735c795e",
"md5": "4440814e9d9d6e662ef17661ed10fd71",
"sha256": "f0cbca6e00bbe82b3cc5998bee106cb9175df567fa38063cb6c21bf98d337b1c"
},
"downloads": -1,
"filename": "kesslergame-2.4.0.tar.gz",
"has_sig": false,
"md5_digest": "4440814e9d9d6e662ef17661ed10fd71",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 64770,
"upload_time": "2025-07-28T14:49:57",
"upload_time_iso_8601": "2025-07-28T14:49:57.079478Z",
"url": "https://files.pythonhosted.org/packages/7d/6b/1e32c3a78669220f4402f6ea2c74eb0ac512ce2c13a80a200cad735c795e/kesslergame-2.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-28 14:49:57",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ThalesGroup",
"github_project": "kessler-game",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": []
},
{
"name": "pillow",
"specs": []
},
{
"name": "inputs",
"specs": []
},
{
"name": "mypy",
"specs": []
}
],
"lcname": "kesslergame"
}