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
    Well I'm not sure how free the neural network is to play around with parameters but I'd guess if you allow the AI to play around with walls it might might come up with uses for walls. If you had a specific use of walls like placing them around buildings and have the metrics to determine if the behaviour was effective it could find that it is effective to place walls around Pelters. It might have to place walls around all other buildings in thousands of simulated games to arrive to that "conclusion".

    Edit:Sorian is calling himself "teacher" to the neural network so he is still very important in the whole process. However once he have found good guidelines for the AI the game can change in patch from patch and he just have to run a couple of hundreds or thousands of simulated games and the neural network will adapt.
  2. gunshin

    gunshin Well-Known Member

    Messages:
    790
    Likes Received:
    417
    The problem is getting the 1000's of games to arrive at that conclusion. and the fact that each change should be minimal, like how far should the wall be placed from a building, what kind of buildings it should be placed next to, what kind of economy should be required before, what kind of risk that location is of becoming under attack. These 4 options alone could total 10's of thousands of testing games. Its definitely the best way to create an AI, but its not very plausible with a small playerbase =/
  3. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    2 AIs can play the game 24 hours per day, they can play at gamespeeds several times normal without the need for graphical displays and computational power is almost free.
  4. gunshin

    gunshin Well-Known Member

    Messages:
    790
    Likes Received:
    417
    yes, but one of the ais will require some fixed strategy. both AI's using genetic algorithms to beat each other will end with bad results(one may still win, but the win needs to be discarded due to the fact that we cannot gauge whether the opponent AI used a better or worse strategy). We need a controlled environment for an algorithm to evolve, otherwise we are just throwing random strategies at each other which will not hold much relevence against actual players.
  5. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    I think that is how it works. I'm pretty sure only one of the AIs used in the simulated game would be trying out random values or algorithm and determining if those actions were good or bad. Based on that it would then chose to use the new values or algorithms if they led to an improvement or discard if they were worse. In the next game the evolving AI could play the same AI again while I think the evolving AI would play the newly "improved" evolved AI from last game if it determined it to have been improved.
    Notice that the AI is actually likely to be different neural networks performing different tasks. I'm not sure how it "chooses" a strategy across several different neural networks but even if it doesn't "choose" a strategy it will refine and improve its' current until the point where it might transform into a whole new strategy. Whether or not it can be able to branch into several different strategies and chose between them I don't know.
  6. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    I agree with @l3tuce . That is absolutely the wrong way to do it.

    I like the discussion in this blog post: http://christophermpark.blogspot.co.nz/2009/06/designing-emergent-ai-part-1.html

    Over the course of that 6 page article he talks about the AI in depth. The AI at lower difficulty levels makes more sub-optimal choices, just like a regular unskilled human player would do.

    Bearing in mind that game isn't anything like PA, so it doesn't really compare. But that's what the AI should be doing.

    I'm worried that we'll get AI like Sins of a Solar Empire AI, which is really bad.

    No offense if anybody worked on that game.

    The AI targets structures by build order, most of it's units won't bypass defenses to attack the system next door, and it's fleet is combat ineffective because it always tries to preserve it's units. Which makes sense in some situations.

    However what happens is you fortify a system. The AI jumps in with an inferior fleet (which could do substantial damage to your units), but because it calculates that it will lose it jumps out of the system again.

    Which means a highly effective thing to do against the AI is to create a deathball. As soon as it retreats, rather than stays to attack, you chase it to the next system, destroy the fleet, capture the planet, and create another deathball.

    I basically play against the AI like I would SimCity or Anno. The AI isn't that sophisticated, so I just play a sandbox game mode in a massive Galaxy for as long as the AI still poses enough threat that I can have a few good fleet battles every so often.
  7. slywynsam

    slywynsam Active Member

    Messages:
    428
    Likes Received:
    150
    My last post got eaten by the page turn, but I think the economic control will only be one way that you can modify the behaviors or 'bonuses' that the AI gets. You can make it play better or worse, cripple or boost it's economy, probably modify it's construction rates or something else.
  8. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    An economic cheating AI does not make a smart AI. That's the AI from Sins of a Solar Empire. Which is a challenge at the beginning of the game.

    But according to this post of the Sins of a Solar Empire forums, speaking about the Vicious AI:

    That's not a smarter AI, that's not a harder AI. It means you win by targeting all the bugs in the AI's programming. If players are doing that, the AI isn't good enough. It's not a measure of "The AI is so hard that players have to resort to cheating to beat it" - it's a measure of "How good am I at programing an AI that doesn't allow players to exploit it".

    It's just like in RPGs like Skyrim, when you take advantage of the bad pathing of an enemy to beat it.
    Culverin likes this.
  9. slywynsam

    slywynsam Active Member

    Messages:
    428
    Likes Received:
    150
    I think you somewhat missed the point. I don't know that there will be a 'setting' for AI(though there probably will be). I would imagine that eventually(if my understanding of how the AI will be implemented is correct) you will be able to 'customize' the AI to be as hard or weak as you want, or as smart or dumb, or as rich or poor, etc. You will likely be able to control different parameters to create a 'custom' AI combatant.

    Economic control is only one of the possible ways. You could create a dumb AI with the same income as you(So they can have the same amount of units and buildings that you do but make worse decisions with them), or have a really smart, very tactical AI who is poor, to give you a better chance to beat it.

    I could be completely off my rocker here and be entirely wrong, but that's my understanding of how they want to do it.
  10. kryovow

    kryovow Well-Known Member

    Messages:
    1,112
    Likes Received:
    240
    i think the new single laser turret is also a good thing that the ai could build next to new metal spots after claiming them
  11. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    Hopefully... there aren't many examples of AI done well in games.

    You're examples are still economic though.

    The AI can control:
    • economy
    • production
    • units (counters/no counters)
    • defense of base
    • attacking of others
    • expansion
    That would be cool, because often games just make the AI really really stupid with an amazing economy, and it stuffs itself up. There was one game where turning up the difficulty actually made the game easier, because the AI raided you more, sacrificed it's units in attacks against you, and didn't have them at its base when it came to defend.

    If they are going to implement it so that you can change behaviours over numerous factors, that would be really really awesome.

    The issue isn't as clear cut as "the AI builds too few fabbers". The issue is that the AI currently lacks behaviors. Building lots and lots of fabbers isn't always going to be the best solution. It increases build power. But making a slammer or a leveler pop out of an advanced factory near an impending attack is much better.

    The AI doesn't recognise that it could use more production capacity, but consider these games:



    In the later game, peter411 makes an unconventional ant rush build. My belief is if he'd used bots at first and switched it up to ants later, he'd have done much better. He appears to have lost the game because he didn't develop eco, but in reality he lost the game because the other player was further ahead in "time". If those first early raids had succeeded, more than likely he would have done a decent amount of damage to the enemy base.

    Considering the AI:

    If it has a good start location, it can create a reasonably large base in a relatively short amount of time. It uses it's fabbers effectively, so an early rush build is particularly potent from the AI.

    The problem is it doesn't have any different behaviors in evidence at the moment. It lacks the tools to respond well to a range of given situations. The lack of fabricators is a quick, easy and cheap fix, but it doesn't actually solve the fundamental problem.

    The AI doesn't seem to "understand" what developing the economy means..

    It doesn't expand across the map unless it needs the space to expand its main base, so it doesn't claim mex spots. It also doesn't spread production across the map, and it doesn't do a good job of defending what it has.​

    If the planet generation favors the AI enough, it gains enough mex to advance. Otherwise it sits in its base with a couple of factories and starts rushing you, ineffectively.​

    It seems from observation that it needs a minimum metal income before it starts upgrading to T2. If it doesn't start building a substantial number of T2 units, it's not a threat, because it never builds advanced units or nukes.
    It doesn't increase production capacity. Some people observe it's limited to 4 factories and one advanced. I myself have seen 10 factories, a couple advanced, a nuke and orbital. One game it had 4 nuclear launchers queued up in a row.

    The AI also lacks a defensive posture - best form of defense is offense, always. As such it will send troops to attack rather than fend off an attack.

    The AI doesn't use intel it gathers intelligently.

    It needs to stop placing advanced power generators if there's a death-ball in it's base, and instead build base defenses. (Seen today between Ai 2 and Ai 3), or pull back units to defend its base from a massive tank assault​

    It has no ability to switch strategies - if you play on an oceanic map, the AI should be able to do substantial amounts of damage with its air-force. It needs to concentrate on its strengths rather than trying to fill an entire continent on an oceanic planets with ants and succeeding beautifully, while building a token air-force for defense.

    As already stated, it needs to be able to differentiate between economic development, unit and structure production and defensive deployment.
  12. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    The problem is that without fabbers the AI won't do any of that because you'll out-macro it and just win. More fabbers is the key to allowing the AI to do all that other stuff as sorian develops its functions. It must have a strong base economy. It can't expand without the tools to do so and that means lots of fabbers.

    And how was Kyro able to respond to that rush? By having lots of fabbers, getting a strong economy and being able to spam factories. Lots of fabbers is a key base part of the game. Kyro's strong economy is why he wins the commander duel, he had energy and pete did not.

    This is very early days AI is my understanding, so I think much of what you want is coming, but sorian has said he's putting in the low level stuff first before the strategic thinking happens. I'm looking forward to the neural network being implemented and replacing the hand-crafted values (which is why the AI doesn't recognise a lot of threats, because they have no value), but I'm guessing sorian wants the game mechanics closer to complete before doing that otherwise he'll be constantly retraining.
    Last edited: November 4, 2013
  13. stormingkiwi

    stormingkiwi Post Master General

    Messages:
    3,266
    Likes Received:
    1,355
    I think the most important question we gain from this thread is: Is the AI a he, a she, or an it?

    I know where you're coming from. But the issue isn't as simple as the AI building fabbers before everything else. There isn't much that drives the AI's interactions. If you leave it to do it's own thing, some iterations will happily build 3 factories, sit in its base and spam bombers, advanced bombers, fighters and tanks. I observed a game on an *oceanic planet where each AI was on the same super continent. One AI did just that and was not harassed thanks to being in a cul de sac, another AI pushed pink onto his own island and left him there, orange moved his bots past blacks commander and destroyed him. The rest of the border skirmishes were minor, there were occasional base raids, but none of the AI made serious moves to attack another. Shame that black got killed, because black, orange, purple and brown were interacting with one another quite a bit.

    *oceanic planet - there were bodies of water which interfered with movement, which focused the action. I think the sea had 50% coverage. lots of land, every spawn point was on land. There were lots of necks between sections of continent so moving armies ran into one another

    The whole reason that build power is needed is to rapidly expand, set up long build queues, fortify your mexes and so on. As it is, the AI doesn't build with the aim of expanding, so all the extra fabs will do is get him to the point where it decides to sit still, chill out and fill a continent with bots until your graphics card melts.

    The AI has a horrid tendency to get fixated on stuff as it is. I basically reduced his base to his commander, 3 walls and a laser turret, then sat back to see what he did.

    First two buildings up - orbital factories.

    I agree that the AI needs more fabs - but that's just a nail. He needs the toolbox to actually implement them correctly.



    I kind of assumed that Kyro wins the commander duel because of lag. It takes a second to turn your entire base off, and at 100+ APM....

    As for the economy, that's part of every RTS game. It's always the key to victory. Rushing is also the same game - you have to get an army to your opponent quickly, you have to do sufficient damage that you shut down his economy, which is incredibly difficulty in this game because of the streaming economy. You need to do so while not sacrificing the development of your own. You then need to get your economy back on track.

    Pete does a bad rush. The point of a rush is speed of deployment into the enemy base. He wastes a lot of time deploying his tanks, choosing the worst rushing unit in the game, completely sacrificing his economy in favor of rushing too early. The tactic was sound, the execution was not.



    My understanding as well. The neural network is a style of swarm robotics, correct? When I hear neural net I think of Freelancer, or I think of the AI running on multiple computers in the cloud somewhere.
  14. spazzdla

    spazzdla Active Member

    Messages:
    319
    Likes Received:
    135
    My first bot factory never stops pumping out fabbers lol.. Well maybe when I reach some crazy number but even then I find them very useful for procing, continuing to expand or replacing a destroyed engi force.

    On thing I've noticed which might help the AI is get the first fabber to assist the Cman building energy, however ya, first bot factory, army of fabers.
  15. ghost1107

    ghost1107 Active Member

    Messages:
    365
    Likes Received:
    181
    This is an amazin thread, it realy makes me laugh.:D

    AI is to strong,:p it doesn't care about managing eco, tactics or expanding. It's not even finnished!

    You don't know what Sorian is capable off. With a mod he made a monster out of a normal AI. Even though that AI cheated a lot, he couldn't help it it was just a mod. Currently they gave him free controle over the full creation of the AI. When this AI is finnished I'm pretty sure it can give many players a run for there money the first couple times when it is not cheating.

    However, Sorian is a good guy. He'll atleast make it so what the AI isn't a scouting master.
  16. Quitch

    Quitch Post Master General

    Messages:
    5,885
    Likes Received:
    6,045
    Neural nets as implemented by sorian are about the AI making optimal decisions with its units given the current circumstances e.g. fight or flight. This is based around unit stats so that as the game is rebalanced the AI understands and makes intelligent decisions based on the new stats.

    Well... yeah. Because this is a beta and tons of AI elements haven't been put in yet. I mean, the AI doesn't even "see" enemy navies right now, and two patches ago it didn't even use land units. It's only just discovered ants!

    This is why I drew attention to the fabbers, because fabber behaviour is in, but it wasn't making enough, where as I'm sure much of the strategic thinking will change as sorian works on the AI and therefore it's not worth getting hung up on it right now (especially with basics like threat values still missing, we're not even at the neural network stage yet).

    Fabbers are key because it's what players do first. Pump out fabbers, expand, become huge and win. It's one of the keystones of the game right now. If the AI doesn't do fabbers the AI ain't gonna be doing nothing.

    You only have to look at SUPCOM 2 as an example. Sorian did some great work improving that AI when he joined GPG and Hard and Cheating AIs did some really great stuff with drops and platoon micro. But when you played Normal you didn't see any of that, because the AI had a terrible opening game and you out-expanded and out-macroed it so quickly that none of that cool behaviour mattered because the AI was dead before it got a chance to use it.

    So, fabbers, because the AI needs to expand and get an economy before it can do anything of the things you're talking about, because this is the foundation of how you play this game. Lots of fabbers. Plus, as sorian said, it's an easy quick win.
  17. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
    @stormingkiwi The AI expands when it needs metal or space. Unfortunately, there is a bug in the live build that kills the AIs eco. Just a minor typo that didn't get fixed in time for live.

    AI reactions and strategies are not in yet, as you have seen. There are more base level things to work on before I get to that.
    stormingkiwi and Quitch like this.
  18. garat

    garat Cat Herder Uber Alumni

    Messages:
    3,344
    Likes Received:
    5,376
    Sup Com 1 AI didn't cheat either, though his mod did make a monster out of it. :) We specifically had a mode called "Cheating" if you wanted an AI that would cheat.
  19. ghost1107

    ghost1107 Active Member

    Messages:
    365
    Likes Received:
    181
    I know. I have had the pleasure of fighting and killing the mod+cheating variant. It toke hours, it was never easy and I've died against them more then I'd like to admit. Good times, good times. :D
  20. arsene

    arsene Active Member

    Messages:
    166
    Likes Received:
    114
    There was a project someone did for starcraft 2 where he used genetic algorithms to come up with builds. He would state a goal, such as "I want buildings a1,a2,a3.. by time x1,x2,x3.. & units ..." and the program would come up with a good sequence to attain these goals. It was possible because you can assume that none of your units have been killed and then express the game state with a few simple functions without needing access to the game, so you could do a million different runs quickly. It had limited uses for competitive play, but it was capable of generating quite strong timing attacks.

Share This Page