Skip to content

Configuration enums

Solver operation modes

SolverMode is used to pick a specific solving approach when calling RuleSet.solve().

rummikub_solver.SolverMode

Bases: Enum

Attributes:

Name Type Description
INITIAL

Initial placement mode, player can only use tiles from their own rack

TILE_COUNT

Maximize the number of tiles placed

TOTAL_VALUE

Maximize the total value of the tiles placed

INITIAL = 'initial' class-attribute instance-attribute

Initial placement mode, player can only use tiles from their own rack

TILE_COUNT = 'tiles' class-attribute instance-attribute

Maximize the number of tiles placed

TOTAL_VALUE = 'value' class-attribute instance-attribute

Maximize the total value of the tiles placed

Supported MILP solver backends

Each backend, with the exception of [MILPSolver.SCIPY] requires additional packages to be installed. See Picking an alternative solver backend.

rummikub_solver.MILPSolver

Bases: StrEnum

Mixed-integer Linear Programming solver to use.

Methods:

Name Description
supported

All currently available solver backends, based on what is installed.

Attributes:

Name Type Description
CBC

COIN-OR (EPL-2.0), https://github.com/coin-or/CyLP

GLPK_MI

GNU Linear Programming Kit (GPL-3.0-only), https://www.gnu.org/software/glpk/ (via cvxopt)

HIGHS

HiGHS (MIT), https://highs.dev/ (via highspy)

SCIP

SCIP (Apache-2.0), https://scipopt.org/ (via pyscipopt)

SCIPY

SciPy (BSD-3-Clause), https://scipy.org/, default solver (built on HiGHS)

COPT

COPT (LicenseRef-Proprietary), https://github.com/COPT-Public/COPT-Release

CPLEX

IBM CPLEX (LicenseRef-Proprietary), https://www.ibm.com/docs/en/icos

GUROBI

Gurobi (LicenseRef-Proprietary), https://www.gurobi.com/

MOSEK

Mosek (LicenseRef-Proprietary), https://www.mosek.com/

XPRESS

Fico XPress, (LicenseRef-Proprietary), https://www.fico.com/en/products/fico-xpress-optimization

CBC = 'CBC' class-attribute instance-attribute

COIN-OR (EPL-2.0), https://github.com/coin-or/CyLP

GLPK_MI = 'GLPK_MI' class-attribute instance-attribute

GNU Linear Programming Kit (GPL-3.0-only), https://www.gnu.org/software/glpk/ (via cvxopt)

HIGHS = 'HIGHS' class-attribute instance-attribute

HiGHS (MIT), https://highs.dev/ (via highspy)

SCIP = 'SCIP' class-attribute instance-attribute

SCIP (Apache-2.0), https://scipopt.org/ (via pyscipopt)

SCIPY = 'SCIPY' class-attribute instance-attribute

SciPy (BSD-3-Clause), https://scipy.org/, default solver (built on HiGHS)

COPT = 'COPT' class-attribute instance-attribute

COPT (LicenseRef-Proprietary), https://github.com/COPT-Public/COPT-Release

CPLEX = 'CPLEX' class-attribute instance-attribute

IBM CPLEX (LicenseRef-Proprietary), https://www.ibm.com/docs/en/icos

GUROBI = 'GUROBI' class-attribute instance-attribute

Gurobi (LicenseRef-Proprietary), https://www.gurobi.com/

MOSEK = 'MOSEK' class-attribute instance-attribute

Mosek (LicenseRef-Proprietary), https://www.mosek.com/

XPRESS = 'XPRESS' class-attribute instance-attribute

Fico XPress, (LicenseRef-Proprietary), https://www.fico.com/en/products/fico-xpress-optimization

supported() -> set[Self] classmethod

All currently available solver backends, based on what is installed.

Returns:

Type Description
set[Self]

All the backends that are currently installed.