0

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 ?

ziggystar
  • 28,410
  • 9
  • 72
  • 124
Ion Utale
  • 551
  • 1
  • 9
  • 22
  • What exactly are you asking for? Do you want to know if the approach _1.Collect Data. 2.Process Data. 3.Predict_ is valid or _if you should use a database_ or something completely different? – Kaadzia Dec 14 '12 at 13:54
  • I was talking about game play, about how to make the most fun game for the player... if this takes to collect data and process it, fine i will do it, but if it doesn't i will just use another aproch – Ion Utale Jan 13 '13 at 21:04

2 Answers2

2

Disclaimer: I spent over 2 years working on both Prince of Persia and Assassin's Creed, I am not legally allowed to tell you how these games are made, but I will try to give you general knowledge about game AI. Most games do not use learning as you described.

First, the language or the platform (or device) you target has nothing to do with the artificial intelligence tools you will be using.

Second, your two first examples, tic tac toe and chess are turn-based games, this is totally different than a real-time game. Also, both of these games work on a limited board with a somewhat limited search space. These games would be way more easily solved using other algorithms than learning (like minimax for example).

In the case of a real-time adventure game in 3D space like those you described, just even finding the context or input you will be feeding to your learning system will be hard... what elements are pertinent for the decision making: recent audio stimuli, visual stimuli, relativeness of these stimuli in space and time, surrounding enemies or allies, etc... Then, given the complexity of these world and what NPCs are allowed to do, how do you define the output of your learning algorithm? How does this output remain cohesive over subsequent queries?

Keep in mind that whatever changes you make to your game design will require rerunning the learning process and possibly the definition of the input and output.

You are better off going the standard route, use well known methods such as finite state machines, fuzzy state machines, behavior trees, planning, etc... You will have more control over the decision making and will actually be able to design your NPC behaviors, which you wouldn't be able to do with learning.

emartel
  • 7,712
  • 1
  • 30
  • 58
  • very interesting, thanks @emartel. I didn't understand much of it ( like NPC ). But anyway, i still think that loading enemys = to player skills it is a good approach: 1.Great Player can have more fun kill as much as he can. 2. Worst Player can have some fun exploring the world. – Ion Utale Jan 13 '13 at 21:00
  • Hi, sorry for that, I should have defined `NPC` as Non Playing Characters... so your enemies or allies that are not controlled by a player. Unfortunately I think you're assuming too much on what can be done with learning and how it can be done. It's not easy and results are never guaranteed, depending on the play style of a player the game might look totally broken. – emartel Jan 13 '13 at 21:11
  • but anyway, Can anyone point me with the "rules of fun" for a game.Just to point me in the right direction "point the finger". I would be nice if i'll now in what direction i should focus. Thanks for all the answers. – Ion Utale Jan 15 '13 at 09:56
  • There is no such thing as `rules of fun`! Each game is different and fun for different reasons. A lot of the work for an artificial intelligence programmer is to test combinations, do some back and forth with the designers, animators and level designers to make sure the product is fun... it usually comes from experimentation! – emartel Jan 15 '13 at 15:40
0

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.

Ian Overton
  • 1,060
  • 7
  • 17
  • ... all i was thinking is to make the most fun of the game ... And what should be the things to keep in mind to make the game more enjoyable for the player ??? – Ion Utale Jan 13 '13 at 20:52