Rocky II Zerg and Protoss AI (Updated 02/02/12)

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
User avatar
JH24
Posts: 323
Joined: Sat Mar 14, 2009 6:25 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Rocky II Zerg and Protoss AI (Updated 02/02/12)

Postby JH24 » Tue Apr 07, 2009 9:07 pm

Rocky II Zerg and Protoss AI

You'll need BWAIlauncher to play against this AI. You can find the BWAIlauncher in this topic:
index.php?showtopic=452

The previous version has been re-uploaded in a Winrar file further down this post.

Rocky II Zerg non-cheating AI: [attachment=2996:Rocky II Zerg v2.7a non-cheating.txt]
Rocky II Zerg non-cheating low-tech AI (It won't go past Lair): [attachment=2995:Rocky II Zerg v2.7a non-cheating low-tech.txt]

To play, right click the file above and save it to your BWAILauncherPackages\01) Entropy (Non-Cheating)/ (Zerg) directory.

Rocky II Zerg cheating AI: [attachment=2990:Rocky II Zerg v2.7 cheating.txt]

Rocky II Zerg cheating low-tech AI (It won't go past Lair): [attachment=2992:Rocky II Zerg v2.7 cheating low-tech.txt]

To play, right click the file above and save it to your /BWAILauncher/Packages/03) Racine's Rebels (Pro $)/ (Zerg) directory.

===

Rocky II Protoss non-cheating AI: [attachment=2986:Rocky II Protoss v2.6 non-cheating.txt]

To play, right click the file above and save it to your BWAILauncherPackages\01) Entropy (Non-Cheating)/ (Protoss) directory.

Rocky II Protoss cheating AI: [attachment=2991:Rocky II Protoss v2.6 cheating.txt]

To play, right click the file above and save it to your /BWAILauncher/Packages/03) Racine's Rebels (Pro $)/ (Protoss) directory.

===

Previous Protoss/Zerg AI version: [attachment=2985:Rocky II older Protoss and Zerg AI scripts..rar]

===

AI description:

The "vanilla" AI's only make use of the original units in Starcraft.
The "expansion" AI's also make use of the units available in Brood War.

This AI is designed to be stronger during mid- and lategame scenario's. It does not perform early rushes and it's weaker in the early game. Generally, the AI needs a preparation time of around 7-10 minutes but will defend against earlier attacks. It focuses on building large armies, fighting huge battles, and producing new units non-stop or with as few breaks as possible.

The cheating Gold AI's receive bonus resources but will still try to play "fair". The AI's won't build for example 12 gateways or hatcheries in the first minute or anytime later in the game. They'll follow the original non-cheating script but generally their armies will be much larger then with the non-cheating AI's. They will also upgrade and tech more aggressively.

The bonus resources for the cheating AI's are temporary, after around 30 minutes these AI's won't receive any free resources anymore. It's still possible to drain a cheating AI of resources.

Special thanks to:
Archon_Wing- For all your support and awesome advice, your awesome AI FAQ on this site, and for the original attack structure for Zerg/Protoss.
Bajadulce- For all your help and valuable advice, as well as creating/maintaining this awesome site.
Myk and PandaBB- For all your helpful support and feedback, as well as creating awesome Zerg AI's of which I really learned a lot from.
Bmnbmn, Equalizer, Faded_Sentry, Symmetry, X_Of_Life and HasherL- For your great advice, support and comments.
Iskatumesk- For sharing all your knowledge of AI scripting as well as for your great advice.
poiuy_qwert- For the creation of PYAI, a great program which really made AI scripting a lot of fun for me. And for BWAI Launcher, that has made testing and editing AI's so much more fun and easier!

Everyone that downloaded this file.
If I have forgotten to mention someone in the credits, my sincere apologies. Please let me know and I'll add you immediately.


Also, you have my permission to continue working on these scripts, modifying them in any way or using them or part of them as base for other AI's.
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Archon_Wing » Tue Apr 07, 2009 10:22 pm

User avatar
JH24
Posts: 323
Joined: Sat Mar 14, 2009 6:25 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby JH24 » Wed Apr 08, 2009 7:17 pm

I have less time left than I expected, I'll reply in more detail to your post tomorrow, Archon_Wing. If you're interested, I've edited my first post and added the scripts for the three races.

Earlier today, for version 0.3 I tried to experiment a bit by moving the main attacks into a multirun thread with resources_jumps and notown_jumps. If it works, I'll wonder if that will make the AI a bit faster. I must say its really fun experimenting and trying out things like this. :)
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Archon_Wing » Thu Apr 09, 2009 5:25 am

Here's 2 reps, a zvt and a pvz

ZvT- The terran doesn't seem to go on the offensive much. It does however, produce a lot of tanks and has better antiair You could try m+m and tanks vs zerg only, and m+m into pure mech for the others. May even be a good idea to make the ai pop a few wraiths or valks to use as antiair. Pure mech is fine against zerg though.

PvZ- They defended against the sair harass well enough. The attacks were pretty big but took a while to gather. You might have to bother with a few mutas or lurks and hive units if resources allow. I usually prefer to stick the higher tech stuff in a different thread.

Also it seems the zerg script has too many train commands. Train means "train up to this amount" and usually the comp will rebuild, so too many of the same train commands could slow it down. I like to use the train command to sorta specify what kind of minimum force I'd like.

Another command that would help once you have a large army is
guard_resources zergling

That will send 1 zergling to each resource area. For the other races you would want to use a cheap unit.
User avatar
JH24
Posts: 323
Joined: Sat Mar 14, 2009 6:25 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby JH24 » Thu Apr 09, 2009 8:19 pm

User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Archon_Wing » Fri Apr 10, 2009 2:03 am

User avatar
JH24
Posts: 323
Joined: Sat Mar 14, 2009 6:25 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby JH24 » Mon Apr 13, 2009 7:32 pm

A quick update.


I knew when I began that AI scripting is very difficult, but I got so much problems with my Zerg script this weekend that I really had a moment were I just wanted to throw everything away and quit. Eventually, I did manage to get the Zerg script working again. (It would only do an attack loop once, and despite my specific order to keep repeating it it would do nothing anymore after the first time. Now it works again but I don't really know yet how I solved this. These AI scripts are so fragile.


On the positive side, I made a lot of changes and in general, all three AI's have improved and become stronger. All three have three different starting builds depending on race, there are seveal resource-checks to make sure the AI will not develop further or waste money needelessly, and it will make use of a larger variety of units, when resources and circumstances allow. (Ultralisk, Archon, Battlecruiser, Mutalisk, Dark_Archon, Science-Vessel, etc.)



I'm not entirely sure yet though if I should allow the Zerg AI to make Lurkers. Would it be better if I invest more in Mutalisks instead of Lurkers? In a way, Lurkers are great against marines and Zealots, but the AI often seems to unburrow them when the enemy is approaching.
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Archon_Wing » Mon Apr 13, 2009 9:01 pm

You could always make it run if the comp has lots of gas, but don't let it conflict with the other hydra upgrade. It's best if all the den upgrades and lurker training was all in the same place. I've noted the comp will use lurkers to attack as long as they have a defenseuse command, even if you don't specify them in your attacks. Actually the comp seems to do that with a lot of units.
User avatar
JH24
Posts: 323
Joined: Sat Mar 14, 2009 6:25 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby JH24 » Wed Apr 15, 2009 8:19 pm

@ Archon_Wing, I've added a resource_check for Lurkers, but it will only come after the other Hydralisk upgrades are complete. I wonder how this will work.

Test AI version 0.3 (See first post)
I've updated my first post with a new version of my AI. All three AI's should have become at least a little stronger and more stable in general. The biggest improvement for this version has to be (as far as I could test) the managing of the economy by the AI's (Even the Zerg, which gave me so much trouble with their behavior last weekend) In general, all AI's are now able to quickly expand their resource gathering in combination with their military development. At least I hope it will give me a more solid base to improve my AI further in future versions.

General changes:
- Better resource management.
- Different opening builds depending on the opponent the AI is facing.
- Added resource_checks to make sure the AI won't upgrade to a higher tier unless it has enough resources to build through and support it.
- Added several random attacks in the first part of the script.
- Added resource_ and notowns_jump trigger based lists for all three sides, which will determine the size of the AI's attacking forces. This way, even when the AI is losing, it will try keep fighting and resisting until the end.
- The upgrades for armor and weapons differ for each opponent the AI is facing. It will prioritize certain upgrades to cover for certain weaknesses. (Example: Protoss are weak against Terran's EMP Shockwave. So the Protoss AI will instead try to upgrade its armor and weapons as fast as possible, as spending money on Plasma Shields might be potentially a waste.

Likewise the Protoss AI might prioritize upgrading Plasma Shields against Zerg regarding Plague instead of upgrading its Armor.

Race-based changes:
Terran:
- More balanced opening build.
- Against Terran and Protoss, heavier emphasis on Siege Tanks.
- Against Zerg, more emphasis on M+M and Goliaths.
- Early detection build, early focus on Comsat and Turrets.
- More variety added, might build Battlecruisers and Science Vessels if the resources are available.
- Added specific tech and upgrades depending on race. Example: Against Protoss the Terran will tech EMP shockwave, against Zerg Irradiate.

Zerg:
- Re-balancing opening build. Still somewhat weak, but strengthened Mid- and High Tier.
- Tweaked resource gathering.
- Tweaked upgrade paths and teching, more race dependant.
- Lurker and Ultralisk upgrades will only be researched if specific conditions are met.
- Added support for Mutalisks, Ultralisks and Defilers.
- Increased waiting time between expanding from 7500 to 8800.
- Tweaked early defense regarding Corsairs or rushes.
- Reduced dependancy on Ultralisks in favor of other units.
- Removed support for Guardians. (Too expensive, maybe in later versions)

Protoss:
- Decreased the time between expanding from 9200 to 8800.
- Tweaked resource gathering.
- Tweaked early unit production.
- Tweaked early defense build regarding photon cannons.
- Removed most of the early attacks as they seemed to slow AI down.
- Tweaked mid-game random attacks.
- Added Reaver support for Protoss, AI will use them more often and more agressively.
- Tweaked AI to build observers as soon as possible.
- Carriers, Dark_Archons, Archons, Dark_Templar, High_Templar are all added/supported for more variety. Their actual use remains resource dependent though, so they might not appear very often.

Problems I'd like to fix in future versions:
- Less dependency on "train" commands.
- Improved balancing between resources and unit production.
- Trying to decrease the Zerg AI's "slowness" at points. (The AI seems to be waiting for something at times)
- Trying to add and experiment with "reactive" scripts.

The scripts for version 0.3a are added in my first post too.
Thanks for reading! :)
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Archon_Wing » Wed Apr 15, 2009 9:09 pm


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 2 guests