@microwither: Yeah, I went 2, it went 5, I went 7 (looking for 1, 8 or 3 if it makes a mistake), it went 4, I went 6, (Best move for computer here would be 3 to block the double) but it went 8, then I went 3 and had 2 win conditions. However, if you go to https://ostermiller.org/calc/tictactoe.html, your impossible is more like experienced, which I think is really nice, because you can still beat it, but its hard (kinda, unless you know what you're doing).
@microwither: I went 1, it went 5, i went 9, it went 3, i went 7, it went 4, i went 8 and won first try on impossible. There is no algorithm that guarantees a victory in this game, that's what makes it so fun. If you wanna see why write out all of the possibilities, it really helps you understand the game. And then you can rewrite your algorithm to make it harder, still not impossible, but harder.