Perfect Micro

Accname

2D-Graphics enthusiast
Reaction score
1,462
Are these the only units the AI can control or will it at some point be able to actually play the game?
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Talking about extreme AIs, here's one I did. Not as extreme as the other ones but with 24 sentries you can hold off an infinite amount of zerglings.


[video=youtube;SBLNe0Gs19g]http://www.youtube.com/watch?v=SBLNe0Gs19g[/video]
 

Sevion

The DIY Ninja
Reaction score
413
Sure sure that's good and all, Siretu, but the real question is, can your AI do that with Stalkers!?
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Sure sure that's good and all, Siretu, but the real question is, can your AI do that with Stalkers!?

Use Force field? No that would be overpowered. Can you imagine How powerful blink stalkers would be with Force field ?
 

Bloodcount

Starcraft II Moderator
Reaction score
297
IT can't. The thing is that the AI can make for a part of the second a perfect circle. It just shows that siretu is a good coder and that blizzard have shit AI making skills... I mean the insane AI cheats and is retarded when it comes to forcefields. ^_^
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
Do blizzard AI's use forcefields at all? Havent seen any yet. Havent seen any use of warp prisms also.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
There was a thread about it on Teamliquid where many people stated that making the AI use force fields is (next to)impossible. I disagree so I created what is shown in the video I linked. It was created pretty quickly, like a day or so of not so much coding iirc. It's still in developement. I want to improve it even more.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
There was a thread about it on Teamliquid where many people stated that making the AI use force fields is (next to)impossible. I disagree so I created what is shown in the video I linked. It was created pretty quickly, like a day or so of not so much coding iirc. It's still in developement. I want to improve it even more.

Well, lol.

Looking at your video it seems like you just ordered the sentries to ff in a circular area around your stuff - maybe even hardcoding the points they ff.
And the one with the mm force doesn't look very convincing too. The result would've been much different if there were more zealots. You'd actually trap your army because the ff arc was so large. And since they only used ff once I guess it's a very very limited AI.

But how much thinking does your AI do?
Does it just throw force fields at the general direction of enemies? Or is it actually clever enough to ff as it needs to?
Does it react to your own units? Or will it ff-bomb zealots without hesitation.
Can it ff behind enemies to actually block pathways?

You need to give the AI a fundamental understanding of it's army, the enemy's army, the terrain and how battles could unfold. That is not easy.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
The one with the surround is very simple indeed. They are not hardcoded ofc, it does it around ranged units so while some zealots might get trapped, most wont.

Why would the split force field work so bad with more zealots? The zealots will still get to the forward part of the army. And how would a player do the split in that case to make it better?

The amount of FF's used for the split is hard coded atm but easily changed. I just haven't found a good number. When I decide how big I want the arc, I can easily calculate a good amount based on the diameter of the opponent army.

When it comes to how smart it is with the split, it makes sure to make a curve/line that goes through the center point of the opponent's army and that is never broken(no unit gets through). It also rechecks periodically if they aren't in range immediately to get updated positions to force field on.

Since it goes through the middle of the army, it doesn't care about your own units since zealots will essentially be fine(they will have approximately half the army to attack.

The problem with blocking pathways is that the sentry will rarely be in range to do it properly. However, it will kind of take advantage of high ground chokes and wont force field on the high ground(because that would be unneccesary since it already blocks movement). The same goes for lower ground valleys.

As I said, I didn't do a lot of coding on this and I am still developing it(although other projects have priority) but the automaton 2000 video is also a pretty simple AI. I'd say it's more simple than this one atm.

"You need to give the AI a fundamental understanding of it's army, the enemy's army, the terrain and how battles could unfold. That is not easy." - This is one of the general arguments against Force Field AI but I think it's quite overused without really thinking about it. I'd say 90% of the Force Field uses are surrounds, splits or blocking a ramp. Very rarely do you have to take in account:
* The terrain(not much more than analyzing some chokes)
* How battles could unfold (Please give me an example of what you mean, I might be misunderstanding you)

When it comes to analyzing the enemy's army, do note that the code in the video is the same code in both cases. The reason it did surround FF in one and split in the other is because it analyzed the army and picked the one it though would be appropriate(by counting the percent of the enemy army that consists of melee units)
 

Accname

2D-Graphics enthusiast
Reaction score
1,462
I think his point is that humans might use forcefields for very different purposes, like for example to block of scouts which might peek in to see your tec (i doubt your AI will forcefield for a single worker, will it?) or maybe a humans wants to have a breach in his force field wall to let his own zealots pass. or maybe use force fields when escaping.

A human might also use force fields to prevent enemy structures of producing any units or to block scvs from repairing bunkers / thors / planetaries.
All kinds of stuff which are not as obvious as splitting the enemies army.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I understand that, I just want the examples. I have no way to check if I want to check if I want to waste FF on hiding my tech since it's not an entire AI for melee play, it's just the micro part(I am working on an entire AI but it's a lot harder and it takes times much more than the day I spent on that)

When it comes to making a hole in your FF wall to let zealots through, there will be units on the right side of the wall that the zealots can hit and the FF will be just about gone when the opponent's army on the right side is dead. Also, I'v never seen a real person split with a hole in intentionally but I have a hard time imagining it would be that useful.

I agree with the blocking of repairs(although your argument is invalid for Thors since they break the force fields automatically) and it's a thing that should probably be implemented(and it's not that hard tbh)

On the other hand, does the marine AI stim out some marines to take out creep tumors? Focus down the hatchery? Automatically split them when infestors are visible? All those are things that would be possible to fix for a micro AI without access to the entire AI(unlike your example for hiding tech)

My point is just that many people are like: "Oh well what if you're in this exact position? The exact perfect answer would be to just throw down two force fields there to force the reapers up the cliff while you flank with zealots through the whole in your FF block."

What I am trying to say that, sure there are a lot of things you can do with force field, most things are never relevant. I am aware that this AI is not perfect and lacks some common FF uses(like blocking repair and ramps) but most uses are not really that viable ever.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
* How battles could unfold (Please give me an example of what you mean, I might be misunderstanding you)

I mean something like... If your army mainly consists of zealots and sentries - and you split off a small part of the enemy's army (like in this video, most of the army was actualyl behind the FF) you'd soon find all your zealots trapped by your own force fields after they mob up the few units on their side.
Or if the enemy's army has a lot of tanks.

And there are a lot of other things that actually have to be considered.
If you are attacking and ff block your way it would be horrible.
If you are defending and ff block the ramp, but all the zealots try to run down it'd also be horrible.
So your AI needs to coordinate your entire army movement.
I'm not talking about the "perfect answer" here, but about situation where using a FF would make the situation worse than not using it.

And choke-detection isn't that easy, too.
All-in-all it's helluvalot work to do, in all kinds of areas. Not impossible, but take into consideration that it all has to run with the rather limited Galaxy script. It'll eat a lot of performance too.

The marine AI has a very elaborate path finding by the way. So it's not as simple as stutter stepping away from enemies and engaging the next one of there's no one nearby.
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
The marine AI has a very elaborate path finding by the way. So it's not as simple as stutter stepping away from enemies and engaging the next one of there's no one nearby.

Well the Ursadak one, sure. I agree with that, but I was talking about Automaton 2000(that showed no elaborate path finding, it was all on a big flat area)

I don't see what's so special about chokes. I mean, if there's no choke it will split with force fields when the armies engage. If there is a choke, the AI will split with less force fields than before. That behavior is already in.

I am working on making it force field split a bit further behind so the parts are more even.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Well, how do you find a choke? And how do you evaluate it's tactical usefulness?
You have to search for it, which is costly.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top