Skip to content

Instantly share code, notes, and snippets.

View thomasahle's full-sized avatar
♟️

Thomas Dybdahl Ahle thomasahle

♟️
View GitHub Profile
@thomasahle
thomasahle / tetraminos.py
Created November 27, 2020 13:43
Packing tetraminos
import collections
from ortools.linear_solver import pywraplp
# xy format
tetras = [
# Up downs
((0,0),(0,1),(1,1),(1,2)),
((0,0),(0,1),(-1,1),(-1,2)),
# left rights
((0,0),(1,0),(1,-1),(2,-1)),