Lanchester’s Law

Model competition and battle outcomes using Lanchester’s law.

← Differential Equations projects

Learn Mathematics Differential Equations

Question

How do force size and effectiveness affect the outcome of a battle model?

Goals

  • Implement coupled equations for two opposing forces.
  • Compare scenarios and explain the assumptions behind the result.

Method

Let the size of each force control the rate at which the other decreases.

  • Choose a Lanchester model and set the initial forces and effectiveness rates.
  • Integrate the coupled equations and plot both force sizes over time.
  • Compare linear and square-law cases and test the model's sensitivity.

Try an example

Arrange several coloured forces around an arena, then watch a Go WebAssembly game turn movement and ranged laser attacks into population curves.

Controls: Choose 2–6 teams and set each force size with the in-game controls. Press Enter to start, Space to pause, R to restart, or Esc to edit. After the battle, compare the matching team-colour survivor curves.