Metadata-Version: 2.3
Name: linkedin-games
Version: 1.0.5
Summary: A Python package for solving LinkedIn board games like Mini Sudoku, Patches, Queens, Tango and Zip using Linear Optimization models.
Keywords: Games,Linear Optimization,LinkedIn,LinkedIn Games,Mini Sudoku,Optimization,Patches,Queens,Tango,Zip
Author: Rodrigo C. L. Porto
Author-email: Rodrigo C. L. Porto <rodrigo.cl.porto@gmail.com>
License: MIT License
         
         Copyright (c) 2026 Rodrigo Celso de Lima Porto
         
         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.
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Education
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Framework :: Pytest
Classifier: Topic :: Games/Entertainment :: Puzzle Games
Classifier: Topic :: Scientific/Engineering :: Mathematics
Classifier: Typing :: Typed
Requires-Dist: highspy>=1.14.0
Requires-Dist: matplotlib>=3.10.8
Requires-Dist: networkx>=3.6.1
Requires-Dist: pyomo>=6.10.0
Requires-Python: >=3.13
Project-URL: Code Examples, https://mybinder.org/v2/gh/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers/binder?urlpath=lab%2Ftree%2Fnotebooks%2F
Project-URL: Source Code, https://github.com/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers
Project-URL: Textbook, https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/
Project-URL: Documentation, https://linkedin-games-linear-optimization-solvers.readthedocs.io/
Project-URL: LinkedIn Profile, https://www.linkedin.com/in/rodrigo-cl-porto/
Project-URL: GitHub Profile, https://github.com/rodrigo-cl-porto
Description-Content-Type: text/markdown

<div id="logo" align="center">
    <img src="https://cdn.jsdelivr.net/gh/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers/docs/assets/logo.svg" alt="logo" width="30%" loading="lazy" />
</div>

<div id="project-metadata" align="center">
    <a href="https://pypi.org/project/linkedin-games/">
        <img src="https://img.shields.io/pypi/v/linkedin-games?logo=pypi&style=flat&color=blue&logoColor=gold" alt="PyPI - Package Version" loading="lazy" />
    </a>
    <a href="https://pypi.org/project/linkedin-games/">
        <img src="https://img.shields.io/pypi/pyversions/linkedin-games?logo=pypi&style=flat&color=blue&logoColor=gold" alt="PyPI - Python Version" loading="lazy" />
    </a>
    <a href="https://linkedin-games-linear-optimization-solvers.readthedocs.io/">
        <img src="https://readthedocs.org/projects/linkedin-games-linear-optimization-solvers/badge/?version=latest&style=flat" alt="Docs Status" loading="lazy" />
    </a>
    <a href="https://spdx.org/licenses/">
        <img src="https://img.shields.io/badge/license-MIT-9400d3.svg?style=flat&color=orange" alt="License - MIT" loading="lazy" />
    </a>
</div>

<div id="dev-metadata" align="center">
    <a href="https://github.com/astral-sh/uv">
        <img src="https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fraw.githubusercontent.com%2FOnyx-Nostalgia%2Fuv%2Frefs%2Fheads%2Ffix%2Flogo-badge%2Fassets%2Fbadge%2Fv0.json" alt="Package Manager - uv" loading="lazy" />
    </a>
    <a href="https://github.com/astral-sh/ruff">
        <img src="https://img.shields.io/endpoint?style=flat&url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Linting/Formatter - Ruff" loading="lazy" />
    </a>
    <a href="https://github.com/astral-sh/ty">
        <img src="https://img.shields.io/endpoint?style=flat&url=https://raw.githubusercontent.com/astral-sh/ty/main/assets/badge/v0.json" alt="Type Checker - Ty" loading="lazy" />
    </a>
    <a href="https://github.com/pytest-dev/pytest">
        <img src="https://img.shields.io/badge/py-test-blue?logo=pytest&style=flat" alt="Automatic Tests - pytest" loading="lazy" />
    </a>
    <a href="https://github.com/nat-n/poethepoet">
        <img src="https://img.shields.io/badge/poe-the_poet-FFFFFF?style=flat" alt="Task Runner - Poe The Poet" loading="lazy" />
    </a>
</div>

<div id="documentation-metadata" align="center">
    <a href="https://jupyterbook.org">
        <img src="https://raw.githubusercontent.com/jupyter-book/jupyter-book/next/docs/media/images/badge.svg" alt="Book - Jupyter Book" loading="lazy" />
    </a>
    <a href="https://github.com/zensical/zensical">
        <img src="https://img.shields.io/badge/docs-zensical-orange?style=flat" alt="Technical Documentation - Zensical" loading="lazy" />
    </a>
</div>

<div id="github-metadata" align="center">
    <a href="https://github.com/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers">
        <img src="https://img.shields.io/github/last-commit/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers/main?style=social&logo=github" alt="Last Commit" loading="lazy" />
    </a>
    <a href="https://github.com/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers">
        <img src="https://img.shields.io/github/stars/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers" alt="GitHub Stars" loading="lazy" />
    </a>
    <a href="https://github.com/sponsors/rodrigo-cl-porto/">
        <img src="https://img.shields.io/github/sponsors/rodrigo-cl-porto?logo=GitHub%20Sponsors&style=social" alt="GitHub Sponsors" loading="lazy" />
    </a>
</div>

# 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][linkedin-mini-sudoku], [Patches][linkedin-patches], [Queens][linkedin-queens], [Tango][linkedin-tango] and [Zip][linkedin-zip], for now) using Linear Optimization models.

This repository also contains a [Jupyter Book][textbook] 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:

```bash
pip install linkedin-games
```

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

```bash
uv add linkedin-games
```

# A Simple Example

In order to solve this Patches game:

<div align="center">
    <img src="https://cdn.jsdelivr.net/gh/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers/docs/assets/patches-121.jpg" alt="Patches No. 121" width="40%" loading="lazy">
</div>

One can run this simple code snippet.

```python
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:

<div align="center">
    <img src="https://cdn.jsdelivr.net/gh/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers/docs/assets/patches-121-solved.png" alt="Patches No. 121 solved" width="40%" loading="lazy" >
</div>

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

<div align="center">
    <img src="https://cdn.jsdelivr.net/gh/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers/docs/assets/patches-121-solution.jpg" alt="Solution of Patches No. 121" width="40%" loading="lazy" >
</div>

# 📙 Textbook

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

## Table of Contents

- Solving LinkedIn Games by Linear Optimization
    - [Home][home]
- Getting Started
    - [What is Optimization?][what-is-optimization]
    - [LinkedIn Games Python Package][linkedin-games-python-package]
- How to Solve
    - [Mini Sudoku][how-to-solve-mini-sudoku]
    - [Patches][how-to-solve-patches]
    - [Queens][how-to-solve-queens]
    - [Tango][how-to-solve-tango]
    - [Zip][how-to-solve-zip]

# 🧩 Play with the Code Examples

You can run the code examples of this package on this [JupyterLab environment][playground] (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][readthedocs].

# ❤️ 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.

[Binder]: https://mybinder.org/
[donation]: https://github.com/sponsors/rodrigo-cl-porto
[home]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/
[how-to-solve-mini-sudoku]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/how-to-solve/mini-sudoku/
[how-to-solve-patches]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/how-to-solve/patches/
[how-to-solve-queens]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/how-to-solve/queens/
[how-to-solve-tango]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/how-to-solve/tango/
[how-to-solve-zip]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/how-to-solve/zip/
[linkedin-games-python-package]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/getting-started/linkedin-games-python-package/
[linkedin-mini-sudoku]: https://www.linkedin.com/games/mini-sudoku/
[linkedin-patches]: https://www.linkedin.com/games/patches/
[linkedin-queens]: https://www.linkedin.com/games/queens/
[linkedin-tango]: https://www.linkedin.com/games/tango/
[linkedin-zip]: https://www.linkedin.com/games/zip/
[playground]: https://mybinder.org/v2/gh/rodrigo-cl-porto/LinkedIn-Games-Linear-Optimization-Solvers/binder?urlpath=lab%2Ftree%2Fnotebooks%2F
[readthedocs]: https://linkedin-games-linear-optimization-solvers.readthedocs.io/
[textbook]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/
[what-is-optimization]: https://rodrigo-cl-porto.github.io/LinkedIn-Games-Linear-Optimization-Solvers/getting-started/what-is-optimization/
