Lanchesters' Battle Simulator

2024-09-27

Ever since I learned about Lanchesters' laws from this great (!) Youtube video I have always been very eager to run my own simulations in code to see if the law holds up. In short, the law states that the rate of which your army looses units depends on the number of units in the opposing army.

This is a very simple model that doesn't take into account many factors but you can imagine a fun exercise in Starcraft or Age of Empires with this in the back of your mind. With the advent of LLMs that might help one do some recreative programming ... I was wondering if I needed a big game engine at all for this sort of thing or if maybe I could just simulate this directly in the browser.

Thats how I started toying with the idea, and here's where I ended up:

Team A: 0 | Team B: 0