For Backers Only: AI building stuff

Discussion in 'Backers Lounge (Read-only)' started by Sorian, July 19, 2013.

  1. nixtempestas

    nixtempestas Post Master General

    Messages:
    1,216
    Likes Received:
    746
    So I actually have to defend a planet I kicked the AI off of now...

    good thing we are getting so much optimization in, or the area patrols would grind it to a halt.
  2. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    You might wanna file a bug to whoever is responsible for the area build commands:

    Fabbers will move to blocked spots (at least for mexes) even if it's a long detour only to turn away just when reaching lathing range.

    In case of enemy structures they don't even attempt to reclaim the structures, which would actually be the expected behavior! For allied units they should skip that node entirely (look ahead validation before executing the move command is required!) unless they can assist (only makes sense for own structures of same type and position).

    This occurs whenever a spot gets blocked after the area build command has been unrolled. Which is very likely for mexes when queuing the entire planet.
  3. SXX

    SXX Post Master General

    Messages:
    6,896
    Likes Received:
    1,812
    So I spectated one more game with new PTE and here is some strange behavior I noticed. I started game with two identical teams of AIs on two planet and they finishes space race in same time. What's weird both AIs chose mostly identical place for landing: right between north and south pole. I pretty sure it's wasn't just coincidence.

    What even more interesting one of AIs evacuated his commender using teleport he's built when it's had low HP, but after 5 minutes bring it back and both commanders blow up in fight... :D
    cdrkf likes this.
  4. tehtrekd

    tehtrekd Post Master General

    Messages:
    2,996
    Likes Received:
    2,772
    It seems like the AI doesn't build nukes anymore.
    I was playing on G.W. and was completely pinned down, oddly enough though, despite having them, the AI didn't use its nukes.
    Upon further inspection in the replay, it didn't make any missiles.
    nuke.png
    This held true for all of the launchers.
  5. nixtempestas

    nixtempestas Post Master General

    Messages:
    1,216
    Likes Received:
    746
    Could it have been stalling its eco?

    Or maybe the the AI was prioritizing other things due to the high cost of running a nuke launchers. If so then this should probably be looked at, especially on multi-planet system where those unit hordes the AI likes are pretty useless.
  6. tehtrekd

    tehtrekd Post Master General

    Messages:
    2,996
    Likes Received:
    2,772
    Look at its eco. It wasn't stalling.
    Also I doubt anything was being prioritized, it had a planet all to itself and it was difficult to invade me.
  7. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    I've seen empty launchers in the past as well. I have a largely unfounded theory that they made Sorian special-case GW not to nuke players, because there were so many complaints about it from new players before GW came out.
  8. tehtrekd

    tehtrekd Post Master General

    Messages:
    2,996
    Likes Received:
    2,772
    That could be, but you'd think it'd step up and nuke on the hardest difficulty.
  9. tehtrekd

    tehtrekd Post Master General

    Messages:
    2,996
    Likes Received:
    2,772
    "Well I've been able to handle a single AI pretty well so far, I think I'm ready to step it up to an FFA with 3 AI, what could possibly go wrong?"

    These were the words that crossed my mind before attempting a 4-way FFA with your AI.
    In short, EVERYTHING WENT WRONG.
    This AI holds a grudge like you wouldn't believe, you mess with it once and it will not stop until you're a smoldering pile of ash.
    It also never stops expanding, so if you focus on one of the AI's the other one will not only attack you, but will out-expand you.

    My best moment was probably when I attacked an enemy and after emerging victorious from the hellfire pit I had created, enemy commander's head in one hand and a half-destroyed dox in the other, I realized that my economy was completely fucked because another enemy team had destroyed my entire expansion beyond my main base, half of my work force and my base was beginning to look like the annexation of Poland, tanks were everywhere and I was losing.

    It was horrific.

    EDIT: It didn't help that the random planets were extremely small. It'd be nice if the random systems generated main planets based on the number of players (2-3 small, 3-6 medium, 7-9 large, 10 very large or something to that effect)
    Last edited: June 19, 2014
  10. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    Is there a quick and dirty way to make the AI build units added in by a mod? Statera adds several and I'd like for the AI to be a wee bit more competent and use them.
  11. wondible

    wondible Post Master General

    Messages:
    3,315
    Likes Received:
    2,089
    Never tried shadowing AI stuff; you'd have to try tweaking some values to see if they take.

    If there is anything quick it would have to be pa/ai/ai_unit_map.json, but I fear you'll have to reference that in the appropriate *_builds files.

    And then cross your fingers and pray it's not built into the neural nets.
  12. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    I plan on adding easier support for adding things to ai_unit_map and platoon_templates. Any extra json files found on the appropriate locations (like ai\fabber_builds\) will be loaded an used.
    wondible likes this.
  13. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    The number 1 complaint that people have on the steam forum is that the AI is too good. They say the devs were lazy because they programmed it to play perfectly and win every time instead of being human. They say the whole game is a scam and demand a refund because beating galactic war is impossible. The Steam forum is full of irrational rage all because this game is too hard.

    Sorian, you have won.
  14. lokiCML

    lokiCML Post Master General

    Messages:
    1,973
    Likes Received:
    953
    [​IMG]

    Sorian's AI will take over the world!:eek:
    Last edited: June 26, 2014
  15. nofear1299

    nofear1299 Active Member

    Messages:
    294
    Likes Received:
    147
    Hahaha wow. It is not even possible to program a perfect AI in an RTS? surely?
  16. tehtrekd

    tehtrekd Post Master General

    Messages:
    2,996
    Likes Received:
    2,772
    Actually, from what I understand, it's much easier to program an impossible to defeat AI than it is to make an AI that provides a fair challenge.
    stormingkiwi likes this.
  17. Quitch

    Quitch Post Master General

    Messages:
    5,884
    Likes Received:
    6,045
    @sorian, what's the difference between the AI difficulty levels? I recall it being the effeciency with which the AI handles its eco, but does it include anything else? Such as:
    • Tactics used
    • Levels of micro
    • Ability to accurately assess threats

    Yeah. No. I've seen this line of reasoning float around before and it's bollocks. OK, you could give the AI an impossible to overcome economic handicap, but that seems to me to be outside the argument. It is not within our capabilities to build an undefeatable RTS AI right now which operates under the same rules as a human. Even that Starcraft 2 project, which built an AI for only one race and one strategy, still couldn't reliably beat their tester (though he was a high level player).

    Making an AI that provides a good challenge for all skill levels is difficult, but it's achievable, unlike the other thing.
    Jaedrik, igncom1 and cptconundrum like this.
  18. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    No, it is impossible to write a perfect, generic AI. What you are thinking about is a "cheating" AI which does not follow the rules of the game, but that is not an AI, it's more of an "NPC".

    Humans come with an extensive amount of pre-knowledge which the AI has no access too. Even if the AI would know all possible tactics, it would only be able to train towards countering a limited set of these, ranked by global distribution.

    Humans have knowledge about their enemy, they are able to predict which strategies their enemy is likely to deploy and can counter these strategies proactively. And writing heuristics to categorize strategies IS difficult, that would require more than just simple regular expressions.

    A generic AI can only deal with a "standardized" player, but not with anyone who adapts to the AI.


    Writing a "fair" AI however is rather easy. Because what is perceived "fair" is actually an adaptive system which makes exactly the "wrong" decision.

    Defenses adapted to what you offensive strategy you are using, but just slightly too weak so it allows you to break through eventually. Same goes for the offensive strategy which again is adapted to your defenses, so the AI would actually attack with the specific units you have built counter against.

    That's the plain opposite of what any sane human player would do, but it's the only way to guarantee a victory to the player without making either the players or AI's moves appear "wasted effort".


    However, that's not the goal of the PA AI. If you have a look at how the AI is currently used, the main use of the AI is mostly to leverage the impact of mobbing in FFA since the AI is incorruptible and will stab everyones back.
  19. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    Difficulty effects econ efficiency, ai micro level, which player it focuses attacks on, and neural net decision making.
    janusbifrons, Quitch and cdrkf like this.
  20. cdrkf

    cdrkf Post Master General

    Messages:
    5,721
    Likes Received:
    4,793
    I find it amusing that so many are complaining the AI is too strong...

    I'm pretty sure the sequence of events unfolds thusly:
    1: Purchase PA
    2: Load up GW or Skirmish game
    3: Play on hardest difficulty setting, or against 'Uber' AI because everyone knows AI's suck
    4: Crushed by AI in short order
    5: Complain on Steam / Uber Forum that the AI is overpowered, cheating or otherwise broken due to fact that a player with 0 experience couldn't instantly defeat it on hardest difficulty.
    6: Play a bit more and learn how to play the game
    7: Deafeat Uber AI
    8: Complain on Steam / Uber Forum that the AI is under-powered and easy to defeat. Ask Sorian to make it harder...

Share This Page