Quote Originally Posted by xofvc4rqb
I searched for some ways on the site to remake it but only found raw data with no examples on stuff like the Minimax Tree, where all the possible moves were linked to each other. Can someone instruct me with examples or at least some info from where I can start reading and experimenting?
A quick search brings up this article on Game Trees.

Quote Originally Posted by xofvc4rqb
I was thinking of making a counter-defense way of thinking for the AI - analyze horizontally, diagonally and vertically if there are two of the player's marks ('x'/'o') and put a counter-move to that ('o'/'x') but if there are none - play offensively. But I think that would also require lots of ifs and loops (the defensive part). I would also have to take into account the tricky moves where you put the opponent in a "fork" where I have two places to put my mark that are a winning situation.
If you want to go this route instead then making use of some simple opening rules can help a great deal, e.g., "if the opponent starts at the centre, respond at a corner", "if the opponent starts at a corner, respond at the centre", "if the opponent starts at a side, respond anywhere except the tiles diagonal to the start and the far corners from the start".

Quote Originally Posted by xofvc4rqb
spaces seem to be ignored so I put _ instead
Besides code, you can post such examples in bbcode tags.