dodgem-game


Namedodgem-game JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummaryPlay and analyze the Dodgem game with CLI/GUI using an evaluation database
upload_time2025-08-22 04:52:39
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT License Copyright (c) 2025 Katsutoshi Seki (関 勝寿) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords game ai search mongodb board-game dodgem
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Dodgem

Dodgem is a Python package for playing and analyzing the board game **Dodgem**. It provides:

* A command-line interface to play games, build an offline MongoDB evaluation database by perfect analysis, and traverse the game tree
* Perfect-opponent play on 3×3, 4×4, and 5×5 boards using the MongoDB database with a simple Tkinter GUI
* A compact gzipped JSON file (a curated subset of the MongoDB database) that can be fully loaded into memory, eliminating the need for a large on-disk MongoDB instance
* A Python API for programmatic use
* An [online Dodgem page](https://sekika.github.io/dodgem/) that uses the JSON file

![Dodgem GUI](https://sekika.github.io/dodgem-py/dodgem.png "Dodgem GUI")

## Features
- [CPU levels](https://sekika.github.io/dodgem-py/level/): 1–3 (search + evalmap), 4 (MongoDB-backed, perfect play)
- Evalmap JSON.GZ bundled and refreshable from your MongoDB
- MongoDB-based computation and status reporting

## Requirements
- Python 3.10+
- pip
- MongoDB server (only required for database features and CPU level 4; not needed for levels 1–3)
- Tkinter for the GUI

## Installation
```bash
pip install dodgem-game
```

## Quickstart
- Help
```bash
dodgem -h
```

- Play 10 games on 4x4 at level 4 vs. 4 (requires MongoDB)
```bash
dodgem -n 4 -p -r 10 -l 4
```

- Play a game without MongoDB (levels 1–3) at lavel 2 vs. 3 by showing the process
```bash
dodgem -n 4 -p -l 2 -g 3 -r 1 -v 3
```

- GUI
```bash
dodgem --gui
```

## About the data
- The MongoDB evaluation database is computed offline by a nearly perfect analysis.
- The evalmap (JSON.GZ) is a curated subset of that MongoDB database, packaged for fast lookup without MongoDB.

The evalmap produced by this package is used by the online Dodgem page. The online version uses only the evalmap subset (no MongoDB), so it supports CPU levels 1–3. Level 4 (MongoDB-backed) is available in the local CLI/GUI.

## Database and Evalmap
- Create MongoDB evaluation DB (per board size):
```bash
dodgem -n 4 -c
```

- Export evalmap JSON.GZ from MongoDB (for all board sizes):
```bash
dodgem -e
```

- Show DB status:
```bash
dodgem -n 4 -s
```

## Minimal Python API example
```python
from dodgem import Dodgem

d = Dodgem(n=4)             # loads bundled evalmap by default
d.level = [3, 3]            # both sides level 3 (no MongoDB required)
d.play_games(repetition=5)  # play 5 games and print a summary
```

## Documentation
See https://sekika.github.io/dodgem-py/
- Installation, Quickstart, CLI, GUI
- Game rules, API reference, configuration
- Evalmap format, MongoDB database details
- CPU levels, FAQ

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "dodgem-game",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "game, ai, search, mongodb, board-game, dodgem",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/af/7f/77458427ad66c5979f31ef40db162b5e71de06723969c15de933bbd1bea5/dodgem_game-1.0.0.tar.gz",
    "platform": null,
    "description": "# Dodgem\n\nDodgem is a Python package for playing and analyzing the board game **Dodgem**. It provides:\n\n* A command-line interface to play games, build an offline MongoDB evaluation database by perfect analysis, and traverse the game tree\n* Perfect-opponent play on 3\u00d73, 4\u00d74, and 5\u00d75 boards using the MongoDB database with a simple Tkinter GUI\n* A compact gzipped JSON file (a curated subset of the MongoDB database) that can be fully loaded into memory, eliminating the need for a large on-disk MongoDB instance\n* A Python API for programmatic use\n* An [online Dodgem page](https://sekika.github.io/dodgem/) that uses the JSON file\n\n![Dodgem GUI](https://sekika.github.io/dodgem-py/dodgem.png \"Dodgem GUI\")\n\n## Features\n- [CPU levels](https://sekika.github.io/dodgem-py/level/): 1\u20133 (search + evalmap), 4 (MongoDB-backed, perfect play)\n- Evalmap JSON.GZ bundled and refreshable from your MongoDB\n- MongoDB-based computation and status reporting\n\n## Requirements\n- Python 3.10+\n- pip\n- MongoDB server (only required for database features and CPU level 4; not needed for levels 1\u20133)\n- Tkinter for the GUI\n\n## Installation\n```bash\npip install dodgem-game\n```\n\n## Quickstart\n- Help\n```bash\ndodgem -h\n```\n\n- Play 10 games on 4x4 at level 4 vs. 4 (requires MongoDB)\n```bash\ndodgem -n 4 -p -r 10 -l 4\n```\n\n- Play a game without MongoDB (levels 1\u20133) at lavel 2 vs. 3 by showing the process\n```bash\ndodgem -n 4 -p -l 2 -g 3 -r 1 -v 3\n```\n\n- GUI\n```bash\ndodgem --gui\n```\n\n## About the data\n- The MongoDB evaluation database is computed offline by a nearly perfect analysis.\n- The evalmap (JSON.GZ) is a curated subset of that MongoDB database, packaged for fast lookup without MongoDB.\n\nThe evalmap produced by this package is used by the online Dodgem page. The online version uses only the evalmap subset (no MongoDB), so it supports CPU levels 1\u20133. Level 4 (MongoDB-backed) is available in the local CLI/GUI.\n\n## Database and Evalmap\n- Create MongoDB evaluation DB (per board size):\n```bash\ndodgem -n 4 -c\n```\n\n- Export evalmap JSON.GZ from MongoDB (for all board sizes):\n```bash\ndodgem -e\n```\n\n- Show DB status:\n```bash\ndodgem -n 4 -s\n```\n\n## Minimal Python API example\n```python\nfrom dodgem import Dodgem\n\nd = Dodgem(n=4)             # loads bundled evalmap by default\nd.level = [3, 3]            # both sides level 3 (no MongoDB required)\nd.play_games(repetition=5)  # play 5 games and print a summary\n```\n\n## Documentation\nSee https://sekika.github.io/dodgem-py/\n- Installation, Quickstart, CLI, GUI\n- Game rules, API reference, configuration\n- Evalmap format, MongoDB database details\n- CPU levels, FAQ\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2025 Katsutoshi Seki (\u95a2 \u52dd\u5bff)\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.\n        ",
    "summary": "Play and analyze the Dodgem game with CLI/GUI using an evaluation database",
    "version": "1.0.0",
    "project_urls": {
        "Documentation": "https://sekika.github.io/dodgem-py/",
        "Homepage": "https://sekika.github.io/dodgem/",
        "Source": "https://github.com/sekika/dodgem-py"
    },
    "split_keywords": [
        "game",
        " ai",
        " search",
        " mongodb",
        " board-game",
        " dodgem"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8e5fdf92dc728d11a50df922a9b72a0d0b472949850d79b0c38d7d933b3debcb",
                "md5": "9b3c5b02f240a438bc924915b1740548",
                "sha256": "505f66de09056ea03635bf8db3376aa18e960cb8d1db0d624ff2978f138b5689"
            },
            "downloads": -1,
            "filename": "dodgem_game-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9b3c5b02f240a438bc924915b1740548",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5153048,
            "upload_time": "2025-08-22T04:52:36",
            "upload_time_iso_8601": "2025-08-22T04:52:36.122940Z",
            "url": "https://files.pythonhosted.org/packages/8e/5f/df92dc728d11a50df922a9b72a0d0b472949850d79b0c38d7d933b3debcb/dodgem_game-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "af7f77458427ad66c5979f31ef40db162b5e71de06723969c15de933bbd1bea5",
                "md5": "a5f104a63141cb4c9760cec60f8d614f",
                "sha256": "c6301323d9a613c18e89f0a1f5d38822abf869ab1af12e1efff9abb1c06f876b"
            },
            "downloads": -1,
            "filename": "dodgem_game-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a5f104a63141cb4c9760cec60f8d614f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 5155712,
            "upload_time": "2025-08-22T04:52:39",
            "upload_time_iso_8601": "2025-08-22T04:52:39.357847Z",
            "url": "https://files.pythonhosted.org/packages/af/7f/77458427ad66c5979f31ef40db162b5e71de06723969c15de933bbd1bea5/dodgem_game-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-22 04:52:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sekika",
    "github_project": "dodgem-py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "dodgem-game"
}
        
Elapsed time: 0.91558s