I know that an AI should do 3 things:
1.Collect Data.
2.Process Data.
3.Predict The NextData that will be collected.
I believe that i should use a dataBase to collect all the data.
In a game like (Tic Tac Toe, Chess, … etc) on a iOS device, i would make it play against it self for 30 sec or so , and learn from its mistakes, but in a game like Prince of persia, Assassins i would learn (from) the player skills ( start with the first 3 min of playing where the skills of the player will be tested ), and then adapt the game to the player skills, so if the player is a dam good one the game will give allot of fun, but if the player is a beginner i will give some more exploring, and easy to kill “evil soldiers”.
” Finally the question arrives”
1.Is this approach valid ? Or is there a better one ?
I really think it is what you as a developer wants. If you want an unbeatable AI your approach would be different then one of getting the most fun out of the game.
Adapting the ai skill by how well the player plays. I wouldn’t say is an “AI” thing more of a way to code it for the most enjoyment for the player.
If it was truly AI then it’d be the best player the programmer could build. When I made AI what I’d do is build an initial AI and then build an AI that could beat that AI each version being a benchmark that had to be beaten. I don’t think you want to go the route of the AI “learning” from it’s mistakes as it would be a lot of overhead and a long learning curve. As the game developer you would probably have a pretty good idea how to make an AI that could beat out AI’s that learn everything. That is just my opinion.