|
On November 15 2009 08:49 AssuredVacancy wrote: Lol usually it gets the scv to like 30 hp before getting stuck on a wall/trapped by other scvs. But I was playing on destination and the 'platform' is fairly small, I think it'll be quite fun to program the microing competition. Do you mind posting the code?
|
On November 13 2009 23:39 azndsh wrote:If you really wanted to make a strong AI for a game, it would make a lot more sense to pick a different genre such as turn-based strategy (Civ), fighting games (SF4), or even first-person shooters (HL). It depends on your definition of "strong". In most first-person shooters, the real question is how much the AI is allowed to cheat - if you don't impose human-like limits on its reaction speed, it's going to win every time, simply because if you pop up behind it to shoot at it, it's going to notice and fire at you in the time it takes you to pull the trigger. This depends on the game, of course - some may have hardcoded limits on, say, turn speed, that would prevent this - but generally speaking, the strategy in first-person shooters is based on what human players are capable of, and a well-written AI would blow all this to hell.
It's the same for Starcraft. Assuming you can solve the basic challenge of actually working with brood war without killing yourself, it becomes pretty easy to just solve Stage 1 for every reasonable combination of units, and suddenly the AI will be almost impossible to defeat, if it's using the right strategy, no matter how good you are. It's often repeated by everyone from D- zergs to Day[9] that you can get to B+ or A- just by playing ZvZ with really solid muta micro. The AI, if enough effort is put into it, literally CANNOT fail its micro. At that point, the only challenge it has playing against human players is adapting to (or having its programmer adapt it to) weird things it hasn't taken into consideration. An example of this would be stasis of probes ordered to mine on a Terran AI's ramp to block it. Plenty of (most?) human players have seen dragoons or zealots stasised on a ramp to block it, and probably quite a few of them know you can SCV drill the goons/zeals out of the way. But how many know that you can stasis probes that have been ordered to mine, which will then form a completely impassable wall until stasis runs out? I somehow doubt any of the UC Santa Cruz students working on this do.
My point with all of this is that an AI vs AI Starcraft match, just like an AI vs AI HL match, wouldn't be all that likely to be remotely similar to a human vs human Starcraft match. An uneducated observer might think that "late-game ZvZ" (lol) was about guardians or dark swarm or ultralisks supporting lurker/ling armies, because they aren't aware just how effectively well-microed mutalisks break things. I'm predicting that if the AI is written comprehensively enough, a match between two AI will be as confusing to us as professional ZvZ is to the aforementioned uneducated observer. Hell, for all we know, DRAGOONS become incredible instead of buggy when controlled with 20k+ APM.
Civilization is a good example of a game where writing an AI would be an interesting challenge, simply because it's a turn-based game and you don't have the crutch of "my mechanics are infinitely superior to yours". At that point, the AI's main advantage becomes prediction, like it is in chess, and things get very hairy. The problem is, Civ4 (especially once you've tossed a couple expansions in there) is WAY more complicated than Chess, Brood War, or pretty much any other game out there. I wouldn't even want to try to teach an AI to chop-rush wonders perfectly, let alone perform any espionage-based strategy or actually wage war. The difficulty of playing against the AI in Civ is the fact that it cheats. I'm not even kidding, the difference between you and an Immortal-level AI is about three times the starting resources and about twice the research (and building? it's been a while since I've Civved) speed. Think about playing against a starcraft AI that starts with two nexuses, eight probes, and three or four zealots. The game becomes a contest of using your far superior understanding of the game to fend off the AI's overwhelming advantages long enough to execute what basically amounts to a timing attack. I'd love to see an AI that changes that, but I don't think it's going to happen any time soon.
For a more realistic goal, try teaching an AI to play a single-player game - say, Dwarf Fortress. Learning curve that makes men cry and boys kill themselves, incredibly, fiendishly complicated, but you just have to play well enough to avoid sowing the seeds of your own destruction, not well enough to beat someone else.
|
I am pretty sure that an SC AI is quite limited by the real time requirement. I don't think it is possible to pull of perfect late game micro, macro and strategic decision making with that time constraint and current hardware (the affordable hardware, no supercomputing).
I wonder what hardware is used for the contests. Especially if you can use Cuda or something along those lines.
|
On November 16 2009 00:53 spinesheath wrote: I am pretty sure that an SC AI is quite limited by the real time requirement. I don't think it is possible to pull of perfect late game micro, macro and strategic decision making with that time constraint and current hardware (the affordable hardware, no supercomputing). That depends on how optimized your code is and how you define "perfect". In the absolute worst-case scenario (a Zerg AI at 200/200 supply), you might have 200 units that needed active control (that's assuming a rather ling-heavy army, and 40-60 drones automining) and 120 enemy units to track (assuming your opponent is NOT zerg, also maxed, and we can see everything he has). There's really no reason hardware should be a limit with that - even if this contest was run on my Dell laptop that cost $400 in 2006, you'd have dual 1.73 GHz processors and 4GB of RAM to work with after whatever overhead your OS and Starcraft took off. Assuming the code is efficiently written (you pull unit positions and such from Starcraft's memory where possible instead of writing them into your own, you only do so when there's a change, et cetera), there's no reason either of those numbers should be a limiting factor. Of course, it would be completely possible to write the code inefficiently enough that microing 6 lings against 3 marines would be a resource strain, but if you run into that problem you don't deserve to win this contest anyway. EDIT: realized that I didn't go into detail on the "perfect" portion
The other thing to consider is that you could conceivably do way more calculation than you need to. Whether an individual zealot attacks and what it attacks is not something you need to predict, especially in large battles - there's not really much you can do to micro your lings away from zealot hits anyway, and even if you could it would be counterproductive given the relative attack rates. All you need to know is what it's currently doing. In other words, if you're doing a multi-layered approach (micro, tactical, strategy) the lower level can work entirely without prediction, and if your micro routines for a lot of tasks (hydras against reavers, for example) are hardcoded, you can do that with basically no effort. What's really going to suck up resources is taking the army compositions and terrain and predicting a likely victor, taking the production facility, base, and worker count and predicting who the momentum's in favor of, and most importantly calculating responses based on each of those. Fortunately, you only need to do that every so often - a five or ten frame cycle should be more than enough - and, if written efficiently, that should still leave plenty of spare resources for things like planning pylon hearts on even the worst hardware in even the most intense AI 3v3 on BGH.
|
On November 16 2009 00:23 CaptainPlatypus wrote: It's the same for Starcraft. Assuming you can solve the basic challenge of actually working with brood war without killing yourself, it becomes pretty easy to just solve Stage 1 for every reasonable combination of units, and suddenly the AI will be almost impossible to defeat, if it's using the right strategy, no matter how good you are. It's often repeated by everyone from D- zergs to Day[9] that you can get to B+ or A- just by playing ZvZ with really solid muta micro. The AI, if enough effort is put into it, literally CANNOT fail its micro. At that point, the only challenge it has playing against human players is adapting to (or having its programmer adapt it to) weird things it hasn't taken into consideration. An example of this would be stasis of probes ordered to mine on a Terran AI's ramp to block it. Plenty of (most?) human players have seen dragoons or zealots stasised on a ramp to block it, and probably quite a few of them know you can SCV drill the goons/zeals out of the way. But how many know that you can stasis probes that have been ordered to mine, which will then form a completely impassable wall until stasis runs out? I somehow doubt any of the UC Santa Cruz students working on this do. Theres no way you can look at every possible situation and just pick a "right strategy" for each and every one.
|
5 pool into 1 hatch mutas (with perfect ling and muta control) would rape T or P..... Those 6 initial lings (the only ones it would make) would disrupt mining and tech so much, and yet never die, and flawless muta control would never lose a single muta, and never be a frame late when attacking.....
Plus, the drones could be mining way more efficiently, since you could manually tell each one where and when and how to mine all of the time..... Infinite apm would allow so much for Z.
|
On November 14 2009 07:59 spinesheath wrote:Show nested quote +On November 14 2009 02:41 SirKibbleX wrote: If you've ever lost to one of the game's pre-built AIs when you were first learning SC, then you know that its possible for a comp to beat a human. In fact, a good AI is theoretically much, much better than you. I await the programmer who can 'prove' whether or not a probe/drone can kill well-micro'd terran workers without taking a single hit.
The beauty of this competition is that it will inevitably lead to newer, better modules. If someone can focus all their effort on one small task, like one person focuses purely on perfecting zergling vs. zergling combat for the micro competition, and another person focuses purely on writing a code for optimizing psionic storms, the larger AIs will be able to take those small-scale functions and algorithms and apply them to create a better and better system. I'd say in 2-3 years the AI could be able to beat humans 100%, but AIs may continue to become better and better and better... I doubt it'll be that easy. Chess AIs have been in development for a very long time and finally they are about as strong as humans. Go AIs suck horribly even though the game concept is quite simple. Imo creating a decent SC AI will be much harder than any of those, as SC is much more complex. Unless the AI can win by outmicroing humans very early in the game, which I doubt because defense is stronger than offense in SC.
Go AI's suck because the search space for go is way larger than that of chess. In go you have 361 possible moves at the start of the game, while in chess you have 20.
|
|
|
On November 16 2009 18:03 simulatedvacuum wrote:Show nested quote +On November 14 2009 07:59 spinesheath wrote:On November 14 2009 02:41 SirKibbleX wrote: If you've ever lost to one of the game's pre-built AIs when you were first learning SC, then you know that its possible for a comp to beat a human. In fact, a good AI is theoretically much, much better than you. I await the programmer who can 'prove' whether or not a probe/drone can kill well-micro'd terran workers without taking a single hit.
The beauty of this competition is that it will inevitably lead to newer, better modules. If someone can focus all their effort on one small task, like one person focuses purely on perfecting zergling vs. zergling combat for the micro competition, and another person focuses purely on writing a code for optimizing psionic storms, the larger AIs will be able to take those small-scale functions and algorithms and apply them to create a better and better system. I'd say in 2-3 years the AI could be able to beat humans 100%, but AIs may continue to become better and better and better... I doubt it'll be that easy. Chess AIs have been in development for a very long time and finally they are about as strong as humans. Go AIs suck horribly even though the game concept is quite simple. Imo creating a decent SC AI will be much harder than any of those, as SC is much more complex. Unless the AI can win by outmicroing humans very early in the game, which I doubt because defense is stronger than offense in SC. Go AI's suck because the search space for go is way larger than that of chess. In go you have 361 possible moves at the start of the game, while in chess you have 20.
That certainly is one of the major reasons. Which partly is why I am assuming that it is much harder to create a good AI for SC. In early game you could say that there are less possible moves, but actually there are incredibly many (you can order all your workers to move to every single pixel on the map). Since most of those moves are stupid, early game is still quite simple. But as the game progresses, the number of possibly useful moves increases drastically (while in Go the number of moves decreases), and far beyond 361. Because of that, you can only work with a game-tree model on a very abstract level, like where to defend, where to attack, where to harrass, which units to use and so on. This probably can be scaled to around the complexity of chess (just my guess). Additionally to all those abstract calculations you have to deal with tasks like micro which aren't all that trivial either.
Edit: I am currently working on a simple 5 pool AI, and fooling around with all the classes to get familiar with them. I found something which I consider a problem: If you disable (or rather don't enable) "maphack", you should not know what your opponent is doing unless you scout it. But there is at least one way to keep track of your opponents units without scouting: The onAddUnit method also tells you whenever your opponent creates a new unit, and you also get the unit type. That makes it very easy to figure out what your opponent is doing. And I would also expect that you can get various other information through other methods.
|
On November 16 2009 20:09 spinesheath wrote:But there is at least one way to keep track of your opponents units without scouting: The onAddUnit method also tells you whenever your opponent creates a new unit, and you also get the unit type. i think this was fixed in a recent version
|
Hmm, looks like they uploaded that version shortly after I downloaded the old one. Duh.
|
So now I'm writing SC AI in C#. Is there anything you cannot do with this game? :-D
Now... I just need to figure out what I actually want to do with it.
|
Just write a PvZ AI that camps its choke with zealots and masses scouts. Mmm, scouts.
|
I wonder if most people are going to get detection. Since then one of the best things to do would be to create dark templars --> block with them. Imagine placing one at your opponents ramp and their script never tells them to get observers/position overlords/science vessels. On the topic of terran detection, can the AI scan correctly?
|
On November 16 2009 20:09 spinesheath wrote:Show nested quote +On November 16 2009 18:03 simulatedvacuum wrote:On November 14 2009 07:59 spinesheath wrote:On November 14 2009 02:41 SirKibbleX wrote: If you've ever lost to one of the game's pre-built AIs when you were first learning SC, then you know that its possible for a comp to beat a human. In fact, a good AI is theoretically much, much better than you. I await the programmer who can 'prove' whether or not a probe/drone can kill well-micro'd terran workers without taking a single hit.
The beauty of this competition is that it will inevitably lead to newer, better modules. If someone can focus all their effort on one small task, like one person focuses purely on perfecting zergling vs. zergling combat for the micro competition, and another person focuses purely on writing a code for optimizing psionic storms, the larger AIs will be able to take those small-scale functions and algorithms and apply them to create a better and better system. I'd say in 2-3 years the AI could be able to beat humans 100%, but AIs may continue to become better and better and better... I doubt it'll be that easy. Chess AIs have been in development for a very long time and finally they are about as strong as humans. Go AIs suck horribly even though the game concept is quite simple. Imo creating a decent SC AI will be much harder than any of those, as SC is much more complex. Unless the AI can win by outmicroing humans very early in the game, which I doubt because defense is stronger than offense in SC. Go AI's suck because the search space for go is way larger than that of chess. In go you have 361 possible moves at the start of the game, while in chess you have 20. ...
Starcraft is not comparable to Go in terms of search space though. What you do is not a DIRECT reflection of what your opponent does. For example, when you start the game, the actions of mining and teching can be the SAME almost every game at this level of starcraft. In Go, what you do is directly influenced by your opponents, thus you'd have to generate a new set of moves everytime your opponents take their turn. In starcraft, if you turtle->macro up a big army->a move, it will be effective to some extent regardless of what your opponent does.
|
I mentioned that early game is kinda simple. But in lategame tvz - if it is played out like in human v human - you have to react to everything your opponent does. You usually can't just do what you want because both players can deal immense damage if you ignore their moves.
But yeah, those games obviously are quite different. I still think that the complexity and speed of lategame SC is a lot harder to deal with than Chess, and probably Go as well.
|
On November 17 2009 02:11 spinesheath wrote: I mentioned that early game is kinda simple. But in lategame tvz - if it is played out like in human v human - you have to react to everything your opponent does. You usually can't just do what you want because both players can deal immense damage if you ignore their moves.
But yeah, those games obviously are quite different. I still think that the complexity and speed of lategame SC is a lot harder to deal with than Chess, and probably Go as well.
I think you're trying to make an AI that plays against a human, but really, you're only playing against something else that follows a set of instructions. This simplifies a lot of things as you expect them to only attack move as well at certain times, and not only that, unless they have their whole game planned out, which is pretty much impossible, their 'attacking' procedures will be generic and the same throughout.
|
are these AIs going to be downloadable? im curious
|
On November 17 2009 03:30 AssuredVacancy wrote:Show nested quote +On November 17 2009 02:11 spinesheath wrote: I mentioned that early game is kinda simple. But in lategame tvz - if it is played out like in human v human - you have to react to everything your opponent does. You usually can't just do what you want because both players can deal immense damage if you ignore their moves.
But yeah, those games obviously are quite different. I still think that the complexity and speed of lategame SC is a lot harder to deal with than Chess, and probably Go as well. I think you're trying to make an AI that plays against a human, but really, you're only playing against something else that follows a set of instructions. This simplifies a lot of things as you expect them to only attack move as well at certain times, and not only that, unless they have their whole game planned out, which is pretty much impossible, their 'attacking' procedures will be generic and the same throughout.
An AI doesn't have to be THAT stupid. With BWAPI you can actually micro, and modern AI techniques allow adaption, planning, and other stuff like that. It could even be creative.
|
So do we actually get to see any replays of AI's duking it out? I'm kind of curious to see how it would look, but couldn't figure out how to set it up .
|
|
|
|
|
|