Game Development Reference
In-Depth Information
10
Mathematical Functions
It's no secret that mathematical functions are integral (Oooh… a calculus pun!)
to game development as a whole. This is especially true in the subspecialty
of game artificial intelligence (AI). In Part II, we explored the heady world of
decision theory. Much of the discussion, however, was theoretical rather than prac-
tical. Even as we delved into the mathematics of utility, much of what we explored
was relatively straightforward. If we are to convert that theory into practice, we
need to explore the language necessary for expressing those theories.
A good example is that of marginal utility. In Chapter 8, we discussed how util-
ity can change over a range such as time or quantity. Simply knowing that it can
change—or even which direction it is changing—is not enough. We need to define
what that rate of change is. We may need to even define the rate of change of the
change! There are numerous ways of accomplishing this task, the selection of which
depends on exactly the effect that we desire.
As we have repeated throughout this topic so far, the best approach is for us to
lay out the tools and make note of some convenient examples of their usage. In that
pursuit, this chapter will consist of a reference guide to these basic tools.
S IMPLE L INEAR F UNCTIONS
The most basic function we will use is the linear function —named as such due to
the result forming a straight line. We usually see this early algebraic staple defined
in the slope-intercept form,
where m is the slope of the line and b is the y -intercept (the point where the line
crosses the y -axis).
229
 
 
 
Search WWH ::




Custom Search