Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. GPT 6.1 Sol: Near-Astra intelligence for a fifth of the price (openai.com)
    302comments
  2. Dots: Always-on agents (openai.com)
    169comments
  3. Tcl/Tk 9.1 Released (tcl-lang.org)
    15comments
  4. How Delhi cut electricity loss from 50 to 5 percent (ieee.org)
    191comments
  5. DraftKings Is Using AI to Behaviorally Target Chronic Gamblers (eff.org)
    164comments
  6. New PlayStation 5 Console Jailbreak Released (github.com/ntfargo)
    15comments
  7. A Privacy Analysis of Web and Mobile Conversational AI Agents [pdf] (jorgegarciaherrero.com)
    123comments
  8. Virus Stole a Human Gene and Won't Let Go of It (nytimes.com)
    5comments
  9. NAND-16: a computer built from 277,248 NAND gates (somethingbig.ai)
    6comments
  10. Walking Men (bookofjoe2.blogspot.com)
    17comments
  11. Without the Hot Air (withouthotair.com)
    50comments
  12. Jeeves. Reasoning improves Jev-like decision models (github.com/posthog)
    81comments
  13. Phyllotaxis: An audio-reactive LED display (jagi.studio)
    39comments
  14. ChatGPT Pro 500 (help.openai.com)
    90comments
  15. DevDay 2026 Recap (openai.com)
    12comments
  16. Show HN: NSL – WSL for Linux (frostyard.github.io)
    38comments
  17. You are no longer invited to dinner (derekthompson.org)
    536comments
  18. Using any C++ library in Godot (conan.io)
    48comments
  19. Digital Audio on the ZX Spectrum's 1-Bit Beeper (bumbershootsoft.wordpress.com)
    14comments
  20. A Staff Engineer's Guide to Inventing Work (sujithjay.com)
    13comments
  21. The End of a Fair Price: Dynamic Pricing and the Normalization of Gouging (prospect.org)
    3comments
  22. 1 in 8 cancer cases worldwide are caused by infections, study finds (cbc.ca)
    97comments
  23. Show HN: Jevstiller – Distill Jev into a local model, with a disagreement bound (jevstiller.pages.dev)
    6comments
  24. Google ending ChromeOS support two years early (theregister.com)
    106comments
  25. California farmers are struggling to sell grapes as demand for wine drops (kqed.org)
    857comments
  26. macOS Golden Gate Is a Buggy Mess (squareorbits.com)
    260comments
  27. Booted up in 1993, this server still runs – but not for much longer (2017) (computerworld.com)
    87comments
  28. 500k facial scans at UK stations yield no arrests, 1 false positive (theguardian.com)
    250comments
  29. Software occlusion culling in Block Game (enikofox.com)
    7comments
  30. Pirating the Pirates (mubi.com)
    344comments

Solving a corn puzzle with CP-SAT

24 pointsby 1d agothill.me
9 comments
1d agoHN ↗

It was much better than I would have written myself, and I ended up learning from it.

Eventually shitting on LLM code will be seen by all as lazy cope. I too am aware of the existence of SAT but I really would struggle to immediately see through some problem i was having and interpret SAT unless I did it a bunch. Having agent suggest the "right thing" is clearly better. And hopefully would help my intuition in the future.

1d agoHN ↗

Ok, in this specific case, a puzzle with what 10 pieces, a recursive backtracker will be just as fast and more importantly, be far easier to reason about and implement.

If this was a thousand piece puzzle, I would still venture recursive backtracker with good heuristics will beat CP-SAT, even in the sudoku case some good heuristics with backtracking beats CP-SAT. Not sure why Claude immediately jumped to using CP-SAT.

1d agoHN ↗

I would be shocked if a good recursive backtracker could beat a good SAT solver for large problems. I mean, if you could solve SAT with recursive backtracking people would. That is the core of a SAT or CP solver, with the all the extra clever stuff.

I've spent significant chunks of my career help people throw away backtracking searchers people polished over years with a CP-SAT model I threw together in 30 minutes, often much to their upset.

You can for Sudoku often beat a CP-SAT solver, but that's because the problems are trivial and take milliseconds. If you look at more difficult Sudoku variants, or 16x16 grids, backtracking solvers start to fall behind.

22h agoHN ↗

Agreed. I don't know if I would be shocked, but I would be surprised.

This is one that is hard for people to really internalize, I think? The SAT solvers many are likely to use today are not at all the same as the ones they would have used 20 years ago. They have made some amazing advances in how to approach those problems.

There are also probably some very poorly conceived models that people use to adapt a problem to some of these solvers.

1d agoHN ↗

Instead of backtracking, Claude just imported an industrial-strength library made to solve these sorts of problems. OR-Tools CP-SAT is put out by Google and is made for solving constrained optimization problems, as well as satisfiability problems like this one.

I'm not familiar with CP-SAT, but TTBOMK all SAT solvers use a type of backtracking search underneath called DPLL. Modern ones are highly tuned in terms of which variable they choose to branch on next, and in what order to try its possible values; this can have an enormous impact on runtime. They probably use several tricks on top of that; the big one that I'm aware is conflict-driven clause learning, where the solver adds new constraints that it discovers as it goes along (e.g., it might be able to determine that x and y always have the same value in every solution), which can shrink the search space a lot.

21h agoHN ↗

Yes, constraint learning is a huge deal. And there is a fun trick to solving sudoku that is basically this. Someone realized that you can essentially build an extra ring around the board that has the same constraints as elsewhere. Phistomefel Ring is the name, I believe. (This may be a different one, I just reached for the first thing a google search found for my vague description.)

10h agoHN ↗

CP-SAT is still a glorified and optimized recursive backtracking search. There's nothing better in the literature. They call it DPLL.

It just evaluates the data and constraints to search the more obvious paths first, and cut illegal paths earlier. And some integer tricks, and a cache of learned constraints. Which the Russians found, when trying to solve Chess efficiently. IBM/Ken Thompson just threw hardware at it, while the Russians made the algorithmic advances. Just as now with LLM's. The US folks just throw hardware at it, whilst the Chinese optimize their algos.