Skip to main content

Linear Optimization Solvers for LinkedIn Games

This repository holds a Python package that provides a simple set of components to solve LinkedIn board games (Mini Sudoku, Patches, Queens, Tango and Zip, for now) using Linear Optimization models.

This repository also contains a Jupyter Book that teachs how this package implements Linear Optimization models to solve each game. The book introduces the basics of mathematical optimization, explain the components of the package and presents the line of reasoning behind the model's structure of each minigame.

How to Install

To install the LinkedIn Games package, you can use the pip command:

pip install linkedin-games

Or run the command below if you use uv as your package manager:

uv add linkedin-games

A Simple Example

In order to solve this Patches game:

Patches No. 121

One can run this simple code snippet.

from linkedin_games import Patches

patch_seeds = {
    (1,1): {"color": "yellow", "area": 8},
    (2,5): {"color": "green",  "area": 8},
    (3,3): {"color": "purple"},
    (4,4): {"color": "orange"},
    (5,2): {"color": "teal",   "area": 8},
    (6,6): {"color": "red",    "area": 6, "shape": "vertical"},
}
patches = Patches(size=6, seeds=patch_seeds)
patches.solve().display()

Which will return the following result:

Patches No. 121 solved

Which, by its turn, matches the official solution of this game:

Solution of Patches No. 121

📙 Textbook

You can read more about the usage and implementation of this package on this Jupyter Book.

Table of Contents

🧩 Play with the Code Examples

You can run the code examples of this package on this JupyterLab environment (hosted on Binder) without installing anything on your machine.

📖 API Documentation

The documentation of this package's API is also available on Read the Docs.

❤️ Consider Donating

If you find this package useful and would like to support its development, please consider making a donation. Your contributions will help me maintain my work, as well as fund future projects.

Metadata

Release files for linkedin-games 1.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for linkedin-games 1.0.5
File Size Uploaded
linkedin_games-1.0.5.tar.gz 26.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for linkedin-games 1.0.5
File Interpreter ABI Platform
linkedin_games-1.0.5-py3-none-any.whl Python 3 none any Details

Total release size: 78.1 kB

Release files / linkedin_games-1.0.5.tar.gz

Download URL linkedin_games-1.0.5.tar.gz
Size 26.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b70c4119871481a48e0d5f8e0d2192219bd4ad3f7de46385fbf9f05bea621bd1
BLAKE2b-256 checksum
How to use checksums
861cc6e81b7481157bd28cc43b0e919221e684522645239048dd4e0dc97069ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / linkedin_games-1.0.5-py3-none-any.whl

Download URL linkedin_games-1.0.5-py3-none-any.whl
Size 52.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1b12bfd527fd3108af0d0108102064b9772086dbbb698fe07adeec7f54287861
BLAKE2b-256 checksum
How to use checksums
d160fb1d6461b795cc9828d8a6c04c7cad9d86bb2a316823004fe7def72b3bd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.1 {"installer":{"name":"uv","version":"0.12.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

1.0.5 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page