Live data from Hacker News

MiniZinc

minizinc.org

11–20 of 76 posts

Re: MiniZinc

#11

Im sure this is useful but these languages (proof langs, constraints, etc) are always so difficult to parse or read Adoption for these systems might be higher if they had a more readable syntax (and bonus if they could transpile down to source code you can tweak) Also maybe I missed it on mobile, but I would love examples of the syntax and examples of application usage on the first page. Maybe this is useful to me! W…

I’ve played with minizinc in the past though we use scipopt now instead.

The minizinc code looks pretty reasonable to me though. Specify your variables as ranges. Specify your constraints as math equations. Tell it what you’re looking to maximise / minimise.

https://www.minizinc.org/doc-2.7.6/en/modelling.html#ex-cake...

Re: MiniZinc

#12
post #4

What exactly is "constraint modeling" and what is it used for?

Scheduling is probably the most obvious example of a real problem. You’ve got a space that has many different ways of being bounded and need to efficiently search that space.

Physical design systems (modeling possible boat hulls, say—not the physics itself but the interaction of numerous variables) and resource allocation (drafting a baseball team, say) seem like other likely areas, though I’ve got no idea if constraint tools are the best option or whether they’re even used.

Broadly: if a multivariate problem can’t be modeled, a constraint-based search strategy is the(/one) next-best tool.

Re: MiniZinc

#13

Im sure this is useful but these languages (proof langs, constraints, etc) are always so difficult to parse or read Adoption for these systems might be higher if they had a more readable syntax (and bonus if they could transpile down to source code you can tweak) Also maybe I missed it on mobile, but I would love examples of the syntax and examples of application usage on the first page. Maybe this is useful to me! W…

Yes exactly, we need typescript style solution to get best 80% of ocaml/haskell available to joes kind of thing.

Re: MiniZinc

#14

I wrote a thesis on using constraint satisfaction with minizinc to solve the genome edit distance problem: https://github.com/jpnelson/genome-edit/blob/master/thesis.p... My takeaway: modeling problems in minizinc correctly is exceptionally difficult for non-trivial problems. You can model it correctly, but you'll likely still need to add additional "constraints" that improve the performance of the solver to the degr…

Is that a minizinc thing or a solver thing in general?

Re: MiniZinc

#15
Constraint modelling is really neat. It only works well on a specific category of problems, but when it works it can feel almost like cheating. You don't actually do anything, you just restate the problem in code and the computer does the work for you.

Re: MiniZinc

#17
post #4

What exactly is "constraint modeling" and what is it used for?

Solving sudoku and other kinds of logical "puzzles".

Provable properties for cryptographic algorithms is a thing. Provably correct compilers exist. It’s not hard to imagine provably correct kernel modules for example and benefits they’d bring. If they had better ux you could imagine business logic, state machines, asynchronous computation to have provable properties as well. It’s very interesting area but on the edge of usability currently. I’d predict it has great future as ai gets incorporated more and more as it gives solid logic/mathematical proofs over solutions - if it doesn’t make sense to you, think json schema like validated llm output but for any computation.

Sophisticated programming languages dive towards this direction already compared to untyped cousins. Programs are validated against type theory correctness. You can go deeper with dependent types. And those languages go all the way down to prove everything there is to be proven.

Re: MiniZinc

#18
post #9
post #4

What exactly is "constraint modeling" and what is it used for?

My GPT answer was: Imagine you have a big box of colorful building blocks, and you want to create something specific, like a house or a car. But you have some rules or constraints that you need to follow in order to complete your creation. Constraint modeling is like playing with those building blocks, but with rules. It helps you figure out how to build something while following certain restrictions. These restricti…

I don't get people posting GPT answers. If parent wanted that, surely they would've done that themselves?

Re: MiniZinc

#19
post #14

I wrote a thesis on using constraint satisfaction with minizinc to solve the genome edit distance problem: https://github.com/jpnelson/genome-edit/blob/master/thesis.p... My takeaway: modeling problems in minizinc correctly is exceptionally difficult for non-trivial problems. You can model it correctly, but you'll likely still need to add additional "constraints" that improve the performance of the solver to the degr…

Is that a minizinc thing or a solver thing in general?

https://en.wikipedia.org/wiki/Variety_(cybernetics)

key takeaway: Boisot and McKelvey updated this law to the "law of requisite complexity", that holds that, in order to be efficaciously adaptive, the internal complexity of a system must match the external complexity it confronts.

Re: MiniZinc

#20
I once tried to use MiniZinc as a back-end for a school timetabling app I was working on, and came away with the impression that the OptaPlanner Java API would be a lot easier to use. (Although unlike solvers, OptaPlanner uses heuristic algorithms -- simulated annealing, etc.)

Maybe it's just that formally expressing a set of constraints doesn't come naturally to me. I'm sure with a lot of practice, writing MiniZinc code would be easier.

The Google OR-Tools Python API also might be easier if you're generating models dynamically. I wouldn't want to generate MiniZinc code...

Post reply on HN