Advent of Code

  • Be sure to checkout “Tips & Tricks”
    Dear Guest Visitor → Once you register and log-in:

    This forum does not automatically send notices of new content. So if, for example, you would like to be notified by mail when Steve posts an update to his blog (or of any other specific activity anywhere else), you need to tell the system what to “Watch” for you. Please checkout the “Tips & Tricks” page for details about that... and other tips!

    /Steve.
  • Larger Font Styles
    Guest:

    Just a quick heads-up that I've implemented larger font variants of our forum's light and dark page styles. You can select the style of your choice by scrolling to the footer of any page here. This might be more comfortable (it is for me) for those with high-resolution displays where the standard fonts, while permitting a lot of text to fit on the screen, might be uncomfortably small.

    (You can permanently dismiss this notification with the “X” at the upper right.)

    /Steve.

PHolder

Well-known member
Sep 16, 2020
609
2
292
Ontario, Canada
The site is very simple, but fairly advanced. It generates unique inputs for each user, so you can't submit someone else's results as your own. Also, don't assume these are easy-peasy little challenges... Some of them will be fairly straightforward, and some of them will be anything but. I did some of the challenges from last year (after the fact, because that was when I first learned about it) but stopped when I got completely stumped on a maze walking challenge and wasted a couple of days on it without progress.

I think you can still go back and do past years challenges if you want... Here's the maze one I found stumping https://adventofcode.com/2019/day/18 (warning that if you want to do all them in order, they will form a story. Additionally, some of the challenges from 2019 had you building a special virtual machine IntCode parser and you will probably have to solve those problems in order as they build on each other.)

Here's a post about last years progression live as it happened (and then eventually stopped happening) https://www.twit.community/t/advent-of-code-2019/4362/1
 
Last edited:
  • Like
Reactions: Barry Wallis

Barry Wallis

Magician in Training
Thanks for the info @PHolder. My comment about the site looking old was only about the look (which being a text RPG guy, I love). I'm prepared to see how far I get. The good news is that I am retired and have plenty of time and I'm not compulsive so if I need to put it down for a few days and come back to it (or not), I can do that too. We'll see how it goes.
 
Last edited:

PHolder

Well-known member
Sep 16, 2020
609
2
292
Ontario, Canada
I did day 1's problem in less than 30 minutes. It wasn't too tricky as long as you found a non-combinatorial way to do it. Usually the problems are tuned so if you take a good approach, the answer can be calculated quickly, but if you try to brute force it, you will quickly run out of time (or patience) to find an answer. Even more frequently part one of the problem could be brute forced, but part two will combinatorically blow up if you try to brute force it.
 

PHXdNelson

David N.
Sep 18, 2020
19
2
Phoenix, Arizona, USA
@PHolder -

By chance did you watch the video after you completed today's task?

I was surprised to see the spoilers in the video! This is not the case for last years original "Advent of Cyber". I recently started working on those while waiting for this years to launch.
 
  • Like
Reactions: Barry Wallis

Barry Wallis

Magician in Training
@PHolder -

By chance did you watch the video after you completed today's task?
Nope. I didn't even know there was one. I completed the first of today's tasks. Actually, I was up after midnight last night and looked at it before I went to sleep. I came up with a design before my brain shut down, remembered and refined it this morning. Now I'm going to practice for my magic class and try not to think about the second half until I am done.
 

PHXdNelson

David N.
Sep 18, 2020
19
2
Phoenix, Arizona, USA
As a novice, I love watching or reading other solutions to these challenges after I completed them. It is another great way to learn. As for this specific challenge, John Hammond was today's creator. I like a lot of his ctf walkthroughs. One of the other contributors I like is TCM (The Cyber Mentor). He is a great instructor!
 

PHolder

Well-known member
Sep 16, 2020
609
2
292
Ontario, Canada
@Barry Wallis Day 2 starting soon, but I would encourage you to think of a less brute force solution for day 1. You will not be able to brute force solutions for every problem forthcoming, part of the challenge is to think outside the box. I will give you a hint, but wrap it in a spoiler:
Try thinking if there is a way to do a Big O of 1 O(1) way to tell if a number is in a list of numbers. Big O is a complexity indication, and the least complex (in general) would be O(1). Your nested loop solution is O(n*n) (n squared) because there are two loops to n, one nested in the other. A better solution is O( n ) which is one loop to n, doing a O(1) lookup inside. https://en.wikipedia.org/wiki/Big_O_notation
 
Last edited:

PHolder

Well-known member
Sep 16, 2020
609
2
292
Ontario, Canada
Day 2 wasn't too bad. Mostly a parsing problem I suspect.
If your language of choice has regular expressions, and you know how to use them, that should make short work of it.
 

miquelfire

I like red!
Sep 26, 2020
34
4
www.miquelfire.red
I have been using Advent of Code to basically learn modern JavaScript. One of the sponsors had templates so I'm using it this year. You can see my code here.

I haven't looked at Day 2 yet. PHolder's hint tells me I'll be running RegexBuddy today.
 

PHolder

Well-known member
Sep 16, 2020
609
2
292
Ontario, Canada
Day 3 isn't too tricky. I would say the biggest thing is to:
use mod to cause the horizontal repeat and to generalize your part 1 solver so it can be repurposed easily for part 2.