From 415f51ebad22b1ab890068cad13293489af577a7 Mon Sep 17 00:00:00 2001 From: Adam Spragg Date: Tue, 20 Dec 2022 14:45:19 +0000 Subject: First attempt at puzzle 19 part 1 (buggy) It produces *a* result for each blueprint, but not the best result. I feel like that's a hard problem. The number of decisions about what to build when over 24 iterations explodes so much that you can't brute-force the optimal geode count. Either there's a way of pruning possibilities that I've not thought of, or there's a pretty good heuristic you can get from the blueprint about the proportions of how many of each type of material you want to be producing, that you can pick what to build and get a geode count that doesn't deviate from optimal in only 24 iterations. One other possibility is transforming this puzzle into a SAT format and letting a SAT solver attack it, with its ability to prune decision trees effectively. But I don't have any actual experience with those, and I'm not sure I have time to figure that out for AoC. https://en.wikipedia.org/wiki/SAT_solver --- makefile | 1 + 1 file changed, 1 insertion(+) (limited to 'makefile') diff --git a/makefile b/makefile index 2a45609..5b108f6 100644 --- a/makefile +++ b/makefile @@ -20,6 +20,7 @@ all: bin \ bin/16 \ bin/17 \ bin/18 \ + bin/19 \ bin: mkdir -p $@ -- cgit v1.2.1