taggedjc wrote:If you add to A1, you may actually have to remove something from A2, since if you have a 60% chance of guessing correctly and a 40% chance of guessing incorrectly, and you change the chance of guessing correctly to 65%, the other chance necessarily goes down to 35%.

You are right that we can't always increase both A1 and A2, since maybe A1 + A2 = 1 already. Similarly, we might be unable to decrease both if one of them takes the value 0. I'll call these situations boundary cases. The point of my argument about attempting to make these modifications is that we can always assume we are in one of these boundary cases, since if we aren't, we can make such a modification and move to a boundary case without making the strategy any worse. That's why I said this:

sfwc wrote:In fact, we can keep on changing the values of A1 and A2 in the appropriate direction until we can go no further because of the bounding conditions. This happens when either at least one of A1 and A2 is 0 or else A1 + A2 = 1. So, we may as well suppose that one of these things happen: if not, we can make it happen without breaking the constraint or reducing the value of p.

I'm sorry if I laid out the argument in a way that made this unclear.

taggedjc wrote:How did you come up with the constraint E? The puzzle is that you can't have any wrong guesses, not that you have to have more correct guesses than wrong ones - I guess I just don't see how the given constraint gives that meaning.

Yes, there is an extra step here, which you might have missed since it is in the stuff I quoted in that post, rather than in the main text. I'll give the key quotations again here:

skeptical scientist wrote:Goplat wrote:I'm pretty sure it's impossible for any strategy to do better than 50%. My reasoning:

If you are still confused after reading both of those spoilers then let me know and I'll try to give a bit more explanation.

taggedjc wrote:If you were doing this puzzle without a malevolent villain who knows the strategy, would you apply the same argument?

No, the argument wouldn't work in that case. The reason is that the argument in the quote from Goplat assumes that the villain chooses a worst-case scenario for the heroes. But if the hat colours are chosen randomly then even if the worst-case scenario is very bad, it can be made improbable enough that that doesn't matter.

Let me know if you have any more questions.