Home
Community
Forums
Custom Ai
BWAI Mods
Tools
PyMS

What is the BWAIProject?

The BroodWarAIProject is a team of StarCraft artificial intelligence coders whose objective is to create a superior version of Brood War AI. So far we have only managed to modify the original AI scripts. We have not touched the individual unit behavior, but we are exploring means to change that. Despite these inherit hardcoded limitations, BWAI has achieved well over 500,000 world wide downloads over the course of its 3 version history. Spanning now nearly half a decade as of 2008, BWAI could possibly be the most downloaded SC mod of all time.

We hope you enjoy our efforts. This project is dedicated to all those out there that do not have a decent connection to play StarCraft online and to those seeking a more challenging comp opponent. It is also dedicated to Bob Fitch, from Blizzard, the creator of the original Broodwar AI.

Latest Version:

BWAI Gold Final
Download

External Links:
BroodWarAiProject @ EntropyZero.org
BWAPI Project @ Google.net

BWAI in PC Gamer Magazine August 2007!

Myk's Zerg AI - Beta

Hey, everyone! I've been working on this for the last few weeks, basically writing the entire script from scratch with some awesome help from Archon_Wing and this site's many resources, tools and insightful posts.

Currently, this is a non-cheating ZvT script. It's very rough but if you can afford any feedback I'd greatly appreciate it. cool.gif

More updates coming soon! smile.gif

Attached File MykZergBetaV05.zip (439.86K downloaded 1 time)

Stuff included in the zip:
  • AI seMPQ executable, complete with triggers which remove observers from AI Vs. AI replays which can be found HERE
  • aiscript.bin - No idea why I included this.
  • txt file with a copy of the current AI script.


CODE
# stat_txt.tbl entry 1344: Zerg Expansion Custom Level<0>
ZMCx(1344, 101, aiscript):
start_town()
transports_off()
farms_notiming()
define_max(80, Zerg Drone)
define_max(80, Zerg Zergling)
define_max(6, Zerg Hydralisk)
define_max(18, Zerg Lurker)
define_max(255, Zerg Scourge)
define_max(12, Zerg Queen)
define_max(15, Zerg Mutalisk)
define_max(6, Zerg Defiler)
define_max(6, Zerg Ultralisk)
debug(ZergMain, MykZergV04c Starting)


--ZergMain--
wait_build(1, Zerg Hatchery)
build(9, Zerg Drone, 80)
wait_build(9, Zerg Drone)
build(2, Zerg Overlord, 80)
wait_build(2, Zerg Overlord)
build(12, Zerg Drone, 80)
wait_buildstart(11, Zerg Drone)
rush(0, 12PoolGo)
goto(12HatchGo)


--12PoolGo--
wait(200)

build(1, Zerg Spawning Pool, 150)
defenseuse_ga(1, Zerg Zergling)
defenseuse_gg(1, Zerg Zergling)
expand(1, expansion1)
goto(12HatchResume)


--12HatchGo--
expand(1, expansion1)
wait(200)

build(1, Zerg Spawning Pool, 150)
defenseuse_ga(1, Zerg Zergling)
defenseuse_gg(1, Zerg Zergling)

--12HatchResume--
build(11, Zerg Drone, 80)
wait_buildstart(11, Zerg Drone)
build(12, Zerg Drone, 80)
wait_buildstart(12, Zerg Drone)
build(13, Zerg Drone, 80)
wait_buildstart(13, Zerg Drone)
wait(100)

build(2, Zerg Hatchery, 80)
wait_buildstart(2, Zerg Hatchery)
build(16, Zerg Drone, 80)
farms_timing()
wait(50)

build(1, Zerg Extractor, 80)
wait_buildstart(1, Zerg Extractor)
multirun(drones)
build(1, Zerg Lair, 80)
train(12, Zerg Zergling)
creep(3)
wait(50)

build(3, Zerg Creep Colony, 80)
wait_build(3, Zerg Creep Colony)
build(3, Zerg Sunken Colony, 80)
defensebuild_gg(1, Zerg Zergling)
wait(50)

upgrade(1, Metabolic Boost, 80)
build(1, Zerg Spire, 80)
defensebuild_gg(6, Zerg Zergling)
wait(50)

wait_buildstart(1, Zerg Spire)
build(2, Zerg Overlord, 80)
wait_build(2, Zerg Overlord)
defenseuse_gg(1, Zerg Mutalisk)
defenseuse_ag(1, Zerg Mutalisk)
defenseuse_ga(1, Zerg Mutalisk)
defenseuse_aa(1, Zerg Mutalisk)
wait_build(1, Zerg Spire)
multirun(lurkers)
wait(50)

multirun(evostuff)

--damnmutaloop--
attack_add(12, Zerg Mutalisk)
attack_prepare()
attack_do()
train(9, Zerg Mutalisk)
attack_clear()
clear_combatdata()
if_owned(Zerg Lurker, mutaloopdone)
wait(50)

goto(damnmutaloop)


--mutaloopdone--
expand(2, expansion2)
attack_add(24, Zerg Zergling)
attack_add(12, Zerg Mutalisk)
attack_add(3, Zerg Lurker)
attack_prepare()
wait(400)

attack_do()
train(6, Zerg Lurker)
attack_clear()
clear_combatdata()
wait(50)

build(1, Zerg Queen's Nest, 80)
attack_add(6, Zerg Lurker)
attack_add(24, Zerg Zergling)
attack_prepare()
attack_do()
train(8, Zerg Lurker)
attack_clear()
clear_combatdata()
expand(3, expansion2)
attack_add(8, Zerg Lurker)
attack_add(36, Zerg Zergling)
attack_prepare()
attack_do()
attack_clear()
clear_combatdata()
wait(100)

multirun(TvZHiveTech)
attack_add(6, Zerg Mutalisk)
attack_add(24, Zerg Lurker)
wait_build(1, Zerg Spire)
attack_add(6, Zerg Guardian)
attack_add(2, Zerg Devourer)
attack_prepare()
attack_do()
stop()


--TvZHiveTech--
build(1, Zerg Hive, 80)
wait_build(1, Zerg Hive)
build(1, Zerg Defiler Mound, 80)

--evostuff--
wait_buildstart(1, Zerg Hydralisk Den)
wait(400)

build(1, Zerg Evolution Chamber, 80)
wait_build(1, Zerg Evolution Chamber)
upgrade(1, Zerg Carapace, 50)
wait(4000)

upgrade(2, Zerg Carapace, 50)
wait(4500)

upgrade(3, Zerg Carapace, 50)
wait(5000)

upgrade(1, Zerg Melee Attacks, 50)
wait(4000)

upgrade(2, Zerg Melee Attacks, 50)
wait(4500)

upgrade(3, Zerg Melee Attacks, 50)
stop()


--lurkers--
wait(800)

build(1, Zerg Hydralisk Den, 80)
wait_build(1, Zerg Hydralisk Den)
tech(Lurker Aspect, 80)
defenseuse_ga(1, Zerg Lurker)
defenseuse_gg(1, Zerg Lurker)
defensebuild_gg(1, Zerg Lurker)
train(3, Zerg Lurker)
stop()


--drones--
wait_build(1, Zerg Hatchery)
build(1, Zerg Drone, 50)
wait_build(2, Zerg Drone)
build(2, Zerg Drone, 50)
wait_build(3, Zerg Drone)
build(3, Zerg Drone, 50)
wait_build(4, Zerg Drone)
build(4, Zerg Drone, 50)
wait_build(5, Zerg Drone)
build(5, Zerg Drone, 50)
wait_build(5, Zerg Drone)
build(6, Zerg Drone, 50)
wait_build(6, Zerg Drone)
build(7, Zerg Drone, 50)
wait_build(7, Zerg Drone)
build(8, Zerg Drone, 50)
wait_build(8, Zerg Drone)
build(9, Zerg Drone, 50)
wait_build(9, Zerg Drone)
build(10, Zerg Drone, 50)
wait_build(10, Zerg Drone)
build(11, Zerg Drone, 50)
wait_build(11, Zerg Drone)
build(12, Zerg Drone, 50)
wait_build(12, Zerg Drone)
build(13, Zerg Drone, 50)
wait_build(13, Zerg Drone)
build(14, Zerg Drone, 50)
wait_build(14, Zerg Drone)
build(15, Zerg Drone, 50)
wait_build(15, Zerg Drone)
build(16, Zerg Drone, 50)
wait_build(16, Zerg Drone)
build(17, Zerg Drone, 50)
wait_build(17, Zerg Drone)
build(18, Zerg Drone, 50)
wait_build(18, Zerg Drone)
build(19, Zerg Drone, 50)
wait_build(19, Zerg Drone)
build(20, Zerg Drone, 50)
wait_build(20, Zerg Drone)
build(21, Zerg Drone, 50)
wait_build(21, Zerg Drone)
build(22, Zerg Drone, 50)
wait_build(22, Zerg Drone)
build(23, Zerg Drone, 50)
wait_build(23, Zerg Drone)
build(24, Zerg Drone, 50)
wait_build(24, Zerg Drone)
build(25, Zerg Drone, 50)
wait_build(25, Zerg Drone)
stop()


--expansion1--
start_town()
build(1, Zerg Hatchery, 80)
wait_build(1, Zerg Hatchery)
get_oldpeons(4)
multirun(drones)
creep(3)
wait(100)

build(4, Zerg Creep Colony, 80)
wait_build(4, Zerg Creep Colony)
build(4, Zerg Sunken Colony, 80)
multirun(gas)
stop()


--expansion2--
start_town()
build(1, Zerg Hatchery, 80)
wait_build(1, Zerg Hatchery)
get_oldpeons(1)
multirun(drones)
multirun(gas)
creep(3)
wait(100)

build(4, Zerg Creep Colony, 80)
wait_build(2, Zerg Creep Colony)
build(3, Zerg Sunken Colony, 80)
build(1, Zerg Spore Colony, 80)
stop()


--gas--
build(1, Zerg Extractor, 70)
stop()

Entropy Prime 1.21-- My edit of Entropy, the all in one non-cheating AI

Note: This was made for my own use, and therefore released as-is. Play at your own risk. wink.gif

Note:
This is an updated version of Entropy Plus; I just felt like giving the new version a different name. Crashes have been fixed and scripts have been strengthened a bit, as well as the newer version of Rocky AI. This will be the last edit of the file, barring any major crashes, or someone gets the debug messages working again.

No matter how strong you make an AI, people will easily adapt to it after playing it a few times. Random builds can add some replay value, but eventually the result will be the same as playing any one opponent too much-- you begin to play the player and not the game. And that can get boring and takes you nowhere.

Thus BWAI Gold came along and consisted with the two best Ais possible via script-- Racine's Rebels which would cheat and negate the issue of predictability by getting everything faster and unknown difficulty and EntropyII which greatly varied its tactics. The ability to combine scripts gave rise to a whole level of unpredictability as it is basically like fighting scripts with widely different personalities.

Initially, I only edited Entropy out of vanity-- to put my own scripts in it. Defeating my AIs, even 1v2, was an easy task, because I knew my AI just wasn't going to exploit certain timing windows to attack or expand. Even with random jumps covering these windows, it was just not enough to change the way I played. Entropy was the solution. My generally more slow moving, late game focused Ais serve as a contrast to most of the entropy AIs which usually focus on early aggression, and a number of scripts like all in tactics a lot. So this all proves to fit in well in making a more complete AI. I also edited the existing scripts a bit, mostly for stability issues but in general they will do a little better.

Keep in mind that even after all this, I still consider this a pretty minor update. If you played the original Entropy AI and was disappointed, chances are you won't find anything here. The hardcoded limitations are still here, the crappy micro is still here, and you should probably play at least 1v 2 comps and play on Good AI Maps to have it be challenging. So no complaining about how easy is it to win when you wall, or lure workers away. We don't care. tongue.gif Go find some human opponents! smile.gif

Attached File Entropy Prime 1.21.zip (1087.33K downloaded 234 times)
Edit to Rocky Script

Read more...

Armageddon Onslaught



Version 3.0 Final released! Prepare yourself for the ultimate survival challenge against the Underworld's darkest horrors and machines of war that have scourged thousands of worlds. The gates of hell have opened once more for the final battle!

3.0 release thread @ Campaign Creations

Rocky 1.2a - A non-cheating Terran/Zerg/Protoss AI for normal maps

Hello everyone,

I'm still somewhat uncertain about this, but after the awesome support and very valuable advice from Archon_Wing, as well as Bajadulce and Iskatumesk I decided to try post my test version of a non-cheating AI I've been working on for more than two weeks now.

This AI contains three separate non-cheating AI scripts for Terran, Zerg and Protoss, currently only for Land maps.



================================================================================


IMPORTANT:


Archon_Wing has released "Entropy Prime". An awesome modification which contains all the non-cheating AI scripts made here, all added in one nice package. Several new AI's have been added including my "Rocky" 1.1a AI. Download Entropy Prime and everytime you'll play a skirmish in Brood War the computer will pick a random AI, no game will be the same again and you'll have no idea what to expect. No matter which side you play against, a random AI opponent, each with a different personality will be selected, making each new game exciting as you have no idea what the AI will have in store for you!


Try it out! Link: http://www.broodwarai.com/forums/index.php?showtopic=525



================================================================================


Here is the new version. The non_cheating Terran/Zerg/Protoss TestAI 1.2, or also named "Rocky 1.2a". This AI has 3 different strategies for each race and several random/unpredictable attacks/surprises.



I'm not a good AI scripter or a good Starcraft player, and my AI is not as good or as challenging as the other amazing and epic AI's here on this awesome site. However, if you enjoy intense battles with large armies, Rocky 1.2a will always be ready to play and give you a fun time! wink.gif


Rocky 1.2a is especially designed to shine in mid-game/mid-tier battles.


All the AI scripts, including text files have been added in one Rar file. There is also an "AI documentation" file included for additional info.
Rocky 1.2a will be the last version added to the Entropy project. Future Rocky versions will include Island scripts. (Modified Blizzard scripts)



Attached File Rocky_1.2a.rar (767.8K downloaded 33 times)



These are the available versions:


1. Rocky 1.2a Skirmish (Brood War): This version is the standard version of the Rocky AI. It can rush you early or prefer to wait and attack you at a later time.

2. Rocky 1.1a Turtle (Brood War): This version prefers to build up its economy and armies before launching an attack. Only choose this version if you prefer to turtle and don't want to be attacked very early. 9 out of 10 times this AI will leave you alone for a while, it will defend itself though when attacked.

3. Rocky original Skirmish AI 1.1a: Does not use Brood War units and tech. Designed for players who don't have Brood War. Works on both Starcraft and Brood War maps.




If anyone is interested, 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. (The scripts are added in my opening post.)


If you have any suggestions for different strategies or for changes regarding Rocky 1.2a, I'm always willing to add those changes.










The Protoss have just destroyed the Zerg's Main base, additional forces are being send but they won't be needed anymore.





The Orange Zerg have broken the defenses of their Blue enemies, and are moving in to finish them off. Reinforcements are on their way to ensure victory.





The Terran are pushing into the base of their enemy, with additional forces underway to keep up the momentum. This time, the Protoss' superior technology won't save them.




The Allied Terrans launch their attacks against both Zerg bases around the same time.





Two Allied Protoss are about to win this battle.

Unleaded AI 2.44: Full Non-cheating AI (Updated 7/1/09)


Unleaded Ai is the combination of Unleaded Terran, Storm Zerg, and Unleaded Protoss, three non cheating AIs. Unleaded Terran and Protoss are based on the default Blizzard AI's theme of showcasing a large variety of units and using the AI's inhuman spellcasting abilities, but with more updated strategies and better resource management. So basically, what would the Blizz AI do if it had knowledge of the strategy we have now? Storm Zerg is the polar opposite of the unleaded AIs. It has little strategy, and is aggressive from the start on, rarely stopping to take a break. These AIs are meant to complement each other. As with all other AI-only mods, unit behavior and micro cannot be changed yet, so it is best played 1v2, 2v3 , etc on limited money maps. Also, please try avoiding AI specific exploits such as walling and luring away workers.
Download:

Attached File UnleadedAI 2.44.zip (149.29K downloaded 29 times)


Unleaded AI was boosted a bit in the upcoming version of Entropy Prime, this version is just to provide the latest scripts. Also, the toss script is more readable.

It's recommended you check out Entropy Prime, which contains these scripts and more.
Thanks to Bajadulce, this exe now uses a Firegraft fix that deals with the bug where Terran AI would not finish buildings when the worker is destroyed. This should make the terran AI a bit harder than usual. Only works with 1.16.1, the latest version of Brood War

Also, as we are developing a new AI vs AI replay pack http://www.broodwarai.com/forums/index.php...ic=561&st=0, this exe uses triggers that remove an observer from play. If for some reason you are observing a game with this exe, all you have to do is build a 5th worker and your will not be defeated. Note: The older BWAIWar III replays will not work right here sometimes.

edit: Fixed a trigger problem that would cause a player to vanish. I have uploaded a correct version. Apologies.

This script is open source. Anyone can modify it to suit their needs or make their own script, as long as it is properly credited. The scripts can be found in their entirety in the zip files as txt format

Read more...