Re: [Jprogramming] Advent of Code Day 19

2022-01-11 Thread Stefan Baumann
On Mon, Jan 10, 2022 at 8:20 PM Raul Miller wrote: > Hmm... > > I like your use of reference rotations R. And, your approach to > combining what were a bunch of different steps in mine looks nice. (It > takes a bit longer this way, but for this puzzle the extra time I > needed to code up my appro

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread Raul Miller
Ah, I somehow had overlooked that part of the puzzle. Thanks, -- Raul On Mon, Jan 10, 2022 at 6:29 PM 'Mike Day' via Programming wrote: > > Perhaps we’re not talking about the same thing. I was using this bit of the > problem description: > “By finding pairs of scanners that both see at leas

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread 'Mike Day' via Programming
Perhaps we’re not talking about the same thing. I was using this bit of the problem description: “By finding pairs of scanners that both see at least 12 of the same beacons, you can assemble the entire map” So for each scanner I found its inter-beacon distances, which are independent of th

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread Raul Miller
On Mon, Jan 10, 2022 at 1:17 PM 'Michael Day' via Programming wrote: > You mentioned looking for 67 or 68 of the same beacon distances. My > criterion was >: 66, iirc, since 12 matching distinct points would have > 66 = 11.12%2 pairs of non-zero distances. Actually, I was looking for at least

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread Raul Miller
Hmm... I like your use of reference rotations R. And, your approach to combining what were a bunch of different steps in mine looks nice. (It takes a bit longer this way, but for this puzzle the extra time I needed to code up my approach is far more of a problem.) But how did you come up with 12

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread 'Michael Day' via Programming
Thanks for this and for the previously undefined "cross" in another post. I now see why I got 48 rotations rather than 24 - I hadn't taken on board that all scanners used the "same" coord system,  which others have interpreted as all using the same parity. You mentioned looking for 67 or 68 of

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread Stefan Baumann
Main insight here was that with any beacon being scanned from scanners 0 and s it holds that b₀ = Tₛ + bₛ*Rₛ with b₀, bₛ being the beacons coordinates relative to 0, s resp., Tₛ is s' translation vector and Rₛ the cube rotation matrix belonging to s. This means Tₛ = b₀ - bₛ*Rₛ and we can calculat

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread 'Mike Day' via Programming
Well, I was using my right hand/ lh/ 2 fingers & thumb, a la Faraday, for insight! Didn’t help! Mike Sent from my iPad > On 10 Jan 2022, at 04:54, Raul Miller wrote: > > I should perhaps clarify -- since there's no actual physical > coordinates involved here. I am using "left handed" and "ri

Re: [Jprogramming] Advent of Code Day 19

2022-01-10 Thread 'Mike Day' via Programming
Sure. Sorry, excuse my phrasing; that’s what I meant but didn’t express clearly! Ciao, Mike Sent from my iPad > On 10 Jan 2022, at 03:21, Pierpaolo Bernardi wrote: > >> Il giorno 9 gennaio 2022, alle ore 20:56, 'Michael Day' via Programming >> ha scritto: >> >> Chat really, but I think

Re: [Jprogramming] Advent of Code Day 19

2022-01-09 Thread Raul Miller
I should perhaps clarify -- since there's no actual physical coordinates involved here. I am using "left handed" and "right handed" to refer to what should maybe be labeled as the parity of the axes of the coordinate system. I really need better vocabulary for talking about these distinctions. Th

Re: [Jprogramming] Advent of Code Day 19

2022-01-09 Thread Raul Miller
Also, ... I believe that that cross product is a right handed cross product. It would be interesting to think about what would need to change to make a left handed cross product work (for example, the cross product implementation in the complete tensor essay in the wiki). (I had thought that I was

Re: [Jprogramming] Advent of Code Day 19

2022-01-09 Thread Pierpaolo Bernardi
Il giorno 9 gennaio 2022, alle ore 20:56, 'Michael Day' via Programming ha scritto: >Chat really,  but I think it still belongs here. >I've just had another look at the performance stats for day 19. The numbers >solving parts 1 & 2 are 15420 and 236, respectively., at the time of >typing. >Weir

Re: [Jprogramming] Advent of Code Day 19

2022-01-09 Thread Raul Miller
Oops, I thought I had included that in my message. My apologies: NB. from https://code.jsoftware.com/wiki/Phrases/Matrices cross=:(1 _1 1 * 1 (-/ . *)\. ])@,. Good question, thanks. -- Raul On Sun, Jan 9, 2022 at 9:49 AM 'Michael Day' via Programming wrote: > > Raul, would you mind defining

Re: [Jprogramming] Advent of Code Day 19

2022-01-09 Thread 'Michael Day' via Programming
Chat really,  but I think it still belongs here. I've just had another look at the performance stats for day 19. The numbers solving parts 1 & 2 are 15420 and 236, respectively., at the time of typing. Weird - once you've done part 1,  there's hardly anything further to do in part 2 ! Perhaps

Re: [Jprogramming] Advent of Code Day 19

2022-01-09 Thread 'Michael Day' via Programming
Raul,  would you mind defining cross?  I've tried */ and (+/  .  *) but neither seem to work for me,  and I'm not sure what you mean. As I said a few days ago,  I gave up wondering why I'd found 48 rotations when they asked for 24,  couldn't grasp what the meant by facing" and resorted to matr

Re: [Jprogramming] Advent of Code Day 19

2022-01-09 Thread Raul Miller
Here's a better 'relori', in my opinion: NB. y: scans from two scanners relori=: {{ sigs=: signature each y upsigs=: 0-.~(~. #~ 2 = #/.~) ;~.@,each sigs masks=: (* wrote: > > https://adventofcode.com/2021/day/19 > > Like a variety of my work on previous days, my code here is rather > bulky.