Problem: At some point in a game, a CPU-controlled faction suffers a massive death of units (usually all workers, being the ones with the weakest HP).
Comment: This has proved to be a problem rather difficult to reproduce. It happens only on long-duration games with few battles, when the AI is able to produce a lot of units while suffering little loss. I built a map to that effect and made tests with many factions, with this result:
Factions affected by this problem:
From Megapack, Egypt and Persian.
Non-megapack, Japanese and Elves.
Diagnose: The cause seem to be the units consuming more than 1 food. In the case of Elves, a particularly hungry faction, it is very easy to observe this mass death. On the other hand, take a “safe” faction like Tech and modify some of its units to need 2 food instead of 1. Then it will not be long before its workers suffer the same fate. Apparently the AI calculates food production counting the number of units, not the real food needs.