🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

how can neural network can be used in videogames

Started by
21 comments, last by Minsc&Boo 8 years, 1 month ago

It's interesting to see that the consensus regarding NN in games seems to be changing.

Advertisement
I'm not that scared by your FUD about how complex things can get. :)


EDIT - a simple thing to contemplate what Im talking about is --- try to program Chess via a NN based solution.


I already mentioned I have used a NN as evaluation function in checkers. Using one as evaluation function in chess is not [much] harder: http://arxiv.org/abs/1509.01549

Other uses of NNs for chess are possible: http://erikbern.com/2014/11/29/deep-learning-for-chess/

I'm not that scared by your FUD about how complex things can get. :)

EDIT - a simple thing to contemplate what Im talking about is --- try to program Chess via a NN based solution.


I already mentioned I have used a NN as evaluation function in checkers. Using one as evaluation function in chess is not [much] harder: http://arxiv.org/abs/1509.01549

Other uses of NNs for chess are possible: http://erikbern.com/2014/11/29/deep-learning-for-chess/

Checkers as a equivalent to Chess ? ok .........

'Chess' Evaluation function ( as in 'tool' ??) .... but is it the fundamental core of the decision logic ? Which is what Im talking about being a problematic thing for NN usage.

'possible' -- Where AI is concerned I recall that little situation in the 50s where they thought AI was just around the corner, and all kinds of Computer AI goodness was just about solved. Here we are 60 years later. 'Complexity' has proven to be quite perplexing.

--------------------------------------------[size="1"]Ratings are Opinion, not Fact

Checkers as a equivalent to Chess ? ok .........


You sound like someone that has never programmed either a checkers engine or a chess engine. I have done both. And nobody said "equivalent". But they are in the same class.


'Chess' Evaluation function ( as in 'tool' ??) .... but is it the fundamental core of the decision logic ? Which is what Im talking about being a problematic thing for NN usage.

Yes, NNs are only a tool. I don't see who you are arguing with here. The main search algorithms to use in boardgames are alpha-beta search and MCTS. Both of them have a two parts that can be implemented using neural networks: An estimate of the probability of each move and an estimate of the result of the game.


'possible' -- Where AI is concerned I recall that little situation in the 50s where they thought AI was just around the corner, and all kinds of Computer AI goodness was just about solved. Here we are 60 years later. 'Complexity' has proven to be quite perplexing.

I am not old enough to remember what people were thinking in the 50s. But I know what AlphaGo just did to the game of go using NNs. And it's hard to argue that go is not a complex game.

"You sound like someone that has never programmed either a checkers engine or a chess engine."

You sound like someone who hasn't programmed anything more complex than a "checkers engine or a chess engine".

"Yes, NNs are only a tool. I don't see who you are arguing with here"

Unfortunately they are the 'hammer' some people see all problems as 'nails' to use on. NNs for basic classification of SIMPLE situational factors are fine, but once the situations are no longer simple (like spotting temporal cause and effect) they just dont work too well. And even then (As stated above) there is the REST of the logic to be done to actually work a game problem solver. Likewise, there usually is ALOT of complex data massaging that needs to be done FIRST to be able to feed it into an NN.

"parts that can be implemented using neural networks"

But are they 'parts' which simpler hand crafted logic can do more simply and efficiently (Are they there done as NN just for the sake of doing them in NN ???)

"not old enough to remember" then read about it. google history of AI

Go's mechanism is very nice and simple - actually its point is it being boiled down into simplicity of mechanism. The game situation representation and play process and actions likewise are quite limited. So of all games it may be nearly the best to use NNs on. Too bad so many other games dont have its major advantages that allow NNs to be employed so easily.

--------------------------------------------[size="1"]Ratings are Opinion, not Fact

Yeah, Go is actually a very simple game with a very large branching factor. That is NOT the case for most game AI needs.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

"You sound like someone that has never programmed either a checkers engine or a chess engine."

You sound like someone who hasn't programmed anything more complex than a "checkers engine or a chess engine".


Whatever.


NNs for basic classification of SIMPLE situational factors are fine, but once the situations are no longer simple (like spotting temporal cause and effect) they just dont work too well.


NNs can tell a Siberian Husky from an Alaskan Malamute by looking at their picture. They can translate sentences between any two languages, with very little additional machinery. Certain NNs (LSTMs in particular) can spot temporal relationships extremely well. It just sounds like you made up your mind about what NNs could do a decade ago and your opinion is impervious to new information.


Yeah, Go is actually a very simple game with a very large branching factor. That is NOT the case for most game AI needs.


This is a serious mischaracterization of the difficulties in writing go AI. The 9x9 game has a branching factor comparable to chess, but until a few years ago we couldn't write strong engines even for that version of the game, because the main problem is not the branching factor: It's the lack of a reasonable evaluation function. Now if you look at what AlphaGo has done, one of their key components is what they call their "value network", which is a NN used as an evaluation function. The problem of writing an evaluation function in go is so subtle and so complex that nobody knows any other way of writing a reasonably reliable evaluation function (this is not exactly true: Monte Carlo methods also kind of work for this, and AlphaGo actually blends the two approaches).


Look, I used to be very skeptical of what NNs could do, but they have gotten a lot better. I still don't think they are very useful for game AI, but it's probably a matter of time until they become useful, and it's probably not a waste of your time to learn about them. It seems plausible that, if you can define a reward system in some quantitative and automated way, you can implement good game AI using a utility-based architecture where the sum of future rewards is estimated using a neural network.

It's interesting to see that the consensus regarding NN in games seems to be changing.

Consensus is a strong word. The recent developments of neural network algorithms and computing power are extending the range of things a reasonably expensive NN is good at, but whether they overlap with the useful AI tasks needed in a certain game depends on the specific case.

Omae Wa Mou Shindeiru

Unfortunately game situations are magnitudes more complex than the single problem of telling one handily pictured husky from another (which if ever needed as a 'tool' takes up a good sized NN by itself, and then we will need the 10000 other 'tools' (and their training sets) for all the other classification/differentiator/deobfuscator tasks, and then the processing resources to run them ALL in a timely manner.

Maybe if you were using NN to spot 20 year old game pixel patterns for game objects in a clutter of on-screen scenery this would be relevant. Unfortunately that IS still just a basic sensor filtering task and does little for the rest of the problem of playing the game.

-

"They can translate sentences between any two languages, with very little additional machinery."

I'd like to see the project that claims THAT. Particularly with your use of the word 'any' - when there are so many world languages to map between and more than a few that dont have exact translations of certain words/idiom-contexts with other languages. (English:"The spirit is willing but the flesh is weak" --> Russian:"The wine is good but the meat is rotten"...)

Text to text NN input ??? or again you are claiming some subtool NN of a much more complex program and data set (dictionaries/grammar rule translators) where the NN component actually turns out to be a trivial part of the whole thing. ???

-

Temporal cause and effect pattern spotting has major difficulties with noise from nonrelevant situational factors and a further combinatoric explosion of endcases, some coming now from irregular event timings. Again in more complex simulation environments this forces greater human intervention being required in the training (hand training the logic which otherwise could simply further just be built as conventional logic) which is the most significant chokepoint of complex NN solutions.

-

For Go I could see use of convolutional neural networks to convert the simple Go grid into higher and higher level features and trying to spot the needed decision patterns . How well can the future-assessment be evaluated - training the NN effectively for that generalizing, without it having terrible gaps? But again that is for an example of a game with 'situation' that is utterly flattened out/narrowed in detail complexity, compared to just about all other 'games'.

--------------------------------------------[size="1"]Ratings are Opinion, not Fact
https://arxiv.org/pdf/1409.3215.pdf

This is also fun: http://karpathy.github.io/2015/05/21/rnn-effectiveness/

This topic is closed to new replies.

Advertisement