• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 00:15
CEST 06:15
KST 13:15
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
Code S Season 2 - RO4 & Finals Results (2025)0Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy4Code S RO8 Preview: herO, Zoun, Bunny, Classic7Code S RO8 Preview: Rogue, GuMiho, Solar, Maru3
Community News
Weekly Cups (June 9-15): herO doubles on GSL week0Firefly suspended by EWC, replaced by Lancer10Classic & herO RO8 Interviews: "I think it’s time to teach [Rogue] a lesson."2Rogue & GuMiho RO8 interviews: "Lifting that trophy would be a testament to all I’ve had to overcome over the years and how far I’ve come on this journey.8Code S RO8 Results + RO4 Bracket (2025 Season 2)14
StarCraft 2
General
Firefly suspended by EWC, replaced by Lancer Rain's Behind the Scenes Storytime How herO can make history in the Code S S2 finals Code S Season 2 - RO4 & Finals Results (2025) Weekly Cups (June 9-15): herO doubles on GSL week
Tourneys
RSL: Revival, a new crowdfunded tournament series $3,500 WardiTV European League 2025 [GSL 2025] Code S: Season 2 - Semi Finals & Finals WardiTV Mondays Sparkling Tuna Cup - Weekly Open Tournament
Strategy
Simple Questions Simple Answers [G] Darkgrid Layout
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 478 Instant Karma Mutation # 477 Slow and Steady Mutation # 476 Charnel House Mutation # 475 Hard Target
Brood War
General
ASL20 Preliminary Maps BGH Auto Balance -> http://bghmmr.eu/ BW General Discussion Recent recommended BW games FlaSh Witnesses SCV Pull Off the Impossible vs Shu
Tourneys
[Megathread] Daily Proleagues [BSL 2v2] ProLeague Season 3 - Friday 21:00 CET Small VOD Thread 2.0 [BSL20] ProLeague Bracket Stage - Day 4
Strategy
I am doing this better than progamers do. [G] How to get started on ladder as a new Z player
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Beyond All Reason What do you want from future RTS games?
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
Vanilla Mini Mafia TL Mafia Community Thread
Community
General
US Politics Mega-thread UK Politics Mega-thread Things Aren’t Peaceful in Palestine Echoes of Revolution and Separation Russo-Ukrainian War Thread
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Korean Music Discussion [Manga] One Piece
Sports
2024 - 2025 Football Thread Formula 1 Discussion NHL Playoffs 2024 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List
Blogs
A Better Routine For Progame…
TrAiDoS
StarCraft improvement
iopq
Heero Yuy & the Tax…
KrillinFromwales
I was completely wrong ab…
jameswatts
Need Your Help/Advice
Glider
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 33699 users

Why AI doesnt ForceField?

Forum Index > StarCraft 2 HotS
Post a Reply
Normal
( bush
Profile Joined April 2011
321 Posts
May 28 2011 20:59 GMT
#1
I was playing some games vs computer Toss and dunno why artificial intelligence do not forcefield.

I know AI can do a lot of amazing things (check the automaton2000 on youtube), but forcefields look so easy and AI dont use. Will be amazing see perfect FFs on insane AI level.


Can someone explain this?
oo
Glueburn
Profile Blog Joined January 2011
United States496 Posts
Last Edited: 2011-05-28 21:23:52
May 28 2011 21:21 GMT
#2
Forcefields look easy?
What!?

I can't imagine trying to code a unit to automatically forcefield around, or infront of a unit, and even if they did program that in, the forcefields probably wouldn't even be good.

The Automation is different in a sense that it moves back units that are getting ready to be hit by an attack, that is fairly simple, it is just something that is done in a split-second.

Can you imagine a behavior that if the force that is attacking the AI's units is bigger then what the AI has, it would automatically forcefield a ramp? hilarity would ensue, but I imagine there is a way to make the AI figure out that the force is moving UP the ramp... gah.. it just sounds so confusing.

But then again, I may be going at it wrong.
Sometimes you have to play a long time to be able to play like yourself. - Miles Davis
Griffith`
Profile Joined September 2010
714 Posts
May 28 2011 21:35 GMT
#3
I've tried making an AI that does forcefields - its EXTREMELY hard - even harder than my mutalisk AI. It requires a lot of cluster algorithms to find centroids - an NP-hard problem.
griffith.583 (NA)
Datum
Profile Joined February 2011
United States371 Posts
Last Edited: 2011-05-28 21:55:20
May 28 2011 21:50 GMT
#4
Do we know if it's NP-incomplete at least? I'm not really thinking about the practicality of this, but as a purely theoretical experiment, would it be possible to set up powerful computer and marvel at perfect forcefields? This is assuming the algorithms do work out.
Jyvblamo
Profile Blog Joined June 2006
Canada13788 Posts
May 28 2011 22:09 GMT
#5
A good forcefield AI would be impressive. It's one of those things that is much more intuitive to human minds and can't be put into a simple algorithm.
Kuzmorgo
Profile Joined May 2009
Hungary1058 Posts
Last Edited: 2011-05-28 23:11:29
May 28 2011 23:11 GMT
#6
On May 29 2011 06:21 CampinSam wrote:
Forcefields look easy?
What!?

I can't imagine trying to code a unit to automatically forcefield around, or infront of a unit, and even if they did program that in, the forcefields probably wouldn't even be good.

The Automation is different in a sense that it moves back units that are getting ready to be hit by an attack, that is fairly simple, it is just something that is done in a split-second.

Can you imagine a behavior that if the force that is attacking the AI's units is bigger then what the AI has, it would automatically forcefield a ramp? hilarity would ensue, but I imagine there is a way to make the AI figure out that the force is moving UP the ramp... gah.. it just sounds so confusing.

But then again, I may be going at it wrong.


Actually ff-ing a ramp shouldn't be so hard. measuring if your army is better is easy (especially since insane has maphack ), and then if he is stronger, ff ramp when opponent is like 2 fields away from it.
The hard thing would be splitting the army. However, i don't think you should work on making it perfect. for example it could work like determining the opponents composition, and for example if opponent has roaches, which have 3 range, then ff 5 distance away from front units, in a semi circle. Or something like that. Of course it won't be epic innovative perfect forcefield, but it could work i think.
"No, whine not! Play, or play not! There is no whine."
-orb-
Profile Blog Joined September 2007
United States5770 Posts
May 28 2011 23:20 GMT
#7
Force fielding is one of the few micro tactics that actually requires some thought. Unlike blinking (which is just pretty obvious and there's only really 1 "correct" way to do it), or splitting marines (which yet again while it's one of the most difficult things to micro, it certainly doesn't take thought, it takes precision), force fielding actually requires the user to decide what they want to do with the force fields (i.e. split the army with a long wall of them, completely block the army by dropping them in front of it, stop the army from retreating by walling behind them so zealots can hit them, etc etc etc).

I would imagine programming an AI to make these decisions and correctly place walls of force fields from edge to edge of chokes would be ridiculously difficult.
'life of lively to live to life of full life thx to shield battery'
how sad that sc2 has no shield battery :(
ClysmiC
Profile Blog Joined December 2010
United States2192 Posts
May 28 2011 23:33 GMT
#8
I think FF'ing a ramp to split an army wouldn't be TOO hard to implement into AI. That being said, I have 0 experience with AI, so I could be totally wrong D:
Iranon
Profile Blog Joined March 2010
United States983 Posts
May 28 2011 23:49 GMT
#9
Programming routines to block a ramp should be fairly simple. Splitting an army seems like it would be easy, but only if you have an unlimited number of them... Figuring out the optimal time and place to drop 4-6 forcefields in response to a moving blob of enemy units, not so much.
dae
Profile Joined June 2010
Canada1600 Posts
May 29 2011 00:00 GMT
#10
It would be interesting if you could program an ai to make perfect forcefield donuts (4 forcefields that can trap like 5-6 roachs in like one spot) - Something like if theres 6+ units there and i have 4 forcefields trap them.
VaultDweller
Profile Joined January 2011
Romania132 Posts
May 29 2011 08:42 GMT
#11
The Greentea AI uses forcefields and sometimes they are decent but mostly seem random.
"War is not about who's right- it's about who's left."
Siretu
Profile Blog Joined April 2010
151 Posts
May 29 2011 09:13 GMT
#12
MTops EagleAI uses very good force fields if I remember correctly. I might be wrong but I know at least that the AI uses them. Search for EagleAI to try it. Make sure to try against a hard difficulty since otherwise it wont have the attention points to use it.
han_han
Profile Joined October 2010
United States205 Posts
May 29 2011 09:49 GMT
#13
Ramp forcefield shouldn't be too hard to incorporate right?
Brewed Tea
Profile Joined October 2010
United States124 Posts
May 29 2011 10:48 GMT
#14
this is how the terminator got started.
if it wasnt for mules terrans would have to 15 hatch every game.
Siretu
Profile Blog Joined April 2010
151 Posts
May 29 2011 11:32 GMT
#15
On May 29 2011 19:48 Brewed Tea wrote:
this is how the terminator got started.


If the terminator had force fields the terminators would win the war easily.
Heraklitus
Profile Joined September 2010
United States553 Posts
May 29 2011 12:26 GMT
#16
On May 29 2011 19:48 Brewed Tea wrote:
this is how the terminator got started.


ROFL
leviathan20
Profile Joined April 2010
United Kingdom193 Posts
May 29 2011 12:44 GMT
#17
On May 29 2011 20:32 Siretu wrote:
Show nested quote +
On May 29 2011 19:48 Brewed Tea wrote:
this is how the terminator got started.


If the terminator had force fields the terminators would win the war easily.


Now I'm just going to imagine John Connor trying to run up a ramp that is being endlessly forcefielded whenever i watch that film.
"We better get that boy a waffle NOW or he gon' DIE!"
BackHo
Profile Blog Joined December 2008
New Zealand400 Posts
May 29 2011 13:47 GMT
#18
In the Kerrigan cut-scene you'd think that one would just shoot themselves rather than drop their guns to let the approaching Zerglings tear you apart.
Taek42
Profile Joined March 2011
United States7 Posts
May 29 2011 13:48 GMT
#19
I have some experience programming Ai. I think everybody can agree that there are specific situations in Which you can throw down an effective force field. Highlighting these situations for the Ai wouldn't be too hard.

Block ramp conditions:

- an enemy force is walking up the ramp
- at least (equasion based on enemy army and AI army) units have crossed the midpoint of the ramp

=> FF at the top of the ramp
=> FF at the bottom of the ramp


Guard against melee units:

- There lots of melee units
- You have more high-range units than they do
- Your units have a large attackable surface area

=> FFs around your units to minimize the surface area
=> Leave a gap in one location to allow your army to move forward after the battle


I don't know if existing AI is capable of looking at the surface area of units. This wouldn't be too hard if it doesn't, because Starcraft uses some form of surface area in determing how melee units can attack a building or a unit ball.


---Splitting Armies---

I considered several things while writing this, but it got really complicated and I never intended to spend a ton of time on this post. Ultimately I do believe that you could do it but it would take me a couple of hours to brainstorm the best ways.

I'll summarize some of the things to highlight though:

- unit ranges
- terrain
- position of your army with respect to enemy army
- position of both with respect to terrain
- clumps of units
- looking at unit clumps as pieces instead of as a whole

When looking at an enemy army, it could focus on all of the units that have less than X range, and see how they are dispersed or 'clumped.' (clumping is easily defined, and I think marine splitting AI already uses clumping). If clump of low range units exists near the edges of the enemy army (this could be determined using X and Y positioning analysis), then FFs could be dropped between these units and the units of the AI to push these units out of range.

It's a lot more comlicated that other types of FF AI but I think that you could turn this into code after a few hours of programming. I don't know how long it usually takes to write Starcraft AI or how long people usually spend programming, but my guess is that it would be worth the time.
Noocta
Profile Joined June 2010
France12578 Posts
May 29 2011 15:17 GMT
#20
On May 29 2011 22:47 BackHo wrote:
In the Kerrigan cut-scene you'd think that one would just shoot themselves rather than drop their guns to let the approaching Zerglings tear you apart.


She was out of bullet dude. :d
" I'm not gonna fight you. I'm gonna kick your ass ! "
Acritter
Profile Joined August 2010
Syria7637 Posts
May 29 2011 16:14 GMT
#21
If I can barely use Forcefields, I'm pretty sure no AI can.
dont let your memes be dreams - konydora, motivational speaker | not actually living in syria
Mortician
Profile Blog Joined December 2008
Bulgaria2332 Posts
May 29 2011 20:13 GMT
#22
On May 30 2011 01:14 Acritter wrote:
If I can barely use Forcefields, I'm pretty sure no AI can.


If I can barely use muta micro, I'm pretty sure no AI can.
"If anything, the skill cap in sc2 is higher [than sc1] because there are a lot more things you can do at one given time. " darmousseh
Datum
Profile Joined February 2011
United States371 Posts
May 29 2011 20:42 GMT
#23
On May 30 2011 01:14 Acritter wrote:
If I can barely use Forcefields, I'm pretty sure no AI can.


Why?
jjacobsson
Profile Joined November 2010
Sweden6 Posts
May 29 2011 21:18 GMT
#24
I can think of 3 reasons why the AI does not use forcefields:

1. It's ridiculously hard to get a good heuristic for when and where to place a forcefield, so it get's cut from the game. "Good" does not necessarily mean "strategically good", it can mean "leads to fun game-play".

2. You can get a good heuristic, but it takes to much processing power and/or memory to actually run it on the target hardware for the game. So it get's cut from the game.

3. It was not deemed an important feature in the game, so no effort was made to try to do it.

My personal guess is number 1.

If it's number 2, you will see it in the future expansions (given that Blizzard keeps it's usual pace of development our computing power will have multiplied by over 9000 before the last expansion is out).

Since it's Blizzard I seriously doubt it's number 3.

All of those 3 points are really different flavors of "game developer ran out of time" when I think about it.

The only thing I can think of if I was to try to code this is some kind of influence map, but I doubt the results would be very good.
Cake or death?
nejdu
Profile Joined January 2011
Sweden20 Posts
May 29 2011 21:28 GMT
#25
In the UMS Pimp my Micro the AI makes awesome forcefields...
Det är bögarnas fel
Kinetik_Inferno
Profile Joined December 2010
United States1431 Posts
May 29 2011 23:38 GMT
#26
On May 29 2011 07:09 Jyvblamo wrote:
A good forcefield AI would be impressive. It's one of those things that is much more intuitive to human minds and can't be put into a simple algorithm.

This is basically it. It's practically impossible to program a computer so that it forcefields a ramp or an army, solely because it doesn't know when is a good time to forcefield. The only way I could think of is programming it to forcefield ramps to ground above, when they have seen a large group of units move up there and that group of units will likely kill the AI's army. EG, contain situation. The problem is defining the contain situation. There really is no "I know, therefore I am I should forcefield." It's very human, forcefielding.
Zedex
Profile Joined January 2011
United Kingdom310 Posts
May 29 2011 23:50 GMT
#27
Its entirely situational which marine micro against banelings the idea is always don't let the banelings hit the marines, with force fields its depends on which race you against, you army composition, the surrounding terrain, whether your trying to stall of actually attack. Simple put there are too many variables that can be but into a program especially because all of these variables are continuous (as opposed to discrete). It would be possible but there would be a need for some serious artificial intelligence instead of the so called AI of the game which is extremely robotic.
¯\_(ツ)_/¯
Dhalphir
Profile Blog Joined November 2010
Australia1305 Posts
May 30 2011 05:32 GMT
#28
Being able to forcefield would take an actual artifical intelligence, not just what we have now which is essentially a huge bunch of "if->then" statements masquerading as AI.

Little beyond a videogame at this point.
Supporting TypeII Gaming - www.typeii.net - TypeReaL, TypePhoeNix, TypeSuN, TypeDBS!!
Navillus
Profile Joined February 2011
United States1188 Posts
May 30 2011 06:16 GMT
#29
The automaton is a terrible example, it's very very cool but it's by no means an AI, it's a UMS which is very different, there he just codes it into the map how the units should act, an AI has to actually use in game information and send orders to units while trying to execute a game plan, in the automaton thread the maker even mentions that what he did could never be used in a real game situation, if it really were that easy Blizz wouldn't have needed to make insane cheat.
"TL gives excellent advice 99% of the time. The problem is no one listens to it." -Plexa
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
May 30 2011 06:54 GMT
#30
On May 30 2011 06:18 jjacobsson wrote:
I can think of 3 reasons why the AI does not use forcefields:

1. It's ridiculously hard to get a good heuristic for when and where to place a forcefield, so it get's cut from the game. "Good" does not necessarily mean "strategically good", it can mean "leads to fun game-play".

2. You can get a good heuristic, but it takes to much processing power and/or memory to actually run it on the target hardware for the game. So it get's cut from the game.

3. It was not deemed an important feature in the game, so no effort was made to try to do it.

My personal guess is number 1.

If it's number 2, you will see it in the future expansions (given that Blizzard keeps it's usual pace of development our computing power will have multiplied by over 9000 before the last expansion is out).

Since it's Blizzard I seriously doubt it's number 3.

All of those 3 points are really different flavors of "game developer ran out of time" when I think about it.

The only thing I can think of if I was to try to code this is some kind of influence map, but I doubt the results would be very good.


My bet would be on 2.

Step 1: To place a good forcefield you have to get the position of all units in range of a sentry (and a little further away).

Step 2: After that you have to group the opponents units into blobs (it is quite realistic to assume that the opponents army can consist of multiple groups).

Step 3: Then you have to analyse if the force is stronger than your own force, taking into account the terrain and relative unit positions.

Step 4: Decide if you want to cut the blobs (if you have a superior or equally strong ranged army), FF behind them (if you have a zealot heavy army) or FF in front of them (if their army is a lot stronger).

Step 5: Find the position for the forcefields by going from the center of each blob to the place where you want to FF (front/center/back) and draw a line along the blob.

Step 1, 2 and 5 are actually computationally intensive and they might have to be done for every AI iteration (multiple times per second).
Slaytilost
Profile Joined October 2010
Netherlands968 Posts
May 30 2011 07:31 GMT
#31
Software development is about cutting corners. What about just spamming forcefields in a 45 degree radius, or until an unmovable surface is detected, 2 secs after you start to battle.
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
May 30 2011 07:57 GMT
#32
On May 30 2011 16:31 Slaytilost wrote:
Software development is about cutting corners. What about just spamming forcefields in a 45 degree radius, or until an unmovable surface is detected, 2 secs after you start to battle.


That would produce lots of funny forcefields that actually do nothing or hurt the protoss more than the opponent and only in 1 out of 10 situations it would produce good forcefields, it would even open more options to abuse the AI.
Slaytilost
Profile Joined October 2010
Netherlands968 Posts
May 30 2011 08:22 GMT
#33
Well lets define good forcefields then. Why and when should you cast how many forcefields?
MrTortoise
Profile Joined January 2011
1388 Posts
Last Edited: 2011-05-30 15:29:40
May 30 2011 15:20 GMT
#34
I like Slaytilost approach.

the easy approach is to solve the constants first ... the maps, get data from them to use for scoring and selection algorithms.

your first problem is looking at the map and figuring out how to score certain positions for forcefield placement ...

eg ramps .. how do you get it to test a part of the map to see if it cuts it off. All these locations get a good score.

Then you have to consider areas that can be cut off by tesselating forcefields.

This would give you a decent score graph of any given map and greatly aid any algorithm ... would be really interesting to see actually ... areas that take up to 10 forcefields scored fairly low vs 1 forcefield scored high in a heat map.

This kidn of graph also help with the mechanic of placing them as you end up with a sorted list of valid locations and groups.

Then you can work with generally heuristics
Eg, Its probably true that its not all that wrong to split an army of even size .

Thats how id start - it would be primitive but its a start.

battles id probably pre-rig with preset appraoches based on composition ratios and score these - eg push marauders back from marines would score higher than trap the whole lot if you have no collosus. Really crude stuff.

Goals would be really simple and based on current known army sizes and composition
Split, contain and push away.


I dont think you need anything overly clever once you break the problem down, its a selection algorithm based on available data. You don;t need past data and you dont need any learning.

The complexities of combat are really only half the problem. and are probably solved to an extent when yous sovle the map portion




VIB
Profile Blog Joined November 2007
Brazil3567 Posts
May 30 2011 15:29 GMT
#35
On May 29 2011 06:35 Griffith` wrote:
I've tried making an AI that does forcefields - its EXTREMELY hard - even harder than my mutalisk AI. It requires a lot of cluster algorithms to find centroids - an NP-hard problem.
You're exaggerating. It's not as trivial as some other microing, but it's not too hard. With the right algorithm it's not NP.

T = pick nearest enemy ranged unit
If T's range < your unit's range
and if battle is going for a few seconds {
C = Count how many force field's you have
P = T's position + a little behind by an amount of T's size
C2 = 0 // will count how many force field worthy spots there are
loop C times or enough to do an angle you think is enough {
// P2 = array of forcefield worthy spots
P2[C] = P + move force (field's size/2 + T's size/2) to the left or right (alternating)
if P2[C] is a moveable spot then: C2++
}
if C > C2 * (RATIO) // adjust RATIO to whatever you prefer between 0 and 1 - this is how many forcefields you'll have left
then cast forcefields from P[0] to P[1]
}

TLDR: Check how many forcefield-able spots are there behind an enemy unit of short range. And if you have enough mana, forcefield those spots.

This will prevent units with shorter range to run away from you. And make it so other's behind it cannot come to help. ie.: roaches vs stalkers

Of course this example is very simple and there's a lot that can be improved. If you wanna make it more complex. You can later A) count how many enemy units there are near the target so you can tell wheter the battle is worth to fight. and B) check if there are massive units nearby and C) check also for units of longer range, force field in front of them if yours unit need to flee or behind them if you are already in it's range so it doesn't flee. etc etc

This algorithm is fast to calculate and would make a reasonable decent use of force fields. It's fast because there aren't that many iterations to do. Since you consider the size of forcefields when calculating space.

On May 30 2011 06:18 jjacobsson wrote:
3. It was not deemed an important feature in the game, so no effort was made to try to do it.
I'm very sure 3 is true.
Great people talk about ideas. Average people talk about things. Small people talk about other people.
loadme
Profile Joined April 2010
171 Posts
May 30 2011 15:43 GMT
#36
on sc2mapster there was a larger news post 6-9 month ago, that showed some FF Ai. it worked quiet well.
Yes.
Faricho
Profile Joined April 2011
Colombia116 Posts
Last Edited: 2011-05-30 15:57:49
May 30 2011 15:54 GMT
#37
well the hardest part (computationally) would be to find the centroid of the enemy units, then cast a line of FF that is perpendicular to the line connecting the centroid of your army with the enemy's.

But before it would be better to position the army to take full advantage of the chokes (I've no idea how)

Maybe the easiest way to find the centers could be summing all the enemy unit's X,Y positions and dividing that by the number of enemy units. But that alone could be heavy
"Critics get shit done and they stand up for quality control and the rights of the consumer. Why people decide to hate on them over some misplaced loyalty that is certainly not reciprocated by the company is entirely beyond me" -TotalBisquit
Deleted User 101379
Profile Blog Joined August 2010
4849 Posts
May 30 2011 15:56 GMT
#38
On May 31 2011 00:29 VIB wrote:
Show nested quote +
On May 29 2011 06:35 Griffith` wrote:
I've tried making an AI that does forcefields - its EXTREMELY hard - even harder than my mutalisk AI. It requires a lot of cluster algorithms to find centroids - an NP-hard problem.
You're exaggerating. It's not as trivial as some other microing, but it's not too hard. With the right algorithm it's not NP.

T = pick nearest enemy ranged unit
If T's range < your unit's range
and if battle is going for a few seconds {
C = Count how many force field's you have
P = T's position + a little behind by an amount of T's size
C2 = 0 // will count how many force field worthy spots there are
loop C times or enough to do an angle you think is enough {
// P2 = array of forcefield worthy spots
P2[C] = P + move force (field's size/2 + T's size/2) to the left or right (alternating)
if P2[C] is a moveable spot then: C2++
}
if C > C2 * (RATIO) // adjust RATIO to whatever you prefer between 0 and 1 - this is how many forcefields you'll have left
then cast forcefields from P[0] to P[1]
}

TLDR: Check how many forcefield-able spots are there behind an enemy unit of short range. And if you have enough mana, forcefield those spots.

This will prevent units with shorter range to run away from you. And make it so other's behind it cannot come to help. ie.: roaches vs stalkers

Of course this example is very simple and there's a lot that can be improved. If you wanna make it more complex. You can later A) count how many enemy units there are near the target so you can tell wheter the battle is worth to fight. and B) check if there are massive units nearby and C) check also for units of longer range, force field in front of them if yours unit need to flee or behind them if you are already in it's range so it doesn't flee. etc etc

This algorithm is fast to calculate and would make a reasonable decent use of force fields. It's fast because there aren't that many iterations to do. Since you consider the size of forcefields when calculating space.

Show nested quote +
On May 30 2011 06:18 jjacobsson wrote:
3. It was not deemed an important feature in the game, so no effort was made to try to do it.
I'm very sure 3 is true.


Ok, what about 2 groups of units from 2 different angles?
Units stimming up a choke?
Splitting units?
Zealots + Sentries vs ranged units?

While your algorithm would work in some situations, it would produce totally horrible results in others. It's simply something that a human can do far better by instinct than any machine. This doesn't mean there shouldn't be any forcefields, a simple implementation would suffice, but we will never see perfectly used forcefields from an AI (at least not in the next year or two).
VIB
Profile Blog Joined November 2007
Brazil3567 Posts
Last Edited: 2011-05-30 16:53:43
May 30 2011 16:50 GMT
#39
On May 31 2011 00:56 Morfildur wrote:
Show nested quote +
On May 31 2011 00:29 VIB wrote:
On May 29 2011 06:35 Griffith` wrote:
I've tried making an AI that does forcefields - its EXTREMELY hard - even harder than my mutalisk AI. It requires a lot of cluster algorithms to find centroids - an NP-hard problem.
You're exaggerating. It's not as trivial as some other microing, but it's not too hard. With the right algorithm it's not NP.

T = pick nearest enemy ranged unit
If T's range < your unit's range
and if battle is going for a few seconds {
C = Count how many force field's you have
P = T's position + a little behind by an amount of T's size
C2 = 0 // will count how many force field worthy spots there are
loop C times or enough to do an angle you think is enough {
// P2 = array of forcefield worthy spots
P2[C] = P + move force (field's size/2 + T's size/2) to the left or right (alternating)
if P2[C] is a moveable spot then: C2++
}
if C > C2 * (RATIO) // adjust RATIO to whatever you prefer between 0 and 1 - this is how many forcefields you'll have left
then cast forcefields from P[0] to P[1]
}

TLDR: Check how many forcefield-able spots are there behind an enemy unit of short range. And if you have enough mana, forcefield those spots.

This will prevent units with shorter range to run away from you. And make it so other's behind it cannot come to help. ie.: roaches vs stalkers

Of course this example is very simple and there's a lot that can be improved. If you wanna make it more complex. You can later A) count how many enemy units there are near the target so you can tell wheter the battle is worth to fight. and B) check if there are massive units nearby and C) check also for units of longer range, force field in front of them if yours unit need to flee or behind them if you are already in it's range so it doesn't flee. etc etc

This algorithm is fast to calculate and would make a reasonable decent use of force fields. It's fast because there aren't that many iterations to do. Since you consider the size of forcefields when calculating space.

On May 30 2011 06:18 jjacobsson wrote:
3. It was not deemed an important feature in the game, so no effort was made to try to do it.
I'm very sure 3 is true.


Ok, what about 2 groups of units from 2 different angles?
Units stimming up a choke?
Splitting units?
Zealots + Sentries vs ranged units?

While your algorithm would work in some situations, it would produce totally horrible results in others. It's simply something that a human can do far better by instinct than any machine. This doesn't mean there shouldn't be any forcefields, a simple implementation would suffice, but we will never see perfectly used forcefields from an AI (at least not in the next year or two).
My algorithm would work fine on all 4 situations that you talk about. Did you even read it? Your argument that a human would do it better is empty and with zero scientific base. My algorithm is far from perfect, it's just a simple thing to show you what and how it can be done. Like I said you can add to it and make it more complex, there's lots of stuff I simply didn't bother putting in that could be.

But neither are humans anywhere near perfect in the force fielding skill. What are you talking about? Humans suck at this. It's not hard to make a computer at least as good as an average player at this. Most players, even at the highest levels, just spam forcefield on the enemy troops without giving it too much thought and often times screw up and make horrible mistakes. It's very very easy to make an algorithm that simulates that. Which is basically what mine is doing.

Most people just use it like "OMG blob of enemy units! Must quick throw force fields in there somewhere to make it less room for them! Don't matter exactly where" That's all. That's how 90% of all force fields are used even in pro games. It's very easy to reproduce that same thing on the AI.
Great people talk about ideas. Average people talk about things. Small people talk about other people.
elitesniper420
Profile Joined May 2011
Canada135 Posts
May 30 2011 17:10 GMT
#40
program the AI to detect big balls of units and then make it place forcefields in the middle of it

problem solved
VIB
Profile Blog Joined November 2007
Brazil3567 Posts
May 30 2011 17:24 GMT
#41
On May 31 2011 02:10 elitesniper420 wrote:
program the AI to detect big balls of units and then make it place forcefields in the middle of it

problem solved
That's actually not a bad idea and would work better than most average human players do
Great people talk about ideas. Average people talk about things. Small people talk about other people.
ComaDose
Profile Blog Joined December 2009
Canada10357 Posts
May 30 2011 17:39 GMT
#42
and many of the ideas here.
very few programers are commenting.
why not try it out.
BW pros training sc2 is like kiss making a dub step album.
aphorism
Profile Joined February 2011
United States226 Posts
May 30 2011 18:09 GMT
#43
On May 31 2011 02:39 ComaDose wrote:
and many of the ideas here.
very few programers are commenting.
why not try it out.


Wait, programmers or progamers?
Zhypher_Bronzer
Profile Joined February 2011
United States24 Posts
May 30 2011 18:19 GMT
#44
thats a good point, i noticed that they never FF xD
Dream as if you'll live forever, live as if you'll die today.
epikAnglory
Profile Blog Joined April 2011
United States1120 Posts
May 30 2011 18:19 GMT
#45
If FFs were that easy the AI would actually use them, but yeah I agree, I wish the AI would play more like a regular player (similar). Hope this is something implemented into future patches or at most HotS.
710+ Posts with a Probe Icon =D
ComaDose
Profile Blog Joined December 2009
Canada10357 Posts
May 30 2011 18:57 GMT
#46
On May 31 2011 03:09 aphorism wrote:
Show nested quote +
On May 31 2011 02:39 ComaDose wrote:
and many of the ideas here.
very few programers are commenting.
why not try it out.


Wait, programmers or progamers?


programmers* :$ it would be easy to make a sentry cast force field. Hard to make it do it correctly. I'm interested in what people who make custom maps and starcraft AI would say.

It is something that can be used for multiple purposes and many ways for each purpose. Like has been said there is decision making to be done.
BW pros training sc2 is like kiss making a dub step album.
VIB
Profile Blog Joined November 2007
Brazil3567 Posts
May 30 2011 19:04 GMT
#47
On May 31 2011 03:57 ComaDose wrote:
Show nested quote +
On May 31 2011 03:09 aphorism wrote:
On May 31 2011 02:39 ComaDose wrote:
and many of the ideas here.
very few programers are commenting.
why not try it out.


Wait, programmers or progamers?


programmers* :$ it would be easy to make a sentry cast force field. Hard to make it do it correctly. I'm interested in what people who make custom maps and starcraft AI would say.

It is something that can be used for multiple purposes and many ways for each purpose. Like has been said there is decision making to be done.

There's people on this thread pointing out to sites where you can find ai that does it. If I had the game myself I would prolly give it a shot, I find it fun to code ai. But I won't buy the game only for that.
Great people talk about ideas. Average people talk about things. Small people talk about other people.
epikAnglory
Profile Blog Joined April 2011
United States1120 Posts
Last Edited: 2011-05-30 23:24:01
May 30 2011 23:23 GMT
#48
It should not be that hard as well, if the army is bigger, then FF 90% of the entire army. Against even Terran army, FF about half. Against even Zerg army, FF the front 10-20%. I am no pro at coding, but for people working at Blizzard it should not take that long.
710+ Posts with a Probe Icon =D
epikAnglory
Profile Blog Joined April 2011
United States1120 Posts
Last Edited: 2011-05-31 02:15:34
May 31 2011 02:14 GMT
#49
Does this mean Insane AI will automatically generate Energy for ForceField as well? =D
EDIT: sorry for double post, but its been hours and its still on top of the Single Player section?
710+ Posts with a Probe Icon =D
japro
Profile Joined August 2010
172 Posts
Last Edited: 2011-05-31 20:41:12
May 31 2011 20:37 GMT
#50
Having an AI place "reasonable" forcefields would be doable I guess. The thing, is these things aren't trivial to program and it's hard draw the line what micro the AI should do and what not? What about drop micro? Line splash avoiding? Marine splitting? Stutterstep micro? etc.
From the point of a programmer you usually do the things that can be done elegantly and straight forward first and add in specific stuff (as which a complicated micro ability that applies to exactly one unit definitely counts) last. Abilities like that that require some intuition about environment usage are very hard to analyze and even if you do find a reasonable method for it, chances are high that you end up with this kind of ability where experienced players can abuse the AI to screw up its own paths etc.
Also Analyzing the "topology" of the environment and the movement of units in it tends to be computationally very expensive (involves for example a lot of very expensive path finding calculations I guess) and you don't want to have a single unit like the sentry take up significant amounts of computing power.
Giwoon
Profile Joined December 2010
Korea (South)431 Posts
June 01 2011 01:41 GMT
#51
On May 29 2011 21:44 leviathan20 wrote:
Show nested quote +
On May 29 2011 20:32 Siretu wrote:
On May 29 2011 19:48 Brewed Tea wrote:
this is how the terminator got started.


If the terminator had force fields the terminators would win the war easily.


Now I'm just going to imagine John Connor trying to run up a ramp that is being endlessly forcefielded whenever i watch that film.


LMFAOOO AHAHAHAHAHA
BUTTHURT?
snakeeyez
Profile Joined May 2011
United States1231 Posts
Last Edited: 2011-06-01 02:20:44
June 01 2011 02:18 GMT
#52
Starcraft 2 is not really a good game for AI type problems like these that are harder to do because it just uses way to many resources that get used for graphics these days. Brood war and the BWAPI is a way better place to work on real AI because you have tons of CPU to work on AI which can never have to much CPU to work with. Any real AI algorithm is going to eat CPU cycles for breakfast I mean even the typical A* they prune the tree at a certain depth because its just too expensive for dozens of units all running such an expensive algorithm. Anyone that says AI is easy has no idea what they are talking about.
That being said a computer that can use force fields intelligently could be done, but its just too much time/money and CPU to spend on something you can just ignore and let real people do instead since multiplayer is the real focus.
edc
Profile Blog Joined May 2011
United States666 Posts
June 01 2011 03:40 GMT
#53
Does the AI even make Sentries? I doubt it could correctly use Hallucinations and Guardian Shields.
“There are two kinds of people in this world, those with loaded guns, and those who dig. You dig.” - Clint Eastwood
epikAnglory
Profile Blog Joined April 2011
United States1120 Posts
June 02 2011 23:57 GMT
#54
On June 01 2011 12:40 edc.initiative wrote:
Does the AI even make Sentries? I doubt it could correctly use Hallucinations and Guardian Shields.

It does make Sentries, and sometimes uses Guardian Shield, but not once have I seen it use Force Fields at all.
710+ Posts with a Probe Icon =D
Rhykker
Profile Joined June 2011
Canada28 Posts
June 07 2011 20:41 GMT
#55
*imagines AI with perfectly-timed and -placed forcefields*

*shudders*

Personally, I'd rather have more difficult AI settings that don't rely on "cheating." Sure, force fielding would help the micro battles, but I'd rather have AI that is capable of radically different macro tactics.
starcraft911
Profile Blog Joined July 2008
Korea (South)1263 Posts
June 07 2011 20:55 GMT
#56
On May 29 2011 06:21 CampinSam wrote:
Forcefields look easy?
What!?

I can't imagine trying to code a unit to automatically forcefield around, or infront of a unit, and even if they did program that in, the forcefields probably wouldn't even be good.


It's not hard to code. Just need to set a param for density of units per grid space then have the FF be placed in the central area of the density > X. If units are spread out then it wont use FF if they are it will use them in order to cut them in half.
dimfish
Profile Blog Joined February 2010
United States663 Posts
June 07 2011 23:39 GMT
#57
It might not seem that hard to code this up, but the issue is that it is a lot harder to define optimal FF casting than to say, define optimal kiting. Let me break it down for you if don't write code.

In your mind you picture a situation with a blob of Protoss units and some sentries against some Terran units marching over in a ball, and you're like "oh, my toss army is bigger, so I would just FF a good-sized chunk of his stuff towards me I know I can kill."

This is not how computers think! There are a ton of conditions your human brain can recognize in an instant. Computers have to think much more rotely. Let's assume the FF AI you write has perfect knowledge (map hack, whatever you want to call it). The AI does not "see" the picture above that you saw. It sees the data of the game like this.

Player 1:
Zealot @ location 4, 5, facing 56 degrees
Zealot @ location 6, 2, facing 10 degrees
Sentry @ location 3, 3 facing 10 degrees

Player 2:
Marine @ location 1, 1, facing 115 degrees
Marine @ location 1, 2, facing 110 degrees

etc.

Now with a list of units and locations, what do you do? Are the armies close, far, scattered all over, what? Someone earlier in the thread mentioned you should do some kind of clustering algorithm on the units, which is a good start.

The point is, you have to write the code to account for the entire range of data. What if the Terran player has single marines standing around the map? Do you want your FF AI to spend energy trapping and killing one marine? If three SCVs and one marine charge up your ramp would you FF it? Your AI might unless you define very clearly what is dangerous and what is not.

What if you decide the Terran army is actually in a ball, and your army is actually in a ball and the conditions are right for casting FF? Should you just fire them off? Maybe not! Maybe the Terran army is actually walking away from your ball and in the time it takes your sentries to carry out the FF order you give it, the Terran units will be gone, and poof: silly-looking FF! This observation alone means a good FF AI will probably need to do some planning and keep sentries in range of points that might be good FF spots in the future.

I think a good FF AI is certainly doable, it will just take some serious development time.
Pughy
Profile Blog Joined July 2010
Wales662 Posts
Last Edited: 2011-06-08 03:45:30
June 08 2011 03:33 GMT
#58
I agree with some people in this thread. An AI will never be able to use forcefields in a competent way like real players can. Forcefields change the gameplay in a way computers can never anticipate. I've played nearly 3000 ladder 1v1's and knowing when/how to forcefield can still be very tricky (and I'm masters).

An example is in PvT when the T rushes up your ramp. You've gotta decide if you keep them out, or let them in. But then theres other stuff that comes into the equation. eg you may not have enough forces to kill the push but can block it for 15 seconds longer which may let you get extra units to beat the push, or an extra sentry to hold the ramp. Being optimal with sentries is the hardest thing, and when you think about it. Even now the most optimal use of sentries isn't even known so how could someone code that into an AI?

Also thought of another example. What about roaches with burrow? An AI would have alot of trouble figuring out how to forcefield burrowed roachs effiecently so you don't get over run or lose position? (which isn't easy for even a human player)
Commentatorwww.twitter.com/pughydude www.twitch.tv/pughydude
CoolManJones
Profile Joined October 2010
United States23 Posts
June 08 2011 20:07 GMT
#59
thx, excellent answer.
Siretu
Profile Blog Joined April 2010
151 Posts
Last Edited: 2011-06-08 23:02:16
June 08 2011 22:56 GMT
#60
On June 08 2011 08:39 dimfish wrote:
It might not seem that hard to code this up, but the issue is that it is a lot harder to define optimal FF casting than to say, define optimal kiting. Let me break it down for you if don't write code.

In your mind you picture a situation with a blob of Protoss units and some sentries against some Terran units marching over in a ball, and you're like "oh, my toss army is bigger, so I would just FF a good-sized chunk of his stuff towards me I know I can kill."

This is not how computers think! There are a ton of conditions your human brain can recognize in an instant. Computers have to think much more rotely. Let's assume the FF AI you write has perfect knowledge (map hack, whatever you want to call it). The AI does not "see" the picture above that you saw. It sees the data of the game like this.

Player 1:
Zealot @ location 4, 5, facing 56 degrees
Zealot @ location 6, 2, facing 10 degrees
Sentry @ location 3, 3 facing 10 degrees

Player 2:
Marine @ location 1, 1, facing 115 degrees
Marine @ location 1, 2, facing 110 degrees

etc.

Now with a list of units and locations, what do you do? Are the armies close, far, scattered all over, what? Someone earlier in the thread mentioned you should do some kind of clustering algorithm on the units, which is a good start.

The point is, you have to write the code to account for the entire range of data. What if the Terran player has single marines standing around the map? Do you want your FF AI to spend energy trapping and killing one marine? If three SCVs and one marine charge up your ramp would you FF it? Your AI might unless you define very clearly what is dangerous and what is not.

What if you decide the Terran army is actually in a ball, and your army is actually in a ball and the conditions are right for casting FF? Should you just fire them off? Maybe not! Maybe the Terran army is actually walking away from your ball and in the time it takes your sentries to carry out the FF order you give it, the Terran units will be gone, and poof: silly-looking FF! This observation alone means a good FF AI will probably need to do some planning and keep sentries in range of points that might be good FF spots in the future.

I think a good FF AI is certainly doable, it will just take some serious development time.



I disagree. There are a lot of handy functions to easily work out how scattered the army is and if it's a decent amount of enemy units(not just a single marine). Force fielding a ramp is harder and would take some time but I think I could probably make a decent one within a day of serious coding. Blizzard has a bunch of great programmers who should be able to fix it pretty fast.

The question is, does the AI have to be better than a human? You mention "keeping sentries in range of points that might be good FF spots in the future." What human actually does that. I mean, you might sort your sentries so they're in the middle so they can get in range for the force fields but it's not like you're actually trying to calculate the best spot for them to be at to make sure they can cast their force field.


On May 29 2011 06:21 CampinSam wrote:
Forcefields look easy?
What!?

I can't imagine trying to code a unit to automatically forcefield around, or infront of a unit, and even if they did program that in, the forcefields probably wouldn't even be good.

This would be even easier. Force fielding in a circle around a unit is not particulary hard at all. In front of a unit is still pretty easy(easier than splitting a whole army) but takes some more time.
AzureD
Profile Joined September 2010
United States320 Posts
June 08 2011 23:29 GMT
#61
If I where coding it I would keep things simple. If enemy range > your units range then FF behind the the enemy units. If your range > enemy range then FF in front or on top of enemy units. Probably just doing FF behind enemy units would make them effective enough as it would split them for default FF use and add special conditions for other cases.

Code it so FF never overlap by more than a few pixels but always touch.

Code it so they do not use FF unless enemy army is at least 50% as strong as yours.

Code FF to never cover more than a certain % of impassable terrain.
dimfish
Profile Blog Joined February 2010
United States663 Posts
June 08 2011 23:36 GMT
#62
On June 09 2011 07:56 Siretu wrote:
Show nested quote +
On June 08 2011 08:39 dimfish wrote:
It might not seem that hard to code this up, but the issue is that it is a lot harder to define optimal FF casting than to say, define optimal kiting. Let me break it down for you if don't write code.

In your mind you picture a situation with a blob of Protoss units and some sentries against some Terran units marching over in a ball, and you're like "oh, my toss army is bigger, so I would just FF a good-sized chunk of his stuff towards me I know I can kill."

This is not how computers think! There are a ton of conditions your human brain can recognize in an instant. Computers have to think much more rotely. Let's assume the FF AI you write has perfect knowledge (map hack, whatever you want to call it). The AI does not "see" the picture above that you saw. It sees the data of the game like this.

Player 1:
Zealot @ location 4, 5, facing 56 degrees
Zealot @ location 6, 2, facing 10 degrees
Sentry @ location 3, 3 facing 10 degrees

Player 2:
Marine @ location 1, 1, facing 115 degrees
Marine @ location 1, 2, facing 110 degrees

etc.

Now with a list of units and locations, what do you do? Are the armies close, far, scattered all over, what? Someone earlier in the thread mentioned you should do some kind of clustering algorithm on the units, which is a good start.

The point is, you have to write the code to account for the entire range of data. What if the Terran player has single marines standing around the map? Do you want your FF AI to spend energy trapping and killing one marine? If three SCVs and one marine charge up your ramp would you FF it? Your AI might unless you define very clearly what is dangerous and what is not.

What if you decide the Terran army is actually in a ball, and your army is actually in a ball and the conditions are right for casting FF? Should you just fire them off? Maybe not! Maybe the Terran army is actually walking away from your ball and in the time it takes your sentries to carry out the FF order you give it, the Terran units will be gone, and poof: silly-looking FF! This observation alone means a good FF AI will probably need to do some planning and keep sentries in range of points that might be good FF spots in the future.

I think a good FF AI is certainly doable, it will just take some serious development time.



I disagree. There are a lot of handy functions to easily work out how scattered the army is and if it's a decent amount of enemy units(not just a single marine).
What handy functions? In the editor scripting language? Lying around in the universe? What is the algorithmic complexity of them? There will undoubtedly be a trade-off of precision for speed.


On June 09 2011 07:56 Siretu wrote:Force fielding a ramp is harder and would take some time but I think I could probably make a decent one within a day of serious coding. Blizzard has a bunch of great programmers who should be able to fix it pretty fast.
I challenge you to actually sit down and try this and then post your AI after a week, even. And all it has to do is be the supplied game AI except you added some FF behavior. The scripting -> load in game -> test -> change code cycle is already really long compared to other forms of software development. Blizzard has a history of leaving stuff out if they aren't going to do it right. I suspect good FF AI didn't meet this criteria. If they could do it in a day, it'd be there.


On June 09 2011 07:56 Siretu wrote:The question is, does the AI have to be better than a human? You mention "keeping sentries in range of points that might be good FF spots in the future." What human actually does that. I mean, you might sort your sentries so they're in the middle so they can get in range for the force fields but it's not like you're actually trying to calculate the best spot for them to be at to make sure they can cast their force field.
Haha, now we're getting the difference between human and AI play! Of course a human doesn't sort their sentries, because a human can see an opportunity for FF coming in advance and also be able to tell whether the sentries will be in range, or maybe grab them all and move them up. A human brain feels a battle coming and knows where enemy units are likely to be in a few seconds from now. These are all much more difficult for an AI to "know."

Without planning (meaning watching the past and predicting the future) an AI will just realize, in an instant, "hey there is a good FF spot, RIGHT THERE" and it might 1) cast the FFs if the sentries are in-range or close to in-range or 2) realize the sentries are out of range and not cast the FF. Or cast them anyway and hope for the best, and maybe do some really silly stuff.

What I'm getting at is, to a human watching, the AI will sometimes do smart things and sometimes appear to be incredibly stupid. It's all because you have to tell the AI EXACTLY what to do in EVERY situation which is a lot harder for a us to write down in code (for something complex like casting FF) than to just do it yourself with human intuition.

Now banshee micro on the other hand has an easily-expressed behavior. "If something that can shoot you is in range->move away from it, otherwise move toward the nearest known target." BAM! Only mechanics are holding humans back from being banshee gods! You can probably get a really nasty Bansee AI going in a day for sure.
ftl
Profile Joined March 2011
28 Posts
June 09 2011 01:20 GMT
#63
Just something to point out - the in-game AI isn't supposed to be perfect. It's supposed to be a good OPPONENT.

I have no doubt that, with access to the Blizzard AI code, a good programmer or a good team would be able to do something with forcefields which is better than nothing. The more time you spend on it, the more intricate it can be - something really basic within a day, something more reasonable in a month.

But would it make for a good game?

For example, if the AI would often make decisions that are good but sometimes make forcefields that *look really stupid* - then the casual player playing against the AI wouldn't have as much fun, because it's no fun to win against someone who looks like they're playing retarded. (Remember, the point of the built-in AI is to challenge casuals and give them something to play against! It's not to be the best AI it could be!)

Likewise, if a natural result of the forcefield AI is that the AI would end up perma-forcefielding its ramp when it's been beaten... that would make for a really frustrating game. The human player is in a winning position, but still has to play on for half an hour to build a completely new army that can break a one-base anti-air army, because their ground army is permanently forcefielded outside. It's annoying and frustrating, especially to a casual player.

Is it worth introducing those possibilities to the AI? Maybe it is, maybe it isn't.

But the point is that the AI has to also look good and be a good opponent for casuals. Making an AI that can beat serious gamers was never the point.
Siretu
Profile Blog Joined April 2010
151 Posts
June 09 2011 09:12 GMT
#64
On June 09 2011 08:36 dimfish wrote:
Show nested quote +
On June 09 2011 07:56 Siretu wrote:
On June 08 2011 08:39 dimfish wrote:
It might not seem that hard to code this up, but the issue is that it is a lot harder to define optimal FF casting than to say, define optimal kiting. Let me break it down for you if don't write code.

In your mind you picture a situation with a blob of Protoss units and some sentries against some Terran units marching over in a ball, and you're like "oh, my toss army is bigger, so I would just FF a good-sized chunk of his stuff towards me I know I can kill."

This is not how computers think! There are a ton of conditions your human brain can recognize in an instant. Computers have to think much more rotely. Let's assume the FF AI you write has perfect knowledge (map hack, whatever you want to call it). The AI does not "see" the picture above that you saw. It sees the data of the game like this.

Player 1:
Zealot @ location 4, 5, facing 56 degrees
Zealot @ location 6, 2, facing 10 degrees
Sentry @ location 3, 3 facing 10 degrees

Player 2:
Marine @ location 1, 1, facing 115 degrees
Marine @ location 1, 2, facing 110 degrees

etc.

Now with a list of units and locations, what do you do? Are the armies close, far, scattered all over, what? Someone earlier in the thread mentioned you should do some kind of clustering algorithm on the units, which is a good start.

The point is, you have to write the code to account for the entire range of data. What if the Terran player has single marines standing around the map? Do you want your FF AI to spend energy trapping and killing one marine? If three SCVs and one marine charge up your ramp would you FF it? Your AI might unless you define very clearly what is dangerous and what is not.

What if you decide the Terran army is actually in a ball, and your army is actually in a ball and the conditions are right for casting FF? Should you just fire them off? Maybe not! Maybe the Terran army is actually walking away from your ball and in the time it takes your sentries to carry out the FF order you give it, the Terran units will be gone, and poof: silly-looking FF! This observation alone means a good FF AI will probably need to do some planning and keep sentries in range of points that might be good FF spots in the future.

I think a good FF AI is certainly doable, it will just take some serious development time.



I disagree. There are a lot of handy functions to easily work out how scattered the army is and if it's a decent amount of enemy units(not just a single marine).
What handy functions? In the editor scripting language? Lying around in the universe? What is the algorithmic complexity of them? There will undoubtedly be a trade-off of precision for speed.


Show nested quote +
On June 09 2011 07:56 Siretu wrote:Force fielding a ramp is harder and would take some time but I think I could probably make a decent one within a day of serious coding. Blizzard has a bunch of great programmers who should be able to fix it pretty fast.
I challenge you to actually sit down and try this and then post your AI after a week, even. And all it has to do is be the supplied game AI except you added some FF behavior. The scripting -> load in game -> test -> change code cycle is already really long compared to other forms of software development. Blizzard has a history of leaving stuff out if they aren't going to do it right. I suspect good FF AI didn't meet this criteria. If they could do it in a day, it'd be there.


Show nested quote +
On June 09 2011 07:56 Siretu wrote:The question is, does the AI have to be better than a human? You mention "keeping sentries in range of points that might be good FF spots in the future." What human actually does that. I mean, you might sort your sentries so they're in the middle so they can get in range for the force fields but it's not like you're actually trying to calculate the best spot for them to be at to make sure they can cast their force field.
Haha, now we're getting the difference between human and AI play! Of course a human doesn't sort their sentries, because a human can see an opportunity for FF coming in advance and also be able to tell whether the sentries will be in range, or maybe grab them all and move them up. A human brain feels a battle coming and knows where enemy units are likely to be in a few seconds from now. These are all much more difficult for an AI to "know."

Without planning (meaning watching the past and predicting the future) an AI will just realize, in an instant, "hey there is a good FF spot, RIGHT THERE" and it might 1) cast the FFs if the sentries are in-range or close to in-range or 2) realize the sentries are out of range and not cast the FF. Or cast them anyway and hope for the best, and maybe do some really silly stuff.

What I'm getting at is, to a human watching, the AI will sometimes do smart things and sometimes appear to be incredibly stupid. It's all because you have to tell the AI EXACTLY what to do in EVERY situation which is a lot harder for a us to write down in code (for something complex like casting FF) than to just do it yourself with human intuition.

Now banshee micro on the other hand has an easily-expressed behavior. "If something that can shoot you is in range->move away from it, otherwise move toward the nearest known target." BAM! Only mechanics are holding humans back from being banshee gods! You can probably get a really nasty Bansee AI going in a day for sure.


The handy functions available in the editor allow you to easier work out if there's a deathball or just some spread out units. I mean, when you're coding you can get more out of the AI than just the location and rotation. Things like going through the enemy units close to your own army and checking how many units are around each of them will easily give you a trigger that finds out what kind of army(wide-spread, deathball, just a couple of units) you're dealing with.

I have to again mention EagleAI(Search for it on battle.net). It uses some pretty good force fields(not for ramp blocking but for splitting armies). Just make sure you set it to a hard difficulty or it wont have enough attention points to do it.

Even though there's already AI that does it, I will sit down and make a Force Field AI. Not right now since I have 3 parties this week and then my summer job starts next week. This means I wont have a serious day of coding available so I'll have to spread it out.

Also, when it comes to ramp force fielding you would need a pathing system to recognize a ramp(Which is possible. EagleAI does it). If you include coding this, it would be hard to do it within a day. I cba doing a pathing system so I will create a simple splitting AI(As well as surrounding)

I agree with your other points. I just didn't think most protoss players microed their sentries positions that much(I am not a protoss, so I wouldn't know)

And yes, things with easily-expressed behaviors are easy to create and AI for. I've easily done kiting, storming/emp'ing the most dense area and avoiding storm damage.
GGitsJack
Profile Blog Joined June 2010
New Zealand426 Posts
June 09 2011 10:38 GMT
#65
Soon we can get an insanely-insane out of this world A.I that our pro gamers cant even beat :D
"A reason becomes an excuse if you don't do anything about it."
xaeiu
Profile Blog Joined September 2010
432 Posts
June 09 2011 11:30 GMT
#66
On June 09 2011 19:38 GGitsJack wrote:
Soon we can get an insanely-insane out of this world A.I that our pro gamers cant even beat :D

what's more insane than a cheating ai?
HoMM
Profile Joined July 2010
Estonia635 Posts
June 09 2011 14:52 GMT
#67
On June 09 2011 19:38 GGitsJack wrote:
Soon we can get an insanely-insane out of this world A.I that our pro gamers cant even beat :D


That's what they said about chess...
SC2 Masters Protoss - LoL Diamond adc/support www.twitter.com/hommlol www.youtube.com/homm87
typedef struct
Profile Joined January 2011
United States84 Posts
Last Edited: 2011-06-09 16:34:12
June 09 2011 16:08 GMT
#68
Heuristics off the top of my head.

1. Am I up a ramp, or containing an enemy up a ramp?
Easiest case, basically a specialization of #3. Friendly strength vs perceived enemy strength, cast in time to allow 0-50% of enemy forces up/down.

2. If I outrange the enemy units, are they clumped enough to put them in FF-jail, and do I have enough to kill them before they get out?
Straightforward. Of course if the value of the enemy units is less that the value of my sentry energy, don't do this.

3. Are there 2 impassable terrain features close enough, and I do have enough FF, to completely block off the enemy's avenue of approach?
The primary case. Cast a line of FF, perpendicular to the enemy's avenue of approach, connecting 2 impassable terrain features. When to cast depends on friendly strength vs perceived enemy strength. Could be after 0-100% of enemy forces have passed the desired FF area, with additional considerations. If I have HT, I want to let enough through for 1 storm to fully cover without wasting any of the storm. If I'm Zealot-heavy, let enough through that I don't run into my own FF.

4. If I outrange the enemy, do I have enough FF to put myself in FF jail?
Getting desperate here. Your stalker ball has been swarmed by lings.

5. You're a Protoss in the open with no sentry energy.
gg
Eiviyn
Profile Joined August 2010
United Kingdom169 Posts
June 09 2011 17:39 GMT
#69
Just so you guys know, SC2 already has a trigger function which determines the centre point of a group of units.

If all you wanted was a FF line down the (perpendicular) middle of the group, it'd take a few minutes tops to make.
RoyalCheese
Profile Joined May 2010
Czech Republic745 Posts
June 09 2011 18:06 GMT
#70
I'm sure it's doable but it would require _a lot_ of programming. Hardest part would probably be analyzing the terrain...rest of it could be done easily.
Kennigit: "Chill was once able to retire really young, but decided to donate his entire salary TO SUPPORT ESPORTS"
BadgerBadger8264
Profile Joined March 2011
Netherlands409 Posts
June 10 2011 00:17 GMT
#71
Forcefielding your ramp might be kinda easy, but for the rest, you gotta remember forcefields can hurt you as well. Just placing them is usually not good, It all really depends on his unit composition, his placement, your unit composition, etc. It would be extremely hard to code, especially for something as useless as AI as that's barely used anyway.
Siretu
Profile Blog Joined April 2010
151 Posts
June 12 2011 11:52 GMT
#72
Also, there was an AI that did proper force fields even back in the beta:
butchji
Profile Joined September 2009
Germany1531 Posts
June 12 2011 12:20 GMT
#73
On June 09 2011 23:52 HoMM wrote:
Show nested quote +
On June 09 2011 19:38 GGitsJack wrote:
Soon we can get an insanely-insane out of this world A.I that our pro gamers cant even beat :D


That's what they said about chess...



And it's true now?
MrTortoise
Profile Joined January 2011
1388 Posts
June 12 2011 13:49 GMT
#74
peopel seem to forget that you don thave to *solve* the problem

you just have to make it look like its about ruight in 80% of situations


yes you can abuse AI ... but if you want ed to write something to solve a sitaution you probably could ... it just that it wouldn't work realtime ... its kind of why people need to play for a LONG time to learn ... and people learn REALLY fast.

All you need is avague approximation.
Medrea
Profile Joined May 2011
10003 Posts
June 12 2011 14:20 GMT
#75
I think everyone here is forgetting that campaign mission where the protoss AI totally uses force fields to prevent you from getting the artifact.
twitch.tv/medrea
Siretu
Profile Blog Joined April 2010
151 Posts
Last Edited: 2011-06-12 21:16:34
June 12 2011 14:58 GMT
#76
I don't recall the mission but I am certain the positions of the force fields were hard coded.

Edit: Some updates on the challenge dimfish gave me. I started coding 16.00 GMT +1 but I did lots of other stuff in the 7h since I started(Eating dinner, being outside, watching TLAttack) So I'd say I worked for about 3h. I am by no means one of the better SC2 mapmakers around but I now have an AI that can easily do a correct split of an attacking and moving army. I can also on command make it surround itself in force fields to protect from melee attackers.
FudgeMunkey
Profile Joined March 2011
Australia59 Posts
June 13 2011 09:27 GMT
#77
I remember that mission, although that must have been coded in specifically.
If you try that mission again (save before the ffs then reload save file) then the ffs will most likely be placed in the exact same place as before...
"Those who brag are the real losers" :D
dimfish
Profile Blog Joined February 2010
United States663 Posts
June 13 2011 13:38 GMT
#78
On June 12 2011 23:58 Siretu wrote:Edit: Some updates on the challenge dimfish gave me. I started coding 16.00 GMT +1 but I did lots of other stuff in the 7h since I started(Eating dinner, being outside, watching TLAttack) So I'd say I worked for about 3h. I am by no means one of the better SC2 mapmakers around but I now have an AI that can easily do a correct split of an attacking and moving army. I can also on command make it surround itself in force fields to protect from melee attackers.
HAhha, awesome! One more tricky thing: how many forcefields should you use in any given engagement? MAke this thing bad-ass
Siretu
Profile Blog Joined April 2010
151 Posts
June 13 2011 16:07 GMT
#79
Easy. Check all the enemy units' distance from the center point of the enemy army. Take the highest of them and multiply by two.

That's the diameter of a circle that fits the entire army in it. A force field has a diameter of 3. So use (Army diameter) / 3 force fields and probably round up. Don't forget to check you actually got the energy to finalize the wall-off.

Right now it uses 7 force fields for splitting and when it surrounds itself in force fields it makes as many as are needed to protect the entire sentry ball(There was some trigonometry involed, damn I hate trigonometry)
DocNemesis
Profile Blog Joined April 2011
Philippines446 Posts
June 13 2011 18:13 GMT
#80
It would take sheer ingenuity to make a sentry AI use forcefields.
Here to kick ass....with Violence. And I got a blog site: http://nemesistrestkon.wordpress.com
Siretu
Profile Blog Joined April 2010
151 Posts
June 13 2011 19:48 GMT
#81
On June 14 2011 03:13 DocNemesis wrote:
It would take sheer ingenuity to make a sentry AI use forcefields.


Making a sentry AI that uses force fields is trivial.

Making an AI that uses force fields that might be useful in some situations is harder(but still quite easy).

Making an AI that uses force fields properly most of the time(like a normal player) is not impossible but itsn't that easy either.

Making an AI that does perfect force fields in all situations(Automaton 2000 style) is going to be very hard.
StormsInJuly
Profile Joined January 2009
Sweden165 Posts
June 13 2011 23:26 GMT
#82
I'm not even sure blizzard realized the potential for forcefield back when they were developing the game
AnxiousHippo
Profile Blog Joined January 2011
Australia1451 Posts
June 14 2011 08:13 GMT
#83
Forcefields can be used both offensively and defensively. There are probably just too many possibilities for forcefields and the AI wouldn't be able to utilize to their full potential. They would also have to realize all the kinds of things they can do (like blocking a ramp to stop reinforcements from the natural while you take out the main) which will take a very long time considering SC2 is still, in a way, fairly new.
An apple a day keeps the Protoss away | TLHF
ETisME
Profile Blog Joined April 2011
12355 Posts
June 14 2011 11:09 GMT
#84
On May 29 2011 21:44 leviathan20 wrote:
Show nested quote +
On May 29 2011 20:32 Siretu wrote:
On May 29 2011 19:48 Brewed Tea wrote:
this is how the terminator got started.


If the terminator had force fields the terminators would win the war easily.


Now I'm just going to imagine John Connor trying to run up a ramp that is being endlessly forcefielded whenever i watch that film.

*Forcefield*
"I will be back"

comes back with millions of terminators lol
其疾如风,其徐如林,侵掠如火,不动如山,难知如阴,动如雷震。
ComaDose
Profile Blog Joined December 2009
Canada10357 Posts
June 14 2011 12:53 GMT
#85
On June 14 2011 08:26 StormsInJuly wrote:
I'm not even sure blizzard realized the potential for forcefield back when they were developing the game

Im possitive they did. They did have people like david kim playing it afterall.
I keep checking this thread for more developments of people actually doing it aha.
BW pros training sc2 is like kiss making a dub step album.
Roflhaxx
Profile Joined April 2010
Korea (South)1244 Posts
June 14 2011 15:43 GMT
#86
Can't you just make some triggers on ramp that makes the ai force field when ur army is halfway cross/starting to cross?
A game where the first thing you do is scout with a “worker”. Does that make any sense? Who scouts with a “worker”? That’s like sending out the janitor to perform recon, what general would do that? Retarded game.
Leeto
Profile Joined August 2007
United States1320 Posts
June 14 2011 16:30 GMT
#87
Forcefielding a ramp is the easy part. Using forcefield to control space during a battle, to cut off retreats or to split an army or to create a better concave, is incredibly hard to code.
Duban
Profile Joined July 2009
United States548 Posts
Last Edited: 2011-06-14 18:21:29
June 14 2011 18:11 GMT
#88
I think I have an idea that at worse is much better than NP hard. I think it's N^2*O where N is the number of enemy units and O is the number of force fields.

For each enemy unit determine what enemy units around it would get pushed and where. Draw a straight line away from the center of the force field to determine where that unit "in theory" would be moved to and keep track of "how far" that unit would be pushed relative to the sentry, closer or farther away. From that grouping use the Variance to determine which force field "splits" the most units, and add some way of "preferring" units closer to the sentry so you don't try to ff the middle of the ball and die in the process.

Not very efficient, but it beats NP hard.
An ignorant person makes a mistake. A stupid person makes it again.
BisuDagger
Profile Blog Joined October 2009
Bisutopia19224 Posts
June 14 2011 18:46 GMT
#89
This is like a situation that came up in a video game I finished working on recently called Fender Bender. The issue here was that the AI vehicles could collect and use shields. The problem was they could be programmed to be used at perfect times in the game without weapon switching delay. They also could collect the shields when available at the best times. One of the ways we dealt with this was by only allowing the hardest difficulty of AI to use the shields. We also gave the shield equal priority to all other pickups.

How this applies to Starcraft: In insane mode force field could def. be used. When battle has been detected by the ai. It can determine the largest sphere created by connecting unit positions together. This bounding sphere can then be split in half. At the center point the force field could be casted allowing for "perfect" army splits.

To take this a step further. The AI is able to understand enemy army size. If the enemy is stronger then the computer, the AI can detect how far the battle commencing is from a nexus and if a ramp is near by. If its with in a certain range then it can cast force field on the ramp blocking the enemy.

Finally: Guardian shield is nice so the AI can just decide that if a guardian shield is active then the other sentries can cast force field.

This code would not be difficult to write in, it's probably that the amount of work load already thrown at the programmers was too much to try and include everything.
ModeratorFormer Afreeca Starleague Caster: http://afreeca.tv/ASL2ENG2
Aarda9
Profile Joined January 2011
United States27 Posts
Last Edited: 2011-06-14 20:02:03
June 14 2011 20:01 GMT
#90
I get FF'd all the time by the hard AI D: Thank you Yabot -_______-
Zerglot with Stim
Siretu
Profile Blog Joined April 2010
151 Posts
June 14 2011 21:32 GMT
#91
Update on the challenge:

Since I am working full time, I don't have so much time to work on the AI.

I've fixed a bug that made it FF too early when attacking from the right. It now automatically detects what kind of FF it should use(Currently limited to either split or defensive surround against enemy melee units)

It's fun to see 20 sentries own 1000 speedlings without any losses. They could probably beat 2000.

I remade the splitting code so I can easily adjust the amount of force fields used. I haven't added the automatic adjustment of the amount of force fields. Not because it's hard, just because I've been prioritizing other stuff.

Adding ramp force fielding requires pathing algorithms that I know EagleAI has but that I don't have. I will try remaking the part I need.
Sevenofnines
Profile Joined May 2010
United States167 Posts
June 14 2011 23:16 GMT
#92
Rudimentary forcefielding would not be particularly hard to program. Obvious things like ramps or splitting an army in half or blocking melee units is easy.

Things begin to get more difficult outside of those trivial situations. For instance:

-Suppose you only have enough energy for say 5 forcefields while your army engages in a wide open area. Would the AI know where to optimally place those forcefields? This problem involves things like existing Terrain, the position/range/speed/damage/composition/etc. of not only the Protoss units but the enemy units as well. I'm sure you could program the AI to figure this out given time, but it becomes much more difficult.

-Suppose its a PvP and the enemy has a slightly larger Colossus count. Would the AI know that FF might end up being detrimental because it would help the enemy colossi? Would it be able to account for massive units possibly breaking FF. How would each of those things affect the rest of the army? Also, would the AI be able to calculate that if it placed FF in a certain way, how the enemy army might reposition and possibly take advantage of the AI's own FF's (i.e repositioning Colossi in a line parallel to the FF's).

All of those things would need to be taken into consideration. Otherwise the AI would be easily exploitable. Making an AI to FF trivial situations is pretty easy. Making one that places optimal FF, can take advantage of them correctly, prevent the enemy from taking advantage of them, and works on all maps and engagement situations would be extremely difficult.

chAse_
Profile Joined April 2011
Germany84 Posts
June 15 2011 02:06 GMT
#93
On June 15 2011 08:16 Sevenofnines wrote:
Rudimentary forcefielding would not be particularly hard to program. Obvious things like ramps or splitting an army in half or blocking melee units is easy.

Things begin to get more difficult outside of those trivial situations. For instance:

-Suppose you only have enough energy for say 5 forcefields while your army engages in a wide open area. Would the AI know where to optimally place those forcefields? This problem involves things like existing Terrain, the position/range/speed/damage/composition/etc. of not only the Protoss units but the enemy units as well. I'm sure you could program the AI to figure this out given time, but it becomes much more difficult.

-Suppose its a PvP and the enemy has a slightly larger Colossus count. Would the AI know that FF might end up being detrimental because it would help the enemy colossi? Would it be able to account for massive units possibly breaking FF. How would each of those things affect the rest of the army? Also, would the AI be able to calculate that if it placed FF in a certain way, how the enemy army might reposition and possibly take advantage of the AI's own FF's (i.e repositioning Colossi in a line parallel to the FF's).

All of those things would need to be taken into consideration. Otherwise the AI would be easily exploitable. Making an AI to FF trivial situations is pretty easy. Making one that places optimal FF, can take advantage of them correctly, prevent the enemy from taking advantage of them, and works on all maps and engagement situations would be extremely difficult.



exactly what you said, sir.

a 'stupid' FF-AI is pretty easy to code, an intelligent one is not.
Siretu
Profile Blog Joined April 2010
151 Posts
June 15 2011 06:27 GMT
#94
On June 15 2011 08:16 Sevenofnines wrote:
Rudimentary forcefielding would not be particularly hard to program. Obvious things like ramps or splitting an army in half or blocking melee units is easy.

Things begin to get more difficult outside of those trivial situations. For instance:

-Suppose you only have enough energy for say 5 forcefields while your army engages in a wide open area. Would the AI know where to optimally place those forcefields? This problem involves things like existing Terrain, the position/range/speed/damage/composition/etc. of not only the Protoss units but the enemy units as well. I'm sure you could program the AI to figure this out given time, but it becomes much more difficult.

-Suppose its a PvP and the enemy has a slightly larger Colossus count. Would the AI know that FF might end up being detrimental because it would help the enemy colossi? Would it be able to account for massive units possibly breaking FF. How would each of those things affect the rest of the army? Also, would the AI be able to calculate that if it placed FF in a certain way, how the enemy army might reposition and possibly take advantage of the AI's own FF's (i.e repositioning Colossi in a line parallel to the FF's).

All of those things would need to be taken into consideration. Otherwise the AI would be easily exploitable. Making an AI to FF trivial situations is pretty easy. Making one that places optimal FF, can take advantage of them correctly, prevent the enemy from taking advantage of them, and works on all maps and engagement situations would be extremely difficult.


I agree With your first paragraph. Stupid FF ai is easy to make. I just think making smart FF ai is easier to make than you say.

First of all I see it like this: There are three levels. Stupid ai, player-like ai(FFs are not always optimally placed and sometimes it can be abused, just as a normal player), smart ai.

Creating a smart ai that always places optimal FF in all situations is extremely hard. Creating a player-like ai with a high sucess-rate is not.

Now for your difficult situations. My ai analyzes the two armies(not extensively, just a little), it will check terrain soon. Not perfectly ofc but I will improve it over time.

Checking coloossi count is very easy, so is checking for massive units.

Your last argument about repositioning and taking advantage seems very vague. It seems like something players dont think about and that they might be abused in the same Way.

I hope my entire post is readable. writing it on a small smartphone is hard work.
Siretu
Profile Blog Joined April 2010
151 Posts
Last Edited: 2011-06-18 21:17:45
June 18 2011 17:27 GMT
#95
I haven't had time working on this lately due to work and other projects but I thought I should upload what I made so far. There is no difference between the attacks(except the units). The AI automatically detects which kind of force fields it should use(split or surround)



I know the surround part is kind of boring. Interesting fact, 24 sentries should be able to beat an infinite amount of lings using this since 6 sentries is enough to force field a ramp indefinitely. This means 24 sentries can keep 4 force fields up indefinitely which is what is needed to help them survive.
TedJustice
Profile Blog Joined June 2010
Canada1324 Posts
Last Edited: 2011-06-18 18:31:13
June 18 2011 18:23 GMT
#96
Yeah, it shouldn't be too hard to just program an AI to throw forcefields at random in big battles.

But from what I've read, that's already been done. I guess it's the actual good forcefields that get complicated.

EDIT: That surround video was pretty cool though.
Severedevil
Profile Blog Joined April 2009
United States4835 Posts
June 18 2011 18:59 GMT
#97
Positional and terrain-dependent play is very complicated. I'm pretty sure we've never had an RTS AI that could rival a good human at those.
My strategy is to fork people.
ptanhkhoa
Profile Joined June 2010
Vietnam87 Posts
June 20 2011 09:20 GMT
#98
Try Green Tea AI ^^
dimfish
Profile Blog Joined February 2010
United States663 Posts
June 21 2011 15:10 GMT
#99
On June 19 2011 02:27 Siretu wrote:
I haven't had time working on this lately due to work and other projects but I thought I should upload what I made so far. There is no difference between the attacks(except the units). The AI automatically detects which kind of force fields it should use(split or surround)

http://www.youtube.com/watch?v=SBLNe0Gs19g&feature=player_embedded

I know the surround part is kind of boring. Interesting fact, 24 sentries should be able to beat an infinite amount of lings using this since 6 sentries is enough to force field a ramp indefinitely. This means 24 sentries can keep 4 force fields up indefinitely which is what is needed to help them survive.


Cool, cool! Now you gotta get those isolated cases into a multiplayer AI and see how well you can get it to decide when to FF
Siretu
Profile Blog Joined April 2010
151 Posts
June 21 2011 15:57 GMT
#100
I will but I have two things left to fix first. 1. terrain check. 2. make sure they dont Force field if all the sentries together cant make all the Force fields needed. right now 1 sentry will try to shield itself with Force fields even if it only has enough energy for one.

after that is added, i will add it to the standard ai and see what happens.
MindBreaker
Profile Blog Joined March 2011
United States574 Posts
June 21 2011 18:22 GMT
#101
On May 29 2011 22:47 BackHo wrote:
In the Kerrigan cut-scene you'd think that one would just shoot themselves rather than drop their guns to let the approaching Zerglings tear you apart.

Off topic much???
Is it weird that I play most of my online games at work? And that it's a pizza place??
Normal
Please log in or register to reply.
Live Events Refresh
Replay Cast
00:00
2025 GSL S2 - Ro8 Group B
Liquipedia
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
ROOTCatZ 312
Nina 226
StarCraft: Brood War
Britney 20334
Sea 1761
PianO 265
HiyA 251
Shine 93
ajuk12(nOOB) 21
yabsab 18
Icarus 7
Dota 2
monkeys_forever1283
NeuroSwarm65
Counter-Strike
Stewie2K1292
Other Games
summit1g6777
C9.Mang01124
shahzam895
WinterStarcraft474
Mew2King128
Maynarde123
Trikslyr55
kaitlyn22
Organizations
Other Games
gamesdonequick1504
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 16 non-featured ]
StarCraft 2
• Berry_CruncH296
• practicex 27
• AfreecaTV YouTube
• intothetv
• Kozan
• IndyKCrew
• LaughNgamezSOOP
• Migwel
• sooper7s
StarCraft: Brood War
• Azhi_Dahaki11
• BSLYoutube
• STPLYoutube
• ZZZeroYoutube
League of Legends
• Stunt442
Other Games
• Scarra1060
• Shiphtur213
Upcoming Events
RSL Revival
5h 45m
Cure vs Percival
ByuN vs Spirit
WardiTV Qualifier
11h 45m
PiGosaur Monday
19h 45m
RSL Revival
1d 5h
herO vs sOs
Zoun vs Clem
Replay Cast
1d 19h
The PondCast
2 days
RSL Revival
2 days
Harstem vs SHIN
Solar vs Cham
Replay Cast
2 days
RSL Revival
3 days
Reynor vs Scarlett
ShoWTimE vs Classic
uThermal 2v2 Circuit
3 days
[ Show More ]
SC Evo League
4 days
Circuito Brasileiro de…
4 days
Sparkling Tuna Cup
5 days
Liquipedia Results

Completed

Acropolis #3 - GSC
2025 GSL S2
Heroes 10 EU

Ongoing

JPL Season 2
BSL 2v2 Season 3
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
NPSL S3
Rose Open S1
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025
YaLLa Compass Qatar 2025
PGL Bucharest 2025

Upcoming

CSLPRO Last Chance 2025
CSLPRO Chat StarLAN 3
K-Championship
SEL Season 2 Championship
Esports World Cup 2025
HSC XXVII
Championship of Russia 2025
BLAST Open Fall 2025
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.