chiark / gitweb /
aoc-2022.git
10 months ago23b done
Ben Harris [Fri, 14 Jun 2024 08:18:06 +0000 (09:18 +0100)]
23b done

10 months ago23a: Stop showing the map, which makes it slightly faster
Ben Harris [Thu, 13 Jun 2024 22:31:22 +0000 (23:31 +0100)]
23a: Stop showing the map, which makes it slightly faster

10 months ago23a done
Ben Harris [Thu, 13 Jun 2024 22:26:42 +0000 (23:26 +0100)]
23a done

11 months ago23a: prettier proposal generators
Ben Harris [Sat, 8 Jun 2024 09:09:11 +0000 (10:09 +0100)]
23a: prettier proposal generators

11 months ago23a round 1 done
Ben Harris [Sat, 8 Jun 2024 08:53:29 +0000 (09:53 +0100)]
23a round 1 done

11 months ago19b done
Ben Harris [Tue, 28 May 2024 08:32:22 +0000 (09:32 +0100)]
19b done

(committed late because I forgot)

11 months ago23a: all proposals generated
Ben Harris [Thu, 6 Jun 2024 22:49:00 +0000 (23:49 +0100)]
23a: all proposals generated

But how to merge them?

11 months ago23a prep
Ben Harris [Thu, 6 Jun 2024 18:24:02 +0000 (19:24 +0100)]
23a prep

11 months ago22b done
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

11 months ago22b: half-working boundary walking
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

11 months ago22b: move padding into Main and pad much more
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.

11 months ago22b structural tweaks
Ben Harris [Sat, 1 Jun 2024 16:58:23 +0000 (17:58 +0100)]
22b structural tweaks

Still solves part 1

11 months ago22b: pad map so we can detect falling off
Ben Harris [Sat, 1 Jun 2024 16:49:48 +0000 (17:49 +0100)]
22b: pad map so we can detect falling off

11 months ago22a works on example
Ben Harris [Sat, 1 Jun 2024 14:16:29 +0000 (15:16 +0100)]
22a works on example

11 months ago22a: initial position and a debug display
Ben Harris [Sat, 1 Jun 2024 11:12:27 +0000 (12:12 +0100)]
22a: initial position and a debug display

11 months ago22a input parsed
Ben Harris [Sat, 1 Jun 2024 09:29:40 +0000 (10:29 +0100)]
22a input parsed

11 months ago21b done
Ben Harris [Fri, 31 May 2024 21:05:43 +0000 (22:05 +0100)]
21b done

11 months ago21b that does something useful
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.

11 months ago21a: pull out opcode decoding
Ben Harris [Fri, 31 May 2024 13:01:24 +0000 (14:01 +0100)]
21a: pull out opcode decoding

11 months ago21a simplified
Ben Harris [Fri, 31 May 2024 12:52:20 +0000 (13:52 +0100)]
21a simplified

Less cleverness, more flexibility for 21b

11 months ago21a done
Ben Harris [Fri, 31 May 2024 08:59:11 +0000 (09:59 +0100)]
21a done

11 months ago20b 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.

11 months ago20: trivial simplification
Ben Harris [Thu, 30 May 2024 20:25:29 +0000 (21:25 +0100)]
20: trivial simplification

11 months ago20b: working on the example
Ben Harris [Thu, 30 May 2024 20:24:19 +0000 (21:24 +0100)]
20b: working on the example

But not the real input

11 months ago20a done
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.

11 months ago20a: slight simplification
Ben Harris [Thu, 30 May 2024 13:38:42 +0000 (14:38 +0100)]
20a: slight simplification

11 months ago20a example OK
Ben Harris [Thu, 30 May 2024 13:32:51 +0000 (14:32 +0100)]
20a example OK

Fails on the real input though.

11 months ago20a closer
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.

11 months ago20a doesn't work
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.

11 months ago19a even faster
Ben Harris [Tue, 28 May 2024 08:26:34 +0000 (09:26 +0100)]
19a even faster

Merging the two "is it worth it?" checks.

11 months ago19a: much faster
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.

11 months ago19a: correct maximum-cost calculation
Ben Harris [Mon, 27 May 2024 13:16:38 +0000 (14:16 +0100)]
19a: correct maximum-cost calculation

11 months ago19a done
Ben Harris [Mon, 27 May 2024 12:51:44 +0000 (13:51 +0100)]
19a done

11 months ago19a gets the example blueprint 1 right
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.

11 months ago19a: this approach almost works
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.

11 months ago19b done
Ben Harris [Sun, 26 May 2024 13:26:54 +0000 (14:26 +0100)]
19b done

11 months ago16a: use fact that ⍟ can take an array of repetition counts
Ben Harris [Sun, 26 May 2024 07:24:11 +0000 (08:24 +0100)]
16a: use fact that ⍟ can take an array of repetition counts

11 months ago18a: comment correction
Ben Harris [Sat, 25 May 2024 23:12:29 +0000 (00:12 +0100)]
18a: comment correction

11 months ago18a done
Ben Harris [Sat, 25 May 2024 23:09:14 +0000 (00:09 +0100)]
18a done

11 months ago17b finally 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.

11 months ago17b works on example
Ben Harris [Sat, 25 May 2024 21:22:22 +0000 (22:22 +0100)]
17b works on example

11 months ago17a done
Ben Harris [Sat, 25 May 2024 10:15:20 +0000 (11:15 +0100)]
17a done

11 months ago17a starting to work
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

11 months ago16b done
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!)

11 months ago16a done
Ben Harris [Tue, 21 May 2024 15:36:56 +0000 (17:36 +0200)]
16a done

11 months ago16a: example completes in reasonable time
Ben Harris [Tue, 21 May 2024 15:24:55 +0000 (17:24 +0200)]
16a: example completes in reasonable time

11 months ago16a: faster search, now 19 levels in a minute
Ben Harris [Tue, 21 May 2024 11:00:36 +0000 (13:00 +0200)]
16a: faster search, now 19 levels in a minute

11 months ago16a: correct but slow exhaustive search
Ben Harris [Tue, 21 May 2024 10:38:32 +0000 (12:38 +0200)]
16a: correct but slow exhaustive search

11 months ago15b done
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.

11 months ago15b: found constraining beacons
Ben Harris [Wed, 15 May 2024 15:53:02 +0000 (17:53 +0200)]
15b: found constraining beacons

11 months ago15a done
Ben Harris [Wed, 15 May 2024 14:45:39 +0000 (15:45 +0100)]
15a done

11 months ago15a: input parsing
Ben Harris [Wed, 15 May 2024 10:34:46 +0000 (11:34 +0100)]
15a: input parsing

11 months ago14b done
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.

11 months ago14b kind of works but gives weird internal CBQN errors
Ben Harris [Tue, 14 May 2024 15:12:30 +0000 (16:12 +0100)]
14b kind of works but gives weird internal CBQN errors

11 months ago14a done
Ben Harris [Tue, 14 May 2024 14:58:00 +0000 (15:58 +0100)]
14a done

11 months ago14a: map constructed
Ben Harris [Tue, 14 May 2024 12:16:38 +0000 (13:16 +0100)]
14a: map constructed

11 months ago14a: short-circuit boolean ops because I think I'll need them
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

11 months ago13b done
Ben Harris [Mon, 13 May 2024 20:03:39 +0000 (21:03 +0100)]
13b done

11 months ago13a working on the example but probably subtly wrong
Ben Harris [Mon, 13 May 2024 19:43:28 +0000 (20:43 +0100)]
13a working on the example but probably subtly wrong

11 months ago13a: most of the list parser done
Ben Harris [Mon, 13 May 2024 13:33:52 +0000 (14:33 +0100)]
13a: most of the list parser done

11 months ago12: factorise contruction of can_go_x arrays somewhat
Ben Harris [Sun, 12 May 2024 10:57:52 +0000 (11:57 +0100)]
12: factorise contruction of can_go_x arrays somewhat

11 months ago12: Use the primitive •_while_: it's actually easier to understand
Ben Harris [Sun, 12 May 2024 10:41:46 +0000 (11:41 +0100)]
12: Use the primitive •_while_: it's actually easier to understand

11 months ago12b done
Ben Harris [Sun, 12 May 2024 10:19:46 +0000 (11:19 +0100)]
12b done

11 months ago12a done
Ben Harris [Sun, 12 May 2024 10:08:51 +0000 (11:08 +0100)]
12a done

11 months ago11a: faster Inspect copied back from 11b
Ben Harris [Sat, 11 May 2024 10:53:52 +0000 (11:53 +0100)]
11a: faster Inspect copied back from 11b

11 months ago11a and 11b done
Ben Harris [Sat, 11 May 2024 09:58:31 +0000 (10:58 +0100)]
11a and 11b done

11 months ago10b done
Ben Harris [Fri, 10 May 2024 08:41:26 +0000 (09:41 +0100)]
10b done

12 months ago10a done
Ben Harris [Fri, 10 May 2024 08:10:18 +0000 (09:10 +0100)]
10a done

12 months ago09: prep cleanup
Ben Harris [Thu, 9 May 2024 13:00:31 +0000 (14:00 +0100)]
09: prep cleanup

12 months ago09b done
Ben Harris [Thu, 9 May 2024 12:49:19 +0000 (13:49 +0100)]
09b done

12 months ago09a: restructure to calculate head and tail paths separately
Ben Harris [Thu, 9 May 2024 12:43:49 +0000 (13:43 +0100)]
09a: restructure to calculate head and tail paths separately

12 months ago09a: split head and tail steps
Ben Harris [Thu, 9 May 2024 12:34:55 +0000 (13:34 +0100)]
09a: split head and tail steps

12 months ago09a done
Ben Harris [Thu, 9 May 2024 08:40:52 +0000 (09:40 +0100)]
09a done

12 months ago09a working on example
Ben Harris [Thu, 9 May 2024 08:35:56 +0000 (09:35 +0100)]
09a working on example

12 months ago09a: successfully tracing path using fold
Ben Harris [Thu, 9 May 2024 08:25:58 +0000 (09:25 +0100)]
09a: successfully tracing path using fold

12 months ago08: explicitly construct rotations as powers of ⌽∘⍉
Ben Harris [Wed, 8 May 2024 13:37:29 +0000 (14:37 +0100)]
08: explicitly construct rotations as powers of ⌽∘⍉

12 months ago08: rotate maps rather than mirroring
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.

12 months ago08b done
Ben Harris [Wed, 8 May 2024 13:26:13 +0000 (14:26 +0100)]
08b done

12 months ago08a done
Ben Harris [Wed, 8 May 2024 08:29:13 +0000 (09:29 +0100)]
08a done

12 months ago07: slight cleanups though I'm still not happy
Ben Harris [Tue, 7 May 2024 21:26:37 +0000 (22:26 +0100)]
07: slight cleanups though I'm still not happy

12 months ago07b done (also slight readability improvement in 07a
Ben Harris [Tue, 7 May 2024 20:27:47 +0000 (21:27 +0100)]
07b done (also slight readability improvement in 07a

12 months ago07a done
Ben Harris [Tue, 7 May 2024 20:17:59 +0000 (21:17 +0100)]
07a done

12 months ago07a: store paths in the normal order (root to leaf)
Ben Harris [Tue, 7 May 2024 18:24:54 +0000 (19:24 +0100)]
07a: store paths in the normal order (root to leaf)

12 months ago07a: extract only regular files
Ben Harris [Tue, 7 May 2024 12:41:01 +0000 (13:41 +0100)]
07a: extract only regular files

12 months ago07a: got a list of files with full paths
Ben Harris [Tue, 7 May 2024 12:36:44 +0000 (13:36 +0100)]
07a: got a list of files with full paths

12 months ago07a trivial CLI that can cd
Ben Harris [Tue, 7 May 2024 08:14:37 +0000 (09:14 +0100)]
07a trivial CLI that can cd

12 months ago06: simplify code to use monadic / (Indexes)
Ben Harris [Mon, 6 May 2024 19:46:50 +0000 (20:46 +0100)]
06: simplify code to use monadic / (Indexes)

12 months ago06b done
Ben Harris [Mon, 6 May 2024 05:43:02 +0000 (06:43 +0100)]
06b done

12 months ago06a: parameterise main block by length of marker
Ben Harris [Mon, 6 May 2024 05:42:18 +0000 (06:42 +0100)]
06a: parameterise main block by length of marker

12 months ago06a gratuitously more tacit version
Ben Harris [Mon, 6 May 2024 05:37:18 +0000 (06:37 +0100)]
06a gratuitously more tacit version

12 months ago06a done
Ben Harris [Mon, 6 May 2024 05:36:27 +0000 (06:36 +0100)]
06a done

12 months ago05: simpler Prep
Ben Harris [Sun, 5 May 2024 15:26:05 +0000 (16:26 +0100)]
05: simpler Prep

12 months ago05b: remove a comment that only applied to 05a
Ben Harris [Sun, 5 May 2024 12:13:43 +0000 (13:13 +0100)]
05b: remove a comment that only applied to 05a

12 months ago05a: another place where a scalar can be automatically promoted
Ben Harris [Sun, 5 May 2024 12:12:27 +0000 (13:12 +0100)]
05a: another place where a scalar can be automatically promoted

12 months ago05a: slightly simpler Prep1Proc
Ben Harris [Sun, 5 May 2024 12:09:48 +0000 (13:09 +0100)]
05a: slightly simpler Prep1Proc

12 months ago05b done
Ben Harris [Sun, 5 May 2024 12:07:17 +0000 (13:07 +0100)]
05b done

12 months ago05a: slightly prettier ExecuteMove
Ben Harris [Sun, 5 May 2024 11:58:41 +0000 (12:58 +0100)]
05a: slightly prettier ExecuteMove

12 months ago05a done
Ben Harris [Sun, 5 May 2024 11:55:56 +0000 (12:55 +0100)]
05a done

12 months agoTidy up and comment map prep in 05a
Ben Harris [Sun, 5 May 2024 11:32:25 +0000 (12:32 +0100)]
Tidy up and comment map prep in 05a

12 months agoPrep for 05a
Ben Harris [Sun, 5 May 2024 10:28:33 +0000 (11:28 +0100)]
Prep for 05a