Sign in to follow this  
AaronDean

Design a game that is good for a neural network

Recommended Posts

So how would you design a game if you had to make the AI for the game a neural network? I'm thinking of something like a multi-player boardgame like Risk or Axis and Allies, a territory grab. Maybe not as complicated and I'm not concerned about the graphics at this point, just the game-play.

I'm wanting to try my hand at coding a neural network and I want it to learn to play a game that no one has played before. For those that know neural networks and the problems they are good at solving, how would you design a new game that a neural network would be good at learning.

Thanks,

AD

Share this post


Link to post
Share on other sites
Neural networks are good at solving the same things our brains are good at solving: pattern recognition and signal processing. They aren't good at planning (they don't actually _do_ planning) or strategy; they are purely reactionary. Neural networks require extensive training if they are of any meaningful complexity, so they tend to work best with relatively static problems, hence they apply to games that require little creativity.

Really, though, you're doing this bass-ackwards. Whether your goal is to make a good game or to just practice neural network development, either way I wouldn't design a game explicitly for a neural network. That would be like designing a lock that was made for lock-picking; it'd be both a bad lock and a pointlessly trivial exercise to the budding burglar. smile.png

Share this post


Link to post
Share on other sites

Neural networks are good at solving the same things our brains are good at solving:

 

Are they? All the NNs I've seen are pretty awful at problems humans are good at!

@Original post:

Instead of implementing a game, why not tackle an existing game? You could take a look through this list ( http://boardgamegeek.com/browse/boardgame ) and implement the rules of a game on it you would like to tackle with a NN. I'm don't think many of those games have had NNs play them before... I think good games to tackle might be: Small World; Tichu; Ticket to Ride; Sheriff of Nottingham; Hive*;

These games do not require deep strategy or planning and it should be relatively easy to get a NN up and running that can play at least a decent game against human players.

*Except Hive, which does, but is a chess-like game that I do not believe anyone has tackled with a neural net yet.

 

Share this post


Link to post
Share on other sites

Neural networks are good at solving the same things our brains are good at solving:

 
Are they? All the NNs I've seen are pretty awful at problems humans are good at!


Although the statement you are responding to is overselling them, neural networks have improved a lot in the last 8 years. There are now neural networks that are about as good as humans at many image-recognition tasks: Classifying images, recognizing hand-written digits, recognizing street signs, reading house numbers...

In the subject of games, there are now neural networks that are extremely good at predicting the next move in go and playing Atari 2600 games.

I have recently used a neural network as an evaluation function for Spanish checkers. When used within a simple alpha-beta searcher, the resulting program is probably better than any human (in limited testing, it seems to play better than a friend of mine who is a top player).

Share this post


Link to post
Share on other sites

Kanji input on a pen stroke interface  (3000 common characters you need a rather complex keyboard)  was a well used NN application (20 years ago was it ??)

 

SO maybe a game that uses sweep input (mouse or finger interface) gestures  which are recognized (have to be learned and then repeated back at the game ??)

 

Typical unit AI's are very irregular special case oriented -  generalized patterns really arent there in most game mechanics (and scripting already handles quite well - you might have a few NN tools for certain analysis but it would only be a small piece.

 

The training thing for NNs really doesnt work without massive effort of creating training sets even for a very generalized game state set.   (You also need a very explicit  'right or wrong' judgement metric so any forming NN can correct itself and more complicated games which have results happen in a delayed fashion are hard to gather/digest the judgement data for.)

 

 

Share this post


Link to post
Share on other sites


So how would you design a game if you had to make the AI for the game a neural network?

 

I probably wouldn't.

 

Its unlikely that you'll find any type of game where a NN would be the superior choice in AI.  thus any game using NN would be sub-par and not worth doing.

 

only if one could identify a good candidate game, and then PROVE that NN works better than other AI types (via rapid prototyping), would it be a viable option.

 

this assumes that its not simply undertaken as a learning exercise.

 

if undertaken as a learning exercise only, you'd want a game where what a human player does is similar to what your NN does. But even then, a non-NN AI would probably still beat your best attempt at NN AI.

Share this post


Link to post
Share on other sites

Hi, I suggest that you take a look at Temporal Difference Learning, where the AI is trained to Grand Master level by Reinfoced Learning (nnet's learn by playing against itself).

 

I would probably try something simpler than Risk &c. for a start ;-)

 

TDL works better w. games with a random element (the dice roll in backgammon in the case of TDGammon), but you can also make it work for deterministic games, it requies a somewhat larger training setup however (alotta code).

 

I have great success using TDL to train the nnet AI for my games, it performs brilliantly and I do not have to learn the strategy myself ;-)

 

Good luck !

 

Cheers,

/Thomas

Share this post


Link to post
Share on other sites

I agree with everyone else that you are:

 

  1. Doing it backwards by choosing a game to match the algo
  2. Putting the word "good" in the wrong place... i.e. "a game that is good for a neural network". In theory, you could have a very, very simple game that NN could solve. However, it would likely be a pathetic game. It is very likely you will achieve the different goal of designing "a good game that a neural network can solve."

If you are just trying to learn how to do a NN, don't design a game. Use something standard.

 

When you are done, put NNs behind you and concentrate on doing AI with other algos that have far more application in game AI.

Share this post


Link to post
Share on other sites

Or a standard NN task can be turned into a game.

For example, you can use a camera to play rock-paper-scissors in real time against a simulated character on the screen. A NN can

  1. recognize when the player swings his hand to react with the bot's move, like real people do;
  2. more importantly, cheat by recognizing patterns in how the human player moves fingers and adjusting the bot's choice of rock, paper or scissors on the fly..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this