You are given a pile of 10 shuffled cards, 5 with P and 5 with N. You draw one at a time; if you get a "P" you win a dollar, and if you get an "N" you lose a dollar. You can choose to stop drawing at any point. What's the optimal strategy and expected value of the game?
I have the brute force solution of $$E_{5,5} = \max\{1/2(1+E_{4,5}) + 1/2(-1+E_{5,4}),0\}$$ and continuing recursively. Is there a clever way to generalize the final answer or strategy for $n$ cards?