(1) Make the scenario more deterministic by explicitly forbidding the AI to expand beyond a certain point. The stone barrier is supposed to prevent enemy expansion, but the AI might by chance build a lot of quarries and then expand.
(2) Change the logic of the scenario so that advanced military buildings become unlocked as soon as the player can see the enemy's territory.
I see two approaches to fixing that:
(1) Make the scenario more deterministic by explicitly forbidding the AI to expand beyond a certain point. The stone barrier is supposed to prevent enemy expansion, but the AI might by chance build a lot of quarries and then expand.
(2) Change the logic of the scenario so that advanced military buildings become unlocked as soon as the player can see the enemy's territory.