How many AI...?

Discussion in 'Backers Lounge (Read-only)' started by Nayzablade, April 2, 2013.

  1. Nayzablade

    Nayzablade Active Member

    Messages:
    206
    Likes Received:
    84
    Howdy.

    My friends and myself rarely play pVp in games as we prefer the whole "Coop" experience :)

    Uber has said that the game will have 40 player support, which is great! So I was wondering if that would mean we could create a game with 37 AIs vs 3 humans...?

    I am interested in how the AI will be handled as well eg: Handled by the host computer, prorated up amongst the players or from a dedicated server..?

    A comp stomp of those epic David vs Goliath proportions would be rather excellent if at all possible.

    Anyways, if anyone could clarify this (see: point me to a post that I missed, or answer the question) that would be great.

    Regards,
    Nayzablade
  2. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    If you're going to use 37 AI's then the AI code should surely be optimized so that you don't get additional overhead for each additional AI beyond the amount of units it has to use.
  3. AusSkiller

    AusSkiller Member

    Messages:
    218
    Likes Received:
    0
    I'd be very surprised if there's any limit to how many AIs you can have, other than what your server's hardware can handle. I doubt you'd be able to run more than 10-15 on a high end desktop but we'll have to wait till it's done to find out for sure.
  4. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    Yup, You'll always be limited by the hardware of the server, what are the requirements for those 40 player games? we don't know fully yet as there doesn't seem to be a full on "playable" game quite yet, based on what we've seen they are really close thought.

    Mike
  5. yogurt312

    yogurt312 New Member

    Messages:
    565
    Likes Received:
    2
    Was it TA that ran AIs on the clients computers so you could have 3 AIs per player?
  6. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    Yes. But PA will be server based so all 37 AI's will run on the server. The entire sim in fact.
  7. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    But since the server reacts to client requests, there's no technical reason why you can't run AIs client side.
  8. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    And there's no reason you can't dish out other parts of the sim to the clients either but they're not doing that either.
  9. Pluisjen

    Pluisjen Member

    Messages:
    701
    Likes Received:
    3
    There's actually a bunch of reasons not to dish out other parts of the sim to the clients, which is why they're not doing it.

    But running AI locally... that could be interesting. Assuming, of course, you have the client-side hardware to have enough spare cycles to operate it. Because if you start lagging, any AI you are hosting will also start lagging.
  10. yogurt312

    yogurt312 New Member

    Messages:
    565
    Likes Received:
    2
    Its a way of maximising the amount of grunt that's happening to give the most AI's possible in a single game.
  11. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    Please, list them.

    Also, you needlessly assume that AI is part of the sim. Sure, it's been that way in previous engines, but doesn't necessarily have to be that way. Are you, you keyboard and mouse part of the sim?

    The only reason why I can think of not letting AI's client side is that it potentially allows someone more information than they rightfully should have - the same mechanic that allows intel exploits in P2P architectures.
  12. torrasque

    torrasque Active Member

    Messages:
    337
    Likes Received:
    36
    The client/server architecture of PA is made that the server only send you what you need.
    What you need is what is on your screen, plus some notification.
    Making an AI locally mean that you would have to deal with those human restrictions instead of having the state of the game at hand.
    It could add quite a lot of difficulties to the programming.
    Just as an example, take in consideration that the pathing is done on the server. You would have to redo it on the client...
    Another downside would be the bandwidth consumption. It would consume as much as a human while it consume nothing on the server.
  13. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    You wouldn't need to re-do it on the client for an AI. That's daft.

    Consuming nothing on the server is exactly the point! A client-side AI doesn't put any extra load on the server.
  14. Pluisjen

    Pluisjen Member

    Messages:
    701
    Likes Received:
    3
    Actually that's an interesting point against running the AI on the client. A lot of the path-finding is done on the client... in the user's head. Running a local AI would require a lot more information, because the AI needs to calculate a lot of paths to determine what his next move will be.

    Sending the actual move would be easy, but calculating what that move was going to be requires a lot of extra work for the client, since the client doesn't know anything about path-finding, which means the AI would be playing blind.
  15. torrasque

    torrasque Active Member

    Messages:
    337
    Likes Received:
    36
    So tell me how you would do it?
    Or you think you can do an efficient AI without pathing?

    As I said: it would put an extra load on the server connection bandwidth. I'm not sure it's gonna end cheaper.

    Keep in mind that PA is not simulated like TA or SC.
  16. BulletMagnet

    BulletMagnet Post Master General

    Messages:
    3,263
    Likes Received:
    591
    We're not talking about the AI for individual units. We're talking about the high-level AI that fights as a plays as a person would. All the AI does is say "attack that thing", the command is sent to the server, which directs units in the sim to go fight things.

    How much bandwidth does one extra player consume?

    That's roughly how much a client side AI consumes. If you're concerned about bandwidth with AIs, then you should be equally concerned about 40 man games.

    If you said it increases client bandwidth; you'd have a very good point. Since a client-side AI is equivalently a person, a player with an AI would use the bandwidth of two players. That might be a problem, we'll find out in the alpha.
  17. Pluisjen

    Pluisjen Member

    Messages:
    701
    Likes Received:
    3
    But how would the AI decide to give that order? It doesn't have any information about game state beyond the current location of each unit, which is useless to it if it cannot calculate how far they are apart. Remember that humans can look at the visual representation of the map and deduce from it how far units are apart and base orders on it. The AI cannot, it needs full pathing information on the entire map to be able to make an informed decision about what orders to give to a unit.
  18. AusSkiller

    AusSkiller Member

    Messages:
    218
    Likes Received:
    0
    For an AI to work it needs a lot of information humans take for granted, for instance we can tell just by looking at something where it is and how to get there, but an AI cannot. Because of that an AI needs much more information such as complete path finding results, it needs to know about all the players and units it could know about unlike humans who only need to know about what they can see because they remember, predict, and extrapolate the rest, and it needs to gather up all sorts of other information about the simulation to make its decisions and so it really needs to have full access to the simulation to be able to run acceptably. Since the simulation for PA is said to run mostly on the server it's unlikely that it's worth running the AI on the clients as all the data about the simulation the AI would need will create a massive increase in bandwidth well beyond what a human player would need.

    Running the AI on clients could easily rule out pretty much any kind of large player vs AI games because the bandwidth requirements would be far in excess of what people without several dedicated fiber connections could handle. A simulation could easily be using over 1GB of RAM on the server, since each AI would need a significant chunk of that data, lets lowball and say 10%, and an AI would potentially need to be sent that data for each update, again lets really lowball and say once per second, then you are looking at each client hosting an AI needing a 1gbit connection per AI, and if you want to run it at a more reasonable update rate (30 updates per second) then that's closer to 30gbit per AI which is obviously ludicrous. Obviously in most cases it wouldn't need that much bandwidth but it will occasionally and if you don't have it the AI will suck.

    To get around those bandwidth issues games normally recreate the simulation for each client because it's much less bandwidth intensive to send actions that affect the simulation over a network than it is to send all the simulation results. Of course that method only works well enough when the clients are recreating the entire simulation because it's difficult to predict if an action would affect a client's or AI's section of the simulation without actually simulating it so you just have to assume all actions will affect a client/AI. The trade off with recreating the simulation is that now the client will have to do the same amount of work as the server, which would rule out large AI vs player games in PA because everyone would be limited to what the worst computer playing the game could handle.

    There's also quite a few benefits to having all the AIs run on the server, for instance some data can be calculated once but then used by any of the other or even all the other AIs saving a massive amount of processing time and greatly improving scalability. There's also the possibility of vectorization to make use some modern CPU instruction sets and process data for several AIs simultaneously on a single core, though that can be a real pain to use effectively, has limited use and may not be necessary.

    In the end though it'll be up to Uber to figure out what the best way to implement AI will be, there is a huge number of things that need to be considered for that decision and only Uber will have all the information required to do so. Clearly Uber know their stuff and will do whatever is most likely to result in the best performance of the game so we shouldn't worry about it too much, but based on what they've said about their tech so far I'll be placing my bets on AIs all running server-side ;).
    Last edited: April 2, 2013
  19. torrasque

    torrasque Active Member

    Messages:
    337
    Likes Received:
    36
    It seems other people have already replied.
    I'll just give a small example: just imagine the target is on an island. Without pathing information the AI would give incoherent orders.
  20. torrasque

    torrasque Active Member

    Messages:
    337
    Likes Received:
    36
    Upgrading bandwidth cost more than upgrading the server spec. ( At least were I live )
    If you have the bandwidth to host a 40 man game, you should be able to afford quite a beast of a server.

    Still, as we don't know how heavy will be the bandwidth requirement for a player, nor the load of an AI on a server, only Neutrino could give a educated guess of the best trade off.

Share This Page