• Advertisement

Archived

This topic is now archived and is closed to further replies.

Neural Network for strategy games

This topic is 4970 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I need help from someone who is experienced in using neural network(nn). I wonder if i can use them for managing the computer player in a real time strategy game. I think this has already been done with Conflict Zone by Mathématiques appliquées. And if i can add a support to it, can i do the learning time in real time with high performance? (i need lots of time for managing path finding and others stuff such as physics) PS : This is a 3D game. ( Be Side ) [edited by - Jis on June 12, 2004 1:22:21 AM]

Share this post


Link to post
Share on other sites
Advertisement
I think you would find this difficult at best. As I understand it, neural networks are at their best for binary outputs : True / false, shoot / duck, right / left. You would have an almost continuous output space, whose number of dimensions would vary as the number of units increased. Now, it''s probably true that a genetic algorithm would be able to evolve an AI for this eventually. The question is, can you make your game and AI-breeding code so efficient that you can afford to run several million generations?

Share this post


Link to post
Share on other sites
aha (for the binary outputs), i don''t need a lot of precision, this is a game AI, not a math one. So you said that their are at their best with binary outputs? i think that this can be implemented (but it worry me) with actions like : shoot/don''t shoot, go away/do not, ... but it will be too rigid. Can''t I make outputs like a position anyway? (i don''t know a lot about neural networks, i just wanted to know if i must be interested by that for the future) Will it takes too much time to the learning time with this?
For the question of computation time, in a game we don''t need to do it every frame (60 FPS~) but with seconds it can be efficient too. So we can compute a little part each frame, and make active the modifications when all is rendered. Do you think, it cannot make the solution anymore? (the genetic algorithm implies a lot of computations, but i wonder if there is not a solution optimised for a game, and i will probably make a neural network for each unit, but perhaps for groups, since this is the computer AI)

Share this post


Link to post
Share on other sites
I''d go for fuzzy logic... If player increases tanks then increase anti tank defense... if player decreases defense then increase offense.... sort of like that.. I don''t know much about it i might be implementing it a bit as a decision tree here but i think both could work a bit or use a combination of them.

You get an efficient AI since you have to save those computations for the graphics since its a 3d game. With neural networks you would have to train many different nets for many different behaviours and patterns. Halflife uses decision trees. If enemy in range, shoot, if life low, run... blah blah.

Share this post


Link to post
Share on other sites
The half life AI is not very impressive.
And i work on a strategy game.
The AI is very important here, more than in a FPS.
Secundo, the logical trees is hard to get evolved. I thought of neural network to train itself and learn how you''re playing.
I think it''s a neural network that was used in Conflict Zone, if i''m wrong, tell me.

( Be Side )

Share this post


Link to post
Share on other sites
THe thing with neural networks is that they require a lot of connections in order to act correctly with a correct training. And all u can do with NN''s is to recognize patterns. This would mean lots of training even before making a release and the AI would have to adapt to some sort of startup before even knowing what the adversary is doing in which case the AI might do things the same every single time. Unless you add some chaotic behaviour to the nets. In which case is simpler if u talk about decision trees. Because you could add a piority system sort of like a neural net does its firing... reduce the possibility or increase the possibility of an outcome when the outcome is not too important like having the tanks shoot whenever another unit comes into range.

You see, if you want to use Neural Nets in RTS 3d AI you must think of these kind of stuff. I hope you see my point here. I know AI is very important in RTS but how much AI does it really need? we''re talking about keeping track at least 300 units on field, having some sort of AI handle their actions and have another type of AI handling their strategy while some sort of AI handles u''re units own actions like shoot when enemy in range... follow enemy blah blah... In a computational way its far easier to decide to shoot with range than with a neural net sometimes might even make the computer stupider then needed.

I have neurons in my ass!!!

Share this post


Link to post
Share on other sites
hahaha yes you're frightening me.
I'm sure this will have lots of computation.
(i will try to put them on hardware, with luck)
But i need to do some precisions :
The AI is not for per-unit managing.
This is a strategy AI that handles the control of an army when you're playing with the computer.
I've said that earlier, the AI will take managing on groups. Large decisions. So no 300 units AI training, (300 will be used for the return value used for training of the AI i think).
I know the trees issue, but i think there is a possibility for the neural network to work with the strategy. In conflict zone, they have a very good AI that trains himself, generals that can handles parts of your army, etc... The more you play with it and the more it becomes stronger and anticipate on you. I've read some tests and the testers said that it reads into your head directly. This game was made by a AI society(french). And this is the best AI in a game for the moment. So if it is not Neural networks, what is it then?
Heuu something else : the AI is not used every time. It is used when there is something changed in the situation like a unit death. Than we use the AI and the training can be done on the intermediate stages when it has nothing to do.

( Be Side )

[edited by - Jis on June 12, 2004 1:21:35 AM]

Share this post


Link to post
Share on other sites
If you really want to create this type of AI then you must read this article.
http://animatlab.lip6.fr/papers/Robert_PreThese2002.pdf

it''s the document used for Conflict Zone''s AI. It doesn''t use just one type of AI like you''re saying about NN''s... it uses lots of AI together to make something called Automata. Just give it a good read and then come back asking whatever you like

Share this post


Link to post
Share on other sites
I seriously doubt that game uses a NN. I''d bet that less than 1% of any game uses NNs. There are far easier methods of implementing advanced AI that will give you as good if not better results, without the headaches of a NN.

Share this post


Link to post
Share on other sites
Hahaha thanks, this is what i wanted, to get ideas fixed.
This pdf, is very interressant, thanks.

[edited by - Jis on June 12, 2004 10:32:37 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by lukar
If you really want to create this type of AI then you must read this article.
http://animatlab.lip6.fr/papers/Robert_PreThese2002.pdf



OK, first question : Is there an English translation anywhere?

Share this post


Link to post
Share on other sites
I don''t think so really. I don''t know much french but i can understand it quite a bit since i know english and spanish. and very basic french. But you should make the effort and get it translated by babel fish or get someone to do it for you. It''s a very valuable paper. Or even contact the guys from the animat lab since they are doing the research on this types of AI along with Nevrex their investor.

Share this post


Link to post
Share on other sites

  • Advertisement