One of the most interesting talks on the math behind procedural generation:
https://www.youtube.com/watch?v=C9RyEiEzMiU
That presentation was foundational for me personally wrt quite a few things.
The issue with procedural generation isn’t how to do it, the issue is how to keep it from being boring.
If you add civilizations and intelligence to procedural generation- you get really fast into foundation prime radiant territory- where you generalize from huts to radioactive ruins or substrate (matrices) - the rise and fall of civilization from first principles. To put that into deterministic math- is fascinating - but then to add the players input and have the fate diverge..
As in deterministic circumstances + a historic noise + a formula for civilizational fungi.
Basically a recursive scenario-tree- with branches for capabilities- and regressions as loops to previous iterrations. The noise function is the index and the dice - and the tree modifies its branches depending on the iterration. You gain a panopticon- your chance of accidental nuclear war wither- the loop back to savagery reduces in likelihood. And so on and so forth.