Specifics of the computer AI

I’d like some info on how the AI constructs buildings depending on it’s level. As in what kind of buildings will Easy all the way to Insane AIs construct? Will they build some of the less obvious buildings like Bunkers, Nydus Canals etc. and use them to a greater or lesser degree?

Also, as an example, if I were to run a scenario, where I had restricted an Insane AI to only be able to produce Command Centers, SCV’s, Supply Depots, Barracks and Marines, would that mess with it to inactivity (seeing that it apparently has some particular rush group compositions), or would it start churning out Marines like crazy and attack with them instead of Battlecruisers and so on? As in act like an Insane AI, only just with Marines exclusively?

Maybe you could take a look at the stock AI’s with PyAI module in PyMS
Shameless self promotion below

http://www.staredit.net/topic/18202/
1 Like

Yeah, I literally have no idea what I’m looking at.

Anyone else?

Self promotion aside, Lalo gave you a very good tool to read AI scripts.
As for the Terran Campaign Insane AI, it uses the full tech tree. Disabling buildings will cause the AI to halt. The same goes for tech and upgrades.
The AI never uses Nydus Canals.
The AI script won’t change if you make certain units unavailable. It will only ignore the production of those units and create the units that are enabled.

1 Like

I see. So if I were to only restrict units and not buildings, it would still go as intended?

This might also help:

 http://classic.battle.net/scc/faq/aiscripts.shtml

Not really, because what I asked for wasn’t there.

Sorry to say.

No worries at all,

I personally like to know more about the built-in AI for fun, but not to modify it (bc I actually have BWAPI AIs, which gives me all I’m asking from a strong/smart AI), but I’d like to know for example the “Protoss Expansion Custom Level” AI… in rare cases, Protoss goes for 12 Nexus, protecting it with Photon Cannons, the script for this AI is huge, I can’t spot it or understand what “–PMCx 0000–” means ? I think --PMCx 0005-- is when Protoss goes for fast Dark Templar ? and what is the probability of a specific build being chosen ?

Not exactly. It would still preserve the attack waves, but without the units that were disabled. Disabling units will cause the AI to defend very poorly.

Moataz:
I personally like to know more about the built-in AI for fun, but not to modify it (bc I actually have BWAPI AIs, which gives me all I’m asking from a strong/smart AI), but I’d like to know for example the “Protoss Expansion Custom Level” AI… in rare cases, Protoss goes for 12 Nexus, protecting it with Photon Cannons, the script for this AI is huge, I can’t spot it or understand what “–PMCx 0000–” means ? I think --PMCx 0005-- is when Protoss goes for fast Dark Templar ? and what is the probability of a specific build being chosen ?

Some information is not there, you won’t see those specifics in the script.
random_jump(32, PMCx 0002) is for expansion, but you’d need to know how random_jump works in-game. You should check Pr0nogo’s wikidot, there’s some information provided by Nekron about AI commands.

Yeah I know about these docs but was lazy to check it, thank you, btw you became good at understanding how the built-in AI works, I remember when Lalo suggested the thing to you. :+1:

1 Like

I checked :heavy_check_mark: the document. The example I copied has a probability of 32 out of 256. That is 1/8.

1 Like

Yes that makes sense if its fast Dark Templar, what about 12 Nexus (or very early Nexus), and where you found the probability thing?

http://pr0nogo.wikidot.com/rs-ai

Block --PMCx 0005-- trains a single DT.
Block --PMCx 0020-- has an “expand 99” command. I’m not sure what 99 means.

		--PMCx 0005--
	build(1, assimilator, 80)
	wait_buildstart(1, assimilator)
	build(13, probe, 80)
	wait_buildstart(13, probe)
	build(1, cybernetics_core, 80)
	wait_buildstart(1, cybernetics_core)
	build(14, probe, 80)
	wait_buildstart(14, probe)
	train(1, zealot)
	build(15, probe, 80)
	wait_buildstart(15, probe)
	build(2, pylon, 80)
	wait_buildstart(2, pylon)
	train(2, zealot)
	build(16, probe, 80)
	wait_buildstart(16, probe)
	build(1, citadel_of_adun, 80)
	wait_buildstart(1, citadel_of_adun)
	build(3, pylon, 80)
	wait_buildstart(3, pylon)
	build(17, probe, 80)
	wait_buildstart(17, probe)
	train(3, zealot)
	build(18, probe, 80)
	wait_buildstart(18, probe)
	build(1, templar_archives, 80)
	wait_buildstart(1, templar_archives)
	train(4, zealot)
	build(19, probe, 80)
	wait_buildstart(19, probe)
	build(4, pylon, 80)
	wait_buildstart(4, pylon)
	farms_timing()
	build(1, forge, 80)
	wait_buildstart(1, forge)
	train(1, dark_templar)
	defenseuse_gg(1, dark_templar)
	build(20, probe, 80)
	wait_buildstart(20, probe)
	attack_add(1, dark_templar)
	attack_prepare()
	build(1, photon_cannon, 80)
	wait_buildstart(1, photon_cannon)
	build(2, photon_cannon, 80)
	wait_buildstart(2, photon_cannon)
	build(3, photon_cannon, 80)
	wait_buildstart(3, photon_cannon)
	build(2, gateway, 80)
	wait_buildstart(2, gateway)
	place_guard(high_templar, 0)
	place_guard(high_templar, 1)
	place_guard(high_templar, 2)
	tech(psionic_storm, 80)
	build(27, probe, 80)
	wait_buildstart(27, probe)
	goto(PMCx 0006)
		--PMCx 0020--
	wait(7200)
	expand(99, PMCx 0013)
	goto(PMCx 0020)
2 Likes

Check this out

https://docs.google.com/document/d/1KXbIDuIBnacWwpJJxSQePmIhc1GKuEgRZxtf8cLi_Qo/edit

expand(99, PMCx 0013) will execute block PMCx 0013 at expansion 99. My guess is that that 99 is either the initial base, the last expansion or a random expansion

It’s very likely a special order to expand (it could just refer to the main base like you said). Something we should be sure of is that the computer won’t expand 99 times.
However, since Moataz asked for the strategy of the 12 Nexus, I started looking at the script for any reference of it. The only thing I found that could represent such build order is that strange block in the script.

If you look at PMCx 0013 you’ll see a start_town header. After that block, the game will run a long series of blocks (0040-0078) with a very specific build order, provided by a sequence of notowns_jump: Gateway, Cybernetics Core, Forge, Cybernetics Core, Robotics Facility, Citadel of Adun, Templar Archives, Stargate, Observatory, Robotics Support Bay, Fleet Beacon, Arbiter Tribunal, stop().

PMCx 0038 is another block for expansions, up to expand(4, PMCx 0037).
PMCx 0037 also has a start_town, but with more Probes than PMCx 0013.
I was trying to figure out the expansion orders in this AI.

1 Like