From the Lab. This one isn't ours: it's Retaining Water, a 2010 contest run by our friend Al Zimmermann. We keep its records here so the Retaining Water simulator has something to chase. Every square sent here is open for anyone to view and load.
The Lab · Al Zimmermann's Programming Contests, 2010

Retaining Water.

Arrange the numbers 1 to n² in a magic square, then think of each number as a column of stone that tall. Rain pools in the low cells. Hold as much water as you can, for every n from 4 to 28.

The rules

Where this came from. Craig Knecht brought the problem to Al Zimmermann, who ran it as a contest from March to June 2010. Walter Trump won and Hermann Jurksch came second, and as at many of Al's contests, first prize was a Bathsheba Grossman sculpture. The records come from Al's final report, which kept every best square, so every record here has been re-scored by our scorer. Want a computer to search for you? The simulator in the Lab anneals squares in your browser, saves its best ones here, and can start from any square on this page.

The scoring code

As on the original site, here is the code that scores every entry, so you can check your own before you send it. It's written to be easy to read, not fast. Each version reads one entry per line and prints its score. We've checked all four against the site on all 102 squares in Al's final report, plus 210 altered ones, good and bad.

Submit a square

Records and results

Loading…