#advent-of-code
1 messages Β· Page 7 of 1
whether it's struggling to find an working solution... or wondering if you can improve what you have... it can be a real time vampire π
the former is uncontroversially the hardest one
it took me like 2 weeks after the new year to finish last year's aoc
hoping that won't happen again this year
how are people solving with brute force in 1 minute
took me like 10mins
didn't help that my y position was 3.1mil
nah. almost screwed me with exams lol
my initial solution took me 14 minutes because I was reparsing the input on every loop
I could do it thanks to a smart part 1 function
Basically I have to check every row, but checking each row is very fast
It takes a minute to bruteforce with plain python and 7 seconds with pypy
Iβm on day 5. Would it be cheating to manually enter the initial values for the stacks?
no, but it makes the problem a bit less interesting IMO.
Iβm so bad at working with this kind of stuff lol
Wait I might have an idea actually lol
Tomorrow's twist is that the distress signal is coming none other than from the trapped elves
π
The ideal/correct way to solve Day 7 ||the file system one|| is with ||recursion|| right?
Just wanna double check before I throw myself down this rabbit hole
yeah
it's one way
depends on how you setup your filesystem
is there somewhere I could get more test inputs for day 14?
is your code working for test but not real input?
no, I realize now I had the same off by one in both cases, but I'd misread a 94 for a 93 so I thought I was passing the test case
you know, generating test inputs for fun would be kinda cool
you can authenticate for advent of code in the other ways it provides and you'll have a chance to get different inputs for each of those accounts
this should give 4 for part 2 498,2 -> 502,2
well, I think that's enough for me today
need to swap out for automated tests instead of visually inspected ones :/
generate some 2019 intcode test inputs
Somehow managed to crash my computer by using all of the memory on part 2 today
either low ram or you actually brute forced it
16 gb
download more RAM π€
yeah you def did it wrong
Yeah I assumed so
I started running it then I took another look at those numbers and was about to stop the program π
Thereβs gotta be some kind of math that I donβt know that would make this easier
π
I don't get how π
turn the manhattan distance into an equation
boom, now you have a system of equations
i will refrain from revealing how you solve that system
Symbolab
ty
tbf my brain also shut down at 1am last night and I forgot how to solve for intersection points so I ended up messing with algebra for like 20 minutes before I remembered you can separate vector equations into component equations
wait where is the question
π
i guess understandable since it was 1 am
but π
oh this is way outta my skill level lmfao
im struggling with roman to integer rn
I was like "ok the lines are perpendicular so we can take the dot product of the direction vectors" and then I realized that was stupid because I already knew the direction vectors
lol
π
and then I was like "I have three unknowns and two equations I think this is impossible"
and I got stuck on that for like 10 minutes
π
yo
i need help
im trying to code a bot for discord but I cannot figure out how to make a /set channel command and /set role command. if someone could help that would be amazing.
wrong channel
#βο½how-to-get-help you should ask in #1035199133436354600 or #discord-bots instead
welp, looks like it's hit the part where it's beyond my skill level
I get systems of equations and stuff but idek how I would find ||a missing point out of a bunch of squares||
intersection of lines
you push them by 1 unit and then find where 4 of them intersect
basic algebra frfr

how'd you find ||where 4 of them intersect btw||
because I just ||iterated over all combinations of length 4 of all the rhombus sides and then all 64 permutations of the 4 sides of the 4 rhombuses and I feel like it was really inefficient||
oh i did not do the algebraic approach
oh
I tried brute forcing and it took like a minute to just do 20k rows so I figured my laptop wasnt built for that
Hello, guys. I don't know where to ask. I'm firmly stuck on Day 11, part 2 (those monkeys). And the only question I have is if linear algebra knowledge is required to solve this. If yes, I'll just calmly give up. I don't want spoilers, otherwise would just have looked at the forum thread.
Does anyone know how to search the threads? Someone posted a neat coord class the other day that I wanted to look back at.
Not sure which day, but even if I knew the day, I'm really not seeing any way to search it
Whats the issue you're running into?
nope, this line from the puzzle might be helpful: ||You'll need to find another way to keep your worry levels manageable.||
best you could do is just search #1047673173447020564
search for "class coord" maybe?
maybe restrict the days to ones that actually had coordinates in the puzzle
I don't see a way to search that in the side bar. There is a search bar that comes up when you click that just for searching the threads, but that only searches the thread TITLES, so unless I'm searching for "AoC" or "Day" or "Solutions" it doesn't bring up anything
You just search in 'advent-of-code-spoilers' and it gives you results for all of the threads
use the default discord (server-wide?) search
This is probably the message you mean: https://spoiler.discord.com/channels/267624335836053506/1050641552524976129/1050853357721485422
Thank you, thought I had tried that already
Doesn't need to be server-wide, searching in a forum channel brings up all threads in that channel
Thanks! I am not desperate enough to look at the spoiler just yet π Will continue thinking.
The spoiler is quoting directly from the puzzle, we're just not supposed to write it in cleartext
Worry levels reach "unmanageable" values, as written in the task. I tried to use symbol math to see what's happening and could not find anything useful, like, for instance, dividers "accumulating" in the worry levels, to reduce those. Also I calculated worry levels of an item for the first 100 rounds and printed some first dividers of those. Cannot see any pattern.
I will continue thinking, thanks for asking.
I do understand that.
this is fine but I'd probably freeze the dataclass instead of making a hash function```py
from dataclasses import dataclass
@dataclass(frozen=True, order=True)
class Coord:
x: int
y: int
I can give you more hints (without giving it away), but we should probably have the discussion in Day11 Solutions&spoilers
I think that it actually makes more sense to use individual spoiler tags, so that they can choose to reveal them when they decide they want the hint
in advent-of-code (small hints, spoiler stuff like this, nothing major)
You're right, this is the perfect place for small hints
having a mutable class with a hash function like that could lead to wonky behaviour like
For what it's worth, here are a couple of small hints towards the puzzle
Rephrasal of your problem: ||You need to reduce the size of the numbers, while not affecting the divisibility checks of any of the monkeys||
Example case to think about: ||Given monkeys that check divisibility by 3 and by 7, what do 2 and 83309 have in common, and why?|| ||Can you transform one into the other?||
!e
from dataclasses import dataclass
@dataclass
class Coord:
x: int
y: int
def __hash__(self):
return hash((self.x, self.y))
a = Coord(2, 3)
s = {a}
a.x = 4
print(a in s)
@feral hazel :white_check_mark: Your 3.11 eval job has completed with return code 0.
False
Why did you set order btw
you can compare it like a tuple
Points shouldn't have an order for the same reason complex doesn't
(if you want tuple comparison, just use a tuple)
ah I like having it as a class because I can add methods to it```py
@dataclass(frozen=True, order=True, slots=True)
class Point:
x: float
y: float
def rotated(self, angle_deg: float, pivot: Optional[Point]=None) -> Point:
if pivot is None:
pivot = Point(0, 0)
px, py = pivot
x, y = self.x - px, self.y - py
angle_rad = radians(angle_deg)
s = sin(angle_rad)
c = cos(angle_rad)
x, y = c*x - s*y, s*x + c*y
return Point(x + px, y + py)
def __iter__(self):
return iter([self.x, self.y])
def __getitem__(self, i):
return [self.x, self.y][i]
def __repr__(self):
return f"({self.x:+.02f}, {self.y:+.02f})"```
Inherit from namedtuple?
that would indeed work
yeah looks good but it feels weird inheriting from something in typing```py
from future import annotations
from typing import NamedTuple, Optional
from math import radians, sin, cos
class Point(NamedTuple):
x: float = 0
y: float = 0
def rotated(self, angle_deg: float, pivot: Optional[Point]=None) -> Point:
if pivot is None:
pivot = Point(0, 0)
px, py = pivot
x, y = self.x - px, self.y - py
angle_rad = radians(angle_deg)
s = sin(angle_rad)
c = cos(angle_rad)
x, y = c*x - s*y, s*x + c*y
return Point(x + px, y + py)
I meant inheriting from the collections version lol
from collections import namedtuple
class Point(namedtuple('Point', 'x y')):
...
ah I think I prefer the syntax of the typing one though
the attributes also don't have types unless you do what you'd do for NamedTuple
(you can type-hint the members even if you inherit from collections namedtuple)
((just don't set a default))
unless you do what you'd do for NamedTuple
(((in fact don't do that anyway it messes with your type checker)))
Anyway glhf everyone, puzzle drops in 2 minutes!
&aoc c
Day 16 starts <t:1671166800:R>.
yep lego
I mean I could have done that if I could be bothered
<t:1671166800:R>
You're welcome
alright it is time for me to get fucked by day 16
according to my calculations, i will place in 4 digits
pretty much every even day i place in 4 digits, and every odd day i place in 3 digits
<@&518565788744024082> Good morning! Day 16 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/16. Good luck!
ew
is this more graph problems
I think you might be right
Doesn't look like a plain graphing problem. This is gonna be...interesting
isn't this just a ||wandering salesman||
π
I figured out the optimisation lol
Nvm it didn't work
i feel like its like a ||weird type of pathfinding||
question: ||will you always want to open the current node before traversing to another tunnel||
no you won't
damn
||if its flow value is not 0, ig?||
no
you literally ||just leave it at wherever the last place to open something is||
||go to 1 -> open 1 -> go to 30 -> open 30 vs go to 1 -> go to 30 -> open 30 -> go to 1, second is better because you have an extra minute to relieve pressure||
imagine this is ||mcts||
||monte carlo tree search||
||explanation of how it works?||
i guess ||calculate cost using how near the valve is and how much flows from it||
this is a ||web|| and not a ||tree|| isn't it?
A grand total of 2 people in here have solved anything for today. Me concerned
yeah naive solutiosn won't work for part 1 idt
yeah i've tried
I gave up even trying to implement the naive solution
it does not work
i don't even have a solution yet
same
Honestly just gonna wait for the Reddit thread to open and smart people to explain how to do it
not many people do
I'm betting it's some math trick
i ust wanna find a way to ||calculate the cost of the valve distance with its flow rate|| and somehow use that
that's the only problem if i understand correctly unless ||lookaheads|| are required
oh that's interesting
pruning via ||cycle detection||?
Probably wouldn't help
||Seems like a version of knapsack today? Yay or nay? ||
how would that work
||any way to do memoization based off of open valves/minutes_left||
i'm just using chatgpt
π
Same lmao. I'm trying anything to get a semblance of a clue as to how to calculate this
i can't think of anything because i'm not an algorithm solver especially when there are paths
Protip : ||Calculate by hand β π ||
WAIT
Is that actually doable?
||is 1e16 combinations too big||
I'm just gonna do this tomorrow when all the smart people've figured it out. Good night and good luck
That's just about the amount of metres a light year has. So..... it's kinda big lol
honestly a lot less based on "common sense"
||it'll be the upper bound||
||at most subsets of 15 from 66 different sets, and 30 different minutes for each||
here's my graph btw
wait
obviously a lot less than 1e16 from common sense
yeah
for all i know ||wandering salesman needs to return to its original point||
||also wandering salesman doesn't want to repeat nodes right?||
this ||does not||
There's only a few worth reaching to release any pressure, it seems.
All but 15 are flow rate 0 on mine. π€
||all the flow rate 0 valves (except AA) seem to have 2 paths, would flattening these paths help?||
||yes probably||
think that would harm more than help
||same for mine||
what program did you use
for sure
networkx + plt
My eyes so far
things are more visible in this one
can you try to filter out the
things
with flow 0
actually wait, i should try flattening paths
I already did
can somebody helpe me with 11 part 2?
||eg if you had AA <-> BB <-> CC but BB has flow rate 0 you can flatten it to AA <-> CC which takes 2 minutes to travel through||
Idk about that but @compact wasp 's graph sure is pretty sus. Looks like an amogus if you look the right way
graph is undirected
can somebody give me a hint for 11 part 2?
i dont want to look at the spoilers and ruin it
but im getting increasingly worried this is some math trick
oh hell
what's an optimal way to ||combine cost of valve and length of path|| because i'm doing that rn
wait i got it
valves are opened right as they should be
||you can multiply time left by the flow amount to get the total pressure you'll relieve at any time||
My part 2 is both wrong on the example AND takes a really long time just for the example. I'm surprised its so much worse than part 1 in terms of timing.
ik
should i turn off github copilot for advent of code?
feels like cheating so im going to, but also it helps with some tedious parts when im problem solving
do what you want to do
ok i'll try to make a cache
RIP computer memory
im gonna come back to a blue screen
can you give me a hand?
think about some operation that you can do to make the numbers smaller, but their divisibilities by all the monkeys remain invariant
i can think a few, but they would involve not reusing my part 1 solution, right?
the time consuming op is the squaring operation, but the other ones alter the numbers enough to make each step different
or am i timing it wrong? is the division that is overtaxing?
all the divisions are prime
but i need to pass the squared numbers to the next monkey, else if they are not squaring i dont get the real answer
wdym but why
why does it work
i changed my //3 for a modulo for the lcm
by cheating
i don't get why it works
some monkeys do addition
adding two numbers and then taking mod n is equivalent to adding the two numbers mod n
same with multiplying
Technically not quite true but yes
same residue mod n whatever
basically it stays the same
sure
but i would expect to have to multiply the result
ooh
but the result is the times visited
This is why modulo arithmetic is often introduced as 'clock arithmetic'
multiplication also preserves it
i see it now
Yeah, result is nothing to do with the numbers being modulod
yeah i see it now
i don't care about the actual numbers passed around, im just counting the pass arounds
i assume by that that there might be even better solutions?
where you don't even have to model the actual rounds?
π
Some people did cycle-tracking solutions to skip most of the rounds
But AFAIK that's the only way of skipping computation
wdym by cycle-tracking?
A -> B -> C -> D -> A -> B (cycle detected, BCDAB)
The key observation is that once an item passes a divisibility check once, it will always pass the divisibility check
wdym?
the items change number on all passes
ooh
you mean when they cycle back to a monkey they regain the divisibility?
Wait I'm dumb I forgot that they're allowed to add LMAO
lmao
I got introduced into modulo arithmetic in like the completely wrong direction
my first official theorem I learnt was fermat's little theorem
and then I had to backtrack and figure out a lot of the stuff about modular addition and multiplication myself
did you do cs?
I'm not in uni yet
will you be going into cs?
Hello?
math is better than cs 
if you go into cs expecting just a bunch of programming you're gonna have a bad time π
yep
CS doesn't even like programming.
CS: I have created this wonderful algorithm
Programmer: Cool, how do we implement it?
CS: Sir, I think you should leave.
bold statement
One lecturer I had was an amazing computer scientist. extremely knowledgeable. His programming skills weren't amazing lol (by their own admission, too)
yeah, programming is fairly different from the more theoretical nature of CS research.
my school has "IST" which stands for like..information something and tech? but they basically just do CS without the math
without the math??
how can u do cs without math
cs is basically math
I'm struggling so hard
I don't see how I'd optimize this past brute force and guessing
do it by hand π
I had that as well
was really kinda just do whatever you want related to programming
and if you could like write bare minimum python you'd be ok
not really related to cs too much
no algorithms or anything
closest thing would've been binary
Does anyone know how do I unsub from aoc pings?
you get pinged for aoc?
Yea
But i haven't got the time recently to solve the newer ones so the pings were a bit annoying
!subscribe the self assignable roles are managed by python
!unsub
Thanks!
im really confused how to use the aoc module that lets you get your puzzle input directly
this is the module but i don't understand what oc is or what i need to do to do to be able to link it to my account and use it
so, that's not an aoc helper
!pip aoc-lube maybe take a look at this? It's pretty neat
oh woopsies, i saw somone else use "import aoc" so i assumed that it was
this is the other helper package folks use
https://pypi.org/project/aoc-helper/
(this was at the start of their code)
What's the basic approach I should be taking with day 12? I know it's finding shortest path but I don't really know where or how to start.
(I want to know what to do without knowing how to do it π )
||BFS||
my school has it as a subject but we have been doing excel for the past 3months
nah today was great
i like how everyone was slow, let me place higher on the leaderboard
i hate you \s
Y'all should watch "The Two Cultures of Programming" by Joshua Ballanco
Extremely insightful
i was somehow the first person on this server to finish p2
no clue how that happened
I had a ton of trouble getting part 2 working
My ||dynamic programming|| approach for part 1 didn't work out at all for part 2, and figuring out that I needed to abandon that approach took me a long time.
mine did π
π
When I started doing AOC, I would look at everyone else's solutions if I had no idea where to begin. I started in 2020, and get a little better every year. This year, I'm asking for hints and approaches before I start looking deeply at other's solutions. If you're newer, make it your goal to try to understand the solutions of others. π
this is my first year doing aoc, so noted
Going to come back to today's problem this weekend. Didn't have a lot of free time today sadly
how many years of experience before that
like 4
can i join
become a golfer if you do
sorry people, seaborn has spoken, we'll hit zero players by day 22, p=0.05
when will we hit 0 if it's linear
looks like 20 or so
depends on whether you weight it, I looked at the flatter tail
either way, future's looking bleak π₯΄
in AoC as well, I mean
what was it like before day 16?
about the same, the model's just bad here
did previous years have big jumps like this?
makes sense tbh, the earlier problems were opened, well, earlier
during the event, maybe
but I don't see any big jumps at a glance
also, the chart on the website is linear
on average, each day leaves 85% players still playing, this year
so with no more big jumps, we should expect around 3k players remaining by last day
honestly after last 2 days I've kinda lost motivation
this isn't turning out to be the "quick puzzles" I was hoping for
just do them faster
too stupid
π
same
pft, I manage lightspeed submissions π€
how fast
i was so fast first few days
because ez
but now i have to think and brain no work π¦
day 4 prolly my peak achievement
Global leaderboard is a nice achievement! I haven't managed to pull that off this year, but have a couple times in the past
This was my first time :^)
nice
quantum mechanics
&aoc c
Day 17 starts <t:1671253200:R>.
that's nice, I play 3 years and get 0 score π₯²
hello hello hello
hola
glhf
Day 17 starts <t:1671253200:R>.
this is gonna be another painful day
im just gonna do it tomorrow so I don't stress myself with time and enjoy it
im gonna stay up until 2 anyways so might as well
good luckkk
GLHF
I'm gonna be up as well but if I start now I'll want to finish fast, as opposed to if I'm already 12 hours late
<@&518565788744024082> Good morning! Day 17 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/17. Good luck!
omfg this is tetris isn't it
this input looks funny
fucking tetris
is this tetris
actually tetris
lol??
simulate tetris lmfao
oh ffs they even have the 2022 number in there
no thanks
lmaooo
like a math competition
lmaooo
just an ||itertools.cycle()||
doesn't seem too bad to brute force
yeah
until part 2 is like "the elephants now want you to find out how tall the tower is after 2022^2022 cycles
π
or part 2 is actually just "now the row disappears if it's filled"
A bit off topic and distracting, but how did you get the confidence interval?
lol part 2
i'm still at the base code
part 2 ew
is this ||cycle detection||?
||man predicted the future jesus christ||
idk what's wrong with my ||cycle detection||
this should work
but it's not working
||which cycles would you detect though? input doesn't seem to have repeating elements||
||the layout of the topmost rows||
||oh interesting||
||but what if the piece dropped was an I piece and it goes all the way to the right, you'd need to know the entire board no?||
||trust||
sus
????
||but you also have to take into account the wind and the piece||
||yeah i did that dw||
||wait wtf even with top 100 rows it's the cycle still happens remarkably fast||
well yeah
that's how it's designed
man this is so sad
i haven't leaderboarded in so long
||but you don't actually need to do all the pieces it was just easier to implement||
||you can just get the heights||
i am throwing so hard
||for cycle detection, do you just try to find like a repeating top 100 rows and just gather the rows every time you wrap back around to 0?||
||i noticed for my input it seems like every time it wrapped around to 0 the same shape always repeated||
||why does it have to wrap back to 0||
||also just do the heights turns out it's way easirer||
||i just thought of it right after i finished implementing getting the top 100 rows, and that worked, so i was too lazy||
Wtf how do you do part 2 I can't get it working
i am legally no longer allowed to call this a skill issue
wow
basically simulated the thing ||but remembered certain shapes||
once you see something you won't need to simulate it again
||i just noticed that the shape repeated when it wrapped back to 0||
Hm hold on I think I might know actually
||i am throwing on the cycle finding part π ||
Is this good
better than me lol
i have 0
today was my favourite puzzle yet
i was stuck debugging part 1 for 20 mins
because i handcoded one of the rock shapes incorrectly
π¦
It was all right aside from my stupid typos
i did the l the wrong way round
L (literally)
are you a masochist
i thought yesterday was fine
have you seen 2019 day 22
yeah, you should check that one out
did you need to know some maths
so much math
what math
modular arithmetic
like do you need to know stuff like crt and flt
because i can use sympy for that
lemme try it now
Did you simulate the entire Tetris like game or are there any other interesting ways to do it? Only hints please
for p1 or p2?
P1
oh yeah i simulated it lol
the one thing about yesterday
was that it required
looking @ the input
and noticing something about it
But does simulating it help for p2? If not, ill not do it
yeah
yeah
Ah cool
Is p2 like, give solution after 20,222,022 rocks now and optimise. Or something more creative?
Just a yes or no will suffice
yes
it's give how many after 1 trillion rock drops
Ah, so I'll optimise the falls then. Thanks π
.
ugh, these elephants are rude
wow thats a lot of people from one company in the top 100
oh which one?
maybe they just play a lot of tetris at that company
Altimetrik
not too many tho
only 26 in the top 100 for p2
it took me around 25 mins
but i guess i do olympiad number theory a lot
so
i knew what to do
i did google code for the ||inverse|| but thats allowed in the actual aoc
the only hard thing was finding the ||geometric progression|| but ||wolfram alpha|| is a lifesaver
how do you draw the table ?
for d17 p2? that's SLOOOOWWWW
ohh mb lol
wait, what? 1hr runtime
huhh
mine was like 160ms. wot- π
This is seaborn.regplot - it constructs the CI by bootstrapping by default I believe.
damn that one took me literal days to figure out
I think I'm done with AoC this year I really don't feel like simulating Tetris just sounds annoying
kinda felt the same way, but w/e
I suspect I will need to be clever for day 16
day16 is definitely the hardest so far, 60% of day15 solvers didn't solve day16
day17 is actually second hardest by that metric, at 40%, but that might drop a little as stragglers solve it. second hardest so far does sound about right for it though.
Hey there. Looking for hints on 2022 Day 16 P1. Have opened a help channel here: #1053756481696170044 message . Anyone who can provide hints are much appreciated :)
Man I really wanna stick with it but I'm literally getting headaches trying to figure this stuff out
rip
So far for Day 16 part 1, I've got ||a graph and dijkstra's algorithm calculated for the distance of every node to every other node||
I think this essentially gives me ||a complete, weighted, non-directional graph since I can map every node to every other node|| but I'm not sure if that's how this works
What I can't figure out is ||how to calculate the tradeoff between opening a valve and traveling. Multiplying the distance by the flow lost traveling doesn't seem to do it||
I have gotten the example answer by both ||brute force testing each permutation and and a genetic algorithm||, but of course those are too inefficient to deal with the full input, let alone whatever they throw at me in part 2
Could I get a small hint here? Does it have something to do with ||limits||?
||you can do a naive solution with dp for pt 1 iirc||
||I'm not terribly familiar with dynamic programming, does this basically mean to store the calculations of a subset of traveling between nodes as we go?|| I've not got the faintest on how to do that, might lose tomorrow to thinking
day 17 visualization (spoiler)
So I revisited my ||genetic algorithm|| with a vastly simplified ||graph|| and it actually got the right answer almost right away
now do ||1e12|| π
e
GLHF
The basic idea of ||dynamic programming|| is ||to solve a problem by reducing it into a simpler problem you've already solved||, so for day 17 you can apply that by ||building a table of possible states at each amount of time|| - ||for every minute from 0 to 30, track which gates are open and the current position, and the maximum score achieved when getting there||
Saying more than that would basically result in outright telling you the answer, but that should be enough for you to figure it out, broken into spoilers where appropriate
&aoc c
Day 18 starts <t:1671339600:R>.
time to die
oh shit
gonna choke so bad
<@&518565788744024082> Good morning! Day 18 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/18. Good luck!
omg
good night
rank 38 holy shit
my code fucked up
bruh
25s
kms
i accidently typed ||(1, -1, 0)|| instead of ||(0, -1, 0)||
is it really a spoiler if it's obviously what the question is asking?
Not doing this one at midnight. I need my sleep...
part 2 is⦠i need time to think
would be a lot easier if i knew this thing were convex
copy paste error? Me too π
bruh
well
am i having a reading diff
i'm confused by part 2, i don't understand what it's asking
Stupid logic errors caused by writing code at 5AM :D
YES SAME
What?
supposed to be like this rigth?
||for i in ((1, 0, 0), (-1, 0, 0), (0, 1, 0), (0, -1, 0), (0, 0, 1), (0, 0, -1)):||
i had
||for i in ((1, 0, 0), (-1, 0, 0), (0, 1, 0), (0, -1, 0), (0, 0, 1), (0, 0, 1)):||
LMAO NO
kms
||code's to get sibling cubes||
No I know but I saw what was coming
lmao
||THE HTING WAS, IT DIDNT MATTER FOR PART 1 CAUSE ????||
actual diff
Can we assume ||there's only 1 air pocket?||
Lmao got lucky
No idea, I didn't
i had the SAME bug for part 1
||it was just a different coordinate||
π
don't
the stuff that's actually outside
alr
right ok, so our scan included cubes that were entirely surrounded by other cubes?
yeah
ah ok
Yeah ok definitely no
I thought so
I found 32, if you were wondering
Here's a ||list of sizes||:
||[991, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]||
oh but it's surrounded by air, and then surrounded by other cubes, i see. damn
i have no idea how to solve this
lol
I struggled for a while because I failed to consider ||pockets of a size greater than 1|| LMAO
||if it's outside, you can BFS to the border||
||but what if there's air between two cubes on one side making it look like it's surrounded, but another side is completely exposed to air? I have to check every side of the cube but if there's nothing stopping me i go to infinity||
||i guess i can stop at the max x, y, and z coords from my scan||
||if you go to infinity, that side is valid area||
||yeah, the max coords aren't too big||
word word
the coords are really small yeah
fun
are you sure you're checking if you've visted a square
||so, these are all the point sized cubes. what exactly needs to be done? i don't quite understand. do they need area of some connected 3d polygon?||
no
||think minecraft||
||it's literally just minecraft||
lmao
and count with spectator mode
why tf is my bfs stupid
never played it π€
am I that incompetent I can't even write a correct bfs
||do a floodfill||
||don't try to go for sides, coordinates are small enough||
||are you checking your bounds correctly||
||i don't think that'll cut it||
||my max coordinate seems to be twenty tho||
||max is 20 for everyone. already verified for golf lol||
nope
||i have this point||
not for me
he purposely makes puzzles on the weekend a little easier to give people a break
i thought it was the other way around .-.
people have more time to actually do the problem
i did too actually, in the post where he mentions it, it's kinda ambiguous
who really knows what eric is thinking
π€·ββοΈ
i still don't think I understood the question :/
Can someone explain graphically?
part 1 or part 2
@devout tusk
||assuming # is a solid and . is air, and we are on a 2d surface||
||part 1: each arrow is pointing to an exposed surface, count the amount of arrows||
π
hi
part 2: ||you can't count the arrows circled in blue because it's not exposed to the "outside"||
that sounds hilarious actually, let's see how easy it is to programmatically generate minecraft maps...
lmao
||generate a /setblock x y z for every position x y z and run it as a datapack||
people have already used minecraft for visualizations of at least one of the previous puzzles. So I'm willing to bet we'll see more for today's
p1
||but what if it is disconnected? won't all 6 sides be exposed?
or is that not possible in the given input?||
||it is possible, yes, then that single-cube-droplet has a surface area of 6||
yes
||isn't that just 6-(if there are any neighbors in the points array as well) for every point?||
||that's just stupidly easy to be true||
today is really easy
yeah
this is exactly how i did it
I just did ||+1 if not in set else -1 for every 6 directions of each block||
it's 24, not 20. my bad
people have numbers >21?
yeah
||Is p2 convex hull or am I over thinking it?|| @torn thorn@covert arrow
From the creator of AOC:
All of the puzzles are designed to have a solution that completes within 15 seconds on pretty old hardware in an interpreted language. (Call it ~250ms in a compiled language.)
Is it reasonable to have an expectation of 60x faster for compiled languages?
what is ||convex hull|| lmao
Yeah it seems similar actually no they're different
but you won't need it
how was todayβs problem
i glanced over it last night and it didnβt seem too bad
when i said iβd go to sleep instead of doing AoC for more sleep but
significantly easier compared to last 2 days
will look at it soon
I hate algorithms. Just like last year it's dijkstra that makes me lose my motivation
it's not convex hull
too late, lol. Already did it like 8 hours ago lol
there is no guarantee the shape you're trying to find the surface area of is convex
:sigh: I need more test inputs for day 16
I'm calculating something wrong somehow on the larger input because I pass the initial test, but past a certain branching factor all my searches return the same wrong answer
alas
huh, I had a bug in my time keeping for each player that wasn't breaking the test cases but was in the full scale
does the guess duration get longer than 5 minutes if you keep getting things wrong?
hey can anyone help me with day 7 im super duper stuck
a dm or even a quick call just to get myself situated because I cant seem to get anything down
common problem: ||are you assuming directory names are unique?||
not even Im just stuck creating a directory tree Idk how I should go about making one
still looking for help?
!cban 989273658570711181 racism
:incoming_envelope: :ok_hand: applied ban to @narrow hull permanently.
byee
what was last year 19?
beacons
the one where you had to rotate the scanner scans and match them up with beacon positions
doesn't feel like day 19 was that bad, I enjoyed beacons.
beacons was mainly just brute force wasn't it?
just rotate everything 27 times and check every beacon for every scanner
day 23 and day 24 last year were both objectively harder. although day23 was good for me, it was on average a lot harder.
amphipods was such a simple problem and input
but devilishly annoying to solve if you didn't know algs or anything
think I ended up asking a comp sci professor friend of mine for help with an algorithm and he told me about uniform cost search
day 24 was just math
disguised as an instruction problem
difiiculty scatterplot using the top 100 finish tmes:
https://www.maurits.vdschee.nl/scatterplot/
really cool
i mean it took at least 40 minutes for 1st place to solve it
seems to be a valley between two peaks situation the past couple years
think we're in the lull rn
so hopefully a less difficult problem today
and then difficulty ramps up again the next couple days
or of course the peaks are actually duplicating over the years and we get three peaks this year
GLHF everyone
Hopefully today won't be too long so I can get more sleep before my exam later kekw
My VSCode integrated terminal has kicked it, so always-on-top windows it is I guess π
GLHF
<@&518565788744024082> Good morning! Day 19 is ready to be attempted. View it online now at https://adventofcode.com/2022/day/19. Good luck!
tech tree is ore -> clay -> obsidian
wow
i assume part 2 would be like ||now u can switch blueprints||
tfw you have to reformat the example input
probably...?
i doubt you'd ever want to thoug
||interesting how ore is collected only at the end of the day||
im not having a good time
don't reading diff ^
I can't tell if it's a greedy algorithm or a dp problem
so you get the ores after the minute ends?
I can't figure out applying either of those lol
I'm sure the || obsidian to geode || is greedy
Looks boring and tedious to implement ngl. I don't have the motivation to do this especially on a Monday morning
if that's the case it's probably the same with all the others since the general formula is the same
screw it, dp it is
|| treat it like a graph ||
50%|βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | 1/2 [01:38<01:38, 98.94s/it]
very slowly
is this actual input
nope, test
lmao
Eww, ||not another graph question again! ||
They should allow a user rating for every question so more questions can be made that are interesting rather than tedious like these
wtf i forgot
kekw
||ok but sometimes clay robot costs more, sometimes clay robot costs less - any way to prove that greedy will work?||
||at this point it probably won't||
||just hail mary and hope then?||
i have no idea how tf to do this
that's the entire point of the latter days? more tedious?
you're not the only one
tedious != hard
tedious is just annoying
the dp does not work
this
it makes sense its just
a lot to account for or do by yourself
latter days should be hard not tedious
oh hey, test works
both work for me im just bored
wow
how long did it take for you again?
03:32 to check the test
bruh this has been running for so long
that's uh... 2 test cases
are you testing building every robot/no robot for each state?
weirdly enough, the actual input seems to go faster
tqdm predicts 4 minutes, but I'm sceptical
uhoh
|| yes. well, every kind I can build. except for geodebots which i handle slightly smarter. ||
ok note to self don't set recursion limit to 999999999
and you account for being able to build multiple?
my python just crashed
oh yikes, updated prediciton
| 4/30 [02:02<18:26, 42.56s/it]
Can you?
idk, was that a restriction in the problem?
the text of the tast actually seems unclear on that
wasn't reading carefully
but I assume the fact we have only one factory is supposed to imply that
π
i feel like this is challenging me though
wasn't reading, was about to do something much more tedious than needed
how is that also not hard
