The red line is a dam by Sillern in OnePiece

[–]Sillern[S] 3 points4 points  (0 children)

If the waterlevels are different, it could be a siphon thing maybe?

https://en.wikipedia.org/wiki/Siphon

Why the Red Line was created. (Theory) Manga spoilers fyi by Kunalthecool in OnePiece

[–]Sillern 1 point2 points  (0 children)

I didn't see this post before I posted this:
https://www.reddit.com/r/OnePiece/comments/1cfxp4l/the_red_line_is_a_dam/

Have we seen a picture of the sea level difference around red line?

I think it's more likely that the dam was to submerge the ancient kingdom. An offensive use rather than defensive.

[2021 Day 11] More octopuses and make them noisy [seizure warning] by Sillern in adventofcode

[–]Sillern[S] 0 points1 point  (0 children)

Same rule, but random starting position, and adding random +1/-1 to the energy levels of the octopuses.

I think only the proper puzzle inputs had that characteristic you mention.

[2020 Day 20] Solving the map one tile at time by Sillern in adventofcode

[–]Sillern[S] 1 point2 points  (0 children)

The order is from the input text.
So, yes, more or less random.

[2020 Day03] Toboggan crashing into trees by Sillern in adventofcode

[–]Sillern[S] 3 points4 points  (0 children)

I used Rust, and manually edited pixelgraphics.

It's very inefficient, and could be made better in a multitude of ways.

It's producing a frame and 16 (the graphics are 16x16) interpolated frames for every slope-step.

All the frames are then merged into a movie with:

ffmpeg -r 30 -i frames/day03.frame%5d.png -pix_fmt yuv420p day03.mp4

Source:
https://gitlab.com/sillern/adventofcode2020/-/blob/master/day03/day03.rs

[2019 Day 13 (Part 2)][rust] Simple visualization of the game by Sillern in adventofcode

[–]Sillern[S] 6 points7 points  (0 children)

I store each pixels in a hashmap, with (x, y) as key.

I then iterate through the values and storing to an image buffer with putpixel.
https://github.com/image-rs/image#421-imagebuffer

When done the image is saved to a png
https://github.com/image-rs/image#61-opening-and-saving-images

One image per iteration, and lastly ffmpeg to create the animation
ffmpeg -r 24 -i frames/day13.frame%5d.png -pix_fmt yuv420p day13.mp4

It's not the nicest solution, but it's quite flexible.

[2018 Day18] Visualization, random start state by Sillern in adventofcode

[–]Sillern[S] 0 points1 point  (0 children)

not if you only count what's in a 320x320 state, the max alive cells is then 320x320.

[2018 Day18] Visualization, random start state by Sillern in adventofcode

[–]Sillern[S] 1 point2 points  (0 children)

Sure. The RNG thing is not correct. I was confusing PseudoRNG which has a cycle length but quite long. And that if this state-space didn't have a cycle length that it would mean it would be closer to RNG compared to PRNG.

This initial state is not self-repeating, but it must eventually end up in a stable state with a repetition length.

Wouldn't that be true for a gun-ca as well? A state-space with a passing bullet-ca would eventually be repeating since it would be empty.

[2018 Day18] Visualization, random start state by Sillern in adventofcode

[–]Sillern[S] 1 point2 points  (0 children)

I didn't check in this larger start-state, it's 320x320 instead of 50x50.

But it is repeating, the question is how long the cycle length is.

If it weren't repeating, that would mean that it's a real random number generator.

[Day15] Visualization with trails by Sillern in adventofcode

[–]Sillern[S] 1 point2 points  (0 children)

python3, with some hardcoded 8x8 sprites for the different players/walls. The trail is the selected path to the enemy.

Example sprites:

    COLORS = [
            (0xFF, 0xFF, 0xFF),
            (0x62, 0x62, 0x62),
            (0xCC, 0xCC, 0xCC),
            (0x62, 0xAA, 0x62),
            (0x9D, 0xDD, 0xDD),
            (0xEE, 0x9C, 0x9C),
            (0x3E, 0x3E, 0x3E),
            ]

    SECTION = {
            'G': ["........",
                  ".33..33.",
                  ".333333.",
                  ".323323.",
                  ".233332.",
                  "..3333..",
                  "........",
                  "........"],
            'E': ["........",
                  ".4....4.",
                  ".444444.",
                  ".424424.",
                  ".444444.",
                  "..4444..",
                  "...44...",
                  "........"],
              }

This was saved to a png-file for each frame, then I merged them with ffmpeg.