Game Development Reference
In-Depth Information
system that has an ''I don't think so'' output. In these systems, the training data
includes properly marked garbage. Good garbage for training can be hard to find,
and tuning systems that have a garbage output can be a black art. The question
for the designer is to ponder the difference between an AI that is resolute, if
occasionally stupid, compared with one that sometimes does not know what to
do. If the designer says, ''All the choices are always good, just sometimes some are
better than others,'' then the resolute system is fine. On the other hand, if there is
a good default behavior available to the AI, especially when some of the outputs
could be badly inappropriate, then it may be worth the effort to implement a
garbage output. Whether it is programmed to recognize garbage or not, a clas-
sifier should always be tested with data that has no right answer.
Input Features
Getting the inputs right can make or break a neural network. The inputs are
collectively known as the features presented to the network. We could have pre-
processed two of the inputs, hit points and max hit points, and used the ratio as a
single input instead. In our particular case, a properly engineered network will
infer the relationship, but this is not always a given.
Consider a monster that is in combat with a powerful foe. The monster is losing
hit points in large chunks. The monster will go from the attacking state to dead
without ever having a chance to flee. Our current set of features is not sufficient.
If we add rate of change of hit points as an input feature, our monster can act
more intelligently. It can know that it can stay in combat longer against a weak
foe, even if the monster is hurting. And it will know to flee early if it is being
hammered by a potent foe.
Getting the features right is critical if the network needs to deal with time-varying
data. The rate of change in a value (the first derivative, in mathematical terms)
can be very useful, as we saw in the monster-hit-points example. The rate of
change of a first derivative (the second derivative of the value) can be useful as
well. When the steering wheel of a car is turned, the car begins to deviate from a
straight course and to rotate. The change rate of the vehicle's heading (the first
derivative) gives a sense of how fast the vehicle is getting around the corner. The
second derivative, combined with other data (notably the position of the steering
wheel and its first derivative), tells the driver if he or she has exceeded the
available traction and is beginning to spin out. The increasing rate of heading
change, easily noticed when the second derivative is positive, means that the car is
 
Search Nedrilad ::




Custom Search