The game is impossible to win. Because the starting total of rocks, when it is your move, always divides into 4 with a remainder of 1. This means that the player who goes first, with these starting conditions, will always lose.
This is kind of obvious when you look at what the computer plays: if you play 1 it always goes 3 (adds to 4); if you play 2 it also plays 2 (adds to 4); if you play 3 it always plays 1 (you guessed it, adds to 4).
So from a starting number of rocks which can be written down as 4X + 1, where X is a positive integer, you will lose in X rounds.
Some examples:
Starting total of 5 rocks. You can play 1, this leaves 4 rocks -> comp plays 3 -> you lose. You can play 2, this leaves 3 rocks -> comp plays 2 -> you lose. You can play 3, this leaves 2 rocks -> comp plays 1 -> you lose.
And what is 5? 4*1 + 1.
(if the starting total is 6, 7 or 8 and you start, then you obviously win since you can force the comp to take his turn when there are 5 rocks. But the game is rigged so this will never occur)
Starting total of 9 rocks. Whatever you play, the comp takes some rocks to leave 5 in the pile when it's your turn. As we saw above, the player whose turn it is with 5 rocks remaining in the pile loses.
And what is 9? 4*2 + 1.
Starting total of 13 rocks. Whatever you play, the comp takes some rocks to leave 9 in the pile when it's your turn. As we saw above, the player whose turn it is with 9 rocks remaining in the pile loses.
And what is 13? 4*3 + 1.
Etc. by induction for all starting stone piles which can be written as 4X + 1 (divide into 4 with remainder 1).