Can you control how AI uses its army?

Started by Neverborn, March 08, 2010, 09:55:20 PM

Previous topic - Next topic

Neverborn

All of the AIs I've seen only control what units the AI makes, so they just attack with wave after wave after wave. All you have to do to come out ahead economically is build some units that counter the opponents... their army dies and most of yours survives. It's so efficient that I can easily beat the 6.1 cheating AI in every matchup (and I'm only a D+ iccup player) by doing nothing other than making a few units, beating the first attack, then counterattacking before they rebuild for wave two.

Let me make an analogy to starcraft 1 ZvT, for those of you familiar with the matchup. Terran can push out with their first 10ish marines and medics, forcing the zerg to put down sunkens to defend. This hurts the zerg economically. Now instead of throwing his marines pointlessly to their death, the terran upgrades them, uses them to defend against mutas, and then pushes out with a much stronger army before lurkers come out.


Now let's talk about ZvP in starcraft two. Currently the protoss AI seems to always do this big 3 gate zealot attack. All I have to do is make a queen and expand while making roaches. I can kill the entire protoss army before it gets to my base with 6-10 roaches with hit-and-run target fire, and then either kill him or keep him in his base until I have an overwhelming advantage. A smarter protoss would make a few zealots early (force me to make the roaches instead of just greedily expanding with drones), but instead of investing in a useless army, gets immortals and crushes me with a combined zealot/immortal army in the midgame. Again if it seems like I saw it coming and will be able to kill him, he keeps his army on the defense and gets high templar or something that counters my counter.


tl;dr version: attacking in waves is stupid and encourages me to turtle (i.e. teaches bad habits). Is there any way to code in more advanced tactics so the AI keeps their army alive until it actually has a chance of winning the battle?


hd

Yes we can. why would you even post a thread like this?

Neverborn

Quote from: hd on March 08, 2010, 10:47:09 PM
Yes we can. why would you even post a thread like this?


Did you even read it? I posted it because it's something that none of the AIs I've seen are taking advantage of. They could be much stronger and play much more intelligently.

hd

Quote from: Neverborn on March 08, 2010, 10:50:24 PM
Quote from: hd on March 08, 2010, 10:47:09 PM
Yes we can. why would you even post a thread like this?


Did you even read it? I posted it because it's something that none of the AIs I've seen are taking advantage of. They could be much stronger and play much more intelligently.

Yes they could... and you're an ass for coming in here and assuming we aren't trying to do that. I've seen several people on these boards researching, posting their finds, doing trial and error, all to get a more realistic AI. Day after day we're writing hundreds to thousands of lines of code trying to create solid attack logic, build logic and response logic. And you come in here, apparently opting not to read the threads in here and make a post essentially saying we're not succeeding.

People were crying over how bad the ai is, people here made one that wasn't complete crap.

If you want one that's more realistic sooner, you can write thousands of lines of code with reference material that only contains a third of the information needed, you can spend hours writing code, doing trial and error, launching sc2 hundreds of times just to test minor little changes incase there's a syntax or spelling error.

Unless you have something to contribute besides blatantly obvious statements, I'd suggest you leave this to the people who are contributing and working very hard to make a solid ai.

Kernel64

I remembered this:

Q: Can the editor...
A: --yes it can.

:)

Astazha

@Neverborn


Sorry you got jumped on, I don't think you meant anything bad.  It was just a naive question, which is totally forgivable.


If you load up the AI that Blizz shipped with the beta you'll see that it does absolutely nothing except harvest with 8 workers and then build about 100 minerals worth of units (2 marines, 1 zealot, 1 hydra) which just stand at their base the whole game.


The present incarnation is a vast, vast improvement over that, and these people have had to do a lot of work to get it there.  Little things like using chronoboost or building towers for defense require code to manage, and it's a lot of work and take a lot of time to debug.  If I had one wish for development it would be that you could set 2 computer players to fight each other and then make it run at 10x normal speed for generating test replays.


Right now what you have are 3 main stages to the game - opening, mid, and late.  In each stage the AI chooses randomly between 3 possible builds mixes and then attacks when if has a specified number of units.  Stage transitions occur at approximately 5-7 minutes and at 16-17 minutes respectively.


Each race has units that it will never build, and the AI does not respond in any way to anything that you do.  That's all there is to the build and attack portion right now.  These programmers are having to start from the ground up and tell the AI how to do really basic things (fortunately the units more or less know how to fight already.)  You could spend an entire day playing with how Protoss uses chronoboost, for example (and I'm sure someone did, and it's still a little bit buggy.)


So yes, we can.  It's just going to take time.


Thanks to everyone who has worked on this so far.  I hope I can learn enough to contribute.