A question regarding the AI

Discussion in 'Planetary Annihilation General Discussion' started by jseah, December 12, 2012.

  1. jseah

    jseah Member

    Messages:
    129
    Likes Received:
    2
    How much will the AI focus on good use of units?

    Going from the Spring RTS AIs, I find that most AIs, with a little tweaking, have sufficiently good strategy to compete with human players (without cheating!), but they *always* fail in using units in the right way.
    That's not to say that AIs have poor micro, they have excellent reaction times to events but their tactical use of units is sub-par.

    Thus far, I have never seen an AI in any TA-like game with good unit use. The units always position themselves wrongly, bunch together when facing AoE, wander into defense ranges, attack unsupported (allied units blocked by tree/wreck/cliff/the unit itself), unable to coordinate attacks.
    They do stupid things like charging escorting units into defenses the artillery is supposed to take down. The lack of the line formation also hurts them massively as well as very poor tower placement / sense of where important points are.


    So I guess my question is:
    Will the AI feature tactical use of units?
    - What I mean is things like escorting artillery with more durable units, useful formations (not the useless porous block that supcom has, solid lines to deny enemy movement and concentrate firepower or sparse areas to avoid heavy AoE), intelligent target selection (focus fire on the most dangerous thing you can kill in a single salvo using all units in range, don't overkill) --- basically, all the things that involve more than one unit working together

    ------------------------

    On a related note, how about information? Will the AI manage scouting the enemy and hiding its own information? (has the enemy seen my secret nuke silo / KKV asteroid?)
  2. evil713

    evil713 New Member

    Messages:
    13
    Likes Received:
    0
    i think its gennerally been found that game creators are not as good at playing there own game in comparison to the elite players 1-3 months in.

    its possable that the AI will be modified over time as community tactics are built up.

    youtube will help.
  3. RaTcHeT302

    RaTcHeT302 Guest

    Apparently someone really good will work on the AI but I still feel like the should let us create our own AI by ourselves. It probably just takes more time and focus to develop a proper AI who can actualy play strategicaly.
  4. wolfdogg

    wolfdogg Member

    Messages:
    350
    Likes Received:
    0
    I agree that the programmers are rarely elite players. But it's not just that. I'm no expert in AI development, but there are a number of reasons that I can think of why the AI doesn't act the way we expect it to in given situations.

    In the past (read SupCom), AI was driven by markers laid out on the battlefield by map creators. These were indicators to the AI on where it should do things like construct it's main base, build sub bases, fortify positions and such like. Non contextual stuff - Objectives laid out for the AI before the game has even started. I suppose you could call it a form of strategy. A great many user generated maps lacked these markers.

    After the game has started, the AI would respond to contextual stuff according to it's code. In other words, as the game develops the AI follows it's code and reacts to in game events accordingly. This is the part that the OP describes as the correct/tactical use of units.

    With this in mind, I think it is entirely plausible to make the AI more proactive instead of reactive. For example, have you ever noticed how the vanilla AI in SupCom doesn't build air unless you do? (The following are more things for us to talk about rather than suggestions for Sorian btw).

    1. The AI should take into account the terrain type, ease of access for different types of units and the ratio of land and sea when it makes decisions about what unit types to build and in what proportions. All this as opposed to primarily waiting to see what the enemy builds. Though in some cases this is just as important a method of unit selection.

    2. Unit types should have code attached that makes the AI use them in specified ways. It should also have code to allow it to choose what units are best to use for given situations. When attacking a specific target, different units would approach it in different ways. In some cases only some units would approach it at all.

    Example: Point defence should be attacked with arty and the arty should be supported by tanks. All of this can be decided simply by looking at what the unit is attacking (based on intel of course) and is completely contextual. Units like arty should stay at the edge of their range and should always be moving to maintain this.

    3. Another example of contextual reaction is when units come under attack. There are a few examples of this I would like to quickly mention.
    A. The AI should be able to perform calculations based on the statistics of the units in the game. If it comes under attack it should base it's reaction on the outcome of the calculations based on what it can see from intel in the battlefield.
    B. If a unit can see what unit is attacking it or if not determine the kind of weapon it is being attacked by, then it should respond accordingly. Perhaps by strafing, kiting, retreating or maybe closing the unit down asap.
    C. The AI should be able to accurately determine if the engaged units are capable of winning the battle and if not it should calculate the best course of action: If they should retreat and regroup or if there is no better option than to stand, fight and die. It should also be able to look at the bigger picture with respect to what it is trying to achieve.
  5. Pluisjen

    Pluisjen Member

    Messages:
    701
    Likes Received:
    3
    The problem with building a good AI is that it's insanely complicated to build a good AI. It's one of those fields where machines fall far short of human beings. But I'm interested in seeing what people come up with.
  6. igncom1

    igncom1 Post Master General

    Messages:
    7,961
    Likes Received:
    3,132
    I am guessing the map generation will include auto generated AI markers to fit previously determined parts of the terrain.
  7. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    2) This relies on modders actually adding this information to their units. Since SupCom mappers in large part failed to do this I am definitely not going to assume they will for units, so this can't rely on "blueprint" style data. I have ideas for this, however.

    3) A and C are where neural networks come into play :). I had B working in SupCom 2 from a strategic standpoint. It should not be difficult to implement some reaction for units as well.
  8. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    Well, it worked well enough(considering the limits you had to deal with) when you had it as part of your SorianAI for FA, and I imagine that so long as it's part of the STOCK system there isn't a reason it wouldn't be used by everyone modding new units, the kick(in my mind) is making sure this system is moddable as well(as the base AI) so that as people create new units types or need custom behaviors they can add them.

    Mike
  9. thorneel

    thorneel Member

    Messages:
    367
    Likes Received:
    1
    Another question about AI modding, would it be possible to voluntarily make unit AI suboptimal, to simulate an imperfect or irrational behaviour?
    For example, a "coward" unit that will flee easily, or a "berserker" unit that will always chaaaarge and fight to death. Or one attacking some particularly intimidating/hated unit despite it not being the best tactical option.
    The scenarios I have in mind involve units not being under direct player control, for this not be offset by micromanagement.
  10. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    Going off Sorian's presentation at the GDC last year, I think you might be able to create that effect by poking at the input weights. Artificially inflate the size/strength of your forces and you'll trick a NN into fighting/not fighting.
  11. Pawz

    Pawz Active Member

    Messages:
    951
    Likes Received:
    161
    It'll be very interesting to see what comes out of a 'neural net' AI when it can call home and get updates for its net, and Sorian is on the other end tweaking values and algorithms :)

    Tough part I imagine is going to be getting that collective information over completely random terrains working to the AI's benefit.

    It would be truly amazing if the AI could update itself while playing and allow the AI programmer to communicate with the AI / inject code on the fly.
  12. Pluisjen

    Pluisjen Member

    Messages:
    701
    Likes Received:
    3
    Writing and testing AI code tends to take longer than a match takes, even a long one.
  13. wolfdogg

    wolfdogg Member

    Messages:
    350
    Likes Received:
    0
    Firstly thanks for the comments on my post, Sorian.

    I see what you mean about modders utilising the facility. After all, a great many user generated maps failed to employ the markers too. I do agree with OrangeKnight that if it was implemented in the stock version of the game maybe more modders would use it. However, it comes down to the same question as the map markers issue: Is the mod made for skirmish against the AI or player vs player? Many maps lacked markers because they were never intended for skirmish use. The thing is, a great many players enjoy skirmish and with the lack of a single player campaign I think the importance of this has increased somewhat.

    @Thorneel. You have touched on something that I was thinking about - AI reactions to misinformation or lack of intel. Particularly things like false radar signatures and such like. If it hasn't the intel and sees a large group of radar signatures moving towards it how will it react? It is perfectly feasible to me that the AI might deem the best course of action is to retreat. Players should be able to 'fool' the AI. Maybe the response is simply to retreat and scout the area simultaneously. The important thing is the way that the AI responds to the 'unknown'.

    EDITED: "and with the lack of a single player campaign I think the importance of this has increased somewhat."
  14. jseah

    jseah Member

    Messages:
    129
    Likes Received:
    2
    SorianAI doesn't use units together though. I wish for the day when the AI builds swarms of tanks and uses them under a mobile shield with artillery support. SorianAI just builds... stuff and chucks them at you. And the better human formation chews up three times their cost. And you get the wrecks.

    The day when the AI understands map control and will work to deny you resources just as much as building its own economy. "Don't try to grow your economy faster than your enemy's, make his grow slower than yours. "

    Scouting to find secret projects would also be nice to have. >.>

Share This Page