Alice and Bob are playing a game. There are 'n' discs. Alice starts the game. The players play alternatively thereafter. In each turn, the players have to choose a number which is a power of 4, say 'd' and subtract it from 'n'. So 'n' will be 'n-d' now. A player who cannot choose a power of 4 to deduct in his turn will lose the game.

Example: if n = 4, then Alice will choose 4 and end the game for Bob. As he will be left with 0 in his turn and he cannot choose a power of 4.

What will be the optimal strategy for the players in this case? And in general how to find the optimal strategy for players? What are the rules of thumb?