chiark / gitweb /
Ben Harris [Fri, 14 Jun 2024 08:18:06 +0000 (09:18 +0100)]
23b done
Ben Harris [Thu, 13 Jun 2024 22:31:22 +0000 (23:31 +0100)]
23a: Stop showing the map, which makes it slightly faster
Ben Harris [Thu, 13 Jun 2024 22:26:42 +0000 (23:26 +0100)]
23a done
Ben Harris [Sat, 8 Jun 2024 09:09:11 +0000 (10:09 +0100)]
23a: prettier proposal generators
Ben Harris [Sat, 8 Jun 2024 08:53:29 +0000 (09:53 +0100)]
23a round 1 done
Ben Harris [Tue, 28 May 2024 08:32:22 +0000 (09:32 +0100)]
19b done
(committed late because I forgot)
Ben Harris [Thu, 6 Jun 2024 22:49:00 +0000 (23:49 +0100)]
23a: all proposals generated
But how to merge them?
Ben Harris [Thu, 6 Jun 2024 18:24:02 +0000 (19:24 +0100)]
23a prep
Ben Harris [Thu, 6 Jun 2024 14:07:52 +0000 (15:07 +0100)]
22b done
First time it ran to completion, it gave the right answer
Ben Harris [Wed, 5 Jun 2024 19:26:22 +0000 (20:26 +0100)]
22b: half-working boundary walking
We can handle only the case where the next edge is the one we want
Ben Harris [Tue, 4 Jun 2024 13:41:34 +0000 (14:41 +0100)]
22b: move padding into Main and pad much more
I'm going to want a whole face's worth of padding all round, and at the
moment only Main knows how big the faces are.
Ben Harris [Sat, 1 Jun 2024 16:58:23 +0000 (17:58 +0100)]
22b structural tweaks
Still solves part 1
Ben Harris [Sat, 1 Jun 2024 16:49:48 +0000 (17:49 +0100)]
22b: pad map so we can detect falling off
Ben Harris [Sat, 1 Jun 2024 14:16:29 +0000 (15:16 +0100)]
22a works on example
Ben Harris [Sat, 1 Jun 2024 11:12:27 +0000 (12:12 +0100)]
22a: initial position and a debug display
Ben Harris [Sat, 1 Jun 2024 09:29:40 +0000 (10:29 +0100)]
22a input parsed
Ben Harris [Fri, 31 May 2024 21:05:43 +0000 (22:05 +0100)]
21b done
Ben Harris [Fri, 31 May 2024 18:52:00 +0000 (19:52 +0100)]
21b that does something useful
It constructs a function to evaluate the result, so then we can make
it depend on the human's number.
Ben Harris [Fri, 31 May 2024 13:01:24 +0000 (14:01 +0100)]
21a: pull out opcode decoding
Ben Harris [Fri, 31 May 2024 12:52:20 +0000 (13:52 +0100)]
21a simplified
Less cleverness, more flexibility for 21b
Ben Harris [Fri, 31 May 2024 08:59:11 +0000 (09:59 +0100)]
21a done
Ben Harris [Fri, 31 May 2024 08:13:15 +0000 (09:13 +0100)]
20b done
The problem was that my input included repeated numbers, so I needed to
keep track of which instance of a repeated number I was moving. I
achieved this by applying the mixing operation to a list of indices into
the original array, looking up shift amounts in the original array and
translating back to the original values at the end.
Ben Harris [Thu, 30 May 2024 20:25:29 +0000 (21:25 +0100)]
20: trivial simplification
Ben Harris [Thu, 30 May 2024 20:24:19 +0000 (21:24 +0100)]
20b: working on the example
But not the real input
Ben Harris [Thu, 30 May 2024 19:45:16 +0000 (20:45 +0100)]
20a done
Thanks to cardboard Verity for providing the answer, which is that it
doesn't matter where the start of the list is: everything treats it as
circular.
Ben Harris [Thu, 30 May 2024 13:38:42 +0000 (14:38 +0100)]
20a: slight simplification
Ben Harris [Thu, 30 May 2024 13:32:51 +0000 (14:32 +0100)]
20a example OK
Fails on the real input though.
Ben Harris [Wed, 29 May 2024 12:59:41 +0000 (13:59 +0100)]
20a closer
Now the only problem is when a number lands precisely on the boundary.
Ben Harris [Wed, 29 May 2024 09:37:48 +0000 (10:37 +0100)]
20a doesn't work
It's a pretty solution, but the problem statement has different ideas
about what moving an element past the end of the list means.
Ben Harris [Tue, 28 May 2024 08:26:34 +0000 (09:26 +0100)]
19a even faster
Merging the two "is it worth it?" checks.
Ben Harris [Tue, 28 May 2024 08:17:30 +0000 (09:17 +0100)]
19a: much faster
We now don't build a robot if our production rate of it resource is
enough to build a new robot of the most expensive kind every minute.
Ben Harris [Mon, 27 May 2024 13:16:38 +0000 (14:16 +0100)]
19a: correct maximum-cost calculation
Ben Harris [Mon, 27 May 2024 12:51:44 +0000 (13:51 +0100)]
19a done
Ben Harris [Mon, 27 May 2024 10:40:14 +0000 (11:40 +0100)]
19a gets the example blueprint 1 right
Takes 17.8 seconds to do so.
Ben Harris [Mon, 27 May 2024 10:00:03 +0000 (11:00 +0100)]
19a: this approach almost works
But not close enough to continue with it.
Ben Harris [Sun, 26 May 2024 13:26:54 +0000 (14:26 +0100)]
19b done
Ben Harris [Sun, 26 May 2024 07:24:11 +0000 (08:24 +0100)]
16a: use fact that ⍟ can take an array of repetition counts
Ben Harris [Sat, 25 May 2024 23:12:29 +0000 (00:12 +0100)]
18a: comment correction
Ben Harris [Sat, 25 May 2024 23:09:14 +0000 (00:09 +0100)]
18a done
Ben Harris [Sat, 25 May 2024 22:35:24 +0000 (23:35 +0100)]
17b finally done
I got confused and forgot that jets didn't reset for each rock. Once
that was fixed it was only a bit slow.
Ben Harris [Sat, 25 May 2024 21:22:22 +0000 (22:22 +0100)]
17b works on example
Ben Harris [Sat, 25 May 2024 10:15:20 +0000 (11:15 +0100)]
17a done
Ben Harris [Tue, 21 May 2024 21:10:06 +0000 (22:10 +0100)]
17a starting to work
need to not restart jet sequence for each rock, though
Ben Harris [Tue, 21 May 2024 19:10:31 +0000 (21:10 +0200)]
16b done
A little light memoization did the trick (but 27s CPU time!)
Ben Harris [Tue, 21 May 2024 15:36:56 +0000 (17:36 +0200)]
16a done
Ben Harris [Tue, 21 May 2024 15:24:55 +0000 (17:24 +0200)]
16a: example completes in reasonable time
Ben Harris [Tue, 21 May 2024 11:00:36 +0000 (13:00 +0200)]
16a: faster search, now 19 levels in a minute
Ben Harris [Tue, 21 May 2024 10:38:32 +0000 (12:38 +0200)]
16a: correct but slow exhaustive search
Ben Harris [Tue, 21 May 2024 09:08:29 +0000 (11:08 +0200)]
15b done
Utter mess with lots of debugging, which I've left in for posterity.
Ben Harris [Wed, 15 May 2024 15:53:02 +0000 (17:53 +0200)]
15b: found constraining beacons
Ben Harris [Wed, 15 May 2024 14:45:39 +0000 (15:45 +0100)]
15a done
Ben Harris [Wed, 15 May 2024 10:34:46 +0000 (11:34 +0100)]
15a: input parsing
Ben Harris [Tue, 14 May 2024 16:19:58 +0000 (17:19 +0100)]
14b done
I dodged the bug by sticking the floor on by simpler means.
Ben Harris [Tue, 14 May 2024 15:12:30 +0000 (16:12 +0100)]
14b kind of works but gives weird internal CBQN errors
Ben Harris [Tue, 14 May 2024 14:58:00 +0000 (15:58 +0100)]
14a done
Ben Harris [Tue, 14 May 2024 12:16:38 +0000 (13:16 +0100)]
14a: map constructed
Ben Harris [Tue, 14 May 2024 06:45:01 +0000 (07:45 +0100)]
14a: short-circuit boolean ops because I think I'll need them
Ben Harris [Mon, 13 May 2024 20:03:39 +0000 (21:03 +0100)]
13b done
Ben Harris [Mon, 13 May 2024 19:43:28 +0000 (20:43 +0100)]
13a working on the example but probably subtly wrong
Ben Harris [Mon, 13 May 2024 13:33:52 +0000 (14:33 +0100)]
13a: most of the list parser done
Ben Harris [Sun, 12 May 2024 10:57:52 +0000 (11:57 +0100)]
12: factorise contruction of can_go_x arrays somewhat
Ben Harris [Sun, 12 May 2024 10:41:46 +0000 (11:41 +0100)]
12: Use the primitive •_while_: it's actually easier to understand
Ben Harris [Sun, 12 May 2024 10:19:46 +0000 (11:19 +0100)]
12b done
Ben Harris [Sun, 12 May 2024 10:08:51 +0000 (11:08 +0100)]
12a done
Ben Harris [Sat, 11 May 2024 10:53:52 +0000 (11:53 +0100)]
11a: faster Inspect copied back from 11b
Ben Harris [Sat, 11 May 2024 09:58:31 +0000 (10:58 +0100)]
11a and 11b done
Ben Harris [Fri, 10 May 2024 08:41:26 +0000 (09:41 +0100)]
10b done
Ben Harris [Fri, 10 May 2024 08:10:18 +0000 (09:10 +0100)]
10a done
Ben Harris [Thu, 9 May 2024 13:00:31 +0000 (14:00 +0100)]
09: prep cleanup
Ben Harris [Thu, 9 May 2024 12:49:19 +0000 (13:49 +0100)]
09b done
Ben Harris [Thu, 9 May 2024 12:43:49 +0000 (13:43 +0100)]
09a: restructure to calculate head and tail paths separately
Ben Harris [Thu, 9 May 2024 12:34:55 +0000 (13:34 +0100)]
09a: split head and tail steps
Ben Harris [Thu, 9 May 2024 08:40:52 +0000 (09:40 +0100)]
09a done
Ben Harris [Thu, 9 May 2024 08:35:56 +0000 (09:35 +0100)]
09a working on example
Ben Harris [Thu, 9 May 2024 08:25:58 +0000 (09:25 +0100)]
09a: successfully tracing path using fold
Ben Harris [Wed, 8 May 2024 13:37:29 +0000 (14:37 +0100)]
08: explicitly construct rotations as powers of ⌽∘⍉
Ben Harris [Wed, 8 May 2024 13:29:16 +0000 (14:29 +0100)]
08: rotate maps rather than mirroring
This is now consistent across 08a and 08b.
Ben Harris [Wed, 8 May 2024 13:26:13 +0000 (14:26 +0100)]
08b done
Ben Harris [Wed, 8 May 2024 08:29:13 +0000 (09:29 +0100)]
08a done
Ben Harris [Tue, 7 May 2024 21:26:37 +0000 (22:26 +0100)]
07: slight cleanups though I'm still not happy
Ben Harris [Tue, 7 May 2024 20:27:47 +0000 (21:27 +0100)]
07b done (also slight readability improvement in 07a
Ben Harris [Tue, 7 May 2024 20:17:59 +0000 (21:17 +0100)]
07a done
Ben Harris [Tue, 7 May 2024 18:24:54 +0000 (19:24 +0100)]
07a: store paths in the normal order (root to leaf)
Ben Harris [Tue, 7 May 2024 12:41:01 +0000 (13:41 +0100)]
07a: extract only regular files
Ben Harris [Tue, 7 May 2024 12:36:44 +0000 (13:36 +0100)]
07a: got a list of files with full paths
Ben Harris [Tue, 7 May 2024 08:14:37 +0000 (09:14 +0100)]
07a trivial CLI that can cd
Ben Harris [Mon, 6 May 2024 19:46:50 +0000 (20:46 +0100)]
06: simplify code to use monadic / (Indexes)
Ben Harris [Mon, 6 May 2024 05:43:02 +0000 (06:43 +0100)]
06b done
Ben Harris [Mon, 6 May 2024 05:42:18 +0000 (06:42 +0100)]
06a: parameterise main block by length of marker
Ben Harris [Mon, 6 May 2024 05:37:18 +0000 (06:37 +0100)]
06a gratuitously more tacit version
Ben Harris [Mon, 6 May 2024 05:36:27 +0000 (06:36 +0100)]
06a done
Ben Harris [Sun, 5 May 2024 15:26:05 +0000 (16:26 +0100)]
05: simpler Prep
Ben Harris [Sun, 5 May 2024 12:13:43 +0000 (13:13 +0100)]
05b: remove a comment that only applied to 05a
Ben Harris [Sun, 5 May 2024 12:12:27 +0000 (13:12 +0100)]
05a: another place where a scalar can be automatically promoted
Ben Harris [Sun, 5 May 2024 12:09:48 +0000 (13:09 +0100)]
05a: slightly simpler Prep1Proc
Ben Harris [Sun, 5 May 2024 12:07:17 +0000 (13:07 +0100)]
05b done
Ben Harris [Sun, 5 May 2024 11:58:41 +0000 (12:58 +0100)]
05a: slightly prettier ExecuteMove
Ben Harris [Sun, 5 May 2024 11:55:56 +0000 (12:55 +0100)]
05a done
Ben Harris [Sun, 5 May 2024 11:32:25 +0000 (12:32 +0100)]
Tidy up and comment map prep in 05a
Ben Harris [Sun, 5 May 2024 10:28:33 +0000 (11:28 +0100)]
Prep for 05a