This question is a spin on the question Basic probability question but struggling (brain teaser with friend) but with some additional rules and considerations that make it more complex. The differences are that we can only make a single bet, and there is uncertainty about the composition of the urn.
We are looking for an optimal strategy for a person that is given the chance to place a bet in some game which has the following description and rules:
At the start we have an urn with $R$ red and $B$ blue balls and we know the total number of balls $R+B=N$, but we do not know $R$ and $B$ individually (except for a prior distribution explained in the last point).
Balls are drawn out of the urn one by one without replacement. Every turn, each remaining ball in the urn has equal probability to be drawn.
We are allowed to see the colors of these balls that have been drawn from the urn, but we can not see the remaining balls in the urn (we have to guess this).
Each time that a ball is taken out of the urn, we are allowed to place a bet on the color of the next ball.
If we bet then we look for the color of the next ball and if the bet is a correct guess then we win a prize.
We can only make a bet once. After a bet, the game ends.
If we do not bet, then the game continues by drawing the next ball from the urn.
The number of balls at the start with a specific color follow some prior distribution:
$$P(R=r,B=b) \propto (r+1)^\alpha (b+1)^\beta \qquad \text{for all integer values $0<r<n$ and r+b = n}$$
For simplicity one may consider $\alpha = \beta = 0$, but if a more general solution is possible that would be nice. (also if it makes the answer easier one may consider a uniform distribution for $0 \leq r \leq n$)
We are looking for a strategy that optimizes the expectation value of winning the prize. What is the strategy and what is the expectation value?