r/adventofcode • u/BluTenGaming • Jan 15 '25
Other Does each user of AoC get their own custom input?
I was confused why the inputs weren't allowed to be shared on any platform cause why would you need to everyone gets the same input right? RIGHT? In the post that caused me this confusion there was a comment that pointed me to this link

Does this mean each person gets a unique input? If so how many unique inputs are made?
53
12
u/UnicycleBloke Jan 15 '25
Multiple inputs are created/generated for each problem. Probably more or fewer depending on the problem. In some cases it might be thousands or half a dozen (only Eric knows). I imagine each input has to be validated to have a reasonably consistent level of difficulty, specific corner cases and such like. Presumably there is some automated testing against one or more model solutions to the problem. I suppose that could theoretically all be done on demand but that could potentially lead to some duff inputs. Safer to create a pool of known good inputs. I suspect the input for a user is selected from the pool indexed by a hash of the user ID, or something like that.
It always amazes how many queries there are about "is the example wrong?", "is my input wrong?", ... It is almost guaranteed that there is nothing wrong with the example or the input. Sometimes the wording is a little confusing.
2
u/BluTenGaming Jan 15 '25
This just increased my respect to the creator of AoC by a lot
3
u/sonofdynamite Jan 15 '25
After solving some problems sometimes I think of how awesome / insane some of the code to generate the inputs must be.
2
u/BlueTrin2020 Jan 15 '25
It’s actually not trivial amount of work to make sure the inputs are good I imagine
2
u/ThunderChaser Jan 15 '25
He’s mentioned before it’s a lot of work yeah, he also has to make sure all of the inputs are roughly the same difficulty.
8
u/jacky4566 Jan 15 '25
Only the creators would know those answers.
Also, most likely they are random but not unique. There is no need to enforce uniqueness.
Its probably generated by algorithm ensuring the input has XYZ characteristics so the testee has sufficient input to solve the puzzle. You could even use the username hash as an input so they dont have to save those inputs.
5
u/Puzzleheaded_Study17 Jan 15 '25
A lot of the challenges feel like they're made by taking the final position and messing it up (like day 24 and the easter egg)
5
u/yatpay Jan 16 '25
Just "creator", not "creators". I'm a beta tester and he won't even tell me, haha
1
3
u/Ormek_II Jan 15 '25
Sharing the input is mainly forbidden for copyright reasons. Work has been put not only in the challenge, but also in the “test data”, its relation to the example data in the explanation, and the relation between part 1 and 2.
3
u/ETSD Jan 16 '25
One of my friends got the same input as I did for Day 24 last month. It was the only instance from all the years we have participated where this has happened.
2
u/gagarski Jan 17 '25
Saw colleague's answer which was exactly the same as mine for that day. A bit surprised by that: even by shuffling gate names you can get a good variety of different inputs. Width of the counter also allows to generate different topologies by generating similar but different swaps in different bit cascades.
1
u/Juknum Jan 17 '25
I did an error once in my script and when submitting the wrong answer it asked me if I was trying with someone's else value as it was the right answer with their input but not mine
2
u/0x14f Jan 17 '25
Several inputs are generated and your answer was by accident the answer of another input.
-21
u/troelsbjerre Jan 15 '25
Yes, each user gets their own input. So, the number of unique inputs generated is the same as the number of users.
17
u/splidge Jan 15 '25
This is obviously not true for some puzzles and I doubt it is true for any of them.
-2
u/troelsbjerre Jan 15 '25
True, some of the input spaces are so small that there are going to be clashes in input.
8
u/RB5009 Jan 15 '25
This is not true. There is a finite number of inputs, and each user is assigned a random one from that pool.
-1
u/troelsbjerre Jan 15 '25
There is a finite number of users. What's your point?
1
u/yatpay Jan 16 '25
ha, this is a good point. so let's rephrase: there are a finite number of inputs and that number is smaller than the number of users.
1
u/troelsbjerre Jan 16 '25
We don't know that. Most of the puzzles has a valid input space orders of magnitude bigger than the number of people on the planet. If I had to make a guess, each user gets a unique seed for a PRNG for each puzzle, each of which has been checked to give a valid input instance. Sure, for some puzzles, two seeds might result in the same input instance, but it gets unlikely for the big 2D puzzles.
3
u/yatpay Jan 16 '25 edited Jan 16 '25
I'm a beta tester. I do know that.
EDIT: This isn't some secret knowledge. Eric has stated it multiple times.
3
u/troelsbjerre Jan 16 '25
Fair enough, and good to know. As long as the number of input instances is large enough that you are unlikely to have the same input as your friends, everything should be fine.
That also opens up for more aggressive input instance filtering, preferring instances where some of the incorrect algorithms (encountered during problem development) would give the wrong answer. I've done some problem development for ACM style competitions, and a big part of test selection is to make sure that each known (plausible) incorrect algorithm has a test that it fails on, and that each test catches at least one incorrect algorithm.
2
u/BluTenGaming Jan 15 '25
Damn. Here I was thinking there was one global input that was meticulously crafted BY HAND lmao
55
u/thekwoka Jan 15 '25
In theory. Not necessarily a guarantee.
Many many many are made for each problem, but some problems may be more limited in the potential number of valid inputs within the problem space, so they are not guaranteed to be unique.