The sorian PA AI thread

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

  1. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    The AI has definitely gotten better about expanding. In 1v1 Queller tests I find it generally takes pretty much all the metal.
  2. bengeocth

    bengeocth Post Master General

    Messages:
    1,285
    Likes Received:
    657
    Can we stop the ai commander from running around grabbing metal at the beginning and make it have fabs do it like normal people?
  3. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    Play on a harder difficulty level?

    The Commander will go factory first on the harder difficulty levels and will not build mexes if it has at least 1 fabber to do it instead.
    Quitch, Remy561 and squishypon3 like this.
  4. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Can you explain how you made the ai go factory first?

    @zweistein000 was trying to get the ai to go factory first in RCBM. (And it'd be nice for Statera as well)
  5. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    I didn't change anything. When the balance changed the AI started going factory first because it had the eco to support going factory first.

    You can change or add build items to force it if need be in your mod.
    cptconundrum and squishypon3 like this.
  6. squishypon3

    squishypon3 Post Master General

    Messages:
    7,971
    Likes Received:
    4,357
    Then what causes the ai to not go factory first on the easier difficulties? (Legitimately wondering)
  7. killerkiwijuice

    killerkiwijuice Post Master General

    Messages:
    3,879
    Likes Received:
    3,597
    once the AI becomes sentient and takes over the world, you should add a chatbot for the luls.

    If (commanderDeath or whatever this is === True){
    ---------console.chat or whatever this is("gg wp m8")
    },

    Would be funny
    Last edited: January 7, 2015
    Tripod27 likes this.
  8. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    The personality econ settings. At the lower difficulty levels the AI is really sloppy with its eco.

    \ui\main\game\new_game\js\ai.js

    The relevant values are:

    metal_drain_check & energy_drain_check

    These two checks are used when evaluating whether the AI has enough eco to build another eco using unit.
    Lower means the AI will build things that, if allowed to use eco, will cause it to stall harder.

    metal_demand_check & energy_demand_check

    These two checks are used to determine whether the AI has enough eco to allow a builder to use a particular build item.
    Lower values mean the AI will be allowed to stall harder.
    mjshorty, lafncow and squishypon3 like this.
  9. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Something that would help the AI is the ability to anticipate income. I took CanAffordPotentialDrain off commander built factories because it slows the AI down too much. You will see the commander sitting there while a fabber builds a MEX, and the second the MEX is done the commander queues a factory.

    The issue with this is that the AI has to walk over to the factory location and build it before there's any drain from the factory, so waiting for the MEX to complete is very inefficient. I use CanAffordBuildDemand to avoid this, but ideally the AI would see it's one MEX short but has one MEX queued and would just build the factory anyway.
  10. zweistein000

    zweistein000 Post Master General

    Messages:
    1,362
    Likes Received:
    727
    The AI just needs to think it can support it. In vanilla this is really simple because the Comm can support itself and almost 2 factories. In RCBM the Comm can only support itself or a factory so it builds ECO until it can do both.
  11. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    You don't even need to make the AI think it can support it, simply make it the highest priority item in the AI commander's list, then add some appropriate limit to ensure it doesn't just build that factory forever.
  12. lizard771

    lizard771 Well-Known Member

    Messages:
    370
    Likes Received:
    314
    It's easy to kill Absurd in 8 - 12 minutes.
  13. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    I can beat most humans in 8-12 minutes. The AI in this game is actually pretty good.
  14. bengeocth

    bengeocth Post Master General

    Messages:
    1,285
    Likes Received:
    657
    I play on absurd
  15. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    The AI does anticipate upcoming income, however I realized that it does not do this effectively with area builds. I am rectifying that now.
  16. mjshorty

    mjshorty Well-Known Member

    Messages:
    871
    Likes Received:
    470
    Looks like its time for a new difficulty "Ridiculous" or "Anti-Quitch" (or "Ridiculous Anti-Quitch, but that would just be demented ("Demented" could be the new difficulty as well lol, and would speak us clues into Sorians mind)) :p
  17. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    The AI doesn't grab metal with its commander on absurd unless it has no fabbers, and its first unit is always a fabber. Got a replay?
  18. bengeocth

    bengeocth Post Master General

    Messages:
    1,285
    Likes Received:
    657
    let me find one

    No, I played it offline. it didnt go to pa stats or the lobbies
  19. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    The only way that should occur is:
    1) The AI was unable to build a factory for some reason (terrain, mods, etc)
    2) The difficulty was low (not sure off hand what levels do not go factory first)
    3) The handicap was low (same as #2)
  20. bengeocth

    bengeocth Post Master General

    Messages:
    1,285
    Likes Received:
    657
    I beleive the former was the case. It started walking around, and even stood for around 20 seconds by a mex after it was completed.

Share This Page