A.I. too overpowered

Discussion in 'Planetary Annihilation General Discussion' started by antonyboysx, October 30, 2013.

  1. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    If the gamespeed in PA was cranked up ten times even a rudimentary AI would beat a human. The game should not be forcing you to execute actions very quickly to perform optimally IMO.

    The exploits you provided from Starcraft will not apply in PA because of the game mechanics.
    Dropship micro as seen in Starcraft can easily be thwarted by having transports descend to pick up units. The transports would then take time to pick up units and they might even be targetable by ground units then.

    The Zergling dodging micro as seen in the video will be much harder in PA.
    1. Turn rate and acceleration
    Zerglings have instant turn rate and instant acceleration. Units in PA does not. Even if a script or the AI is able to predict where shells will land units might not have time to stop, turn and accelerate away from the targeted unit or location.
    2. Targeting access
    We don't know if scripts or AI will have access to enemy targeting. If you look carefully in the video you will see that the Zerglings start to move away from the targeted Zergling even before the Siege tank has fired. If scripts are not able to have direct access to the targeting nor projectiles paths it becomes impossible for the script to know where the shell will hit.
    3. Simulation complexity
    Projectile simulation, unit acceleration and turn rate makes the calculations much more complex. Finding the optimal solutions becomes a lot more computationally heavy. If the AI have to basically run big parts of the game simulation in advance to dodge bullets for many units it will require massive CPU power and will also make the algorithms much more complex and harder to grasp for a programmer.
    4. Latency
    If the scripts or AI is run locally on your machine and not on the server it gives a certain latency which can make projectile dodging impossible.
  2. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    APM is always going to matter in an RTS.
    stormingkiwi, l3tuce and spazzdla like this.
  3. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    APM might always matter in PA but that doesn't mean that we could, and in my opinion we should, strive to make the difference of APM the smallest determining factor in a game between 2 players.
    You could easily make an RTS where Actions Per Minute doesn't matter. Just limit the number of actions players can perform in a minute.
  4. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    Other exploits are possible.
    • Bots can turn and move very quickly, and unlike Starcraft siege tanks with their instant blasts (the AI is anticipating their attack animations), PA artillery and all other units have a slow projectile speed which can even be dodged by human players.
    • Units can shoot beyond their normal range if you have them shoot at other allied units. With human players, it's probably not that serious of an issue because they can't give different orders to individual units quickly enough to do this accurately or in a timely fashion (you'll just get the entire blob spraying wildly). An AI can.
    • The planetary maps mean an AI can harass you from more directions than you have the attention span for, and can micro scouts effortlessly to have vision on everything you do.

    Complexity: An AI doesn't need to do everything perfectly. It just needs to do them statistically better than a human, and that bar is set pretty low. Likewise, an AI can compensate for lag and anticipate threats further ahead than an Australian ping, so I don't see that being an issue.
    l3tuce likes this.
  5. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    APM would still matter, you have to be able to perform at that limit or be at a disadvantage.
  6. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    Well this goes back to if scripts and AIs have access to the locations of projectiles and enemy aiming.
    Even without it you can have basic automation like in Zero-K where raiders will dodge back and forth at random if that behaviour is enabled.
    Also it is something you have to think about when balancing. How useful and successful bullet dodging can be depends on the acceleration, turn rate and speed of units compared to the speed of projectiles.

    This have been fixed in Zero-K by disallowing units to fire in the air and only aim at ground meaning that they will hit the ground. It can be fixed if it is considered to be an exploit but it is also due to that unit ranges are set arbitrarily. It would be cool if unit ranges where only restricted by their physical attributes.
    This is why multiple monitor support and/or minimaps are so important. It allows you to keep track of several battlefields at once but it is also a question about game design. How important should multitasking be and how is the importance of APM kept low on circular maps where you can attack the enemy from all directions?
    Scouts can be given automation to stalk enemy units and stay out of enemy weapon ranges much like automated kiting works.
    Programming AI or scripting harassment is quite difficult. You need to analyse goals, risk, reward, raider survival or sacrifice and how it all fits to your strategic goals. Do you target fabbers, factories, mexes or something else?

    Statistically better than what human? A pro, an average player or a newb?
    A computer can perform certain tasks many times faster and more accurate than a human. That is why we let them pathfind the map, lead target on their weapons and stop to fire when they come in range of the enemy. I'd rather not have to do that manually.
    Also I don't see much difference if you play against an AI with no latency on the server or a human on the server. Both have sort of an unfair advantage in that regard but hopefully that won't matter so much unless PA gameplay promotes very quick actions and twitch micro.
    Quitch likes this.
  7. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    Then you set it at the level at which you think the game should be played(alternatively you could try to have a system where the number of actions you can perform depends on how many actions your opponent have performed).
    I'm not saying that your actions shouldn't matter I just think that all your decisions should matter. The game should be about the one who can make the best decisions and not about who can perform the most actions.
  8. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    APM is linked to decision making. The faster you act the more decisions you can make and the smaller the scale you can make them on.

    There's no getting away from APM in real time gaming. You can decrease its importance, but you cannot remove it.
  9. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    If you make too many small scale decisions you might lose track of the whole and I don't think that PA gameplay should focus on small scale actions.
    Sure an AI can potentially make a huge amount decisions but can it implement those decisions coherently according to a strategy and shifting strategic goals?
    Can you?

    But yes. APM will always be in an RTS in the same way that you will always perform actions in an interactive game.
    Last edited: November 5, 2013
  10. tatsujb

    tatsujb Post Master General

    Messages:
    12,902
    Likes Received:
    5,385
    good luck pulling any of that off in a simulated projectile game.

    with procedual terrain flowfield, pathfinding....
    no, the best AI in PA will be dependant on having the most perfect eco. then there's things you can do from there.
    Quitch likes this.
  11. l3tuce

    l3tuce Active Member

    Messages:
    318
    Likes Received:
    76
    I think I should clear up, when I talk about APM, I am mostly talking about how quickly the enemy expands it's economy. It dosn't have to switch between playing sim city and microing raids so in theroy it can have a perfect economy that recovers quickly from damage without sacrificing aggressiveness.

    Once you have that, you just program it to slow down the rate of it's expansion so less skilled players can keep up.
  12. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    It's mein Gott. XD

    No it won't. The most perfect economy is AI income x1000.

    That's not an indication of the best AI. If anything, that's the way that AI's in most RTS games are programmed.
    The strategic AI itself is really stupid and easy to exploit.

    In most games with walls, you build a wall with a gap in it, and put your entire army in the gap. The AI always attacks the "weak point in the wall". It doesn't matter if it has a better economy than you. You win because you're smarter.

    Just to weigh in on the APM thing - the computer is slowed down for the player's benefit. We wrote code for a computer to play Uno. The computer can simulate 240,000 games of Uno between 4 players in a little less than 30 seconds. I imagine that the computer can simulate the entire game several hundred thousand times faster than it appears to play the game. Depending on clock speed. The AI can make several decisions per second. Probably scaling that number up into the hundreds or thousands.

    The AI will always make more decisions per second than the player. It has to, or else you take away one of the core advantages of the CPU. Players beat CPUs because CPUs are inherently flawed.

    From what I've observed, if you give the AI a decent starting position and keep the current economy management (one fabber for expansion), the AI can produce more than enough units to finish the game very quickly for the human if it moved those units into the humans base, rather than sending them right past the base. I've had some terrifying numbers of AI units roll past by base in the first 3 minutes.
  13. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    A game of PA is a lot more complex than Uno, chess or any boardgame. In Uno or chess you can simulate many thousands or even millions of moves in 1 second. How many possible moves can a single unit in PA do? Should you consider a move command to every single spot on the planet a separate move? When the AI place a building should it consider every possible place on the planet? When placing turrets, should the AI consider Line of Fire obstructions such as hills and mountains and do that for every possible location on the planet? How do you maximise firepower against 1 target, many targets and what if the enemies are moving should you then simulate that?
    Trying to solve the game with brute force doesn't work for a game like PA. There are too many variables.
    Quitch likes this.
  14. Culverin

    Culverin Post Master General

    Messages:
    1,069
    Likes Received:
    582
    In terms of hardware vs humans.
    Computer hardware beats humans hands down, for APM, for micro and for calculating the long term predictions for the game.
    I think "cranking the game speed up to 10" is a very good indicator of how we can't keep up with APM.
    So any semi-competent AI must have the APM throttled then no?


    So this leaves decision making is the actual thing we're talking about.
    A good AI on max for won't have any predictable decision making bugs.


    From the player's perspective, not understanding how to expand for the metagame isn't just a minor bug, it's just a bad AI.
    Not understanding how to deal with a wall (tac missils, shelling, multi-prong engie reclamation ala D-Day), that is more of a real AI programming flaw not understanding either it needs to eliminate it as a choke point, or not knowing how to attack it.





    It made me think of this article I read a while back:
    http://arstechnica.com/gaming/2011/...ermind-won-the-2010-starcraft-ai-competition/
    You guys should take take your time to read it, it's very interesting.
    And that's just Starcraft 1.
    PA is a whole different ball game. More units, higher cap, spherical map.
    (And we're all hoping for the multiple elevations we saw in the concept renders)... ;)



    This thread is very interesting.
    I'm hoping @sorian will get to do another livecast on AI training when the day comes.

    I wonder how issuing "Area Commands" will affect the AI.
  15. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    Computer hardware is about as smart as your average toaster. It does nothing unless it runs actual software.
    Computers suck badly for predicting a game. Even if the game simulation can be ran at 100 times the actual gamespeed the complexity of a game like PA means you it becomes very hard to predict the outcome of the game as any given gamestate can branch out to millions if not an infinite number of games in short perioid of ingame time. Even chess haven't been solved.

    Just because it got massive APM doesn't mean it can actually use that for any good. You would also have to define what a semi-competent AI means.
    Also if the game isn't about quick actions but about making good decisions it might not matter that the AI have alot of APM as long as humans have enough time to make enough good decisions.

    Yes and the complexity makes it all harder to make a good AI for the game. I'll get back when I've read the whole article but i gotta go for now.
    Quitch likes this.
  16. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    I'm not talking about the computer "solving" the game. I'm talking about the game as it relates to the AI. The AI doesn't have to deal with graphics. As far as the CPU is concerned, the entire game is described by numbers, so it can model the game and play it at highly accelerated speeds.

    The issue of AI APM isn't to do with it making decisions, because it's always going to do that much faster than a player can, and the issue isn't to do with it managing micro, because it's always going to do that much better than a player can (which is the point of the Berkeley Overmind). AI APM is kind of irrelevant.The only way to limit the AI's APM is to limit it's clock speed on the decision making algorithm, and that's a poor way to do it.

    The better way is to develop it in such a way that it makes good decisions most of the time, but so that it makes mistakes in a human-like manner (like how the Berkeley Overmind defeats Oriol when he slightly miscalculates).

    The point about Computer Hardware beating humans is true. The human brain's clock speed isn't as fast a computers. You can have identical mathematical algorithms, and the human will run the maths much slower than a computer does. It's kind of why we invented them. Perfect AI would never make a mistake, it would always choose the most optimal based on what it knows.
  17. Culverin

    Culverin Post Master General

    Messages:
    1,069
    Likes Received:
    582
    Yes, that part isn't about decision making.
    But if you consider the actions of "move, attack, patrol, guard, camera movement" restrain orders to only those to "units visible by camera", if each you assign each of those actions a cost, then you can limit how many actions the AI is allowed to issue per minute.


    If we had a truly unhinged AI with not APM cap, in SupCom, it would be able to micro each and every single mantis to dodge each and ever incoming T1 artillery shot.
    You might have heard TLO mention how if he had the ability to spam APM, he would and could micro every single unit to take advantage of the physics based sim,


    The AI already has a much intake of simulation data than the player.
    If we talk about the AI "intelligence", then we are talking about the decision making.
    A good one would be able to beat the player within the human realm of under 200ish APM.
  18. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    You're not playing a human. You're playing a CPU. There's no point nerfing the CPU to playing the game like a human by restricting what units it can control. You're better off writing code which gives every individual unit some AI to reduce the micromanagement, because you'll never win the micro game against the CPU. If you're playing the AI, you're playing the macro game.

    Who's TLO?

    I don't know how I stand on AI micro - I guess if the AI can micro units so that they don't take damage against a particular weapon, then the weapon needs balancing so it is actually effective.
  19. arsene

    arsene Active Member

    Messages:
    166
    Likes Received:
    114
    There is overlap between the strength of an AI and its ability to mimic human decision making, similarly there is a correlation between its strength and the ability to scale the AI down to a desired playing level for some individual player.

    The designers can prove me wrong, but I imagine that for their purposes the strength of an AI is a means to an end to achieve the two goals that I mentioned in the previous paragraph. As a designer you typically want an AI that is fun to play against, you don't care about winning any AI competitions or about creating an AI that is as strong as possible no matter that you are displaying highly unnatural play.

    It might be true that the ability to exploit micro behaviors by an AI gives meaningful clues about undesired behavior in the game, but I strongly doubt it. Typically the strength of an unlimited AI lies in being able to give proper care to every individual unit even despite numbers. Human players can't execute with an infinite number of actions with perfect precision and will not be able to control units in multiple places at once in this fashion. Even controlling single units, the human player will have to look at his base for time to time and will slip up eventually. And you have to program the AI to begin with, which sort of defeats the purpose of using it to discover something new.

    I think there is some naivety here, sorry. If you don't want control demands to exist in the game then you should start playing something else. Real-time strategy in the style of the Annihilation games will always be able to reward multitasking by attacking in different places, and because of the limited range and mobility of units, giving more attention to them will be very useful for you if you want to win. You can play a game of whack-a-mole and try to smash down every micro behavior you discover, but I don't think you want to succeed at this because in all likelihood you will end up with a shell of a game with no interesting units at all. This game will never be chess, even if you succeed in turning all units into pawns on a strategy board you have no guarantee that there will be interesting strategic decisions and no guarantee that multitasking will not reign supreme.

    High level strategy involves planning, but the ability to translate those plans into actual results in the game is what differentiates strong players from weak ones. The high level ideas themselves are often relatively trivial and easy to adopt at a shallow level, understanding it at a deeper level that goes beyond replicating some phrases that you likely did not even come up with by yourself.
    This is why mechanical demands are very useful to have: in chess you are forced to come up with a game plan, some candidate moves and then do calculation, this comes at a cost because you have limited time for this. If there was no need for calculation your ideas would never be put to the test, the need to prioritize devoting time to certain variants over others allows you to implement and validate your higher level plans.
    In a real-time strategy game attention also comes at a cost, with rote practice you will have more of it and will have smoother execution (and even so, better execution typically comes from being able to think faster, not click faster), but nevertheless the ability to decide what area of the game you need to give your attention to is direct evidence for your true level of understanding, more so than your ability to copy some build order you saw someone else do.

    Also, with higher levels of execution new units become viable which opens up new strategies that are uniquely tailored to your level of ability.

    Obviously PA is its own style of game with more focus on troop movements, a desire to have less strenuous control requirements and a grander scale of operations. You need to calibrate the game with this in mind. What I dislike is the dogmatic view that with control requirements the game is a mindless click-fest and that all of this should be eliminated, seemingly no matter the cost.
  20. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    Running the game at accelerated speeds might be good for AI training but it doesn't work in a real time game. You can calculate short term analysis for short term goals but it is too costly to simulate the game to determine long term goals. Even if the AI creator reduced the simulation to bare bones there is too many varying possible outcomes to brute force a solution far ahead in time. This isn't Uno or chess.

    I say create the strongest AI possible and then scale it down. It took the Berkeley team years to develop their AI. I don't think PA will have such a capable AI in years until even further AI advancements have been made.
    If we actually do get an AI that is able to beat top players I think that would be a good thing for the game as you could review the AIs play and the AI might even find exploits and imbalances.


    I bet a calculator can count faster than you. It doesn't make it smart.
    A computer is stupid. A computer is a tool. It does exactly what you tell it to do. Even if todays computers would have the computational power to match a human intellect I'd say that todays AIs aren't developed enough to match us.

    Edit:In a strategy game you are dealing with unknown factors and that is one of the reasons why it is hard to make an AI for an RTS.
    Making the optimal choice might be impossible if you lack intel. Even a perfect AI shouldn't always make optimal choices in an RTS because of that.
    Last edited: November 6, 2013
    Quitch likes this.

Share This Page