You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more
First 12 done. Meetings all day today so not even started 13. Might get a chance lunch tomorrow.
It seems easier than last year so far. Only one that’s needed anything really fixed to get from part 1 to 2. Last year there were a few in the first week where you needed to change your algorithm completely to keep the numbers sane.
13 was way easier than 12 imo. Just getting through it step by step. Anyone fancy an stw leaderboard?
Ok stw leaderboard code is 2114560-90631d35
URL is https://adventofcode.com/2022/leaderboard/private/view/2114560
It seems easier than last year so far.
Yeah, I thought so too. I wondered if it was just because I was more familiar with the style of puzzle.
13 was way easier than 12 imo.
13 had a sneaky case that wasn't covered by the example that caught me out for a couple of minutes, I found 12 fairly straightforward (but we had a pretty similar puzzle last year, and I could remember how I solved it).
todays was quite enjoyable, I had a bug in my line drawing which meant it wasn't working quite right, drawing out the grid is quite satisfying for debug purposes
I thought today's was pretty dull, tbh. Didn't really have to think and could just tap out a solution.
Caught up now - 13 was a bit messy. 14 was kind of fun but a lot simpler (and I'm sure there's a nicer way to do it than my brute-force way - but I still solved in well under a second.
13 was messy but Part 2 was a doddle by sheer luck - I solved part 1
Longest for me so far was day 9 - ropes. Really annoying - all the logic was right but I was only reading one digit of the movement counter.. R 19 was parsing as R 1. Careless mistake but took ages to work it out.
yeah I did day 13 the same way as you (albeit in kotlin) so the second part took all of 1 minute to complete..
I stumbled a bit on the second part of the knots one too - turns out actually slowing down and reading the text helps sometimes.
Probably the one that's caught me out for the longest was the second part of day 11.
I was lucky with that one (path finding, wasn’t it?). It was one line of code for me - just had to set everything with height “a” to be reachable in 0 steps. That was a relief as I had to get back to work 😂
11 was the divide by 3 one (turns out that neither longs nor bigints were the answer), path finding one was easy after last year
Did day one earlier in a bit of downtime.
Biggest takeaways for me is how easy vscode web and GitHub codespaces are..
urgh part 2 of todays is Tough. took a lot of rework to get mine to perform reasonably (runs in <10s in the end)
Yeah. Took me a while to devise a reasonable algorithm too. Runs in about 2s - could probably shave some off, but that'll do.
2s is fast - what approach did you use?
How do I do spoiler blocks?
I was tying myself in knots today trying to get a clever way to solve part 2. I think I was on the track to doing something nice and fast with overlapping diamonds but in the end I decided to see how long the brute force would take. Ended up being 19s so I'll just take that at the moment. Attack again when I have some time to spare.
Spoiler blocks - put [ then word "spoiler" then ] - close it with [ \ same word ]
Make that 8s on the brute-force method (minor tweaks and realised I was running with Java 8 not 19 - good performance increase). Time to leave the computer, I think.
Ah, I'd been trying with lt/gt tags - like all the other ones.
I basically had an efficient brute force.
Sort the sensors by descending Manhattan number.
Iterate over all the valid values of Y:
Start with a set of intervals [[0,4e6]]
For each sensor; calculate the min, max values of X for the given Y
Subtract this interval from the set of possible X values (e.g. [[0,100]] - [10,20] => [[0,9],[21,100]])
If the set of intervals becomes empty, shortcut to the next Y value
If we reach the end of the sensors, and the set is non-empty, then that's the answer.
Day 15 still and a wee optimisation tweak - I was pre-working out and caching some information that I didn't need. So 6ms for part 1 and 2.3s for part 2. That'll do at the moment. I've got a free evening to have a look at Day 16 tonight.
Still "brute-force" but it's just brute forcing a very quick operation. 🙂
Another hard one today
yeah I found round 1 easy enough - few bugs but the logic was ok. Took me ages to wrap my head around part 2 - algo ran for 15 mins in the end, so I expect I missed something 😀
I found part 1 pretty hard. My solution for part 2 runs in just over a minute, but I'm really not proud of it.
Just seen this. Will try and play catch up, although my powershell skills are even rustier than last year and I didn't do so well then.
That was ok-ish. Done now and part 2 solves in just under a second. It's not pretty though.
I'm sure there's a better A* way to do it though that is a few milliseconds.
I'm pretty impressed with the proportion of active people to getting solutions on here - I'm in actual programming groups who don't have as good a ratio.
found today fairly straight forwards - just a case of chunking through. Still tried to brute force part 2 which is never the right answer 😀
21ms and 310ms respectively
and todays is even easier than yesterdays. sub hour for me!
Finally got round to completing day 1. Don't think I'll be topping any leader boards.
Had part 1 in about 5 minutes today, flailed a lot with part 2, but got there in the end.
Up to date again. I didn't really enjoy 17 - silly mistake and then an ugly solution:
The second part, I was lucky. Lots of visualisation for debugging part 1 then checked what the status was when I was looping the wind to the start of the file and found the picture looked the same. Then an ugly "it gains this many rows for the loop over wind" - different number for the first loop and then the last couple of hundred steps. Dumped the numbers into Excel and worked out total.
Day 18 was fun. Liked that.
euain - yeah, I had a silly bug where I'd changed which direction I considered to be up halfway through, and didn't catch all the places.
Part 2 I got more through luck than being clever, I think. It actually fails on the example!
Today's is properly wtf.
yesterdays took me ages. the thing that got the performance managable (it never finished before) was
today is much easier!
I had a really annoying off by one error that took me ages to find today, but otherwise okay.
Robots was a hard one for me - spent far too long messing about with that.
Todays was a lot easier though I had to scratch my head to get one case that seems a bit inconsistent.
I'm glad I'm not the only person who flailed a bit today
I went straight for a doubly linked list, had off by one errors for when it was moving over itself.
Took me *ages* to find. And, for the first time, I ended up debugging against someone else's solution.
Todays was very nice, I thought.
No complex rules and ended up solving the problem properly (60ms running time, including parsing the file) while my computer was still trying to brute-force the solution (stopped after 2h I could see it was still miles off).
Yeah, plain sailing today.
The only thing was thinking it'd be quicker to solve the last bit by hand rather than writing code.
Spoiler: It was not.
Solved today in the same way I was taught years ago
really easy today I found. just a case of chunking through the problem space. I almost assumed my initial approach (brute force) for part 2 wouldn't work but it was fine!
Just a lot of fiddly code yesterday, didn't enjoy it.
Today's was nice and straight forward, though.
Yesterday's ended up involving drawing shapes on paper and cutting it out. I was convinced I'd find some way of programatically defining the transitions over the edges but ended up just hard-coding the 14 different transitions of my input. Pleased when it worked but not really fun.
Todays was easy enough. I suspect there might be something clever way to do it but my laptop churned through my naive code (with some hideous inefficiencies that I kept thinking "I'll come back and sort in part 2 when I need it to be faster") in less than half a second. I'll leave it there and get on with some proper work.
Part 2 was trivial in mine - I just changed my for loop to execute for ever and added a "if (proposedMoves.isEmpty()){break;}" statement instead.
I'm still waiting for something to cause the levels of pain that the scanners/beacons did last time. That hurt my brain.
Yesterday’s ended up involving drawing shapes on paper and cutting it out.
Yeah, I ended up writing numbers on the sides of a puzzle book (hacked most of it together on a plane, that's what I had a available) to work out the relationships.

State-of-the-art here... I even drew the shape in Omnigraffle to cut out.
yeah I also had a cut out cube 🙂
today was quite simple after all the practice
Yup - simple enough today. Quite a relief that I could just add an outer loop to handle part 2. That was unexpectedly easy.
I was getting ready to have to store a big cache of states and positions - I think the states repeat every width x height minutes but both solutions run in <1s so I settled for my simple implementation.
Who's helping the elves out this year?
Nice easy start this year - though I'm being lazy and sticking to my comfy place in Java. Every year I think I'll try to learn something new (Rust, Python,...) but never have the time.
Yes, I'm in again. Sticking with Go - I'd like to try a new language, but it's not even like I get to spend much time in the languages I do know lately!
Perhaps this will be a good way to see how Chat GPT generates code?
Perhaps this will be a good way to see how Chat GPT generates code?
That was so last year :p
Another year, another AoC adventure.
How's it going this year? So far, a nice gentle easing back into the way of it. Today is an exercise in "read the rules" as I jumped in before I'd read them all.. a couple of wrong answers before I went back and actually read them.. ah, we need to all be in the same direction.. etc.
I suspect it won't be long before it won't be doable over a cup of coffee before work. (By me anyway).
I just read today's. I've not started yet, but it's one of my favourite types of Advent of Code problem. Yay.
Agreed, I enjoy this kind of problem. I've got part 1 done but work is getting in the way and I'll not get a chance to play on part 2 until later tonight. Very nerdy, but I'm looking forward to getting stuck in. A couple of ideas how I might do it..
There is a STW AoC leaderboard if you're interested - or maybe you're on it. (I'm not sure who set it up - I think I joined a couple of years ago). If you want, PM me and I'll try to work out what's needed to join it.
It's back on page 2 - posted by @haloric - leaderboard code is: 502307-275d7a99
I got a notification !.
I don't use STW any more - feel free to start a new leaderboard or use the existing one to your hearts content.
cheers.
Always fancied trying this and actually giving it a go this year. A bit late but started a bit last night and halfway through day 2 so far... so far so easy, I assume it gets a lot harder!
Anyway it should be a fun challenge, let's see if I can manage it. Only really posting here for motivation so I actually do it and don't procrastinate into oblivion :-p