Eight-sided die with two rerolls
Asked at Optiver, SIG
You roll a fair eight-sided die (faces through ) and are paid its face value. After the first or second roll you may reroll; you must accept the third roll if you take it (up to rolls total).
What is the fair value of the game under optimal play?