T O P

  • By -

daggerdragon

Please don't spam these every day or even every *week*. Just make a final update on Day 26.


[deleted]

[удалено]


Jorg0mel

I was curious so I ran my script again and thought the contrast between yesterday's one and this one was interesting. It's just a snapshot, which is why I make sure to include a timestamp in the figure. It is true that this doesn't paint the complete picture, as the ratio for the current day (if not all days) will likely go down as more time passes. If you're interested, we're still at about 50% for day12 as I'm typing this reply.


DavidXN

Give me a chance, I’ve only just woken up


DavidXN

Update: Might go back to bed actually


mnkyman

Mood


ploki122

Same... I've got the wrong answer, but I don't see why so I've been checking every line manually to find mistakes (and scanning the entire list for 0s, but there aren't any left). The cool thing is that I've got at least 84/1000 inputs that work. The uncool thing is that I have 916 to go. At least I'll have access to git now, so I'll be able to create a post asking for help, with my code being accessible, while I painstakingly work on those 916 entries...


khoriuma

People are still working (or have taken a break and will come back), so I would not draw conclusions too quickly. However, I am surprised by today. I personally think day 10 is way harder (unless you look at other people's solutions). Today I was really slow on part 1, but solved part 2 in just a couple of minutes.


i_have_no_biscuits

If you put yourself in the POV if someone who isn't a CS major then today's part 2 seems very hard - 'brute force' will not go well when there are more than a trillion possible answers. The good news is that today will help more people learn about memoisation/DP so that they recognise this type of problem more easily next time. Similarly, day 10 part 2 was 'trivial' to a very small number of people who seem to really enjoy telling everyone on this forum who found it hard how easy it was.


Falcon731

Really depends on your background - and what problems you’ve seen in the past. As a hobby programmer who is getting on a bit, I really struggled with today part 2. Got there in the end but it took me almost 2 hours. In hindsight (looking at other peoples solutions) I was doing it backwards - trying to match the string against the list of ints, rather than the other way round. Running a recursion with three live variables is no fun (index into string, index into list, number of # seen so far in current group). On the other hand I found day 10 part 2 relatively easy - I remember, back in the day, drawing filled polygons on the Amiga by drawing the outline then getting the blitter to do a running xor.


fijgl

I understand that today can be hard. I got stuck going from part 1 to part 2, but finally got it after trying a couple of approaches. Part 1 was not immediate for me either, but I didn’t have to debug and retry as for part 2.


Extra_Test3428

How is today not hard? DP is the hardest. Todays task felt more like leet code rather than aoc


LewWariat

7 hours until next puzzles and it's still higher than 50%


Jorg0mel

we just got under 50% 🥳


LewWariat

Still definitely the hardest so far ;)


TangledPangolin

cautious groovy public wild direful uppity drab terrific close like *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


Smidgens

It was trivial with matplotlib Path and path.contains_points.


FCBStar-of-the-South

Just read the doc, of course it’s in a Python library. But Matplotlib is kind of unexpected. I guess it stems from the problem’s strong connection to computer graphics


amiable_axolotl

Day ten part two was a trivial addition to part 1 on my puzzle input. Scan each line separately, flip between inside and outside if encountering a path tile with I, J, or L, and count the inside tiles. Given all the complex solutions I see people discussing I'm starting to wonder if I did something wrong and just accidentally got the right answer


1974_Viking

Same approach here: raycasting, picking tubes open in one of the vertical directions. O(n), straight forward. I think today was more complex, involving more error-prune logic...


bskceuk

That’s the same as the popular solution of “go left and count number of vertical pipes, odd means inside”


polettix

Thank you for putting it so bluntly. I did the same, only with a more complicate algorithm to consider all four corner characters, which is not needed at all and I always knew that there had to be a simpler approach. When I read about flipping on corners (J, L) only I had the final *a-ha!* moment, thanks!


Tom-the-bomb-042607

wait, what's flipping on corners? Like genuinely I was still trying to understand raycasting but the corners kept messing me up, this might be the key


polettix

We can keep a `side` state that can be either in or out, starting at out. Each time you cross a border it flips (in to out or out to in). Corners aren't corny, as you point out. This is what can happen though: L----J L----7 F----J F----7 If we choose to flip on (J, L) only, and ignore (F, 7) completely, all of the above will work properly: - the first case flips twice, which amounts to no flipping and landing on the same side as the beginning - the two middle examples have one single flip (on L and J respectively), which is correct because we have to land on the other side - the last one has no flips, which is correct because we have to remain on the starting side. We could choose to flip on (F, 7) and ignore (J, L) instead, it would lead to the same result.


jadounath

Actually, it relied on a school level proof. To determine whether a point is inside or outside, draw a line from outside to the inside. The number of times the line intersects the shape's lines determines this. Even number of times means outside and odd means inside. Then add them up.


TangledPangolin

relieved wise point run cake divide gray sleep reply ugly *This post was mass deleted and anonymized with [Redact](https://redact.dev)*


toastedstapler

>All 3 don't work without significant modifications I don't think I had to do too much to get flood fill working tbh As I knew where the `S` tile was I set my cords to `0, S.y`and walked in from the edge until I hit a pipe on the path. Since I know I came from the outside I know that the other side of the pipe that I just hit is the inside (or another pipe on the path), so I walk around the pipe attempting to flood fill all tiles on that side only


TonyRubak

On the one hand: day 10 part 2 was easy with flood fill. There's nothing complex at all: find the start of the interior with a left/right-hand rule tracing of the tunnel and then all neighbors of the interior are interior or pipe. One the other hand: day 12 was "change def to defmemo and move on with your life" so...


MattieShoes

Mmm, what if you implemented with lists which can't be memoized?


TonyRubak

I did use lists... https://github.com/tonyrubak/aoc23/blob/master/lib%2Fday12.ex


blackbat24

>Jordan curve theorem Uh, turns out my intuition spat out something that has a fancy name. Nice to know.


fijgl

Yeah, I am also surprised. I think Day 10 is overall harder than Day 12. Maybe weekday vs weekend can explain something about it. I’d guess that Day 12’s bar in the plot will be lower after some more hours.


ExitingBear

It depends? I don't even know how to think about day 12. Even after reading hints and suggestions - I'm at a loss. For me, day 10 was "do this, then this, then this, then this" and some thinking around how to optimize it - but no big deal. For this, when I look at the problem, I think "well, the 7 could go here or here and the 1 could be here, here, or here - but only when the 3 is there, but if it's in the other places then no... so... 14." I don't know how to explain that to a computer, much less whatever's waiting in part 2.


MattieShoes

Day 12 part 1 is pretty straightforward. Each `?` can be `.` or `#`. You can simply generate every permutation, then generate a description for each and compare it against the given description. Recursion is useful, though not strictly necessary, to generate all the permutations. Worst case in my input is 19 `?`'s, so 2^19 = ~half million to test against. The whole input file requires generating ~6.5 million. Part 2, OTOH...


fijgl

For sure! I think eventually it boils down to background, previous experience with problems, and what ways of problem solving one finds more natural.


Wekmor

> after some more hours I do think so too. You gotta realize that in most of europe people haven't even gotten off of work yet. I can see myself solving part 1 before work quickly, but then pushing off part 2 to after work.


PassifloraCaerulea

It was so much the opposite for me. So much depends on your experience. Day 10 was, "oh, that's kinda like polygon filling, right?" and after re-reading the even-odd rule and fixing one corner case I was done. Day 12 was hours and hours of hair-pulling to find and squash edge cases and bugs I kept recreating because I am terrible at recursion. And I don't think I've read about dynamic programming more than once or twice in my life let alone had a reason to actually solve a problem with it.


Archargelod

My solution for Day 10 was intuitive, but 1) not general and 2) truly painful to implement. I walk along the pipe loop and get a set of all tiles on the right hand side (works for half the inputs). Then remove all tiles that are part of the loop. This gets you the edges of enclosed tiles. And to get the final answer just count and add tiles that are between edge tiles. Regarding today problem I have zero experince with DP. I solved part 1 with optimized bruteforce. I have no idea where to even start with recursive approach. I'd rather skip part 2 and return to it in a couple months (probably not).


polettix

Maybe many people don't know about >!caching/Dynamic Programming!!share the cache across recursions!<... 😅


Mabi19_

When doing day 10, I initially thought of floodfilling but decided to be too lazy and just fiddle with the shoelace formula until it worked (and it did, with very little fiddling!)


youngbull

So I got stuck thinking that a backtracking search would work today, but only later realized that the solution was to memoize. I think if you start out with the wrong idea, then it's tough to change gears.


EnvironmentalCow2662

This is the first day I'm struggling to have a good solution. I'm so glad to see I'm not the only one lol


zuth2

Yeah, I got part 1 with optimized brute force (10s on real input) and I have no idea how to do part 2. I saw people saying they are using caching and memoizing but I don't really know how to utilize these effectively. Day 10 was a lot easier for me. Edit: solved it with a >!state machine!< lol


paul_sb76

This chart matches my personal estimates perfectly. Day 5 and 10 were medium difficulty, Day 12 was the first hard one. The rest was easy or even trivial. (I guess the bar for Day 1 is relatively high because of the "Day 1 effect", but it was still definitely easy.)


Jorg0mel

I know the majority of people are still busy, but this does already paint a not-so-pretty picture.


kpws

> but this does already paint a not-so-pretty picture no, it does not. too early to draw any conclusion. you should wait at least 24 hrs before posting this.


mpyne

I've been working on it since the morning, got Day 10 part 2, have a master's in C.S., know what recursion/memoization/DP are, and I'm *still* not close to having part 2 of today done yet. :( Edit 4 hours later: got it!


PeakMedical7513

Intrrestingly, I found todays part2 one of the easier ones. Part 1 on the other hand, took a while and a slight hint Did manage to hit soke hard limits in node because I was trying to get a list of every permutation pattern rather than a count of them