In 16-bit real mode assembly, as a hybrid DOS .COM program and BIOS-bootable disk image. With bonus palette animations! I had the hybrid thing going on before (see the repo), but this is the first time getting something animated.
Well it uses the input of course but I found that if you make it truly random, the lines mostly go down in a straight line, all bunching up in the middle, which isn't very pleasing. So now the beams have a "current direction" which has a 25% of flipping at every splitter
I used a u8, one bit per level to do mine, but because not all bits correspond to a splitter, it ends up duplicating a lot of the paths. Which is why I made the lowest bit at the top, so it flip-flops a lot, giving the appearance of multiple different paths :D
If I understand correctly, your visualization shows up to to 256 unique paths then?
In this one, every time the beam passes a splitter, the other side is put on a queue, so eventually all possible paths are traced, breadth first. Initially I worked through the options recursively, but that depth-first filling out was boring to look at.
Yeah, max of 256 paths, and if there were no holes in the splitter layout, it would be the full 256. Also why i had to limit the depth to 16 layers, more than that and the brute forcing gets a bit silly.
Correction, turns out doing it entirely in Excel was the answer for me. The points I found were correct, but the area calculation in my code was wrong.
I had to visualize it before I could even attempt to solve it. Still did it mostly intuitively based on the visualization.
Squeezing all spaces out of the grid (and plotting at right-angles to the other visualisation here) gives this evil shape, which will doubtless haunt my dreams tonight.
The graph of Day 11, created with very little effort using the dot utility of graphviz. Because of a stupid parsing error I ended up with a cyclic graph, so this visualization helped in debugging.
I can probably improve this a lot, but I was afraid I'll be too lazy after getting this far, so posting as is. Still, lmk if you have any suggestions :)
I know I'm late, but I'd thought, I'd share some of my day 12 visualizations I wanted to see.
Here's my shapes with symmetries:
Here's some of the solutions found in a greedy manner:
The visuals are terminal based, for simple cells I used two spaces with colored background and for solutions I also used braille symbols to better delineate distinctions between cells.
37 Comments
strlcpy@lemmy.sdf.org · 7 pts · 242d
In 16-bit real mode assembly, as a hybrid DOS .COM program and BIOS-bootable disk image. With bonus palette animations! I had the hybrid thing going on before (see the repo), but this is the first time getting something animated.
Repo | day07.com (12 KB) | full video
CameronDev@programming.dev · 2 pts · 242d
That's awesome, is it just random paths?
strlcpy@lemmy.sdf.org · 3 pts · 242d
Well it uses the input of course but I found that if you make it truly random, the lines mostly go down in a straight line, all bunching up in the middle, which isn't very pleasing. So now the beams have a "current direction" which has a 25% of flipping at every splitter
CameronDev@programming.dev · 1 pts · 242d
I used a u8, one bit per level to do mine, but because not all bits correspond to a splitter, it ends up duplicating a lot of the paths. Which is why I made the lowest bit at the top, so it flip-flops a lot, giving the appearance of multiple different paths :D
strlcpy@lemmy.sdf.org · 2 pts · 242d
If I understand correctly, your visualization shows up to to 256 unique paths then?
In this one, every time the beam passes a splitter, the other side is put on a queue, so eventually all possible paths are traced, breadth first. Initially I worked through the options recursively, but that depth-first filling out was boring to look at.
CameronDev@programming.dev · 1 pts · 242d
Yeah, max of 256 paths, and if there were no holes in the splitter layout, it would be the full 256. Also why i had to limit the depth to 16 layers, more than that and the brute forcing gets a bit silly.
mykl@lemmy.world · 6 pts · 243d
If took more code to animate this than it did to solve the problem...
Looks very nice for the test data:
And...okay...for the live data:
strlcpy@programming.dev · 3 pts · 242d
I like the coloring, really cool!
mykl@lemmy.world · 2 pts · 242d
Thanks, 'Tis the season.
CameronDev@programming.dev · 2 pts · 242d
Its very festive :)
mykl@lemmy.world · 2 pts · 242d
That certainly doesn't reflect my mood today.
hades@programming.dev · 5 pts · 242d
Day 4: https://lgbt.earth/i/web/post/903630253957573252
CameronDev@programming.dev · 1 pts · 242d
Thats cool! What are the colours meant to signify?
hades@programming.dev · 2 pts · 242d
Christmas, I guess :) (I just pick a random colour each time a roll is removed)
owenfromcanada@lemmy.ca · 4 pts · 241d
Apparently this is
wrong. Not sure what I'm missing here.correct, my code was borked I guess (maybe an overflow or something?).CameronDev@programming.dev · 2 pts · 241d
First time I've seen a visualisation before solve :D
I took one look at pt2 and noped out, its a later problem I think...
owenfromcanada@lemmy.ca · 2 pts · 241d
Correction, turns out doing it entirely in Excel was the answer for me. The points I found were correct, but the area calculation in my code was wrong.
I had to visualize it before I could even attempt to solve it. Still did it mostly intuitively based on the visualization.
CameronDev@programming.dev · 1 pts · 241d
Ha, love an excel solution, please do share it in the solutions thread!
CameronDev@programming.dev · 4 pts · 243d
Day 7 - Colourised, single image.
hades@programming.dev · 2 pts · 243d
That's day 7, right?
CameronDev@programming.dev · 3 pts · 242d
Its all a blur...
CameronDev@programming.dev · 2 pts · 243d
Video of each path (for the short example, dont think i can do the long one) https://youtube.com/shorts/jLpiUOSIiNw
CameronDev@programming.dev · 1 pts · 243d
Colorised video: https://youtube.com/shorts/H_Fmf1rupGg
CameronDev@programming.dev · 1 pts · 243d
Colorised, but filling in from least photons to most: https://youtube.com/shorts/McM1yIn5UCw
CameronDev@programming.dev · 1 pts · 243d
Showing the of it filling in a bit clearer (or less clearer, i dunno): https://youtube.com/shorts/dBYAdRyhCLU
mykl@lemmy.world · 3 pts · 241d
Squeezing all spaces out of the grid (and plotting at right-angles to the other visualisation here) gives this evil shape, which will doubtless haunt my dreams tonight.
Gobbel2000@programming.dev · 3 pts · 219d
The graph of Day 11, created with very little effort using the
dotutility of graphviz. Because of a stupid parsing error I ended up with a cyclic graph, so this visualization helped in debugging.CameronDev@programming.dev · 1 pts · 219d
I was meaning to do that as well, but forgot. Nice!
CameronDev@programming.dev · 3 pts · 242d
Day 8: https://youtu.be/QiezRG4jiUM
Getting pretty close to having written my own game renderer, only slower and worse :D
CameronDev@programming.dev · 2 pts · 241d
https://youtube.com/shorts/5V9vdWtuRAQ <- Rotation, super proud of this one
CameronDev@programming.dev · 3 pts · 244d
Day 4 - https://youtube.com/shorts/8O9ypsGgApA
hades@programming.dev · 2 pts · 244d
Apart from day 4 not much to visualise so far this year :/
CameronDev@programming.dev · 2 pts · 244d
Yeah, Im hoping it picks up. No mazes yet :(
hades@programming.dev · 3 pts · 243d
Day 7 (zoom to full screen): https://lgbt.earth/i/web/post/903381501524320591
I can probably improve this a lot, but I was afraid I'll be too lazy after getting this far, so posting as is. Still, lmk if you have any suggestions :)
mr_satan@lemmy.zip · 2 pts · 204d
I know I'm late, but I'd thought, I'd share some of my day 12 visualizations I wanted to see.
Here's my shapes with symmetries:

Here's some of the solutions found in a greedy manner:





The visuals are terminal based, for simple cells I used two spaces with colored background and for solutions I also used braille symbols to better delineate distinctions between cells.
abbadon420@sh.itjust.works · 2 pts · 222d
I made a quick visualisation of my input for day 9 with matplotlib. Still haven't solved part 2 though.
CameronDev@programming.dev · 1 pts · 221d
Scales got a messy :D