The sorian PA AI thread

Discussion in 'Planetary Annihilation General Discussion' started by Quitch, December 23, 2014.

  1. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    It's cool that you're interested in Queller, but my understanding of Quitch's AI is that it is quite a lot more involved than the one that ships with the game. You might want to try something a little smaller first to get a better handle on it.
  2. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Quitch wishlist additions:
    • Number of metal spots on planet
    • Ratio of metal spots to planet radius
    Useful to allow the AI to make smarter decisions about its army to fabber balance.
  3. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Another one that came to mind: ability to assign personality tags during play. Would be great as a means of having the AI adapt its play without having to run large numbers of costly unit tag and ratio checks.
  4. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    Yeah, already thought of that one.

    What @Quitch said.
    Quitch likes this.
  5. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    I'm running PTE. It's weird.
  6. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    So would either of those errors kill the AI? I can't see what else it would be.

    I'm using Queller files, but as of yet I've only modified the vanilla AI, which is more or less complete (Or will be as soon as I get this sorted out). I might go ahead and remove all of the Queller personality files and see if that fixes it.
  7. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    Not enough information to tell you that.
  8. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Best not to refer to the vanilla AI within Queller as the vanilla AI. It's Queller's copy of the vanilla AI (and as of the last PTE release also outdated).
  9. stuart98

    stuart98 Post Master General

    Messages:
    6,009
    Likes Received:
    3,888
    So the AI is working correctly, except for one issue:

    It's not using the astreaus to pick up anything. The astreaus has a capacity to load 5 units at a time, which might be confusing the AI, and can pick up all land units aside from the commander. Galactic Annihilation lacks orbital fabbers to build teleporters, so it is critical that the AI uses astreaii to transport fabbers between planets.
  10. igncom1

    igncom1 Post Master General

    Messages:
    7,961
    Likes Received:
    3,132
    Im sure that the AI will do that, when we can do it without having to tell them to load 5 times.
  11. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Is there anyway to see how long a block or check is taking to complete? I see odd spikes in the fabber manager time and I'm not sure if it's because a lot fabbers just checked together, or because there's some particular block which is too expensive.
  12. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    Not that would show up in the control-P panel, no.
    Quitch likes this.
  13. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Astraeus still seems to get stuck if it arrives at an unlandable spot.

    2015-08-03_00007.jpg
  14. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Sorian, is there an issue with the AI micro? I've seen the AI do a lot more running armies into one another, despite their being large numbers of Infernos in the army it's running into. I saw a lot of platoons with Grenadiers in them running back and forth previously evidencing obvious artillery behaviour, but I haven't seen any of that lately. Nor have I seen Dox do that dart back and forth thing they used to do.

    It might be sample bias, but just flagging it.
    Last edited: August 4, 2015
  15. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    There have been quite a few code changes lately, so the AI is in desperate need of neural net training. I will be starting on that today, hopefully.
    cdrkf, Remy561, s03g and 2 others like this.
  16. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    OK, well I also found a bug while starting a new round of neural net training.

    Suffice it to say, AI attack platoon behavior will get a lot better soon.
    stuart98, ace63, Quitch and 3 others like this.
  17. crizmess

    crizmess Well-Known Member

    Messages:
    434
    Likes Received:
    317
    Yesterday, I played some games against Queller on Forge where I restricted myself to use only dox (you have to do fun stuff from time to time).
    And I must say the AI is pretty good now. As a human player you have to exploit the weaknesses of the AI very rigorously to score against it.
    Here is a list of things - I think - I used for my advantage:
    • The AI has no sense of topology when it comes to base building. On Forge, the AI starts its base on its spawn point, but after a few buildings shifts over the mountain range, which leaves the starting base pretty open for attacks. If you can wipe out this small base, it is more or less easy to contain the AI on the left side of the map (towards the island with 6 mex on it) and you are left with a pretty secure rest of the map.
    • The AI loves to see its fabbers die. Again on Forge, once you have wiped the AI's natural expansion (the group of 4 mex at the entrance to the spawning area), the AI will - from time to time - send a fabber to its certain death. It looks to me like this is an artefact of the base building, since the AI thinks it's sending fabbers from one side of its base to the other, but doesn't account that there is an enemy between there. (Maybe the AI can pull back its fabber if it detects enemy units during movement and send in the nearest platoon?)
    • I have the impression that base defence is rather weak. Especially the afore mentioned natural expansion on forge is a good target for an early rush. Sniping fabbers and mexes in the early game can really help you to get a least some control over the AI's economy growth.
    • Something that falls into the same category is anticipation of enemy units movement. This is really hard to do, but currently it looks like the AI does not calculate upcoming threats to its base and/or expansions. Usually you can raid expansions, even if there are platoons nearby that could counter a raid if moved in ahead of the raid.
    • And the last point is of course unit composition. We talked about this before, so I only mention it for the sake of completeness. A human player would switch to infernos once he realises that the opponent is running something stupid like a dox only strategy.

    The items on this list are all high level weaknesses, and I would put most of them under the term "situational awareness". They are not trivial to solve, and I do not expect that you come up with a solution (or better: I hope for all human PA players that you do not come up with a solution). I rather take this as a sign that the AI has come a very far way by now.
    Personally I find the AI is doing micro management pretty well now, this includes building factories, managing resources, expanding and sending platoons around the planet. If you don't have a map that pronounces the weaknesses on the list above, like on a moon or a sandbox planet with no obstacles, once the AI has reached a certain size, you will feel the pain to live between a rock and a hard place.

    One last thing to note is that I'm not a good player after all. The dox only thing on Forge was with Queller @ Uber on x1.3 eco and a win will take something like 12 to 16 minutes game time. On 1.4x eco I see no real chance to do a dox only strategy, a win there for me is pure luck.
    So take this list with a grain of salt, it is, for sure, not representative

    Nonetheless I'm impressed, @Sorian and @Quitch
    ace63 and cdrkf like this.
  18. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Did you check the Queller map spawn recommendations? I recommend putting the AI in slot 1 on Forge because of the mountain issue you raise (which cripples it). I find that on most 1v1 maps the AI does better in one spawn than the other primarily due to the direction it builds, and it favours maps with expansion opportunities in all directions rather than ones which force expansion towards the opponent. Forge is a particularly egregious example of what a bad spawn and metal layout can do.

    A human who switched to Infernos against Dox is a human who is going to lose :) Massed Bolos can beat Dox, but as noted by Sorian above there's a bug impacting how effectively the AI uses its platoons.

    For AI feedback for Sorian I'd recommend using vanilla because otherwise an issue might be a Queller specific thing rather than an AI one.
  19. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    [​IMG]

    Loki is floating but is failing a CanAffordBuildDemand condition for Shellers. Also the GIL-E is failing a HasSeenEnemyUnits check for "tank", but red was 90% tank (is that check for the local planet only?) and the red tank force seen here is moving directly below Loki's radar.

    Code:
            'Uber': {
                metal_drain_check: 0.54,
                energy_drain_check: 0.57,
                metal_demand_check: 0.71,
                energy_demand_check: 0.72,
                micro_type: 2,
                go_for_the_kill: true,
                priority_scout_metal_spots: true,
                enable_commander_danger_responses: true,
                neural_data_mod: 1.0,
                adv_eco_mod: 1.3,
                adv_eco_mod_alone: 0.85,
                personality_tags:
                [
                    "uber"
                ]
            },
    Code:
          {
             "name":"Uber - Sheller",
             "to_build":"AdvancedArtilleryVehicle",
             "instance_count":-1,
             "max_num_assisters":10,
             "priority":199,
            "debug":true,
             "builders":[
                "AdvancedVehicleFactory"
             ],
             "build_conditions":[
                [
                   {
                      "test_type":"HasPersonalityTag",
                      "string0":"uber",
                      "boolean":true
                   },
                   {
                      "test_type":"CanDeployLandFromBase",
                      "boolean":true
                   },
                   {
                      "test_type":"CanAffordBuildDemand"
                   }
                ]
             ]
          }
    Code:
          {
             "name":"Uber - GIL-E",
             "to_build":"AdvancedArtilleryBot",
             "instance_count":-1,
             "max_num_assisters":10,
             "priority":199,
            "debug":true,
             "builders":[
                "AdvancedBotFactory"
             ],
             "build_conditions":[
                [
                   {
                      "test_type":"HasPersonalityTag",
                      "string0":"uber",
                      "boolean":true
                   },
                  {
                      "test_type":"HasPersonalityTag",
                      "string0":"doxrush",
                      "boolean":false
                   },
                   {
                      "test_type":"CanDeployLandFromBase",
                      "boolean":true
                   },
                   {
                      "test_type":"HaveSeenEnemyUnits",
                      "unit_type_string0":"Tank",
                      "boolean":true
                   },
                   {
                      "test_type":"CanAffordBuildDemand"
                   }
                ]
             ]
          },
  20. crizmess

    crizmess Well-Known Member

    Messages:
    434
    Likes Received:
    317
    Yes, I know your spawn recommendations. But the point in more general: Obstacles can lure the AI into a real sub optimal base layout, not that it may be fixable by some map configuration. Maybe this is some kind of personal view point, but for me it would look more elegant if the AI would perform consistently, regardless of map direction and obstacles.

    And yes, I missed to point it out more clearly in my post above: All of the points raised above are very general points that are valid for both AIs. You can use this weaknesses against vanilla as well as Queller - I've done that- , with the only difference that you are being more pressed to use them in the latter case.
    And since the AIs in this game is a cooperation of you guys, and this is the thread you both show up I thought this is the better place to post my feedback. In fact I assume that most of the points mentioned are not fixable by JSON magic, rather than the plumbing somewhere deep in the AI implementation.

    And on the inferno thing, well I told you I'm not a good player ;-) ... on the second thought I would probably switch to inferno & grenadier.

Share This Page