Actually, the reason why the Inferno patch is called that, and not the Necro-Inferno patch, is because Vic couldn't come up with a reasonable algorithm to determine the boundaries of the Necro spawn in the underground (at least at the time of our conversation on this topic).
Dima, did you even understand what you wrote? :)
The Inferno patch is called that because it includes several changes related to playing as this Castle: territory bonus in the underground, hero skills, Magog's shot, and the prices of some upgrades.
And the script for the territory bonus, which is part of the patch, works equally well for lava or any other territory.
What does Necro land have to do with it?
But the idea that it is impossible to determine the belonging of an object or a map cell to a specific spawn is absolutely correct.
You shouldn't take it personally, but your idea is complete nonsense. It needs to be completely rewritten.
Well, then it's not AI, but a random map generator.
Actually, it's not that much nonsense - there is a rational core to it.
Firstly, it is necessary to make the generator add information about the belonging of cells or objects to a specific spawn to the map.
Then, starting spawns, and any other spawns, can be balanced in some way using scripts. But not by simulating hero leveling, but simply by recalculating and replacing objects.
Of course, the balance is determined not only by the total value of the spawn objects, but also by their location. But it is quite possible to make a rough balance so that there are no scenarios with several cons for one player and their absence for another.
I'm just wondering - is it possible to do this? At a reasonable cost of labor.
Everyone has different ideas about what is reasonable.
If you force the generator to add information about spawns to the map format, then it will be easier to proceed from there :)
In principle, this is quite possible.