Today my teacher asked the class if anyone could beat him at a game he (supposedly) invented. The game goes like this: Two players take turns drawing dots on a line on a piece of paper. Whoever gets to draw the 17th point wins the game. You can drow a maximum of 3 dots at a time. When I heard the rules I immidiatelly thought of NIM, but the strategy seems to be different. Also one thing I noticed is that every game ended with the same kind of moves: There are still 4 dots to be drown, and being player X's turn, he must lose being that whatever he plays, player Y will always have the last turn. What would the strategy to beat this game be, and why? Is there a generalized strategy for this games and ones similar to this (NIM for example)?
Edit: also he won no matter who started and how
You've seen that if there are $4$ dots left and it's your turn you lose. It follows by the same argument that if there are $8$ dots left and it's your turn you lose: whatever you do your opponent can play in a way that leaves $4$ dots on your next turn.
Etc. If there are $16$ dots left you lose. So the first player wins by drawing $1$ dot, leaving the opponent with $16$.