Game Development Reference
In-Depth Information
U SING A LGORITHMS TO C ONSTRUCT N UMBERS
Individual numbers alone aren't always enough to do the trick. There usually isn't
a clean one-to-one ratio between something we would like to consider (an input)
and the decision we need to make (an output). It is often important for us to con-
sider a variety of inputs. Additionally, these inputs may be of significantly different
types. This complicates things further.
For instance, if we are simply looking at our health compared to our oppo-
nent's health, we are comparing two values that mean the same thing and may very
well have the same scale. On the other hand, if we were to consider our health and
the number of bullets left in our gun, we would have to determine which of these
is more important and by how much. Do we put the bullets in terms of health?
Health in terms of bullets? Or do we abstract things out to a level that takes both
types of information into account? At this point, we have stepped out of simply
using numbers and formulas… we are now creating more complex chains of logic
and calculation to make our decision.
Making the Grade
If I can tap into my parenting again, my kids' school district has this fancy Web-
based portal so that I can see every bit and piece of their grades. More than simply
getting a letter grade or even the current grade percentage, I get to see the grades for
every single assignment, project, quiz, and test. It goes even deeper than that… I get
to see how many points each of the above was worth to begin with. So a 20-point
quiz is worth more than a 15-point quiz. A 50-point homework assignment is
worth a lot more than a 10-point one. Heck, even getting 40% on the 50-point
homework (i.e., 20 out of 50 points) is worth twice as much as getting 100% of the
10-point one. Of course, the grade on the 50-point assignment is also worth five
times as much as the grade on the 10-point one.
What makes things more interesting is that a 30-point test or quiz is not neces-
sarily equal to a 30-point homework assignment. The reason? The grading system
allows for layers of combination weighting that is similar to our example above.
The work is grouped into categories such as homework, projects, labs, quizzes, and
tests depending on the way the teacher has arranged the class. Each category (sim-
ilar to our mid-level groupings) is then given a weight. The weights are combined
with the respective scores in each category, and a final grade is determined.
Stepping through an example makes things a bit clearer. Here are some sample
grades that I just made up. (My own kids' grades at the moment aren't all that in-
teresting or conducive to an example.) In this example (Figure 3.7), there have
been two tests, two quizzes, and four homework assignments. Each of those (white
boxes) shows the number of points scored out of the maximum possible. For exam-
ple, the first test grade was 35 out of a possible 50.
 
Search WWH ::




Custom Search