Since the Clock and Cinematic Contests were a great success, we decided to start a new one. This time we want to feature the creation and customization of computer AI within the GalaxyEditor and SC2. AI Scripting is an area that we have not seen much of at all, really. Hopefully this can help the community get their hands dirty in this area. Entries may be submitted here. You may also upload your map to our Map Database. Good luck and happy mapping!
What to do?
You can use the GalaxyEditor or anything available to you to create your own custom Melee AI. For those of you who wish to do this in pure Galaxy without Triggers, you may want to take a look at our old Galaxy API Docs. Otherwise, the Trigger Editor will be your friend in this contest. Any race, any level of skill, the design of the AI is completely up to you. In addition, I went ahead and uploaded all of the official Battle.net Ladder maps to our Map DB. You can either use those or you can create your own. You may also want to take a look at Blizzard's Official Galaxy Scripts as examples.
Resources
Galaxy API Docs (Only current as of Patch 8, but there's a list of all current natives up top and some all non-AI functions are documented)
Use the AI - Advanced function to clear the stock list and build queue for an AI player. Then make a build order of set-stock commands, and finally at the end stick an Enable Restocking function.
The AI will NOT use workers that are harvesting via the 'Order workers to harvest nearby resources' function, which was probably how I overlooked this in the first place. Hopefully this will help some people out so that they don't make the same mistake!
Edit: Upon further inspection, you will also need the three following functions to run for the AI player:
AI Advanced - Start AI for player (player) in Campaign mode with 200 Actions Per Minute
AI - Initialize campaign towns for player (player)
AI - Initialize campaign harvesting for player (player)
Deadlines
You have 7 days to complete this contest, and then during one day a poll will be launched for you to vote and elect the winners!
End of the submissions: Friday, June 7th - Midnight PDT (Los Angeles) [Wednesday, June 8th - 9 AM GMT (Paris)]
End of the submissions: Tuesday, June 1st - Midnight PDT (Los Angeles) [Wednesday, June 2nd - 9 AM GMT (Paris)]
End of the votes: 3 days later
Reward
The main goal of the contest is to give the Melee players something to do while going without the beta for a month, however it's better when there's something to win :). Since the Beta is coming to a close, it doesn't make too much sense to hand out Beta Keys. However, the first place winner will get one to give out, because they can still download the game and take advantage of GalaxyEdit!
Callex got a good point so why not even make AIs tournament (ofcourse with additional rules (no cheating with resources etc.))? Something like SC2mapster invitational? :-)
We don't know yet how we are going to select the winner. We thought about doing an AI tournament but it takes a huge amount of time to make the results. An average game lasts 10 minutes, imagine there are 30 entries.
If you make every AI battle against each other it is 30 * 29 * 10 minutes = 8700 minutes = 145 hours = 6 days.
If you make a tournament with direct elimination: (15 + 7 + 3 + 1) * 10 minutes = 260 minutes = 4.4 hours which is more reasonable but the results will be very random.
Since there are no dependences between the games we could split up the tasks between many people, but then there will be many time spent organizing everything.
So, even if we think that's a great idea to make AI fights, the time required to make the results is really huge compared to our forces. We will keep you posted on that :)
I would love to participate in this, but honestly I have no idea what to do with it. I had been asking questions about it on the forum but only got vague answers, so maybe I'll try to figure something out.
I would love to participate in this, but honestly I have no idea what to do with it. I had been asking questions about it on the forum but only got vague answers, so maybe I'll try to figure something out.
Like I said, it's an unexplored area, :). I'm going to take my hand at it as well.
We don't know yet how we are going to select the winner. We thought about doing an AI tournament but it takes a huge amount of time to make the results. An average game lasts 10 minutes, imagine there are 30 entries.
If you make every AI battle against each other it is 30 * 29 * 10 minutes = 8700 minutes = 145 hours = 6 days.
If you make a tournament with direct elimination: (15 + 7 + 3 + 1) * 10 minutes = 260 minutes = 4.4 hours which is more reasonable but the results will be very random.
Since there are no dependences between the games we could split up the tasks between many people, but then there will be many time spent organizing everything.
So, even if we think that's a great idea to make AI fights, the time required to make the results is really huge compared to our forces. We will keep you posted on that :)
For 30 entries;
Entry 1 fights entry 2
Entry 3 fights entry 4
Etc
Loser is eliminated. This would take 150min.
Winner of entry 1+2 fights winner of entry 3+4.
Winner of entry 5+6 fights winner of entry 7+8.
Etc.
Again loser is eliminated. This would take 70min.
Winner of entry 1+2+3+4 vs 5+6+7+8 fights. This would take 40min with the last "group" being short on numbers because 30 doesn't divide into 8.
What you'd have left would be 4 AIs. Have AI 1 and 2 fight, same for 3 and 4. Loser is eliminated. 20min.
Finale, winner of previous bracket. Winner takes home the gold.
With 4 people each with 8 entries (the 4rd person only having 6 entries) it'd take about an hour, then having one person run the finale of the last 4 seeds.
I would really like to use the ai stuff built in to sc2, and do it all in galaxy... but it seems to me that you can't just include it in a map, you have to use a loader to have starcraft let you choose the ai for a melee game.
Now, if we use triggers, then this is solved. However, it looks to me like the triggers for AI are really meant as a supplement to the galaxy based built in ai. Am I wrong?
Ready to get started on this... just not sure what my options are.
@Eiviyn: The problem would be setting up the AI in games itself, I believe. Though, that would be cool... Maybe i'll look into that a bit.
Could, as a requirement, add that there be a variable of "player number" where all triggers relating to the AI player have to use this variable instead of "player 1" etc. The intention being that you have a clear variable that you can alter in order to set up 1v1 matches. Since I don't think I explained that too well;
Copy/paste the AI triggers folder for both competitors into some designated melee map.
One of the requirements for the competition being that you add the "player number" variable. The first AI has it's player number variable set to 1. The second, to 2.
The AIs then go about their business, and if one AI is not set up properly then it is disqualified.
Or something, still not sure I explained that too clearly!
At least, those are my musings.
Either way this would open a fresh new can of worms (the AI competition aspect) due to having to ban the use of Create Unit, making units invulnerable, removing units etc!
I would really like to use the ai stuff built in to sc2, and do it all
in galaxy... but it seems to me that you can't just include it in a map,
you have to use a loader to have starcraft let you choose the ai for a
melee game.
Now, if we use triggers, then this is solved. However, it looks to me
like the triggers for AI are really meant as a supplement to the galaxy
based built in ai. Am I wrong?
Ready to get started on this... just not sure what my options are.
Mhmm. What you'd need to do is write the script (you can use the Script Tester to do so), and then copy/paste it into a .galaxy file. Then, import the script and use a trigger to "Run Custom Script" and just do "include "scriptName".
I went ahead and uploaded the Official Galaxy Scripts for everyone to take a look at as well. Updated the OP and the newspost to reflect this.
@Eiviyn: The problem would be setting up the AI in games itself, I
believe. Though, that would be cool... Maybe i'll look into that a bit.
Could, as a requirement, add that there be a variable of "player number"
where all triggers relating to the AI player have to use this variable
instead of "player 1" etc. The intention being that you have a clear
variable that you can alter in order to set up 1v1 matches. Since I
don't think I explained that too well;
Copy/paste the AI triggers folder for both competitors into some
designated melee map.
One of the requirements for the competition being that you add the
"player number" variable. The first AI has it's player number variable
set to 1. The second, to 2.
The AIs then go about their business, and if one AI is not set up
properly then it is disqualified.
Or something, still not sure I explained that too clearly!
At least, those are my musings.
Either way this would open a fresh new can of worms (the AI competition
aspect) due to having to ban the use of Create Unit, making units
invulnerable, removing units etc!
Actually Eiviyn, I think this is a great idea... I think for now, because not many Scripts have been created, we'll stick to general "Design an AI." Although, depending on the turnout for this, we can have AI Tournaments and things of that nature once people start to get the hang of writing their own AI.
It seems many of the AI - Advanced triggers in the GUI don't work too well; the AI seems to have trouble building structures in particular. Anyone managed to figure this out?
I've had to make my own pathing detection and build order functions as a workaround :S. Not a total project ruiner, but a pain in the ass nonetheless.
It seems many of the AI - Advanced triggers in the GUI don't work too
well; the AI seems to have trouble building structures in particular.
Anyone managed to figure this out?
I've had to make my own pathing detection and build order functions as a
workaround :S. Not a total project ruiner, but a pain in the ass
nonetheless.
Mmmm, I had heard something along those lines, i'll check it out.
Results
Votes
Submission is over, the contest is being voted on right now here.
Melee AI Contest
Since the Clock and Cinematic Contests were a great success, we decided to start a new one. This time we want to feature the creation and customization of computer AI within the GalaxyEditor and SC2. AI Scripting is an area that we have not seen much of at all, really. Hopefully this can help the community get their hands dirty in this area. Entries may be submitted here. You may also upload your map to our Map Database. Good luck and happy mapping!
What to do?
You can use the GalaxyEditor or anything available to you to create your own custom Melee AI. For those of you who wish to do this in pure Galaxy without Triggers, you may want to take a look at our old Galaxy API Docs. Otherwise, the Trigger Editor will be your friend in this contest. Any race, any level of skill, the design of the AI is completely up to you. In addition, I went ahead and uploaded all of the official Battle.net Ladder maps to our Map DB. You can either use those or you can create your own. You may also want to take a look at Blizzard's Official Galaxy Scripts as examples.
Resources
Deadlines
You have 7 days to complete this contest, and then during one day a poll will be launched for you to vote and elect the winners!
End of the submissions: Tuesday, June 1st - Midnight PDT (Los Angeles) [Wednesday, June 2nd - 9 AM GMT (Paris)]Reward
The main goal of the contest is to give the Melee players something to do while going without the beta for a month, however it's better when there's something to win :). Since the Beta is coming to a close, it doesn't make too much sense to hand out Beta Keys. However, the first place winner will get one to give out, because they can still download the game and take advantage of GalaxyEdit!
I can't wait!
You know what would be an AWESOME way to find the winner? Battle the AI's against eachother =D
EDIT: oh, and dibs on the name "skynet" :D
Callex got a good point so why not even make AIs tournament (ofcourse with additional rules (no cheating with resources etc.))? Something like SC2mapster invitational? :-)
We don't know yet how we are going to select the winner. We thought about doing an AI tournament but it takes a huge amount of time to make the results. An average game lasts 10 minutes, imagine there are 30 entries.
Since there are no dependences between the games we could split up the tasks between many people, but then there will be many time spent organizing everything.
So, even if we think that's a great idea to make AI fights, the time required to make the results is really huge compared to our forces. We will keep you posted on that :)
@vjeux: Go
Any rules on what the AI can do?
I would love to participate in this, but honestly I have no idea what to do with it. I had been asking questions about it on the forum but only got vague answers, so maybe I'll try to figure something out.
I still think that'd be a cool idea though, :O.
Anything you want, :). As long as it's Melee. It can't just start mining and then go make you a coffee.
Like I said, it's an unexplored area, :). I'm going to take my hand at it as well.
what if I wanted it to summon, at-will, 9001 void rays and decimate an opponents base?
For 30 entries;
Entry 1 fights entry 2
Entry 3 fights entry 4
Etc
Loser is eliminated. This would take 150min.
Winner of entry 1+2 fights winner of entry 3+4.
Winner of entry 5+6 fights winner of entry 7+8.
Etc.
Again loser is eliminated. This would take 70min.
Winner of entry 1+2+3+4 vs 5+6+7+8 fights. This would take 40min with the last "group" being short on numbers because 30 doesn't divide into 8.
What you'd have left would be 4 AIs. Have AI 1 and 2 fight, same for 3 and 4. Loser is eliminated. 20min.
Finale, winner of previous bracket. Winner takes home the gold.
With 4 people each with 8 entries (the 4rd person only having 6 entries) it'd take about an hour, then having one person run the finale of the last 4 seeds.
Just throwing that out there!
Stole a random picture to illustrate! Only 16 seeds here though, but you get the idea I hope. Typical elimination tournament.
@Sixen: Go
Is it basically programming or something? I don't even know where to start at all is the biggest problem.
@Eiviyn: The problem would be setting up the AI in games itself, I believe. Though, that would be cool... Maybe i'll look into that a bit.
Trigger Editor has some AI stuff I believe. Not sure if it's been activated, I haven't touched the Trigger Editor much in that regard.
Well, if we make one using the galaxy files and all of that... can people even use them without a loader?
Would something like this: http://sc2.nibbits.com/articles/view/10/writing-your-own-starcraft-ii-ai work?
I would really like to use the ai stuff built in to sc2, and do it all in galaxy... but it seems to me that you can't just include it in a map, you have to use a loader to have starcraft let you choose the ai for a melee game.
Now, if we use triggers, then this is solved. However, it looks to me like the triggers for AI are really meant as a supplement to the galaxy based built in ai. Am I wrong?
Ready to get started on this... just not sure what my options are.
Could, as a requirement, add that there be a variable of "player number" where all triggers relating to the AI player have to use this variable instead of "player 1" etc. The intention being that you have a clear variable that you can alter in order to set up 1v1 matches. Since I don't think I explained that too well;
Copy/paste the AI triggers folder for both competitors into some designated melee map.
One of the requirements for the competition being that you add the "player number" variable. The first AI has it's player number variable set to 1. The second, to 2.
The AIs then go about their business, and if one AI is not set up properly then it is disqualified.
Or something, still not sure I explained that too clearly!
At least, those are my musings.
Either way this would open a fresh new can of worms (the AI competition aspect) due to having to ban the use of Create Unit, making units invulnerable, removing units etc!
Mhmm. What you'd need to do is write the script (you can use the Script Tester to do so), and then copy/paste it into a .galaxy file. Then, import the script and use a trigger to "Run Custom Script" and just do "include "scriptName".
I went ahead and uploaded the Official Galaxy Scripts for everyone to take a look at as well. Updated the OP and the newspost to reflect this.
Actually Eiviyn, I think this is a great idea... I think for now, because not many Scripts have been created, we'll stick to general "Design an AI." Although, depending on the turnout for this, we can have AI Tournaments and things of that nature once people start to get the hang of writing their own AI.
It seems many of the AI - Advanced triggers in the GUI don't work too well; the AI seems to have trouble building structures in particular. Anyone managed to figure this out?
I've had to make my own pathing detection and build order functions as a workaround :S. Not a total project ruiner, but a pain in the ass nonetheless.
New to the website. So do I just upload my map here on this forum for the contest? I just created an account and loaded the map up there.
Mmmm, I had heard something along those lines, i'll check it out.
You can upload your map in the Maps DB and then just post a link to the Map page on here so we know it's your submission.
Awesome! Here's my submission. Give it a shot.
http://www.sc2mapster.com/maps/assault-suchuka-mountain/files/1-assault-of-suchuka-mountain/
I'm not so great at Terran so it's pretty tough for me. Let me know how you do. The one I'm submitting to the contest is Assault of Suchuka Mountain.
Awesome, going to check it out, :).