It all started at your birthday party that Pinkie had offered to throw for you by way of thanks, both for being such a loyal customer at Sugarcube Corner, partially because your brilliant logic (or perhaps your genre savvy-ness when it comes to puzzles) needed celebrating for whatever unfathomable reason, but mostly because it's your birthday and parties are awesome.
Pinkie offered to have a game of puzzle solving, just for you.
It is rather embarrassing, all things considered. Truth be told, Pinkie's parties are great social get-togethers, but they seem to maintain the consistently filly-ish tone to them. Not to mention you don't even like puzzles THAT much (or maybe you do, given you're still reading this despite the fact it won't exactly go down in history as the Past Sins of your generation).
But since you're here and have for the most part stuck it out, despite how age inappropriate that all the conundrums you've solved for Pinkie and her friends are for a party, heck, even a show's setting like this one, you figure you may as well indulge her this one time as well.
You agree, and Pinkie rubs her hooves in glee before dashing off. She returns pi seconds later exactly (don't try to think about HOW exact) with a series of black and white hats, in as many different styles as your memory can recall the names of: bowler, top, woolly, and so many more, including what looks like Applejack's old Stetson painted white.
You hope that Applejack won't blow up at Pinkie too much afterwards.
Pinkie goes around, placing blindfolds over everypony including you. Judging by the lack of protesting, you figure that this is a puzzle everypony agreed to get involved in. She then places the hats on everypony's heads, fast as lightning, before ending with you.
A sense of familiarity rises within you: there are about six different puzzles you can think of that involve starting this way, but you can probably safely eliminate at least one, given you don't hear the sounds of Pinkie burrowing into the ground, nor the feel of soft earth around your shoulders.
She then guides you to sit in a circle with the other guests before explaining the rules:
Each guest has been given a hat, that is either white or black. There is also at least one of each coloured hat among all the guests. Once the blindfolds are off, you can see each other's hats, but you must not talk or communicate in any way about your hat colour. The challenge put to all guests is to correctly identify the colour of the hat they're wearing. Only one pony needs to guess correctly for the whole group to win. If nopony can answer, or somepony guesses incorrectly, then nopony gets any of that sweet sweet birthday cake that was being saved for the end of the party.
You have to admit that's a gutsy move on Pinkie's part, assuming she isn't bluffing. She hates short-changing guests and leaving them upset, as the ex-holder of the Element of Laughter, so she must really have faith in your puzzle solving skills.
She allows you to devise a plan before removing the blindfolds, but once the game starts, no talking, except for announcing your hat colour.
Frankly, cake is the only real reason to even go to a party, aside from perhaps the punch in large enough quantities, so there is quite the personal stake to succeed here. So how can you ensure that you can determine your hat colour and taste that sweet, sweet baked confectionary?
Look in a mirror.
If somepony sees only 1 color hat on everyone, call the other color
If everyone sees both then im stumped
EDIT: i think found a way, but im not sure how to extend it past 4 ponies
If pony one sees 3 white hats, they know their hat is black so they will say black
But if pony one had a seen both black & white hats, they pass
Pony 2 take this into account and looks at the rest, if they see only 1, then they have the same color as pony 1, and if the remaining is 1 black and 1 white, then pony two also does not know their own hat colour
Witch mean since both pony 1&2 stayed silent pony 3 knows his is diffrent then pony 4 and calls it
It's definitely important that we can all plan together before the hats are revealed.
Everypony should count the number of black hats they see, wait that many seconds, then announce that their own hat is black unless somepony else has announced already.
Say there are x black hats. Everypony with a white hat will see all the black hats, and count to x. Everypony with a black hat will see x-1 hats (since they don't see their own), count to x-1, and announce before anypony with a white hat.
9232451
I think the question implys there is more hats then ponies in the group
9232456
It really really doesn't.
And here come the hackers!
Mine be white!
I see what you did there! The cake had better not be a lie!
I hope, Pinkie didn't forget to disable the players from using reflective surfaces ...
Anyway! So, I may not see my hat. But I may others'. No one may say anything. Everypony must guess the colour (so we mayn't remove them to see ).
I do believe, I might want to start organising everypony into groups of white-hat and black-hat hackers... I mean, er... S-so!.. Yeah, white-hatters and black-hatters . When everypony gets what I want, they should either guess from seeing, to what group I'd direct them, if yet unsorted, or from looking at the hats in the other group otherwise. Should one of them guess -- we win! Should they call me to join either of the groups, I would know immediately my hat's colour, thus being able to guess correctly -- and we win yet again!
Now where is my cake?!!