CRTs and Numerical Integration
Posted: Mon Feb 11, 2008 12:11 am
My basic point is that the 60 mile hex creates a poor model. We have to live with it, but if we're changing the scale, we might as well tune the game engine.
The issue is that a numerical integration algorithm (which is what a game engine is in the end) has to satisfy three things if it is to generate accurate outcomes: convergence, consistency, and stability. Convergence says that the solution generated by the algorithm has to approach an exact solution as the integration time step goes to zero. Consistency says that the local error of the method (that is, the difference between the exact solution and the results of the numerical integration at each time point) also has to go to zero as the step size decreases. Finally, stability says the algorithm has to be numerically stable--e.g., the system cannot be stiff, with multiple time scales. If it doesn't satisfy those conditions, it will generate flaky answers.
Euler's forward integration method (which is used by most game engines) is known to be flaky. If you use backwards integration, you'll get much better stability, but at the cost of not modelling threshold phenomena (aka breakpoints) well. You really need to use a compromise, like Crank-Nicholson. Using 1-day turns with 60 mile hexes means that you're working with rather stiff systems, and you're likely to get severe inaccuracy in your ground combat system.
We run into the same problems modelling neurones. Engineers tend to use very large compartments in their modelling, but people concerned with how the real brain works reduce the compartment size to the point where edge effects aren't dominating the results. For accuracy, we find that while you can get away with single compartments in in a few cells, for others, you have to use as many as 5000 compartments. We also find that using multiple integration time scales can help.
With 60 mile hexes, you need to model what's going on inside the hex in some detail to overcome those problems. The game produces really whacko results sometimes that totally blow the mind of anyone who actually knows something about what's being modelled.
Now, I'm open to questions.
The issue is that a numerical integration algorithm (which is what a game engine is in the end) has to satisfy three things if it is to generate accurate outcomes: convergence, consistency, and stability. Convergence says that the solution generated by the algorithm has to approach an exact solution as the integration time step goes to zero. Consistency says that the local error of the method (that is, the difference between the exact solution and the results of the numerical integration at each time point) also has to go to zero as the step size decreases. Finally, stability says the algorithm has to be numerically stable--e.g., the system cannot be stiff, with multiple time scales. If it doesn't satisfy those conditions, it will generate flaky answers.
Euler's forward integration method (which is used by most game engines) is known to be flaky. If you use backwards integration, you'll get much better stability, but at the cost of not modelling threshold phenomena (aka breakpoints) well. You really need to use a compromise, like Crank-Nicholson. Using 1-day turns with 60 mile hexes means that you're working with rather stiff systems, and you're likely to get severe inaccuracy in your ground combat system.
We run into the same problems modelling neurones. Engineers tend to use very large compartments in their modelling, but people concerned with how the real brain works reduce the compartment size to the point where edge effects aren't dominating the results. For accuracy, we find that while you can get away with single compartments in in a few cells, for others, you have to use as many as 5000 compartments. We also find that using multiple integration time scales can help.
With 60 mile hexes, you need to model what's going on inside the hex in some detail to overcome those problems. The game produces really whacko results sometimes that totally blow the mind of anyone who actually knows something about what's being modelled.
Now, I'm open to questions.