I haven't yet found a good harassment AI for melee or melee like games and am considering writting one myself.
BASIC GOALS:
find units suitable for harassment and form a group to attack in.
detect targets for harassment (expansions with workers or isolated buildings)
calculate attack paths for approaching the target from different angles.
INTERMEDIATE GOALS:
running away when outnumbered.
targetting workers over attacking units
simple ability usage like stim and cloak.
Time attacks so as to strike simultaniously.
HARDER GOALS:
get harassment units to avoid or sneak past enemy units
use knowledge of terrain (such as cliffs) to determine attack paths
realistically simulate a human players harassment
I think all the basic and intermediate goals are achieveable using trigger systems and can be made in a fashion which is applicable to all melee maps and harassment units. The end result would be a library which could be imported into other maps or adapted for other games. If this tool sounds useful to you, or better yet, if you would be interested in helping to develop such a tool I would greatly appreciate any help you could offer. You would of course get joint credit, I'm looking to form or join a team to tackle this task, not to find people to work for me.
OK, I started working on this project and before I knew it it grew into an all round tactical AI project.
Note that it is not a fully fledged AI. It does not macro or produce units, it just takes units you give it, follows commands like "attack", "harass" and "defend" and tries to follow through with them.
The army is broken up into several divisions. There is
army - moves in a ball and attacks main enemy base/army
home land security - defend against any threats to our bases
special forces - harrassment. guerilla attacks of mobile and specialized forces
scouts - individual units sent to explore parts of the map we have no vission of and other points of interest
reenforcements - newly created units sent to bolster the numbers of other divisions
So far I have written the back bone which could be used by all divissions and I have written the AI for special forces (harassment). So that's probably about 25% done. I would still like help and am looking for a team. If you are interested send me a pm. A divission like reenforcements or scouts should be relatively easy to write an AI for and help you get your head around it.
I created a map called "ASALT heavy rain" in the custom map section (not arcade) for testing but after a few games on it I realized it's challenging and a hell of a lot of fun on its own. So have a go and tell me what you think.
To use it just go on the map "ASALT heavy rain". The computer will not attack until you tell it to. You get a bunch of minerals and buildings to skip the early game so just set yourself up for the early/mid game with about 2-4 bases. Don't just surround yourself with bunkers/cannons/spines. Just get yourself into a standard position of play.
When you are ready type "ai x" into chat, where x is the number of squadrens you let the ai have. so if you type "ai 4" then the AI will harass you with 4 squads of units (each squad containing about 4-8 individual units). As you kill off squads they will be replaced. You can type "ai x" into chat later with a different number if you wish to make it harder/easier.
The AI will be given random units from all three races and will attempt to harass you with them.
It follows relatively simple rules but manages to converge into a very good harrassing force. One that knows about and can utilize abilities such as stim, blink, cloaking, medivac drops, etc.
For the moment I'm just looking at a tactical AI. One where I can plug a build order into and get it to follow a build order that I give it. But I intend to write the project in a way that it could be extended into a complete AI which scouts, macros, decides where/when to attack, etc. Either by me or someone else who wants to take up the project later.
I'd love to hear any feedback on what you think. If you'd like to chip in and help send me a pm. the map is published as open and the code can be viewed/edited/shared so feel free to take a look around. I just ask that you keep it that way and keep it open source and give credit for authorship where due.
Thanks.
EDIT: If people have fun playing against the harrassment AI I could make it into an extension mod if there is enough interest.
Hey Turtles
This AI concept sounds really good, as the default SC2 AI is... sadly... extremely lacking. Oddly enough, I've only ever seen the AI harass with Terran Banshees as you've stated. I have never, ever, not once, seen the AI build Reapers in a skirmish game. Adding to this is the fact that Zerg or Protoss never harass at all, when in fact they're more suited to it (tech wise) than Terrans are. Its baffling.
Personally, I'd love an AI that simply built up regular amounts of units and sent them to attack you 'whilst' it steadily built up its own base and technology. So, for the course of the game, it would reliably and consistently send waves of Zerglings at you when it could afford them, whilst building stuff for Roaches and Hydras. Then, it'd send 'Lings, Roaches and Hydras. Then work up towards adding Mutalisks and Infestors, then working up to finally adding Ultralisks and Broodlords, for example.
I just really dislike the fact that most SC2 games are where you expand to 2, 3 or 4 bases and sit around for 10 - 20 minutes, then there is one major battle between both sides with maximum tech and upgrades. Whoever wins the fight immediately goes on to steamroll the opposing base. There is no back-and-forth battles over terrain and nothing to stop people just sitting in their base and upgrading until its a blob-versus-blob fight.
I've spent the past few months working on my own Mod Extension for SC2 that makes the game as a whole more like Red Alert 2 or CnC Generals, with fights lasting longer than 2 seconds, different upgrades, changed abilities and new units - but unfortunately the AI is outside of my ability.
All of my SC2 gametime is spent in custom matches versus the AI on skirmish maps. I've no interest in playing versus players. So an improved AI is of great interest to me. I'd love to help out, combine it with my Mod Extension or even make my own AI, but I have zero idea whatsoever as to how AI programming works. I had a look at the AI tab in the Editor for example and I dont even know where to start.
One possible suggestion I have for allowing Stealth units to 'sneak' past enemy forces is giving them a 'dummy' weapon. For example, in my Mod, I've got Overseers, Recon Drones and Observers, all unarmed purely scouting units. In order to prevent them moving into enemy forces like idiots when I A-move them with my army, I've given them a 0-damage weapon with the same range as their sight radius. In doing so, they will immediately stop and 'attack' the first enemy they see, preventing them from flying into AA turrets or sitting still in the middle of a fight in the line of fire.
Perhaps some iteration of this could be used for the AI when it attempts to sneak Ghosts or Dark Templar past player forces? The AI does not seem to understand the 'Hold Fire' ability command, so this seems like a possible solution.
I haven't yet found a good harassment AI for melee or melee like games and am considering writting one myself.
BASIC GOALS:
INTERMEDIATE GOALS:
HARDER GOALS:
I think all the basic and intermediate goals are achieveable using trigger systems and can be made in a fashion which is applicable to all melee maps and harassment units. The end result would be a library which could be imported into other maps or adapted for other games. If this tool sounds useful to you, or better yet, if you would be interested in helping to develop such a tool I would greatly appreciate any help you could offer. You would of course get joint credit, I'm looking to form or join a team to tackle this task, not to find people to work for me.
Thanks, Turtles.
OK, I started working on this project and before I knew it it grew into an all round tactical AI project.
Note that it is not a fully fledged AI. It does not macro or produce units, it just takes units you give it, follows commands like "attack", "harass" and "defend" and tries to follow through with them.
The army is broken up into several divisions. There is
army - moves in a ball and attacks main enemy base/army home land security - defend against any threats to our bases special forces - harrassment. guerilla attacks of mobile and specialized forces scouts - individual units sent to explore parts of the map we have no vission of and other points of interest reenforcements - newly created units sent to bolster the numbers of other divisions
So far I have written the back bone which could be used by all divissions and I have written the AI for special forces (harassment). So that's probably about 25% done. I would still like help and am looking for a team. If you are interested send me a pm. A divission like reenforcements or scouts should be relatively easy to write an AI for and help you get your head around it.
I created a map called "ASALT heavy rain" in the custom map section (not arcade) for testing but after a few games on it I realized it's challenging and a hell of a lot of fun on its own. So have a go and tell me what you think.
To use it just go on the map "ASALT heavy rain". The computer will not attack until you tell it to. You get a bunch of minerals and buildings to skip the early game so just set yourself up for the early/mid game with about 2-4 bases. Don't just surround yourself with bunkers/cannons/spines. Just get yourself into a standard position of play.
When you are ready type "ai x" into chat, where x is the number of squadrens you let the ai have. so if you type "ai 4" then the AI will harass you with 4 squads of units (each squad containing about 4-8 individual units). As you kill off squads they will be replaced. You can type "ai x" into chat later with a different number if you wish to make it harder/easier.
The AI will be given random units from all three races and will attempt to harass you with them.
It follows relatively simple rules but manages to converge into a very good harrassing force. One that knows about and can utilize abilities such as stim, blink, cloaking, medivac drops, etc.
For the moment I'm just looking at a tactical AI. One where I can plug a build order into and get it to follow a build order that I give it. But I intend to write the project in a way that it could be extended into a complete AI which scouts, macros, decides where/when to attack, etc. Either by me or someone else who wants to take up the project later.
I'd love to hear any feedback on what you think. If you'd like to chip in and help send me a pm. the map is published as open and the code can be viewed/edited/shared so feel free to take a look around. I just ask that you keep it that way and keep it open source and give credit for authorship where due.
Thanks.
EDIT: If people have fun playing against the harrassment AI I could make it into an extension mod if there is enough interest.
Hey Turtles This AI concept sounds really good, as the default SC2 AI is... sadly... extremely lacking. Oddly enough, I've only ever seen the AI harass with Terran Banshees as you've stated. I have never, ever, not once, seen the AI build Reapers in a skirmish game. Adding to this is the fact that Zerg or Protoss never harass at all, when in fact they're more suited to it (tech wise) than Terrans are. Its baffling.
Personally, I'd love an AI that simply built up regular amounts of units and sent them to attack you 'whilst' it steadily built up its own base and technology. So, for the course of the game, it would reliably and consistently send waves of Zerglings at you when it could afford them, whilst building stuff for Roaches and Hydras. Then, it'd send 'Lings, Roaches and Hydras. Then work up towards adding Mutalisks and Infestors, then working up to finally adding Ultralisks and Broodlords, for example.
I just really dislike the fact that most SC2 games are where you expand to 2, 3 or 4 bases and sit around for 10 - 20 minutes, then there is one major battle between both sides with maximum tech and upgrades. Whoever wins the fight immediately goes on to steamroll the opposing base. There is no back-and-forth battles over terrain and nothing to stop people just sitting in their base and upgrading until its a blob-versus-blob fight.
I've spent the past few months working on my own Mod Extension for SC2 that makes the game as a whole more like Red Alert 2 or CnC Generals, with fights lasting longer than 2 seconds, different upgrades, changed abilities and new units - but unfortunately the AI is outside of my ability.
All of my SC2 gametime is spent in custom matches versus the AI on skirmish maps. I've no interest in playing versus players. So an improved AI is of great interest to me. I'd love to help out, combine it with my Mod Extension or even make my own AI, but I have zero idea whatsoever as to how AI programming works. I had a look at the AI tab in the Editor for example and I dont even know where to start.
One possible suggestion I have for allowing Stealth units to 'sneak' past enemy forces is giving them a 'dummy' weapon. For example, in my Mod, I've got Overseers, Recon Drones and Observers, all unarmed purely scouting units. In order to prevent them moving into enemy forces like idiots when I A-move them with my army, I've given them a 0-damage weapon with the same range as their sight radius. In doing so, they will immediately stop and 'attack' the first enemy they see, preventing them from flying into AA turrets or sitting still in the middle of a fight in the line of fire.
Perhaps some iteration of this could be used for the AI when it attempts to sneak Ghosts or Dark Templar past player forces? The AI does not seem to understand the 'Hold Fire' ability command, so this seems like a possible solution.
Very interested in tactical AI development here as well.
Whatever you do, wholeheartedly, moment by heartfelt moment, becomes a tool for the expression of your very soul.