Janne Mattila

From programmer to programmer -- Programming just for the fun of it

My Advent of Code 2023 visualizations

Posted on: December 29, 2023

Advent of Code 2023 is now over. 25 days of intense coding puzzles behind us. I’m sure every participant learned something new, and I can assure you that I did.

Before Advent of Code 2023 started, I wrote about it in this blog and mentioned that I haven’t done many visualizations for my solutions over the years.

This year I took another approach and tried to build as many visualizations as time permitted.

So, here are my visualizations for Advent of Code 2023:

Day 11

Day 14

Day 16

Day 17

Day 18

Day 20

Snippet from the above mermaid diagram:

stateDiagram-v2
    classDef red fill:#f00,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
    classDef green fill:#0f0,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
    classDef green2 fill:#0f0,color:black,font-weight:bold,stroke-width:2px,stroke:yellow
    classDef blue fill:#00f,color:white,font-weight:bold,stroke-width:2px,stroke:yellow
    class rx red
    class gq green
    class xj green2
    class qs green2
    class kz green2
    class km green2
    
    dj --> fj
    dj --> jn
    xz --> cm
    fn --> rj
    fv --> nt
    fv --> zp

Day 23

Day 25

Mermaid is a great tool for creating diagrams as seen in the above day 20 visualization. I tried to use it for day 25 as well but learned that there were too many data points to successfully visualize my dataset using it.

In the discussions I learned about Graphviz and then GraphvizOnline which seemed to work just fine:

Zoomed in for the critical part:

Here is a snippet on how you can also generate similar graphs:

graph G {
  dlk -- skp;
  dlk -- knc;
  dlk -- vqm;
  dlk -- nnh;
  dlk -- prk;
  dlk -- kkl;
  dlk -- hpk;
  skp -- rrz;
  skp -- sjh;
  skp -- rfn;
}

Community visualizations

Nothing in the above compares to the many community visualizations.

To show level of the visualizations from the community, here’s Advent of Code 2023, visualizations (all days) by Guillaume Brunerie:

In closing

Huge appreciation to Eric Wastl for creating such an amazing event. I can’t even imagine how much work it takes to create all the puzzles and the stories.

Now I have to go to the previous events and try to solve those remaining 52 puzzles that are still unsolved for me.

See you next year!