Music 1: LittleTomcat (see attributions)
Music 2: Portugese Nostalgia (see attributions)

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

Simulation Modelling for Naval Games

Preface:

The following article describes the motive and method for modelling history through equations whenever a computer game is contemplated. Put simply, a happy computer works with equations. Unhappy computers work with probability tables. This article discusses the method for converting historical data into equations. We will concentrate on naval warfare; but, the methods apply equally to land based situations. Last, the Tillamook High School computer teacher kindly shared his knowledge of modern game engines (Unity, UnReal, Godot etc.). In particular, many of these tools provide convenient curve fitting tools; but, I would encourage the developer of games to at least review such conclusions with a spreadsheet to ensure that such equations do not contain nasty surprises.

Simulation Games In Historical Context:

image of Japanese Light Cruiser 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 Data Plot Example


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 algebraic substitution to build new equations which directly and dependably produce useful results. My article on "Anti Torpedo Defence 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 exercise. 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,

P.S. A few words on historical research. When designing games, a great deal of reading is needed to assemble enough data to create a model that is rather like the actual historical events. Often, a single sentence from a history book is critical. For example, "Pre WWII British analysis indicated that a submarine attacking a well protected convoy was about 66% likely to be sunk by escorting ships. (this is historically true)." Several well documented German attacks against convoys proved this to be true; yet, in the Pacific theatre, U.S. submarines were rarely sunk, because "the best" Japanese commanders and crews were not doing "anti submarine warfare". The 2/3 rule applies in the Atlantic, is accurate and stands on a single quote. Contrary Pacific War experience stands on volumes of data and is the result of less than committed enemy ASW teams. Describing historical reality is always a challenging and time consuming task.

Paul Watson



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


Dionysus.biz Home Page