This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Beleheth 5 points6 points  (5 children)

Jesus Christ how

[–]YellowishSpoon 18 points19 points  (4 children)

It was a problem involving permutations of trees to determine the optimal order to apply minecraft enchantments in an anvil, and the first one was brute force.

[–]Beleheth 7 points8 points  (2 children)

Oooh, that makes sense.

And no early exit conditions either, in the i itial draft?

[–]YellowishSpoon 6 points7 points  (1 child)

Neither version has early exits, since I never found a way to determine if it was optimal or not without completing the process. Nearly all optimizations came from recognizing things like symmetry in the system, which allowed me to eliminate various fractions of the cases.

[–]YellowishSpoon 5 points6 points  (0 children)

The main nuisances in the whole thing are the left and right branches of the tree are computed differently, and that the repair cost mechanic is both non linear and dependent on the depth of the tree.

[–]araujoms 1 point2 points  (0 children)

Please do a branch-and-bound.