frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Solving the NY Times "Pips" game with F#

https://github.com/brianberns/Pips
63•brianberns•1w ago

Comments

ematth•1w ago
Hey Brian, I really enjoyed reading your work on the Pips game! I found myself applying a similar backtracking algorithm to my Pythonic solution (https://github.com/ematth/pips). I focused on finding a single solution for each puzzle as opposed to all possible solutions. For hard puzzles with longer run times, I found that running multiple processes, each with the domino list shuffled, gets the solve time down to <15 seconds.
brianberns•1w ago
Thanks! I'm glad to see I'm not the only one who went down this rabbit hole. :)

I considered parallelizing my solution as well, but the problem is that it only gives a linear speedup, while the problem space increases exponentially. I decided to focus on pruning the search tree instead, and that seemed to work pretty well (after much thinking).

prb•1w ago
It's getting crowded down here in the rabbithole... One more to peek at: https://github.com/prb/pips-solver/blob/main/README.md
munchler•1w ago
That's great! Your experience with the 2025-09-15 and 2025-10-14 puzzles was very similar to mine, I think. I'm impressed that you were able to get AI models to solve this game effectively. I coded it the old-fashioned way myself, mostly, with occasional help from Gemini Pro.
prb•1w ago
I did write the spec first — data model, algorithm, etc. That may have helped the agents get traction.
tzs•13h ago

  Last updated 2025-10-27.
  [...]

  The puzzles with the most solutions are:


  • 2025-09-15 hard: 2,764,800 solutions
  • 2025-10-05 hard: 344 solutions
  • 2025-09-30 hard: 110 solutions
  • 2025-09-04 hard: 86 solutions
  • 2025-08-23 hard: 80 solutions
Hah...it's like the NYT was just waiting for you to update so they could immediately release a puzzle that makes your list out of date. 2025-10-28 hard has 166 724 solutions.
eszed•1w ago
I really enjoy the Pips game, but it doesn't appear on the games page in my (Android) NY Times app. I'm a subscriber, and the app is up to date. I can get to it by searching for the article announcing it a few months back, and then clicking through from there, and it works just fine.

Presumably it's there in the separate NYT Games app, but I'd rather not install a separate app.

Does anyone know why they exclude it from the regular games section? I realize this is the silliest of all first-world problems, but still: Why?

atombender•15h ago
It's in the separate Games app. I believe Pips isn't a "full" member of the games section yet (it has no archive, leaderboard or achievement badges), which is probably why they're not including it.
IshKebab•15h ago
I quite like this game but it does feel a little like I'm a human SAT solver.
lloydatkinson•14h ago
Pretty cool! I used backtracking for a very similar layout problem: generating word searches. I used C# for that.
sunrunner•12h ago
This is great, and serendipitous timing for me.

After spending an embarrassing amount of time on today's hard before I went to bed I was wondering what kind of metrics could go into analysing the difficulty of any Pips game (and which ones NYT Games uses) and whether it would be worth writing a solver to do this analysis. I was also considering an SMT or CP approach instead of backtracking as an alternative.

Edit: And after looking through the solve times in more detail, I feel vindicated that the hard for today (01/11/2025) was both a single solution and took the solver over 8x as long to find the solution. It took me longer than 8x my average, but that's besides the point...

tzs•12h ago
Looks like quite a few people who have written Pips solvers are here. I too have one (a dumb as a rock brute force solver in C).

How are you all getting the puzzles into your solvers? I just found out that the puzzles are available in JSON at https://www.nytimes.com/svc/pips/v1/YYYY-MM-DD.json

where YYYY-MM-DD is the date for the puzzle. They have past puzzles and even some future puzzles. At the moment they through 2025-11-25.

Right now I'm using a hand written text input that for example looks like this:

  ..-.
  -ABB
  .AAC

  A 3
  B 3
  C 3

  10 11 00 33
for the 2025-09-09 easy puzzle which looked like this:

                  ┌───────┐
                  │       │
                  │       │
                  │       │
  ┌───────────────────────────────┐
  │       │       │               │
  │       │       │               │
  │       │       │              3│
  └───────│       └───────────────│
          │               │       │
          │               │       │
          │              3│      3│
          └───────────────└───────┘
Those JSON downloads are going to make things so much more convenient!
andrehacker•10h ago
Mr. Righto's (Ken Shirriff) approach using a constraint solver (MiniZinc)

https://www.righto.com/2025/10/solve-nyt-pips-with-constrain...

tzs•4h ago
I see that a few of the people who have written solvers have posted in their repositories counts of the number of solutions for some of the puzzles, such as the infamous 2025-09-15 hard, which had 2 764 800 solutions.

That's how many my dumb brute force solver counted for that one too, so it looks like we are all counting solutions the same way.

This raises a question.

Here's one solution to that particular puzzle

6/5(15,16) 1/2(23,22) 4/5(0,4) 1/5(2,1) 5/3(5,6) 2/5(7,8) 4/4(9,3) 0/0(17,10) 4/2(19,18) 3/3(12,11) 3/4(21,20) 5/5(14,13)

where the notation P/Q(A,B) means the tile that has P pips on one half and Q pips on the other have is placed so the P half is on square A (counting the leftmost square on the first row as 0, and then going left to right, top to bottom) and the Q half is on square B. The order the halves of a tile are given is the order they are in the puzzle specification, and the order the tiles are listed is the order from the puzzle specification.

My solver considers two solutions different if they do not produce identical strings when the solution is written in the aforementioned format.

I'm reasonably sure that this counts some solutions as different that most humans would count as the same.

For example supposed there is a 2/3 tile this is entirely inside a region that has to sum to 10. Another solution that is identical except that tile is rotated 180 degrees would probably be counted as the same solution by a human but as different by my solver.

Similarly, if there is also a 1/1 tile entirely inside that region, the 1/1 tile and the 2/3 tile could be swapped and my solver would say that is a different solution, but I think most humans would not.

How far does this go? Would a human tend to think of all permutations and orientations of a set of tiles that are all contained in the same constraint region as identical solutions?

Visopsys: OS maintained by a single developer since 1997

https://visopsys.org/
218•kome•6h ago•34 comments

Pomelli

https://blog.google/technology/google-labs/pomelli/
101•birriel•5h ago•30 comments

How I use every Claude Code feature

https://blog.sshh.io/p/how-i-use-every-claude-code-feature
107•sshh12•4h ago•31 comments

Claude Code can debug low-level cryptography

https://words.filippo.io/claude-debugging/
249•Bogdanp•9h ago•125 comments

Updated practice for review articles and position papers in ArXiv CS category

https://blog.arxiv.org/2025/10/31/attention-authors-updated-practice-for-review-articles-and-posi...
427•dw64•13h ago•198 comments

Anonymous credentials: rate-limit bots and agents without compromising privacy

https://blog.cloudflare.com/private-rate-limiting/
44•eleye•3h ago•14 comments

GHC now runs in the browser

https://discourse.haskell.org/t/ghc-now-runs-in-your-browser/13169
269•kaycebasques•12h ago•85 comments

Crossfire: High-performance lockless spsc/mpsc/mpmc channels for Rust

https://github.com/frostyplanet/crossfire-rs
11•0x1997•1h ago•0 comments

Show HN: Why write code if the LLM can just do the thing? (web app experiment)

https://github.com/samrolken/nokode
266•samrolken•10h ago•194 comments

3M Diskette Reference Manual (1983) [pdf]

https://retrocmp.de/fdd/diskette/3M_Diskette_Reference_Manual_May83.pdf
41•susam•5d ago•9 comments

Beginner-friendly, unofficial documentation for Helix text editor

https://helix-editor.vercel.app/start-here/basics/
107•Curiositry•9h ago•33 comments

SQLite concurrency and why you should care about it

https://jellyfin.org/posts/SQLite-locking/
271•HunOL•15h ago•115 comments

SailfishOS: A Linux-based European alternative to dominant mobile OSes

https://sailfishos.org/info/
201•ForHackernews•6h ago•83 comments

Automatically Translating C to Rust

https://cacm.acm.org/research/automatically-translating-c-to-rust/
15•FromTheArchives•1w ago•0 comments

The Smol Training Playbook: The Secrets to Building World-Class LLMs

https://huggingface.co/spaces/HuggingFaceTB/smol-training-playbook
153•kashifr•2d ago•8 comments

How to Build a Solar Powered Electric Oven

https://solar.lowtechmagazine.com/2025/10/how-to-build-a-solar-powered-electric-oven/
22•surprisetalk•1w ago•11 comments

A Few Words About Async

https://yoric.github.io/post/quite-a-few-words-about-async/
18•vinhnx•3h ago•0 comments

Sufficiently Smart Compiler

https://wiki.c2.com/?SufficientlySmartCompiler
3•coffeeaddict1•4d ago•0 comments

The hardest program I've ever written (2015)

https://journal.stuffwithstuff.com/2015/09/08/the-hardest-program-ive-ever-written/
71•jacobedawson•3d ago•38 comments

Why "everyone dies" gets AGI all wrong

https://bengoertzel.substack.com/p/why-everyone-dies-gets-agi-all-wrong
67•danans•3h ago•125 comments

OpenDesk by the Centre for Digital Sovereignty

https://www.opendesk.eu/en/product
40•athousandsteps•6h ago•4 comments

Hard Rust requirements from May onward

https://lists.debian.org/debian-devel/2025/10/msg00285.html
347•rkta•21h ago•614 comments

RegEx Crossword

https://jimbly.github.io/regex-crossword/
30•a022311•4d ago•11 comments

CharlotteOS – An Experimental Modern Operating System

https://github.com/charlotte-os/Catten
154•ementally•15h ago•77 comments

Chat Control proposal fails again after public opposition

https://andreafortuna.org/2025/11/01/chat-control-proposal-fails-again-after-massive-public-oppos...
473•speckx•11h ago•130 comments

Show HN: A simple drag and drop tool to document and label fuse boxes

https://github.com/alexadam/fuse-box-labels
9•eg312•1d ago•2 comments

Word2vec-style vector arithmetic on docs embeddings

https://technicalwriting.dev/embeddings/arithmetic/index.html
56•kaycebasques•9h ago•11 comments

Show HN: KeyLeak Detector – Scan websites for exposed API keys and secrets

https://github.com/Amal-David/keyleak-detector
16•amaldavid•5h ago•5 comments

I built my own CityMapper

https://asherfalcon.com/blog/posts/5
125•ashfn•5d ago•17 comments

Austria: Pylons as sculpture for public acceptance of expanding electrification

https://www.goodgoodgood.co/articles/austrian-power-giants-power-line-animals
101•Geekette•4d ago•46 comments