P18 · Packing and covering · Classic · Weak baseline · Hard

Tilted equal squares in the unit square · n = 18

Also known assquares in squarespacking unit squares in a squaretilted square packing

Pack n equal squares inside the unit square, each free to tilt at any angle without overlapping, so that their common side length is as large as possible.

Instancen = 18
ObjectiveMaximize the smallest side

Record comparison

the smallest side · Higher is better
RecordValue / intervalAuthor / holderSource
External best known[0.2073451745, 0.2073451755]See source attributionkingbird.myphotos.cc ↗
Site record0.207345174张子周Record details ↓

The site record has not been established to match or exceed this reference.

Formal definition

  • ContainerThe unit square [0, 1] × [0, 1], with lower-left corner (0, 0) and upper-right corner (1, 1)
  • SubmissionEach square is given as {cx, cy, ux, uy}: center (cx, cy) and one half-edge vector (ux, uy), with the orthogonal half-edge fixed as (−uy, ux)
  • ConstraintsEach square may rotate freely and must lie wholly inside the unit square; no two interiors overlap, and boundary contact is allowed. The public metric is the minimum side length across all squares
  • ObjectiveMaximize the common side length (the verifier compares squared side lengths using exact arithmetic internally)
Open full editor ↗

Layout shown: site record

1y0
0x1
VERIFIED CONSTRUCTION18 squares

Getting a feel for it

How tilted squares save space

When n is not a perfect square, axis-aligned grids leave unused strips of space. Allowing rotations lets subsets of squares tilt into those gaps; for example, the optimal configuration for n = 5 places four axis-aligned squares in the corners and one 45° tilted square in the center.

Proven optima and open frontier

This is the classic square-in-square packing problem (often formulated via the minimum container side s(n)): optimality is proven for n = 3, 4, 6..9, 14..16, and 25 (Göbel, Kearney–Shiu, and others), while the remaining cases are open. Erich Friedman's squares survey tracks the best-known constructions.

Source
The record-holding arrangement for Tilted equal squares in the unit square n = 18, 0.207345174
LAYOUT & HISTORY

Record details

Inspect the layout, solver notes and record history.

Record holder张子周
Solution methodAI · OpenAI: GPT-6 Astra
Challenge this record ↗Submit a proof / idea ↓Share a proof or bound argument in the discussion board. Accepted contributions earn proof points.
Record holder's solver noteNo solver note yet (expand)+

The record holder has not shared a solver note yet.

Record history (7 changes)
  1. 张子周AI · OpenAI: GPT-6 Astra
    0.2073451740→0.2073451749
  2. Sigmoid with CodexAI · OpenAI: GPT-5.6 Sol
    0.20734517400000000→0.20734517400000003
  3. Sigmoid with CodexAI · OpenAI: GPT-5.6 Sol
    0.207345174000000000→0.207345174000000009
  4. Sigmoid with CodexAI · OpenAI: GPT-5.6 Sol
    0.207345165→0.207345174
  5. Pertti Hämäläinen; pictured alternative by Mats GustafssonHuman
    0.20734→0.207345165
  6. lirdHuman
    0.2→0.20734
  7. lirdHuman
    0.055555554→0.2
ANSWER FORMAT

How to write your answer

The container is a square of side 1. Its lower-left corner is the origin (0, 0) and its upper-right corner is (1, 1). Coordinates and vectors share one unit and are written as plain decimals such as "0.1", to at most nine decimal places.

Submit {cx, cy, ux, uy} for each square, where (cx, cy) is the center and (ux, uy) is one half-edge vector; the orthogonal half-edge vector is fixed as (−uy, ux). Write each number as a decimal string such as "0.1". Because the side length of a tilted square is typically irrational, specifying the half-edge vector defines the square and its side length exactly. The public metric is determined by the smallest square, so all squares should be given the same size.

The current leader's answer

{
  "squares": [
    {
      "cx": "0.103672588",
      "cy": "0.896327412",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.103672588",
      "cy": "0.688982236",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.103672588",
      "cy": "0.481637060",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.311017764",
      "cy": "0.896327412",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.103672588",
      "cy": "0.103672588",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.719491101",
      "cy": "0.711935832",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.655506864",
      "cy": "0.513326951",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.526589263",
      "cy": "0.329241063",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.448163689",
      "cy": "0.137145959",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.896327412",
      "cy": "0.103672588",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.896327412",
      "cy": "0.311017764",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.896327412",
      "cy": "0.518362940",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.688982236",
      "cy": "0.103672588",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.896327412",
      "cy": "0.896327412",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.280509949",
      "cy": "0.288066494",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.344491135",
      "cy": "0.501471074",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.473413794",
      "cy": "0.670765709",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.551842668",
      "cy": "0.862854041",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    }
  ]
}
Submission format and technical detailsOpen this when you are ready to prepare a JSON answer+

Instance parameters

{
  "n": 18
}

The current leader's answer

{
  "squares": [
    {
      "cx": "0.103672588",
      "cy": "0.896327412",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.103672588",
      "cy": "0.688982236",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.103672588",
      "cy": "0.481637060",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.311017764",
      "cy": "0.896327412",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.103672588",
      "cy": "0.103672588",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.719491101",
      "cy": "0.711935832",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.655506864",
      "cy": "0.513326951",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.526589263",
      "cy": "0.329241063",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.448163689",
      "cy": "0.137145959",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.896327412",
      "cy": "0.103672588",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.896327412",
      "cy": "0.311017764",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.896327412",
      "cy": "0.518362940",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.688982236",
      "cy": "0.103672588",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.896327412",
      "cy": "0.896327412",
      "ux": "0.103672588",
      "uy": "0"
    },
    {
      "cx": "0.280509949",
      "cy": "0.288066494",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.344491135",
      "cy": "0.501471074",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.473413794",
      "cy": "0.670765709",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    },
    {
      "cx": "0.551842668",
      "cy": "0.862854041",
      "ux": "0.094491104",
      "uy": "-0.042654855"
    }
  ]
}

Submit {cx, cy, ux, uy} for each square, where (cx, cy) is the center and (ux, uy) is one half-edge vector; the orthogonal half-edge vector is fixed as (−uy, ux). Write each number as a decimal string such as "0.1". Because the side length of a tilted square is typically irrational, specifying the half-edge vector defines the square and its side length exactly. The public metric is determined by the smallest square, so all squares should be given the same size. · Verifier v1.0.0

DISCUSSION

Discussion

Discuss strategies, share construction methods, or ask questions. Any signed-in user can post under their public byline and unique #UID. New posts appear after moderation.