1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still havn't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. The Lich King demands your service! We've reached the 19th edition of the Icon Contest. Come along and make some chilling servants for the one true king.
    Dismiss Notice
  4. The 4th SFX Contest has started. Be sure to participate and have a fun factor in it.
    Dismiss Notice
  5. The poll for the 21st Terraining Contest is LIVE. Be sure to check out the entries and vote for one.
    Dismiss Notice
  6. The results are out! Check them out.
    Dismiss Notice
  7. Don’t forget to sign up for the Hive Cup. There’s a 555 EUR prize pool. Sign up now!
    Dismiss Notice
  8. The Hive Workshop Cup contest results have been announced! See the maps that'll be featured in the Hive Workshop Cup tournament!
    Dismiss Notice
  9. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Contest Idea: AI Wars

Discussion in 'StarCraft I & II' started by Mooglefrooglian, Jun 8, 2010.

  1. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    As the title implied, a friend (mrzwach) and I had an amazing idea for something to do while beta was down, which is make an AI.

    And to go farther, battle different people's AIs.

    It's great while multiplayer is down, and it does bring some attention to a sadly neglected area of the editor, which is AI. We need tutorials, and this could inspire some people to write some.

    So as for contest goals or different places you could enter AI:

    • General best battle AI. Winner would be the creator of the AI that has the most wins.
    • Most awesome AI. Perhaps a mass SCV/medicopter drop on the enemy base, complete with perfect micro to prevent losing any SCVs.
    • Fastest techer. Ultralisks in 30 seconds or something (yah, it's impossible).
    • Best expander (perhaps the AI can take over the entire map within 5 minutes or something).

    Creating AI doesn't look to be hard in the editor. If you have looked at any of the Blizzard AI files, you can queue any kind of unit, and the computer will wait until it has resources, and you can set up scout groups and stuff. Difficulty will probably be minimal for a simple battle bot, but for something involving mass micro, hard.

    Would anyone else be interested in this?
     
  2. MGCǂSpectre

    MGCǂSpectre

    Joined:
    Feb 4, 2005
    Messages:
    3,007
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Do you know these AIs that they used with illegal launchers? I dont see a point in launchers with Patch 9 and the Editor anyway but there could be use of those AIs they made.

    Do you know how to import an AI script/those AIs or whatever in a map? Cause I want to import whatever is needed in my melee map, make the AI use those killer strategies they do on those AIs.

    Im asking since I needed and because th fact that you're talking about AIs suggest you know how to use AIs in a map.
     
  3. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    Its fairly simple if you look through the triggers. Notice the Init AI trigger in every default GUI thing? You can import script files, and with tools like Moonlite and Andromeda things will get easier as we go along. I have yet to figure out how to do everything, but thats because I havent even looked. This idea is like 5 minutes old, :p.

    This is to see if people are interested, not the actuual contest rules or anything. We can make those if anyone cares, and obviously those would include instructions on how to add AI to your map.
     
  4. mrzwach

    mrzwach

    Joined:
    Aug 1, 2009
    Messages:
    929
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    This will be interesting, ;D

    Also, here, I archived all the AI galaxy code for your convenience.

    On a side note, it appears that some of the AI stuff is stored in XML files.
    // Reaper AI is left in TactTerrAI to serve as an example of two different ways to write the same
    // AI. To see the xml equivalent of the Reaper AI, look in TacticalData.xml and TargetFindData.xml.
    // In general, AI implemented in galaxy scripts will be slower than AI implemented in data.
    // If it is convenient to express AI in data, one should do so. In this case, converting reaper AI
    // to xml resulted in a 2x performance gain.

    I'll post the xml files for these two sometime soon.


    edit: also, neither of us have made AIs before. Contest is more of just for fun.

    Anyways, I don't think we really need much in terms of contest rules - basically just make sure that you can limit the APM of your AI to a certain number (can be chosen later) and that your AI doesn't cheat or something, if thats possible.
     

    Attached Files:

  5. MGCǂSpectre

    MGCǂSpectre

    Joined:
    Feb 4, 2005
    Messages:
    3,007
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    I mean, they made these AIs:

    http://sc2.nibbits.com/assets/starcrack-ai/files/160/

    Download it, files inside are:

    AIDifficulty.galaxy
    Trigger libs (folder) Protoss0.galaxy, TacticalAI.galaxy,TerranLate.galaxy and many other

    So I dont work with Andromeda or Moonlite since I dont wotk with scripts, codes. JASS or similar. So how can you use those files in your map to make the Comp use them and which of them as they are many? Im not asking how to make an AI but how to use those.
     
  6. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    You could import the scripts, and overwrite the base MPQ I suppose. You could also just import them and do a simple custom script include "aisomething.galaxy".

    Look, we don't know how to add all of this yet, but we know it is absolutely possible. We are looking for suggestions, and concerns about the contest, not the actual technical aspects of how (which I should have covered by tonight). If you're interested, do mention it. If you have an idea for a way to grade, or some sort of sub-contest to add (like best mining AI, etc) do suggest away. If you're just plain interested, make a post so we know it's worth the effort to bother with this contest.
     
  7. mrzwach

    mrzwach

    Joined:
    Aug 1, 2009
    Messages:
    929
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    Actually, AI's are located in Base.sc2data, which is present in every mod. I'll try to figure out if we can just have mods and then stick em on a map to test.
     
  8. MGCǂSpectre

    MGCǂSpectre

    Joined:
    Feb 4, 2005
    Messages:
    3,007
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    If you edit a map with MPQ editor you will see some folders and files. inlcuding strips. I could do ti with MPQ editor to edit my map but dont know where/what to import frm these. Basically creating folders with Ladyks MPQ editor and adding files in it is the same as importing files frm the Import Manager and setting them a path. So these .galaxy files could be added to a map I think as before there was Patch 9 and those who made maps made 'AI maps' somehow, dont know and withotu having to replace your main Liberty files lol.
     
  9. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    Mods definitely seem the way to go.

    On the actual contest, we could probably make a sub category for best ai vs human. If an AI can beat anyone, then it would win or something.
     
  10. MGCǂSpectre

    MGCǂSpectre

    Joined:
    Feb 4, 2005
    Messages:
    3,007
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Ok I get it, it is unknown. I was just asking if you already know how to use those, np. I could make an AI 'articially' with just triggering it what to do and I mean just to play a little melee frm time to time due to the comps being retarded, it's not like Im gonna waste much time to play vs comps :)
     
  11. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    Hell, we could have an observer match when BNet is back up and place bets on AIs and such in a great 8 player FFA. Think of the win.
     
  12. mrzwach

    mrzwach

    Joined:
    Aug 1, 2009
    Messages:
    929
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    Code (vJASS):
    void AIMeleeTerr (int player) {
        int mainState = AIState(player, e_mainState);

        if (mainState == e_mainState_Init)              { TerranInit(player);     }

        else if (mainState == e_mainState_OpenGnd0)     { TerranOpenGnd0(player); }

        else if (mainState == e_mainState_OpenAir0)     { TerranOpenAir0(player); }

        else if (mainState == e_mainState_Mid0)         { TerranMid0(player);     }

        else if (mainState == e_mainState_Late0)        { TerranLate0(player);    }

        else if (mainState == e_mainState_Off)          { EndMeleeScript(player); }
        else if (mainState == e_mainState_Disabled)     {                         }
       
        else { ErrorMeleeScript(player, "Invalid mainState"); }
    }


    I'm thinking we can just intercept this function, and then have it call different functions based on what AI is being used by the player. We know it always calls (race)Init at the very beginning, so depending on how each person codes their AI we can just have it call a function to start them off.
     
  13. MGCǂSpectre

    MGCǂSpectre

    Joined:
    Feb 4, 2005
    Messages:
    3,007
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Are you in Europe, I'd gladly observe that thing cause hmm looks like I felt bored not chatting with any1 and this will sure be great - But you dont need to obs, you can be observer on a map. select player 1 comp player 2 comp , you observer, save map, run map offline, save replay, upload replay, all see how PC plays.

    Hey that's a great idea - a tournament of computers, make bracket AIs vs AIs, only 1 AI will reach and win the final. w00t

    If you feel like figuring out frm those links I posted with AI, go for it, I cant help with scripts as i dont use them
     
  14. mrzwach

    mrzwach

    Joined:
    Aug 1, 2009
    Messages:
    929
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    Yeah, I looked at it, but the problem is the way they did it allows for only one AI for each race.

    Additionally, if you so much as touch any of the race files (ie importing them into a map/MPQ) it causes the game to break. Might not have earlier, but it certainly isn't possible now.

    I'm thinking, just create the AI mostly from scratch but use the real AI files as reference. Could be interesting, :eek:


    EDIT: Actually, I'm going to look in to using their launcher to see if it lets me edit stuff.
     
  15. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,545
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    It is possible, set the AI bonuse (im sure they have one still) to 10000% resources and 9999999% build rate.

    Same as above.

    So far I can not get an AI started for a non computer player, which is annoying. I basically wanted to force AI into empty slots but it aint working.
     
  16. Mooglefrooglian

    Mooglefrooglian

    Joined:
    Nov 28, 2008
    Messages:
    701
    Resources:
    0
    Resources:
    0
    I copied the AI created by a certain third party into my map with simple imports, and it actually worked. I'll make a package or something, which people can then modify for their own maps.

    Also I'd kinda prefer less cheating. Although, a special cateogry for winner with infinite resources could be great... with an AI's ability to multitask, getting 200 starports out and spaming BC's could be doable.
     
  17. MGCǂSpectre

    MGCǂSpectre

    Joined:
    Feb 4, 2005
    Messages:
    3,007
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    Let me play vs cheating AI, it's the best way to train while no real opponents, some people NEED cheating AI. I want to apply it to my EI map. So how do you do it? Using those .galaxy files frm the link?
     
  18. mrzwach

    mrzwach

    Joined:
    Aug 1, 2009
    Messages:
    929
    Resources:
    3
    Tutorials:
    3
    Resources:
    3
    The contest is to create the strongest AI that does not cheat, but it would be fairly easy to just give them full map vision and extra resource income.
     
  19. GregerTheGreat

    GregerTheGreat

    Joined:
    Sep 21, 2008
    Messages:
    42
    Resources:
    0
    Resources:
    0
    This contest is a great idea. Although I have no idea how to create an AI. But i would surely like to try/learn.
     
  20. MGCǂSpectre

    MGCǂSpectre

    Joined:
    Feb 4, 2005
    Messages:
    3,007
    Resources:
    2
    Tutorials:
    2
    Resources:
    2
    No offense guys but Im not sure you will be able to make so good AIs - I hate launchers and illegal crap programs but those AIs were a good idea and useful, they are scripts not programs. What makes those AI good is not that they gain 2x resources - they really acted human like, attacking from behind, dropping units on islands, attacking you non-stop, using counters to your strategy in latest versions.

    You also need an understanding how a player should play even if you could code without a hitch.

    But let me know if you can make an AI play with 2x resources, attack you and all that the AI has using this
    http://sc2.nibbits.com/assets/starcrack-ai/files/160/