Comment by FilosofumRex
Comment by FilosofumRex 9 hours ago
Constrained programming makes CS algos problems , ie Leetcode, look like child's play...Kind like how martial arts gurus often get beaten up in street fights.
Comment by FilosofumRex 9 hours ago
Constrained programming makes CS algos problems , ie Leetcode, look like child's play...Kind like how martial arts gurus often get beaten up in street fights.
Sometimes, that can be the case, but sometimes it takes a surprising amount of insight to make something that is useful. It is often easy to look at a final model and think that it is obvious.
For this problem, there are really three key insights needed to get a useful model
* Adding the exact fill requirements. With some background in constraint programming, this can be obvious, but it is also easy to try to use cumulative instead, and that is as shown not always useful
* The edge-placement restrictions. This is quite an intricate insight that depends on the combined choices available. Also, the first version I wrote for it was wrong in a surprising way that was hard to detect.
* Symmetry breaking for the boxes. This is a standard thing to solve in constraint programming models, but sometimes it is not obvious how to do it. It takes some experience to know that the `lex_chain_less` can be used for this.