Better Commands; specific ideas

Discussion in 'Planetary Annihilation General Discussion' started by jseah, October 3, 2012.

  1. jurgenvonjurgensen

    jurgenvonjurgensen Active Member

    Messages:
    573
    Likes Received:
    65
    RPS is a perfect information game though, and one where, obviously, the rock, paper and scissors are well-defined. An RTS, in terms of RPS, would be a game where you have to record your throws 10 moves in advance, and rather than being told what your opponent threw, you're given a grainy monochrome photograph of a hand and have to work out which throw it was.
  2. qwerty3w

    qwerty3w Active Member

    Messages:
    490
    Likes Received:
    43
    In a RTS game, if you scout an area and find out the opponent has built a shipyard, you certainly know he would build or has built some ships, while in RPS, your future plans aren't limited by your previous steps at all, so I think the players actually have more information in rts games than RPS.
    And 10 moves for each step won't be too different for a RPS AI, the basic logic of predictions would be the same.
    Last edited: October 4, 2012
  3. sylvesterink

    sylvesterink Active Member

    Messages:
    907
    Likes Received:
    41
    Be sure to be specific in your arguments. On a small scale level, such as with micro and unit movement, AI can easily beat human players. On larger tactical or strategic scales, AI has very little chance against a human player in an RTS.

    The principle behind this is that there is very little decision involved in micromanagement. It's a recipe that, if followed correctly, will result in a win most of the time. Good micro can be fouled up if something is changed in the mix. (Say, if you have perfect kiting with marines in Starcraft, and then, suddenly, 1 brood lord.)

    On higher levels, the AI must make a choice of what to do. Most notably, that choice has to take into consideration not only the current situation, but future situations and desired outcomes. The more you take into account the long term view, the more difficult it is for the AI to solve the problem. This is why Go is a much more difficult game for an AI to play in comparison to Chess. There are so many choices and so many potential benefits on the short term, that the AI must branch off into newer and newer iterations of decision checks, quickly reaching the processing limit. There are pattern recognition algorithms that mitigate this issue, but it doesn't solve the problem. With Chess, the number of decisions is smaller and once pieces are taken, they are out of play in the game, meaning the battlefield becomes simpler as the game goes on.

    But Chess and Go are very deterministic games, where a specific action produces a specific reaction. RTSs tend to be deterministic only on the small scale, with very specific battles between very specific units. As soon as you start looking at the larger picture, battles start to become a lot less deterministic, meaning that the problem of which high level decision is the superior one becomes less obvious. To an AI. Now there are more and more "good" choices, but the best ones always tend to be along the lines of a series of strategic decisions, each building on the previous one.

    As an example:
    Taking the high ground is good.
    Taking the high ground and then moving the rest of your army forward while they are covered by the units on the high ground is better.
    Taking the high ground near an enemy base and using it to cover your army as they apply pressure to the base can be very beneficial, but only if you're certain you can take that high ground without being punished by the enemy.

    As you can see, things become less and less absolute as the series of decisions encompass a grander scale and take future events into account. Even Sorian's excellent AI is limited by this issue, because the black box of the neural net can only become so complex before it loses mutability or reduces performance.

    It all boils down to this: On a low level, AI works. On a high level . . . we have a ways to go.
  4. qwerty3w

    qwerty3w Active Member

    Messages:
    490
    Likes Received:
    43
    Uncertainties means the AI would need to consider the probabilities, it is same for any board game AI that can't exhaust all the possibilities of the game.
    Last edited: October 4, 2012
  5. jurgenvonjurgensen

    jurgenvonjurgensen Active Member

    Messages:
    573
    Likes Received:
    65
    "Your opponent will build some ships" is a far less useful piece of information than the RPS equivalent, because building ships is not throwing rock, it's one of about six or seven pieces of information you need to piece together to work out that your opponent has thrown rock.
  6. qwerty3w

    qwerty3w Active Member

    Messages:
    490
    Likes Received:
    43
    But the main focus of RPS is not about how to counter what your opponent has already thrown, it's about what your opponent will throw in the future, and a single move is not very useful information for this.
    Last edited: October 4, 2012
  7. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    I wonder under which circumstances. Did they play only one map? Or did they rotate maps? It may be possible to make an AI that for a single map and a single matchup, that just plays down a perfect bo and micros the **** out of it. Thing is: What about rotating maps and opponents? An AI cant learn over time as easy as human players. A formidable AI would need the ability to adapt to new strategies and maps over time.
  8. jurgenvonjurgensen

    jurgenvonjurgensen Active Member

    Messages:
    573
    Likes Received:
    65
    You're still missing the point. Even getting good enough information processing to be able to reconstruct a single move is a difficult problem for an RTS AI.
  9. qwerty3w

    qwerty3w Active Member

    Messages:
    490
    Likes Received:
    43
    Why is that difficult? If I see a shipyard, I know the opponent would build some ships, if I see some high level economy structures too, I know there is a high probability that the opponent would build some expensive ships, if I have many subs and the opponent has found that with the scout units, I know he might build many expensive destroyers.
    In RPS, a player's skill level is almost compltely relying on his skills of reconstructing the opponent's mental patterns, which is more difficult in my opinion.
  10. jseah

    jseah Member

    Messages:
    129
    Likes Received:
    2
    It's a starcraft AI that solely uses mutalisks.

    The standard human tactic for them is to deathball them. The AI just uses its superior micro to make each one of them find a target, spreadout from AoE and retreat independently. Turns out mutas become broken when you do that.

    EDIT: I might like to mention to lirpakaa that my fire control idea would make the units balanced in this case.

    Lol, you think an RTS can be reduced to an expert system? (if-tables and conditions are essentially a Naive Bayesian classifer, which is an expert system, which, btw, we don't even consider to be a proper AI)

    If we could do that, we could get AIs to run your business.

    Less flippantly, your if-table will be impossibly long if the game has any depth to it.
  11. wolfdogg

    wolfdogg Member

    Messages:
    350
    Likes Received:
    0
    A note on SC:FA AI.

    If I recall correctly, the AI in sup com used markers to give it queues. AI does not possess the intelligence to identify bottlenecks and such like.

    This explains the reason why AI was better at the vanilla maps or community maps made with markers included. It was simply lost on maps with no markers.

    With this in mind, it is easier for the player to predict what the AI will do on a certain map because the AI will always follow the markers. Ever notice how AI always build defence in the same places?

    I can't really comment on SC2 because I just didn't play it anywhere near as much as SC and FA.
  12. jurgenvonjurgensen

    jurgenvonjurgensen Active Member

    Messages:
    573
    Likes Received:
    65
    As jseah pointed out (ish) the combinatorics in programming an AI like that is insane. Does he already have sufficient surface firepower in the form of Fobos to obviate the need for destroyers and go straight to sub spam? Does he even want to go after your subs if perhaps he really only wants to push out some cruisers to get some mobile AA dps? Where is the factory? If it's in a different ocean to your subs then not only do you have to add some more ocean identification code, but his objective has nothing to do with them. Are you winning the land battle, and actually don't care about his naval factory, because taking resources off land spam to deal with an attempt at grabbing naval superiority would be a complete waste of time if he can't build enough ships to start bombarding your stuff before he loses? How good is his air build power? He may not care about your subs if he's got air control and can just push out torpedo bombers to take them out, so he could go straight to missile cruisers or battleships. What position in the build order is this factory? Naval first is obviously a lot different to naval sixth, and building one naval factory is a lot different to building nine. What are his engies doing to the factory? If he's throwing loads of build power at it then he's going heavy naval, but a single T1 engy building a naval factory could be a distraction, or some token attempt at ships as a holding action before his gunships reach critical mass and snipe your ACU. How good is your scouting? If you have poor intel he may be going for a sneaky missile sub sniping attempt (in a mystical version of FA where missile subs don't suck). How likely is he to be building an underwater experimental somewhere and again only be kicking out some ships to draw your subs off your island so it can march up unmolested?

    So many questions result from the simple act of building a naval factory. A lot of them may not be worth asking, but it's never the same set each time, and there are three types of factories at a minimum, and plenty of other buildings with multiple uses which don't just boil down to "scout thing, build counter to whatever that thing does".
  13. jseah

    jseah Member

    Messages:
    129
    Likes Received:
    2
    I might like to mention, that most of what we Core people want to see added to the game? Yeah, those are expert systems.

    Auto-kite has 2 if-conditions. Maybe 3.

    We're not talking about full on AIs here, just easy to understand expert systems that behave *very* predictably in known situations.

    If you know your autokite, you can order your units to autokite and almost literally see what they are doing and why.
    Firecontrol just takes a task (focus fire with just enough firepower) that humans already try to do and do it more perfectly and faster and all the time.

    And the other tools are useful, not just for micro-control for humans, but for the expert systems too. Humans might not use the Face command too often except for ships, but a firecontrol widget might find Face very very useful (make your AA tanks and turrets turn in place to face incoming aircraft before they enter range?)

    EDIT:
    The Advanced Templates I'm seeing people mention, like "build a defense base here", will also be an expert system.
    Perhaps a system of functional slots. So a line of TL-1 def towers slot with high priority, a shield gen with medium priority and a long range artillery tower with low priority. It comes with ratios (20 def towers to 1 shield gen to 2 arty towers). You order a ratio 2, TL2 defense base, a facing and assign 5 engineers. (and in doing so, get to see estimated completion time of each stage of high/med/low and total cost)
    They fill in the def tower slots with 40 TL1 def towers (spaced out), to 2 TL2 shield gens in the shield gen slots (slots related to which slots def towers were filled in) and then plonk 4 TL2 artillery pieces down, in that order.

    These templates would be built outside of a skirmish (there would need to be a build template constructor option)
  14. qwerty3w

    qwerty3w Active Member

    Messages:
    490
    Likes Received:
    43
    I never said the skirmish AI should be entirely a expert system, but it seems some knowledge representation and reasoning is necessary.
    And answering that textwall of questions is simply beyond the capability of me, I'm not a AI maker anyway.
    But I'm pretty sure there are already some RTS AIs that can make some macro decisions which takes the factors like the strategic priorities into account, and we don't have much research in this realm yet, it's unlikely that they couldn't react to some more eomplex situations properly with some improvements.
    And I believe the inperfection of information in rts games, while adds some difficulty in creating a powrful AI, have reduced the difficulty of it too by making the predictions less valuable, a good rts player doesn't need to deduce many steps like a chess player.
  15. jseah

    jseah Member

    Messages:
    129
    Likes Received:
    2
    Guess where that knowledge comes from? Players.

    If you can't answer that textwall because its too big, (and remember that its just due to one shipyard), then getting players to answer it and making the expert system (and debugging/balancing the weights) will be likewise impossible.


    You would think that if it was *simple*, we would already have a good AI no?
  16. lirpakkaa

    lirpakkaa New Member

    Messages:
    60
    Likes Received:
    0
    No, that's not the case. There's not too much optimization to be done for microing ground troops against mutalisks.

    What happens in a normal, human vs human game:
    Mutalisks move in a clump, and you try to pre-empt their movement with placing turrets and moving your marines (or goliaths) in a way that they cannot pick apart lone turrets or kill workers without taking serious damage. The hard thing is predicting the muta movement, while not letting marines stray too far from each other because then they'll be picked off too.

    Now with this AI, the mutas move independently from each other back and forth, with the intervals of the back-forth being about the length of their reload time. So the defending marines can never target the same mutalisk for long, since they don't stay in range for long. Therefor the damage is split between all the mutas pretty evenly, instead of the terran being able to focus down single mutas. There is no real solution to nullifying this method, that the terran player could use if they'd just have better UI.
    IIRC when playing vs this, it's best just to go for goliaths which have longer range than marines, so you cannot run away from them as easily. Their problem is just slower movement, which the AI cannot fully exploit, though.



    No, you don't properly understand what gives someone a good APM. In a ZK team game, where stuff is easy to manage both in terms of the number of stuff you control, and in terms how complex the UI to manage it is. So it's natural you won't get too high an APM. I don't think I ever saw a >200 APM in Spring (I'm one of the best BA players), ever.

    But now compare to something like AoE2 or SCBW, where you have to control things with a lot more commands. Every half a minute you go through your production facilities, assigning a new unit to them for example. To move a big group of units you go 1a2a3a (without necessarily needing to move your mouse much at all while at it) instead of a single selection and single line command. These command sequences are actually pretty easy to do for anyone given a bit of practice (remembering to do them and controlling the more precise stuff is hard, though, even mechanically).
    If you take an easier UI, the 9 clicks you made to move those 30 units don't really translate into 2 clicks for moving those units and then 7 clicks for finer micro - that's just a much more complex process, requiring much more dexterity than the menial 1a2a3a tasks.
    APM values between different games are not comparable. And then you must realize that a lot of peoples clicks are meaningless spam that could be cut away with no ill effect.

    Also consider that the people who play ZK are simply just not that in touch with the game. They don't play 1v1 on a limited set of maps 8 hours a day, if they did their APM would skyrocket eventually since the strategies and tactics would just turn into their second nature.
    I can honestly say that ZK players cannot "keep track of the strategy easily", if they fully did that they'd play better. Watching Spring games you can constantly see people forgetting stuff and doing stupid things if you watch closely. This is not to deride them - it's genuinely hard thing to do.


    And as the spreading units part... What the ****? This is not a thing that's trivial to do just because you have good UI. The more complex the way you need to treat your units, the more finetuning you can give it (without increasing APM requirement, too - a focus on WHERE you click comes apparent). It's just really apparent that having to intelligently spread units, instead of getting away just clumping them, is interesting. It already happens in ZK/BA damnit, just because controlling unit formations is easy input-wise doesn't mean it's trivial!


    So the problem is that the long-range AA tower is not cost effective (we assume this is always true). There's several solutions to this. You could tweak the AI so that they will discern between which targets to shoot automatically. You could buff them in a way that this spam is not cost-effective anymore. Or you could just take it on yourself to put the screamer on Hold Fire, put it to a control group, and switch the status only when an air attack is imminent. The last, micro-dependent solution could also be coupled with buffing it up in the cases it is used correctly like this.
  17. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Much simpler solution, what the AI lacks is the awareness of "how many DPS will units have if i advance further".

    Gunships are valid targets (and the AI should never think otherwise), but the AI should refuse to auto-chase if it knows about defenses which will kill it before it is able to do any damage.
  18. jseah

    jseah Member

    Messages:
    129
    Likes Received:
    2
    RE: Berkeley Overmind
    Wouldn't the opponent just get valkyries? Clumped mutas die horribly to any AoE. IIRC, that was kinda the point of the valk.

    The way I heard it described was that even valks (and Archons) lost because the AI would see the enemy have AoE and just scatter the mutas enough to avoid AoE.
    But breaking focus fire is also interesting. If the Marines had Fire Control to guide their shots towards the weakest muta in range and clumped their targets automatically, do you think that would turn the tide?

    RE: APM & Strategic Awareness
    Fair enough, we always have room to improve. If you mean "decisions per second" as the actual value of which APM is just a poor indicator, then yes, that is fine.
    Although the point of a powerful UI is to decrease the APM count needed to make a certain number of decisions per second. Instead of clicking once per unit to line them up, you can make line commands that give effectively twenty commands in one.

    Instead of continuously giving orders to kite, you can give a Kite-Attack command and just herd the strayers back into formation. (or forget about it)

    RE: Spacing and Focus Firing
    I don't see how deciding how much to space is a factor. I've never had to think about the spacing between my januses in BA (back when I still played them). When you had five of them, I would control nearly every salvo. When you had thirty, you just threw a line at the enemy and hoped for the best (and remembered to retreat them when they were reloading).

    The problems I see with weapon scaling across unit densities (the T3 AA missile turret in SupCom doesn't scale well in increasing tower density against non-experimentals) is, I suppose, a design decision of the units. Then you design the unit mechanics to acheive this. Have some mechanic for a unit being less efficient if more copies of it are around if that is what you want. (eg. a continuous DPS weapon with high AoE also makes hit units more resistant to the same attack again, stackable; so each additional tower increases total damage less than one tower's worth of dps <- have to think about it some more, I can see problems with the idea, but it demonstrates what I am going after)
    Then you get to retain the spacing problem (do I put them at higher density for less efficiency?) while not making a soft restriction of "oh, you can't manage all of them at once, that's why the unit sucks".

    Because the point of a powerful UI is to make your units understand and execute what you want them to do, with as little clicks as possible. Reducing a 1000 APM equivalent individual target assignment problem into a single command is just a very efficient example of it.
    You can babysit one screamer, maybe. Ten screamers is impossible (although I haven't seen a legit ZK game with more than 2). The worst bit is that the decision to shoot indiscriminately or conserve shots can be approximated to a state toggle, so it *should* be a state toggle.

    Your point about the Screamer hold-fire only highlights the problem. I do NOT want Screamer-firestate reaction times to be an important factor in the game. I want to be able to tell my screamer "ignore the fighters, I have other towers, blast the bombers out of the sky". And yes, Screamers are incredibly powerful in the AA role when you manage to pull off the targeting for them, so just nerf them if you have Fire Control.
    - Most air players, if faced with a few microed screamers on a map small enough for them to cover it, will just give up and swap to a land fac. There is no way to make cost against Screamers with air if you can't bait them. An argument can be made that since they are expensive end-game dedicated anti-air, they *should* be the be-all-and-end-all of airspace control.
    And sometimes, I just want to go crazy with the Screamer, like when I am trying to keep air superiority against enemy fighters. THAT is a decision that is interesting (is this an actual threat to my Air Sup. or is it just a fake?), having to babysit the thing is not.


    IMO, you do not make a game interesting by restricting the commands players can give. You make the units "understand" what the player wants and the tactics evolve from there. The basic behaviour should just be optimized and whatever is left is the strategy.


    Erm, isn't that my solution? No overkill does precisely that.

    Which targets to shoot is whichever target that doesn't already have a missile rising to meet it.
  19. jseah

    jseah Member

    Messages:
    129
    Likes Received:
    2
    New idea. See first post for details.

    Not too sure about this one. It might not be worth it, but if done right, has the potential to be incredibly powerful. I think.

    Maybe.

    Feedback? XD
  20. thefirstfish

    thefirstfish New Member

    Messages:
    296
    Likes Received:
    0
    I don't understand what you mean - example?

Share This Page