I solved the entire game:
These are the winning pattern for the First move:
O X X X O X O X X X O
where X means a First can force a win and O means Second can force a win.
Explanation:
So, I wanted to give a mathematical proof since I thought the game was equivalent to nim S(2,3), but then I realized the edge conditions make this statement untrue, it's still a nim variant but I don't know how to approach it. So instead here's an empirical proof:
user ffao already proved that any game with an odd number of positions(< 1) is a win for First (Proof A), so:
_ _ _ _ _ X _ _ _ _ _ = First wins
X _ _ _ _ _ _ _ _ _ = Second wins since the move leaves Second to play A
_ _ _ X _ _ _ _ _ _= Second wins with _ _ _ _ X _ O _ _ _ _ this leaves First with 2 A type games: they will win the first (where they start), and lose the second (where Second start, who will take the match)
What happens with even numbers of positions? 4 squares is an easy win for Second, and 6 is win for First = _ _ X _ _ _ ,
_ _ _ X _ _ _ _ _ _ _ = First wins since the move splits the game in a 2,6 games. If Second takes 2, First starts 6 and wins, if Second starts 6, they will take it, then First will win 2.
_ _ X _ _ _ _ _ _ _ _ = First wins as it leaves a 1,7 games, just like before if Second takes 1, First will start 7 and win; if Second start 7 they will take it and First will take 1 and win.
_ X _ _ _ _ _ _ _ _ _ = First wins This leaves Second to start an 8 game which can be shown to be a win for the second player (First). Second can reduce the match to a 5 game (which First will win due to A), a 6 game (which we have shown First will win), and a 2,3 game (which First will win with: _ _ _ O _ X _ _).
All the other games are mirrors.