Follow TV Tropes

Following

Website / Advent of Code

Go To

Advent of Code is a programming puzzle website created by Eric Wastl.

The site first opened in 2015, and a new season is held every year, with the puzzles from the previous seasons still available.

During each season, a new puzzle is revealed every day (just like any Advent calendar) from 1st Dec to 25th Dec, starting easy and getting progressively harder. Each puzzle consists of two parts, each part rewarding a star for successful completion. The first part must be solved to reveal the second part, which usually continues on or provides a twist on the first part. Thus there are a total of 50 stars to collect every season.

Each puzzle has a small backstory, and starting with the 2016 season, there is an overall narrative tying them together. Some puzzles also contain computer science jokes and shout-outs.

  • 2015: Although there is the overall objective to collect stars to power Santa's snow machine, the stories of the individual puzzles don't form an overall story and are just random Christmas-themed small stories. Some of them do form small arcs (6 with 18, as well as 21 with 22).
  • 2016: You need the stars for the clock that guides Santa's sleigh, and you must infiltrate the Easter Bunny HQ to retrieve the stolen stars.
  • 2017: You get digitized and must solve tasks for various programs inside Santa's printer such that it can print the Naughty/Nice list.
  • 2018: You must travel back in time to resolve temporal anomalies and save Christmas.
  • 2019: You must go on a space trip to save Santa who is stranded at the edge of the Solar System.
  • 2020: You take a vacation on a tropical island and encounter various challenges during your travel via toboggan, plane, train, bus and boat.
  • 2021: An elf drops the sleigh keys into the ocean and you must descend in a submarine to retrieve them, meeting various aquatic creatures on the way.
  • 2022: Santa's reindeer require energy from a magical star fruit for delivering presents. You accompany the elves on their expedition to the grove where the fruit grow.
  • 2023: You've been assigned to investigate why something has gone wrong with global snow production. In the course of your investigation, you visit five floating islands in the sky.

The puzzles can be completed in any programming language (or even other tools such as Excel), as only the output needs to be entered to the site. The input to the puzzle is randomized for each user to avoid people simply copy-pasting the answer.

Typical puzzles include (some of these overlap):


Advent of Code contains examples of:

  • Alliterative Title: All the puzzles in the 2020 season... except the very last one which is appropriately titled Combo Breaker.
  • Anti-Frustration Features:
    • Day 25 of every season is actually a one-part problem, the second part merely gives you a free star and acts as a check whether you have all the other stars, "solving" the second part unlocks the ending. The day 25 puzzle is also generally simpler than what the usual difficulty curve would predict. This is probably because 25 Dec is Christmas Day and you'd be better off celebrating than solving programming puzzles.
    • Depending on the format of the answer, the site may give additional information about a wrong answer, such as whether it's too high or too low, or whether it matches someone else's correct answer (which might indicate you've accidentally copied someone else's input when looking for help with the problem).
  • Arc Number
    • Twenty-five, because Christmas falls on December 25th and there are 25 days of puzzles.
    • Fifty, the number of available stars each year (two per day).
    • The two- or four-digit year tends to show up multiple times throughout the puzzles for that year.
  • ASCII Art: The entire site is designed to evoke the retro style of an ANSI-enabled terminal. Even the glow effects on the bolded text can be considered to be intended to emulate the phosphorescent glow from a CRT display. Other than its favicon, the site uses no actual graphics at all, relying on ASCII art to display charts or other graphical represetations in puzzle text. Until 2023, the retro-terminal look was only broken by the fully-completed calendars, which use effects that would not be possible for ANSI displays. In 2023, those effects start appearing sooner.
  • Big Bad: The Easter Bunny, explicitly for 2016 and implicitly for other seasonsnote .
  • Broken Bridge: Frequently the path to your character's destination is blocked until you solve a puzzle. More often than not, it's one that has nothing to do with your actual objective, but which you do for someone else in exchange for their help.
  • Cosmetic Award: Each puzzle solved progresses the Advent calendar on the main page. Once all 50 stars are collected, the calendar is shown in its full animated glory. The picture on the calendar relates to the story of the season:
    • 2015: Just a Christmas tree (as there is no overall story), snow falling, Santa in his sleigh flying in the background.
    • 2016: The Easter Bunny HQ campus with 3 office buildings and lit up antenna, snow falling, Santa in his sleigh flying in the background.
    • 2017: The circuitry inside Santa's printer. The various chips are references to electronics concepts but some of them are shout outs to movies such as Back to the Future or WarGames. Additionally a personalized Naughty/Nice list is printed at the top, with the Easter Bunny as "naughty" and your name as "nice", and if you are on a private leader board, names from there are randomly picked and added as either naughty or nice.
    • 2018: Santa's hat, sleigh, a candy cane, hot chocolate, and a red-nosed reindeer appear at the North Pole. A slowly rotating image of a mug appears amid the twinkling stars.
    • 2019: Planetary orbits. Completing the calendar fills in the Sun to the left and adds an animated dot indicating your spaceship's journey.
    • 2020: The map of your journey from the North Pole to the tropical island. At the end, a tropical storm appears and a sea monster starts swimming around in the ocean.
    • 2021: A cross section of the ocean and a cave.
    • 2022: A jungle featuring a bridge, a river, and an erupting volcano, with hot air balloons slowly floating across the sky.
  • 2023: Five floating islands in the sky, each with a different biome: ice, tropical, desert, mechanical, and lava.
  • Cyber Space: The theme of the 2017 season.
  • Early-Installment Weirdness: The puzzles in the first season (2015) didn't have a connected plot like in the later years. They also tended to be simpler in construction (and tended to be easier to solve overall, though your mileage may vary); a number are just basic setups for "classic" programming problems like the Traveling Salesman.
  • Easter Egg: Each puzzle has a word or phrase with hidden title text. Once you solve all the puzzles in a season, these are revealed with a dotted line.
  • Excuse Plot: While the plot is fun, ignoring it will not impede your ability to solve the puzzles in any way.
  • Fetch Quest: Many times, your character is obliged to help various elves (and occasionally others) with their problems before you can make progress on your objective. Sometimes you have to wait for something and perform another task to help someone else simply to pass the time.
  • Fox-Chicken-Grain Puzzle: 2016-11, specifically a generalization of the "jealous husbands" variant.
  • I'm a Doctor, Not a Placeholder: Inverted by a character for 2017-25: "I'm a garbage collector, not a doctor."
  • Recursive Reality: 2019-20 and 2019-24; part 2 involves nesting copies of the maze/grid into itself, Russian Doll style, an arbitrarily large number of times. Apparently a feature of Plutonian architecture (to help save space)
  • Shout-Out:
  • The Treachery of Images: 2021-7. The title is a subtle reference to an Easter Egg which can be found by feeding the input into the Intcode intepreter that is used for several puzzles in the 2019 season. This will generate the output Ceci n'est pas une intcode program.
  • Time Travel: In the 2018 season. Your device is only able to jump back 500 years at a time, therefore you end up visiting 1518, 1018, 518, 18 and 483 BC before causing an integer underflow in time itself to end up back in 2018.

Top