I coded a tic tac toe program, but I don't know if I can call it artificial intelligence.
Here's what I did.
There is a random player, which always makes random valid moves.
And then there is the AI player, which will receive input before every move, that input is the state of the board, and all the posibilities. The AI, will try any move that it hasn't tried before. But if it knows every possibility, it will select the one that has the higher value. This value is assigned by the outcome of the match, if the match was won ,+1, 0 for draw, -1 for lose. Every move, will be stored in a database, or updated if it's known.
Eventually it will know every possible move.
I also added a threshold to compare the best moves, so it really select the best move. Example, two moves with a value of 100, the AI will keep trying them both, randomly until one has surpased the other by the threshold, say 50.
It takes about 20.000 games to make the AI perfect, it never loses a game, just draws and wins.
I'm new to AI, and I'm wondering, could this be really considered Artificial Intelligence? And how is this different from a Neural Network approach? (I'm been reading about it, but I still don't quite get it.)