Winning algorithm for a modified Nim game?

So the game of Nim is pretty popular, however I have to find a way to win. There is only one pile and one total amount you can draw each turn. Both of those numbers are random. Also it is random whether or not the winner takes the first or the last piece. The catch is i get to decide who goes first, me or the... show more So the game of Nim is pretty popular, however I have to find a way to win. There is only one pile and one total amount you can draw each turn. Both of those numbers are random. Also it is random whether or not the winner takes the first or the last piece. The catch is i get to decide who goes first, me or the opponent. What is the algorithm that will let me win every time???
2 answers 2