Hi Guys,
I am working on a turn-based-game AI using a neural-network technique known as NEAT. I am attempting to train a network that can move around a two dimensional (X&Y coords) space given a variety of values that are stored in what is effectively a two dimensional array.
I can see two strategies for using the neural network:
For each "cell" in the grid, provide the scores from the different heuristics as inputs to neurons and create a NN that is effectively a very complicated "scoring" system. Move the Non Playing Character (NPC) to the location with the highest score.
Create a compressed value for each heiuristic measure (somehow compressed into as few bits as possible) and provide an input neuron for each of these measures.
I am quite interested in option two because it presents the least amount of calculations required (the runtime of the game is quite long), however I am confused as to what approach I could use to create the "small representation" version of the two-dimensional heiuristic values. I know there are techniques such as Fourier Transformations out there, however I don't know if these will suit my problem. Basically I am looking for a way to convert a 50x50 array of doubles into one or maybe two double values. These two double values can be lossy-compressed, I don't need to be able to get the original values back, I just need a reasonable mechanism for changing the input data into a small footprint.
An alternative to these two possibilities is to somehow encode a "region" based on some distance from the NPC (so you get the actual values for a "close" cell, and an approximation for a "far" cell). I don't know exactly how I would wire this up, but it at least gets rid of the need to evaluate every cell every turn of the game (given I am looking at about 5 million rounds at approximately 1 second per round, any simplification I can come up with would greatly help).
I apologise if this isn't making much sense, it is quite a difficult problem that has stumped me for a while, and I can't think of an easy way to describe it.
Thankyou,
Aidan
EDITED TO ADD (and change title):
Thanks to Chris we've refined what I am looking for. What I am looking for is a way to approximate a line (I can convert the 2D map into a line) in as few parameters as possible. I have used cubic splines for interpolation before, however I need something a lot more feasable for a data-set that varies between 0.0 and 1.0 quite aggressively. What I am realling looking for I suppose is a "hash" of the map.
I know there are techniques such as cubic splines that I can work out some "key-points" from, and these values are a reasonable analogy for what I am looking for. I need a way to take the 2500 values and come up with a small representation of these values that I can use for the neural network. I think the NN can be trained to infer the true meaning of these representations, or at least to determine some correlation between the representation and the real world, so it doesn't necessarily need to be a reversible function, but I don't think many one way functions (such as MD5's, SHA's) are actually going to be very helpful either...