[AI Contest] Mimic AI
Mimic AI by Callex
My entry for the sc2mapster AI competition!
Mimic actively records your build order and army composition as you play, which can then be saved into Mimic's memory for later use. Mimic will then try to emulate your playstyle in subsequent games!
Features:
- Mimic can play as Protoss, Zerg and Terran
- Mimic actively scouts, and cannot attack what it can't see
- Up to 12 players can be controlled by Mimic simultaneously
- The AI can be easily transferred into other melee maps
- Mimic can store up to 30 build orders simultaneously
Instructions:
Playing - By default, Mimic starts with no build or attack orders. If this is your first game against Mimic; build and expand as much as you please. Attack the existing enemy base, and type -save before defeating the opponent. Once the profile is saved, restart the game and Mimic will now know how to build and attack with your race! Alternatively, you can download the MimicAIData.sc2bank file and place it into the Starcraft II Beta\Banks folder. This contains 9 basic profiles to get you started.
Editing - You can change several basic settings within the AI Initialization trigger: 'Gather Rate' determines the mineral yield of the AI. Setting this to 2 will make the AI gather minerals twice as fast, and you can use this to alter the difficulty. Similarly, 'AI Omnipotence' can be toggled on to remove the scouting mechanic; this effectively allows the AI to see the entire map. If you want to choose which players are controlled by the AI, simply add them to the 'AI Players' player group.
Copying - Mimic can be copied into any melee map:
- Open the trigger editor
- Copy the 'Mimic' folder
- Open the destination map
- Paste the 'Mimic' folder into the destination map.
- Click on the 'Melee Initialization' trigger of the destination map, and delete the 'Set Default Melee Options' and 'Start Melee AI' functions.
- On the top toolbar, navigate to 'Map -> Player properties'
- Make all the desired AI players computer controlled
Tournament Mode - You can now battle different Mimic AI's against eachother using the following steps:
- Copy upto four AI data banks into the 'Banks' folder.
- Rename the files: 'MimicPlayer1.sc2bank', 'MimicPlayer2.sc2bank' etc
- Make the first four players computer controlled, or neutral if you want the slot to be empty. (In map -> player properties)
- Set Tournament Mode = true in the AI Initialization trigger.
- As a spectator in slot 5, choose the profiles for each AI. (The map numbers them as they are saved, so typing "-profile 1" will load the first build order saved to the player's bank.)
- Watch your AI's compete against eachother!
If anyone has an AI data bank they would like to upload for everyone else to try out, PM me!
Alright. I got it working between maps. You might want to add that in order to get Mimic working between maps, you have to set your opponents to "Computer" in player properties. They won't set themselves.
Great work, though. I'm having a lot of fun with it.
Phew, that's a relief! Thanks for the feedback.
Apologies in advance to anyone who uses tournament mode. It's really intended for use in AI tournaments; Sc2 is incredibly rigid when it comes to banks. You can't have variable names or even players, hence the very specific requirements for it to work!
Labels are now apparent for each trigger and I haven't experienced any crashes so far. The annoying Param/Value messages are gone. Plus, the AI data seems to be working now as well.
Thanks Callex. I appreciate it a lot. I'll keep you posted if I find anymore errors. :)
I used a different localization method in the latest version. Tell me if it's still screwing up; I'll seek help from someone with a little more experience with locales if so...
Yes, I am using the US Client.
Thanks! Are you using the US client then by any chance? It sounds like the localization errors are behind these issues. I'll have a look around and see what can be done about it.
Hey Callex. Great thing you got going. As with wsLegolas, I am getting a syntax error on either line 31 or 21 (if I am trying a different map). This happens whenever i make any changes to the map (such as changing the AI to any specific race) or even when I try using Mimic on a different map.
It happens with and without the pre-bank profiles.
EDIT: Also, a few other things I noticed: The Param/Value/code appears the entire game for me. It's not a big deal, but I wasn't sure if you were aware of that or not.
Also the pre-bank values are not working for me. They are in my Starcraft II Beta/Banks folder, but the races that I haven't saved buld orders in (Terran/Protoss) still just sit there the entire game.
Again, thanks Callex. It's a complicated deal, but this is something that really has some great potential!
Odd... Did you use the pre-made bank, or start from scratch?
Hi after i save and try to Test document again it always fail and there is an error on line 31 string 101 151 _gv; or something ps i think the saving thing doesnt quite work and thats probably causing the error but anyway this is great :D
Ah, it didn't upload properly. I replaced the corrupt file, it should work now!
Right, I'll have a go at using xhatix's localization tool and re-upload. Tell me if it works!
only problem i can see so far: the map is not localized, so all the triggers and texts are blank 2 me :(
They follow the build orders very well, i was quite suprised when i saw them doing the exact same build order. Here are a few ideas to improve it though. Maybe you could add the feature that they do not attack until the saved supply levels? As in the same supply level that the saver had when they attacked with their forces. Another thing would be them building in roughly the same layout as the ladder maps are symmetric after all. All in all great work, very cool concept.
awsome idea, im gonna check this out thoroughly!
Good luck! I just hope to god it works! It's been a major pain getting this thing going properly. I've crashed my client well over 25 times testing this!
I recommend playing with multiple opponents; you can really see the different strategies in play, and how effective they are against eachother.
That is actually an extremely cool idea. I am going to try this out.