Have there been any attempts (even badly performing ones) that used some sort of ALife or emerging behavior technique? I'd rather just do some experiments in that and see what happens. I'm not interested in winning the ai tourney or anything like that :p (for the time being at least)
Intro to SC:BW AI development - Page 3
Blogs > mooose |
Xeofreestyler
Belgium6753 Posts
Have there been any attempts (even badly performing ones) that used some sort of ALife or emerging behavior technique? I'd rather just do some experiments in that and see what happens. I'm not interested in winning the ai tourney or anything like that :p (for the time being at least) | ||
Cazimirbzh
334 Posts
On May 27 2015 21:43 Xeofreestyler wrote: I'm not really interested in hard-coding behavior though. Right now this seems to be a bit of a rock-paper-scissors type of deal. Have there been any attempts (even badly performing ones) that used some sort of ALife or emerging behavior technique? I'd rather just do some experiments in that and see what happens. I'm not interested in winning the ai tourney or anything like that :p (for the time being at least) You'll need a lot of processing to run it and *2 (to write and to test). I dont think the broodwar community is enough^^. I share processing power (BOINC) and we barely reach 10 petaFLOPS. | ||
Xeofreestyler
Belgium6753 Posts
And whoa, I've heard about BOINC before! That's some great work you're doing dude. I had an idea once a long time ago about how it would be interesting to create some sort of worm/virus that silently uses processing cycles for problems like protein folding and stuff. This is of course a better and on top of that legal way of doing that :D Honestly I don't even know how to visualize what 10 petaFLOPS can do, any analogy you can use to explain? | ||
mooose
Japan200 Posts
So for example you can't really use a search algorithm to determine all the moves in a StarCraft game because it's too complicated, but you can take one area of the game and apply one there. For example SparCraft. My bot lost to UAlbertaBot last year most of the time even though they were usually executing the same build order at each other. This was probably mostly due to UAlbertaBot using SparCraft and therefore having superior micro. So it's not really just about coming up with some stupid rock paper scissors build order and hoping it works. There's lots of different areas you can develop. Also I updated the OP to include a reference to UAlbertaBot's github page since I've referred to it a bunch of times in this thread. It was also very useful for building my own system (I copied/stole a bunch of stuff). | ||
Xeofreestyler
Belgium6753 Posts
| ||
Cazimirbzh
334 Posts
On May 28 2015 10:55 Xeofreestyler wrote: Damnit... ahead of my time again I see. My plans foiled by our primitive hardware! ... uh yeah ... that's the only reason why my plan wouldn't work. And whoa, I've heard about BOINC before! That's some great work you're doing dude. I had an idea once a long time ago about how it would be interesting to create some sort of worm/virus that silently uses processing cycles for problems like protein folding and stuff. This is of course a better and on top of that legal way of doing that :D Honestly I don't even know how to visualize what 10 petaFLOPS can do, any analogy you can use to explain? To understand what kind of hardware you need : "Intel Celeron G1830 and AMD Radeon R9 295x2 tops out at over 11.5 TFLOPS at a grand total of US$902.57" http://www.tomshardware.com/reviews/radeon-r9-295x2-review-benchmark-performance,3799.html http://www.freezepage.com/1420850340WGSMHXRBLE So if you had 1k of this pc lineup and they're all running for 1 second u have 11.5 PFLOPS^^ But it's actually even more harder to generate computing power. To compare, we have approximatly 500k pc link to boinc. ^^ It's really hard to explain how much is 10 PFLOPS I tried to find a small project run by WCG (^^ World community Grid) to give a example. "Computing for Sustainable Water study the effects of human activity on a large watershed, Chesapeake Bay, and gain deeper insights into what actions can support the restoration, health and sustainability of this important water resource Stats: http://www.worldcommunitygrid.org/stat/viewProject.do?projectShortName=cfsw It required 4 PFLOPS in order to finished the job. At the opposite, the folding@home(the big one^^BOINC/google/sonic) project "Its current performance of 40.2 x86 petaFLOPS and 14.4 native petaFLOPS" And if you want to be amaze i suggest checking the total flops generated by boinc projects it's insane^^ I think BOINC is a good way to keep my pc usefull when he's idle because i am still paying the bill. Even when it does nothing^^. After 15 minutes of inactivity, and if there is no software running , my sceensaver switchs between SETI/Milkyway/Einstein/rosetta. I think it should be install BY LAW on all pc :p It's impossible to hack this kind of grid. The segmentation of the data is really impressive. Every 30m/1hour, you switch from a task to another. Also the distribution method prevent to build an emerging pattern. It's safer than bitcoin. The real security issue come from the details of your hardware and also personnal data you share. Please, mooose, more stories. I am unable to grasp how many variables you need in order to have a AI that could play vs parting :p | ||
IskatuMesk
Canada969 Posts
That was the time for me to finally step out of modding for good, because I'm no programmer despite my experience in modding. I wish I had taken a hint back then instead of wasting my time with other games for so long. | ||
nepeta
1872 Posts
On May 28 2015 17:31 mooose wrote: You don't necessarily need to use hard coded behaviour in all areas of the bot though. The great thing about scbw is that it's such a complicated game with loads of areas you can develop. You might not be able to come up with a learning algorithm for playing the whole game, but you can break the problem into areas and develop one of them. For example build order planning or micro or scouting. So for example you can't really use a search algorithm to determine all the moves in a StarCraft game because it's too complicated, but you can take one area of the game and apply one there. For example SparCraft. My bot lost to UAlbertaBot last year most of the time even though they were usually executing the same build order at each other. This was probably mostly due to UAlbertaBot using SparCraft and therefore having superior micro. So it's not really just about coming up with some stupid rock paper scissors build order and hoping it works. There's lots of different areas you can develop. Also I updated the OP to include a reference to UAlbertaBot's github page since I've referred to it a bunch of times in this thread. It was also very useful for building my own system (I copied/stole a bunch of stuff). BWAI should really be made modular, because of this. There are so many fields in which improvements can and have been made, but often new coders are reinventing the wheel. There are some open bots, but ideally there should be a modular structure which can absorb different versions of different fields like scouting, mining, attack-micro, but also more complex code for balancing eco vs army. Then if a module gets written, or improved, it can be incorporated in existing AIs. | ||
mooose
Japan200 Posts
| ||
DinosaurPoop
687 Posts
How do you fix the problem of AI's being eternally horrible at judgement? A lot of the time they have horrible misjudgement problems and often don't know when to stop or to continue committing to something, an AI protoss can fight into tanks and then retreat 2 seconds later, when continuing attacking would have been the less worse option.. A common form of this is having a protoss AI eternally chase 1 zergling with all zealots the protoss has. It could also completely go for the wrong amount of unit, let's say too many dragoons or too many carriers, because the AI often can't weigh the information it gets. | ||
Xeofreestyler
Belgium6753 Posts
Say you're using SparCraft. If I understand correctly, it uses a simplified model of how fights happen in bw so that an AI can 'predict' what the outcome of a battle will be. Since it ignores pathfinding and stuff (splash?), it's gonna be wrong a certain percent of the time (especially towards bigger and complex battles). Say your prediction gives a win, but suddenly the AI re-evaluates the situation as it is and it turns out you're losing the battle. SparCraft calculates how your squad is weaker than the other's, so the 'squad-manager' module orders your units to retreat (but they die to tank fire). Now, retreating isn't necessarily always bad. Sometimes you can save a few units if the opposing squad doesn't have long range, meaning they can't kill you while you're running away. In your example, this is almost never going to happen since tanks have an enormous range and will still get a lot of kills while units run away. But in the case of zealots or something it wouldn't be bad to run away with your leftover lings if they have no way of winning. So this leads me to think that the decision to either 'retreat' or 'suicide but do max damage' has to be a function of the opponent's range. I wouldn't know how to do the math for this though. Perhaps a solution could be to assign aggressiveness levels to squads. 0 being retreat to safety immediately and n (max) being fight until the death. Somewhere in between there could be varying levels of harassment & retreating (positioning). Dunno if this actually makes it easier though, since you still have to figure out how to assign these levels to squads/units | ||
Cazimirbzh
334 Posts
On June 02 2015 18:10 Xeofreestyler wrote: Good question. I'm just gonna think out loud about it here, like an exercise, feel free to correct me. Say you're using SparCraft. If I understand correctly, it uses a simplified model of how fights happen in bw so that an AI can 'predict' what the outcome of a battle will be. Since it ignores pathfinding and stuff (splash?), it's gonna be wrong a certain percent of the time (especially towards bigger and complex battles). Say your prediction gives a win, but suddenly the AI re-evaluates the situation as it is and it turns out you're losing the battle. SparCraft calculates how your squad is weaker than the other's, so the 'squad-manager' module orders your units to retreat (but they die to tank fire). Now, retreating isn't necessarily always bad. Sometimes you can save a few units if the opposing squad doesn't have long range, meaning they can't kill you while you're running away. In your example, this is almost never going to happen since tanks have an enormous range and will still get a lot of kills while units run away. But in the case of zealots or something it wouldn't be bad to run away with your leftover lings if they have no way of winning. So this leads me to think that the decision to either 'retreat' or 'suicide but do max damage' has to be a function of the opponent's range. I wouldn't know how to do the math for this though. Perhaps a solution could be to assign aggressiveness levels to squads. 0 being retreat to safety immediately and n (max) being fight until the death. Somewhere in between there could be varying levels of harassment & retreating (positioning). Dunno if this actually makes it easier though, since you still have to figure out how to assign these levels to squads/units Basicly, you're right. If your IA is stuck you need to add more datas, functions to your script. Like DinosaurPoop said, "AI often can't weigh the information it gets." So you pump more usefull intel in order to conteract the loop. | ||
Xeofreestyler
Belgium6753 Posts
So the problem is rather that either the database can be incomplete, or incorrect. On the one hand there's stuff like collision detection and splash which is probably not accounted for. But on the other hand there are unknown variables such as the opponent's micro skill. This isn't easy to solve indeed. Hmm ... wouldn't a neural net be good at this type of statistical calculations? | ||
Cazimirbzh
334 Posts
On June 03 2015 20:44 Xeofreestyler wrote: Ah it seems like I misunderstood SparCraft. It doesn't calculate the battles real-time, it does it in advance and then looks the results up in a database, correct? Sort of like endgame tables for chess? So the problem is rather that either the database can be incomplete, or incorrect. On the one hand there's stuff like collision detection and splash which is probably not accounted for. But on the other hand there are unknown variables such as the opponent's micro skill. This isn't easy to solve indeed. Hmm ... wouldn't a neural net be good at this type of statistical calculations? I have no idea about sparcraft but standalone and implemented into a BWAPIbased seems to be able to do both. We need our expert^^ ANN can help only when the unknown variables are known and coded^^ You have to consider it like the last level for bots. For this step, it required first to have the basics covered ( no army running after 1gling, no weird retreat, etc). ANN is required when you want to determine what's are the "hidden" reasons of a choice. It's like building a labyrinth and explore it after to draw the map in order to know where are the dead ends. :p ANN will allow you do input "simple" stuffs for very good results but the data will you have to feed and the nonnegative matrix you must compile in order to prevent crazy things is more than hardcore. I think, (where's our expert^^), at the moment, we're at the first step. We're gathering basics data. Next one will be to run simulations on a large scale (boinc) to have the data required for last step, ANN. At this point, it'll be not game per game but for Bo(x). It'll be very interesting to see what hint could/should be noticed during a previous game to select A or B build after a win or a lose. edit : sc2replaystats is working on tools in order to help player but they're making good steps to gather data. | ||
Xeofreestyler
Belgium6753 Posts
By measuring this during the game you could let the ai adapt and be less aggressive etc. | ||
Cazimirbzh
334 Posts
| ||
Xeofreestyler
Belgium6753 Posts
Cuz they can't micro badly all game right? I mean, then they'd just lose hahah | ||
Cazimirbzh
334 Posts
On June 05 2015 21:43 Xeofreestyler wrote: Hmm ... this sounds like a statistics problem though, I mean, isn't there a way to constantly update this calculation and leave out the worst performance out of the averaged equation? (in case of the harass script being 'fooled') Cuz they can't micro badly all game right? I mean, then they'd just lose hahah Yes but we're reaching our current limit This apm calculation issue is a good example of what kind of systematic errors by lack of data a statistical approch will lead to. Because even with a harass script, a lot of scouting, the constant nature of apm data makes it impossible to predict. So, for a next engagement, in terms of effectiveness, unless it's vs AI with an "absolute effectiveness" script, i dont see how you can predict accurately an apm variable as a rule of engagement. | ||
Xeofreestyler
Belgium6753 Posts
float p = random if < .5 retreat else attack There, problem solved. No but really, I read that one bot has like a random 'mood' right? agressive/campy/cheesy/... I think this is a nice idea, keeps your bot from being too predictable. | ||
turtles
Australia360 Posts
Unfortunately no such API exists (or will likely ever exist) for SC2 so having a competitive scene would be near impossible. But looking at what is going on in the broodwar world makes me wish I had started there instead. Fighting other AIs would make for a great way to benchmark and rate your progress. GL, I hope your AI does well | ||
| ||