RummikubConsole


NameRummikubConsole JSON
Version 1.2.5 PyPI version JSON
download
home_pagehttps://github.com/mjpieters/RummikubConsole
SummaryRummikub solver console with multi-game support and persistence.
upload_time2024-01-04 16:48:52
maintainer
docs_urlNone
authorMartijn Pieters
requires_python>=3.8
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Rummikub Console

A Rummikub solver console supporting multiple games and persistence, written in Python. 

![screenshot of a macOS terminal window with a Rummikub Console session in progress][screenshot]

The algorithm used builds on the approach described by D. Den Hertog, P. B. Hulshof (2006), "Solving Rummikub Problems by Integer Linear Programming", *The Computer Journal, 49(6)*, 665-669 ([DOI 10.1093/comjnl/bxl033](https://doi.org/10.1093/comjnl/bxl033)).

## Features

- Can track multiple games, letting you switch between named games
- Saves tracked games automatically
- Can work with different Rummikub rules, letting you adjust the number of colours, tiles, and other aspects
- You can freely adjust what tiles are on the rack or on the table, within the limits of what tiles are available according to the current rules

## Solver improvements

The original models described by Den Hertog and Hulshof assume that all possible sets that meet the minimum length requirements and can't be split up are desirable outcomes.

However, any group set (tiles with the same number but with different colours) containing at least one joker, but which is longer than the minimal run, in effect contains a redundant joker, something you wouldn't want to leave on the table for the next player to use. The same applies to run sets (tiles of the same colour but with consecutive numbers), that are longer than the minimal set length but start or end with a joker. In this implementation, such sets are omitted from
the possible options.

The implementation also includes a solver for the initial move, where you can only
use tiles from your own rack and must place a minimum amount of points before you
can use tiles already on the table. This solver is a variant of the original solver
that maximizes tiles placed, but is constrained by the minimal point amount and
_disregards_ jokers (which means jokers are only used for the opening meld if that is the only option available).

## Install

You can install this project the usual way:

```sh
$ pip install RummikubConsole
```

or use a tool like [pipx][] to help you manage command-line tool installations like these:

```sh
$ pipx install RummikubConsole 
```

## Usage

Run the `rsconsole` command-line tool to open the console, or run `rsconsole --help` to see how you can adjust the Rummikub rules (you can adjust tile count, colours, joker count, the minimum number of tiles to make a set and the minimum score for the initial placement).

You then enter the console command loop. Enter `?` or `h` or `help` to list the available commands, and `help <command>` to get help on what each command does.

## Development

The source code for this project can be found [on GitHub][gh].

When running locally, install [Pipenv], then run:

```bash
pipenv install
pipenv run rsconsole
```

to run the console solver.

## Credits

The initial version of the solver and console were written by [Ollie Hooper][oh].

This version is a complete rewrite by [Martijn Pieters][mp], with new console implementation, expansion of the solver to improve performance and address shortcomings in the original paper, as well as multi-game, game state tracking and persistence support. 

[screenshot]: https://raw.githubusercontent.com/mjpieters/RummikubConsole/master/screenshot.png
[pipx]: https://pipxproject.github.io/
[Pipenv]: https://pipenv.readthedocs.io/
[gh]: https://github.com/Ollie-Hooper/RummikubSolver
[oh]: https://github.com/Ollie-Hooper
[mp]: https://www.zopatista.com

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mjpieters/RummikubConsole",
    "name": "RummikubConsole",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "",
    "author": "Martijn Pieters",
    "author_email": "mj@zopatista.com",
    "download_url": "https://files.pythonhosted.org/packages/21/af/4843ed719c8bcde8d53aed5d353d723215e1b484e51e0c88657900fba7c2/RummikubConsole-1.2.5.tar.gz",
    "platform": null,
    "description": "# Rummikub Console\n\nA Rummikub solver console supporting multiple games and persistence, written in Python. \n\n![screenshot of a macOS terminal window with a Rummikub Console session in progress][screenshot]\n\nThe algorithm used builds on the approach described by D. Den Hertog, P. B. Hulshof (2006), \"Solving Rummikub Problems by Integer Linear Programming\", *The Computer Journal, 49(6)*, 665-669 ([DOI 10.1093/comjnl/bxl033](https://doi.org/10.1093/comjnl/bxl033)).\n\n## Features\n\n- Can track multiple games, letting you switch between named games\n- Saves tracked games automatically\n- Can work with different Rummikub rules, letting you adjust the number of colours, tiles, and other aspects\n- You can freely adjust what tiles are on the rack or on the table, within the limits of what tiles are available according to the current rules\n\n## Solver improvements\n\nThe original models described by Den Hertog and Hulshof assume that all possible sets that meet the minimum length requirements and can't be split up are desirable outcomes.\n\nHowever, any group set (tiles with the same number but with different colours) containing at least one joker, but which is longer than the minimal run, in effect contains a redundant joker, something you wouldn't want to leave on the table for the next player to use. The same applies to run sets (tiles of the same colour but with consecutive numbers), that are longer than the minimal set length but start or end with a joker. In this implementation, such sets are omitted from\nthe possible options.\n\nThe implementation also includes a solver for the initial move, where you can only\nuse tiles from your own rack and must place a minimum amount of points before you\ncan use tiles already on the table. This solver is a variant of the original solver\nthat maximizes tiles placed, but is constrained by the minimal point amount and\n_disregards_ jokers (which means jokers are only used for the opening meld if that is the only option available).\n\n## Install\n\nYou can install this project the usual way:\n\n```sh\n$ pip install RummikubConsole\n```\n\nor use a tool like [pipx][] to help you manage command-line tool installations like these:\n\n```sh\n$ pipx install RummikubConsole \n```\n\n## Usage\n\nRun the `rsconsole` command-line tool to open the console, or run `rsconsole --help` to see how you can adjust the Rummikub rules (you can adjust tile count, colours, joker count, the minimum number of tiles to make a set and the minimum score for the initial placement).\n\nYou then enter the console command loop. Enter `?` or `h` or `help` to list the available commands, and `help <command>` to get help on what each command does.\n\n## Development\n\nThe source code for this project can be found [on GitHub][gh].\n\nWhen running locally, install [Pipenv], then run:\n\n```bash\npipenv install\npipenv run rsconsole\n```\n\nto run the console solver.\n\n## Credits\n\nThe initial version of the solver and console were written by [Ollie Hooper][oh].\n\nThis version is a complete rewrite by [Martijn Pieters][mp], with new console implementation, expansion of the solver to improve performance and address shortcomings in the original paper, as well as multi-game, game state tracking and persistence support. \n\n[screenshot]: https://raw.githubusercontent.com/mjpieters/RummikubConsole/master/screenshot.png\n[pipx]: https://pipxproject.github.io/\n[Pipenv]: https://pipenv.readthedocs.io/\n[gh]: https://github.com/Ollie-Hooper/RummikubSolver\n[oh]: https://github.com/Ollie-Hooper\n[mp]: https://www.zopatista.com\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Rummikub solver console with multi-game support and persistence.",
    "version": "1.2.5",
    "project_urls": {
        "Github: issues": "https://github.com/mjpieters/RummikubConsole/issues",
        "Github: repo": "https://github.com/mjpieters/RummikubConsole",
        "Homepage": "https://github.com/mjpieters/RummikubConsole"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ebff73b1e768b164f8964ea5fb08c24c799edc8b0d4a5149a9207df50b0f71a6",
                "md5": "f4c4aa30bfffbff851d56415c796fefd",
                "sha256": "6b75adeca93e98ebc63c7b2c0c4d677b53ebdc40e0c8ed3aecfcea607cfa8e1f"
            },
            "downloads": -1,
            "filename": "RummikubConsole-1.2.5-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f4c4aa30bfffbff851d56415c796fefd",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 21340,
            "upload_time": "2024-01-04T16:48:46",
            "upload_time_iso_8601": "2024-01-04T16:48:46.241259Z",
            "url": "https://files.pythonhosted.org/packages/eb/ff/73b1e768b164f8964ea5fb08c24c799edc8b0d4a5149a9207df50b0f71a6/RummikubConsole-1.2.5-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "21af4843ed719c8bcde8d53aed5d353d723215e1b484e51e0c88657900fba7c2",
                "md5": "ae60bcbc9b664ee10f5d10a48edf8675",
                "sha256": "387af4245f8f886f330fe835d0796236a3f2d2f70bda9121f45c12c666f2a511"
            },
            "downloads": -1,
            "filename": "RummikubConsole-1.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ae60bcbc9b664ee10f5d10a48edf8675",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 242347,
            "upload_time": "2024-01-04T16:48:52",
            "upload_time_iso_8601": "2024-01-04T16:48:52.606501Z",
            "url": "https://files.pythonhosted.org/packages/21/af/4843ed719c8bcde8d53aed5d353d723215e1b484e51e0c88657900fba7c2/RummikubConsole-1.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-04 16:48:52",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mjpieters",
    "github_project": "RummikubConsole",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "rummikubconsole"
}
        
Elapsed time: 1.35424s