Skip to content

Comment on Solving the Jane Street reverse engineering challenge

Comments

I ended up using a tool called ‘z3’. It’s kind of magical? Every time it finds a solution I get a surge of joy.

This resonates so much. I had a similar feeling after going to my very first operations research lecture. Solving seemingly incomprehensibly complex problems by framing them as a bunch of simple constraints and getting a solution seemed like such magic.

Yeah this was my experience too. I have an undergrad business degree, but got nerd sniped by an optimization problem, found a solution with constraint programming, and ended up going down a 15 year operations research rabbit hole with it.

Many people say that the way to tackle a hard problem is to break it down into smaller problems. I disagree. The best way to tackle a hard problem is to break it down into a defined search space and as many seemingly-redundant constraints as you can possibly list, then dump it all into a solver, go take a nap for a few hours or possibly a month, then come back to the problem solved for you.

Found minizinc/CP-SAT recently and I’m obsessed

z3 or constraint programming comes in very handy in at least one challenge every year in Advent of Code! https://adventofcode.com

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.