Music

Notice: All of my work is historical- WWII and before.

Simulation Modeling for Naval Games

Simulation Games In Historical Context:

Japanese Light Cruiser Image 30 years ago, simulation games were played on game boards, with dice roles which referenced lots and lots of tables. These tables purportedly represented more or less realistic outcomes on a probability basis. Today, simulation games are typically played on computers, often engaging multiple players. I suspect that all to often, in the background a random number generator result is still compared to tables. While tables can be useful, I would like to see that changed. Computers by their nature work with equations. Most of the research I have been doing reduces historical reality to data points which are then "curve fit" via regression software thus producing an equation. Ahhh- the beauty of an equation. Defined at every point and quite naturally understood by computers. Such equations can be coded directly into software routines and time consuming disk access is avoided, as are large data tables.

Examples of Functional Descriptions:

Counter Examples of Functional Descriptions: In all cases, a curve fit solution is not the best answer. In many situations, the "x" value may not be numeric. One of my research articles on this website collects data on how many WWII torpedoes were required to sink ships of various types (i.e. freighters, tankers (full or empty), destroyers, mine layers etc.). The "X" value is apparently the type of ship, but freighters, tankers and destroyers are not numbers and do not easily reduce to numbers. We could try something like using the "Gross Tonnage" of the various types of ships and perhaps a relationship could be established; but, on the surface it looks like this is better handled with a table.

Guidelines for Curve Fitting of Data:

Curve Fitting is a "crude term" for Regression Analysis. They mean the same thing. Curve fitting takes a set of x,y data and attempts to put an equation through the points, or as closely as can be. Most curve fitting software comes with 4 or 5 general equation forms built in. The user is asked for the x,y pairs of data and is asked to choose which equation form to use. Common equation forms include the following: The program will usually tell you something called r^2. If R^2 is 95% or higher, you likely have a pretty good fit although it may be "ratty" at the left and right ends. If R^2 is less than 85%, you probably have a pretty bad fit.

It is a good idea to use a program that not only does the curve fit, but plots out your data with the curve on top.That way, you can see if the fit is fairly good all along the data set, or if it gets really bad at the ends. The plot below was made using Scientific Data Analysis software on an I-Pad. A second sheet of display shows the equation and R^2 value.

Equation: y = 1.2345x + .4936 (i.e. m=1.2345 and b=.4936 for equation in standard form y = mx + b)
R^2 = .988
Linear Plot Showing Data Points


It is also a good idea to try fitting the data to 2 or 3 different equations. Then pick the one you like.

There are lots of good regression software packages available for everything from I-Pad to computer. But you likely have access to X-Cell which can do it!. The command is under Data/Trend Analysis. The Apple spreadsheet as provided for Mac has similar capabilities.

Advantages of Functional Descriptions:

  1. Use of equations in lieu of tables results in cleaner computer code with less logic.
  2. Use of equations in lieu of tables generally results in faster program execution.
  3. Use of equations often allows algebriac substitution to build new equations which directly and dependably produce useful results. My article on "Anti Torpedo Defense Systems..." makes extensive use of this technique to generate some rather complex equations from simple, curve fit origins.
  4. Reduction of "reality" to equations sometimes results in deep insight into history and technology that is not apparent without having undergone the excercise. Clearly, such insight requires considerable maturity in mathematics and interpretation there-of.
  5. Use of equations is obviously a more moral way to code software!

Conclusion:

I have offered convincing reasons why equation form of data should be used in computer simulation games in lieu of tabular data when possible. Numerous examples of the kinds of situations where this applies have been offered, along with an example where it does not apply. Guidelines have been provided to aid in the development of your own equations, to suit your own purposes. Wishing you the best and hoping this brings some light to your future gaming efforts,
Paul Watson


Contact the author paul-watson@sbcglobal.net by e-mail.
© 2017 All Rights Reserved
Paul F. Watson


Dionysus.biz Home Page