Unleaded AI 3.3 Full Non-cheating AI (Updated 2/23/10)

Help - Resources - AI Scripting - Grafting - Plugins - Modding Projects
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Fri Jan 08, 2010 11:51 pm

Hmm, merging too many templars? Well, it gets kinda odd; I have no idea how the Ai works them. I could just reduce amount of archons trained or make sure there's no defensebuild.
User avatar
JH24
Posts: 323
Joined: Sat Mar 14, 2009 6:25 pm

Postby JH24 » Sat Jan 09, 2010 8:43 am

Double post, sorry.
User avatar
JH24
Posts: 323
Joined: Sat Mar 14, 2009 6:25 pm

Postby JH24 » Sat Jan 09, 2010 8:50 am

I had problems with this too. It's surprising how "easy" mass zealots and dragoons can be destroyed by masses of upgraded hydralisks.


Unfortunately, my own AI had trouble with High Templars by building too many and placing them defenseless all around the map, while place_guard build them too late. However, for only defense this command worked well.


The problem is the AI using High Templar before their energy has fully charged. Arbiters for example can easy escape but HT's can't.


Maybe you could add a separate loop after Templar_Archives has been build like this:


(I'll try this for my AI in the next version. Probably it won't work though. But because our AI's are non-cheating, this way we can control the amount of resources they spend on these expensive units.)


EDIT: It seems to work, every 2 or 3 attacks the AI will add a couple of Archons and fully upgraded High Templar.

===

-- templarproduction --

wait(1)

wait_build(1, templar_archives)

place_guard(high_templar, 0)
place_guard(high_templar, 1)
place_guard(high_templar, 2)

(To make sure there's always some base defense)

define_max(6, high_templar)
wait_force(2, high_templar)
wait_force(1, archon)
wait_force(2, high_templar)
wait(24)

wait_build(1, templar_archives)
wait(1)

resources_jump(600, 800, more templar)

wait(1)

goto(templarattack1)


-- more templar --

wait(1)

define_max(8, high_templar)
wait_force(4, high_templar)
wait_force(2, archon)
wait_force(4, high_templar)
wait(24)


-- templarattack2 --

wait(3000) (building up energy)

attack_add(4, high_templar)
attack_add(2, archon)

wait(240)

goto(templarproduction)

-- templarattack1 --

wait(3000) (building up energy)

attack_add(2, high_templar)
attack_add(1, archon)

wait(240)

goto(templarproduction)
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Sat Jan 09, 2010 10:43 am

But it seems like for my script, it's morphing too many archons and not enough templar; I'll just increase the gas requirements for building more than 2 archons.
User avatar
JH24
Posts: 323
Joined: Sat Mar 14, 2009 6:25 pm

Postby JH24 » Sat Jan 09, 2010 11:20 am

You're right, I'm sorry if I went a bit overboard. If the AI will make a few less Archons and still add the Templar to its attack force, it should be perfect. :)
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Thu Jan 14, 2010 2:28 am

edit:3.02 was a mistake, that has been corrected.
Ok I uploaded 3.03 with the following crap:
Terran:
Decreased vulnerability to counter attack. (Make more firebat). And yes it still sucks on Tau Cross ai reps for some reason, go away. :P
Added a random tech switch to infantry after a 1 factory expo tvp
Expands faster vs a early expo in TvP
Added a random possibility for the m+m rush to not built an early ebay for upgrades, and thus launch a faster attack.
Reduced chance of proxy BBS

Protoss:
Fixed probe building in fast expanding PvZ. I have no idea why it didn't built probes.
Is not as obsessive with merging archons.
Includes more goons in PvZ; the original force was too zealot heavy for its own good
Fixed proxy, and reduced chance of it.
Fixed a too slow observatory

Zerg:
Make it 12 hatch by default in ZvP.
Make it attack more instead of sitting around.
Expands slightly faster.
wscha231
Posts: 35
Joined: Fri Sep 11, 2009 8:11 pm

Postby wscha231 » Fri Jan 15, 2010 3:21 am

I tested 3.03. I found there are a couple errors.
in ZvsT zerg doesn't upgrade hydra speed even thought hydra is main force.
in ZvsP zerg doesn't upgrade zergling speed.
in PvsZ toss doesn't upgrade dragoon range.
those happened because of the chance but you may check them.
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Fri Jan 15, 2010 9:42 am

That sounds awfully serious; could you point out which reps do that.

It seems like I left it out in the PvZ fast expand block; did it fast expand? Well it explains a few things then ...

Hydralisk speed appears to have a low priority, that could be changed.

edit: all upgrade issues have been confirmed and able to be fixed in next version.
edit2: 3.05 has addressed most of these; hopefully the AI will play along.
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Wed Jan 20, 2010 9:36 pm

3.05-3.06 updates (3.06 only update terrans, so the Zerg and Protoss scripts are still at 3.05)

Protoss and Zerg:
Low priority/nonexistent upgrades remedied. Occasionally, they refuse to get them anyways, but hopefully it'll be less.

Fixed ZvP build order slightly

Increased chance that Protoss rushes, decreased chance of fast expand

Fixed fast carrier strat

Terran:
Fixed broken random jump to tvp bio (Was accidentially commented out)
More effective use of tvz mech.

3.06 Terran:
Probably a good reason why you actually need to play your own AI. :lol:
Fixed low unit production after responding to a early nexus.

Instead of writing a new block to react to a early nexus, I was lazy and just attached this multirun:
CODE
--anti fe--
wait_buildstart(13, scv)
rush(0, terminate)
goto(crash fe)

--crash fe--
wait_build(1, barracks)
if_owned(refinery, expand too)
random_jump(144, expand too bio)
train(4, marine)
wait_train(4, marine)
send_suicide(0)
clear_combatdata()
stop()
--expand too--
wait_build(1, machine_shop)
train(1, siege_tank)
expand(1, fact_expo)
train(2, siege_tank)
defenseuse_gg(1, siege_tank)
stop()

--expand too bio--
wait(1200)
expand(1, tvz_natural)
stop()


Note: The self check for refinery is to see whether the AI decided to mech or not. If the AI didn't mech, there's a chance of a marine rush. (They don't branch when the fast expand check occurs-- it also is used in TvT as well. ) It was intended to be "portable", meaning you could stick in any terran script, and it'd still work.

Anyhow to summarize. It has the AI take a faster expand and build 2 tanks. However, since the rest of the main script is unchanged; it really hasn't caught up, causing a brief lull in unit production.

Now 2 tanks, some marines and a bunker is more than enough to defend against an enemy AI that fast expanded, but it wasn't enough when I decided to play it for once. ;) Well, actually there just aren't many protoss scripts that fast expand period, besides my own. :D

So I changed it to:
--expand too--
wait_build(1, machine_shop)
train(1, siege_tank)
expand(1, fact_expo)
train(2, siege_tank)
defenseuse_gg(1, siege_tank)
train(4, siege_tank)
wait_force(10, siege_tank)
stop()

Wait_force seems to be a lower priority training command, so it basically means train 4 siege tanks immediately, and then train 10 at your leisure. This means there is a less of a delay in unit production, making it less vulnerable.

ZZZ.... now I just noticed there's an unecessary goto statement up there. I'll fix it if there's any more major updates. :P
User avatar
Archon_Wing
Posts: 903
Joined: Wed Jul 25, 2007 11:22 pm

Postby Archon_Wing » Mon Jan 25, 2010 1:37 pm

3.07--

Fixed a bug where Protoss builds its fast expand too early against Terran. For some reason it was building it ridiculously early, like at 10 supply. (Against terran it does not build a pylon and a forge at the expansion)

build(12, probe, 80)
wait_buildstart(12, probe)
expand(1, 13 nexus)
wait(300)


Besides the obvious fact that the label was outdated (is actually 12 nexus) the computer was just ignoring the wait_buildstart command. Also there's an unnecessary wait here. I had previously thought it was necessary to have a wait so the AI could save up money for the expo, but apparently it does that on its own.

So it was changed to:
build(12, probe, 80)
wait_build(11, probe)
expand(1, 12 nexus)

Insanely stupid and arbitary, I know.

Terran:
Fixed its early rush check against Protoss (aka anti-Blizzard block), causing it to almost never mech.

When the terran picks a mech build, it checks for enemy gas after it starts its own. If it doesn't see an enemy gas but a gateway (meaning the enemy didn't fast expand) it switches back to a 2 barracks infantry build. That check was a bit too precise, so it has been delayed slightly. It also gets faster firebats against such a zealot build.

It unfortunately collects a lot of gas if it does this since it doesn't know how to regulate gas very well, but usually is effective anyways against a low tech toss.

TvP bio attacks were readjusted.

TvZ/TvP bio now builds a bunker at each expo. Previously I didn't bother with bunkers in the more remote ones since the comp didn't bother defending them anyways. But seeing Equalizer's Accel T hold ground so well, I decided to reconsider.

Zerg:
More aggression in ZvZ, still mostly crap.

Here's a replay of a pv2t I just played using the BWAI launcher. The terrans take a while to attack and I get a bit bored after defending the first few attacks without losing much. But then I forget to macro and also got caught out of position resulting in a rather sudden death. :o

Return to “StarCraft Modding”

Who is online

Users browsing this forum: No registered users and 1 guest