Unit AI - Role Awareness

Discussion in 'Planetary Annihilation General Discussion' started by erastos, September 7, 2012.

  1. freepointz

    freepointz New Member

    Messages:
    1
    Likes Received:
    0
    Oh, is that suggesting some sort of player scripting capability? That would be really cool! My issue with any kind of complex, behind-the-scenes behaviors is when those behaviors conflict with what you are trying to do. For example if you have a large group of tanks and a single artillery unit and you order them to attack, what would happen if that artillery unit was selected or not? Would all the tanks guard the arty, would a couple stay and the rest blitz? There are way too many options for that one scenario which in itself may or may not be a mistake in unit selection. For the most part, with a game of this complexity I feel that any hard-coded complex behavior would fail under certain circumstances.

    But this does open the door for something interesting, client side unit behavior scripting (maybe even GUI too!). First and foremost, this could actually be possible since PA will have a client-server model. Meaning if someone goes crazy with scripts, or writes them poorly (inf loops, poor logic), it should only affect themselves rather than bring everyone else down with them. The advantage this brings to the table is that players could potentially make very specific behaviors for their units (eg. when does a unit kite, when does it group up, what terrain does it choose to travel over, should I reclaim that mech marine that's standing next to me etc.). These behaviors need not be universal (some may want them others may not) but this could potentially bring a level of choice that no number of check boxes in a unit card could attempt to cover.

    Is this feasible, fun? I don't know, it really hasn't been done to my knowledge (totally should have been the premise of AI Wars :lol: ). However, again, there is no reason why it couldn't be an option on the setup for the dedicated server. I don't think this option would turn away people in droves either. I mean, to a lesser extent, Dragon Age did this as well (granted it wasn't multiplayer), even the simplified GUI editor from DA could be extrapolated to something for PA as well. If one could import and choose between unit behaviors from other players, one could even circumnavigate the necessity of making their own scripts but still have control over macro behaviors ala the Oblivion mod scene (modular loader, maybe one script modifies air units, another ground units, maybe even as specific to individual units).

    Finally, is this fair? Well, in terms of game information, the native functions called from the scripts are controlled by the devs so ideally there wouldn't be any loop holes to react to units that you the player couldn't see. However someone with scripts should ideally be able do defeat someone without them; If the APM is the same and scripts remove micro than the player with them should be able to do more and react better. Granted if they spend that time donuting engineers on the moon or don't have a large scale strategy, they'd still be toast. However if scripts are an option on the dedicated server, easy to import (maybe even within the game!), and maybe there are even default ones than I can't really see a huge problem with their presence.

    ###########################################

    On a completely different note, yet related to the above topic. If there are support commanders, could they have some macro functionality? A good example are the fleet commanders from Conquest: Frontier Wars (hey! It had metamaps too). Once you assigned them to a fleet they were easily selectable (f1 - f something I forget how many there were), they had macros (retreat, repair, resupply etc) and would report if they were under attack (Halsey starts yelling instead of some generic 'units under attack' nonsense). This would make the game more manageable just from the specific reports from each commander. If commander A says they're under attack, you could just press f whatever and you're there, you don't have to know where they are. Ideally the macro commands would be scriptable via the above suggestion or at least intelligent enough not to retreat to the planet you are about to rock (literally!).

    Yeesh, hopefully someone pulled some useful chunks out of that mess.
  2. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Client side scripting is a terrible thing. The advantage is so much larger than you can imagine, it wouldn't just enable you to eliminate micro managing, it would also enable to automate the whole game at once, replacing you completely by an AI. This renders this feature unacceptable for ranked matches - or in general for any type of match which could be considered as fair.

    And there is yet another problem with client side scripting: While UI-mods don't have much of an impact on the game performance, a client side AI has. Not only would the client have to take the computational overhead which renders this feature unusable on low end machines, it would also require to communicate all the commands to the server. This means several commands per second and unit, in a large enough game this will exceed the upstream bandwidth of many DSL costumers.

    One of the arguments brought up against more intelligent units were that players would blame the AI for the decisions it made (which makes no sense as the decisions wouldn't be random but based on experience). With client side scripting, players could blame their loss on their low end machines or other way around, their enemies victory to their high end machines - and they would be right.

    So client side scripting for the AI is impossible and is not going to happen. It could even be considered as cheating.

    Which leaves the tactical decisions to the server again, but the argument with cheating is still in place, so user chosen scripts are still not an option. This leaves players only with the option to modify the behavior of an unit with checkboxes, but this will never result in an acceptable behavior. No matter what settings you use, your units will be shredded to pieces by any player who performed micro management heavy tactics like hit and run, utilizing fire rang and turn rates an such.
    Why? Because the AI remains stupid. It will only know how to deal with situations it has been explicitly "thought" to deal with and even then the decisions made are not the smartest, it's only a generic default behavior the developer has chosen - and it's most likely wrong in that situation, given the number of options.
    You can't solve this problem with more checkboxes either, unless you want to adapt the settings for every unit every few seconds, which would take micro management to a whole new level.
  3. zordon

    zordon Member

    Messages:
    707
    Likes Received:
    2
    If someone wants to run an AI against competitive opponents they're just giving away wins.
  4. linecircle

    linecircle Member

    Messages:
    83
    Likes Received:
    0
    Competitive play would very likely want to equalize all factors; client-side scripting would only be one such factor. There are different ways to deal with this, eg. server control over local setup, to varying success.

    Performance can become an issue, both in processing and network requirements. But this is not an on or off issue. Low-resource consumption scripts will have less bad effect but still offer some good effect. There is also not much technical barrier to having the processing done server-side.

    Whatever name you want to call it, computer-assisted play in areas not intended for computer-assisted play would be cheating. If, hypothetically, a game allowed unrestricted client-side scripting, it wouldn't be cheating to have the computer play for you. So this issue really depends on the intentions of the developers and of involved players. Players who want to battle their scripts with each other would have different game rules from players wanting to test their micro-skills with each other.

    Having too many configuration options that end up still performing inferior in some situations does not mean that, overall, having some configuration options is bad.

    Under the conditions with which you evaluate them, your points are valid. But, drawing absolute conclusions based on an incomplete picture would be more than a little biased. I understand that you may be doing this for the purpose of pointing out flaws; and the ideas that you bring up are intelligent ones -- then, carry on doing so, but don't then conclude what your points cannot fully support. Further, let the readers or developers weigh all the positives and negatives for themselves. Different people have different values, opinions, and tolerances on whether x amount of good is worth y amount of bad.

    Please, and I say this to everyone in general, for the sake of more productive discussion, consider the greyer nature of reality and don't try to force fit things only into black or white bins. In reality, the downsides of anything can often be mitigated at least in part and it would be detrimental to the game's development to not consider that.

    Personally, I would not want client-side scripting as part of the core game. Mod support would be nice, but by default players should not have to go near it. I feel that the optimal solution regarding AI in units is a mix of a powerful low-micro UI together with reasonably smart default AI; going extreme either way exaggerates their individual problems too much, in my opinion.
  5. asgo

    asgo Member

    Messages:
    457
    Likes Received:
    21
    scripting usually comes in, when "point and click options" aren't enough any more.

    On the client side (as a players helper ) it probably would introduce a too big imbalance between players (those who do like to script and those who don't).

    Fun might be to run user scripts against each other in AI battles, but that's probably going a bit far.

    What I like to see, are server side exposed AI files where you could have a look at it and tweak them for their purposes. And with server side scripts, chosen at game start, there wouldn't be many negative side effects.
  6. coldboot

    coldboot Active Member

    Messages:
    447
    Likes Received:
    112
    I searched for the papers you were referring to and there are a few papers which refer to the use of Neural Networks to create AIs in FPS games. I haven't thoroughly pored over the papers yet, but I have skimmed some of the details

    I believe the same ideas could be applied to an RTS, but I think circumstances for making decisions in an RTS is an order of magnitude more complex than an FPS. Note that I'm just referring to individual or group unit AI in the RTS that decides things like what to shoot at when given a move order, not the actual skirmish AI that makes strategic and tactical decisions.

    In an FPS, there is a uniform set of weapons for each player, and the goals are very simple: kill every hostile unit that you see. In an FPS FFA (Free-For-All) the decisions are the easiest: where should I go, and when I see an enemy, what weapon should I use to shoot him with? When an AI is part of a team trying to kill the player in a single-player environment, it gets more complex if the AI has to figure out how to cooperate to beat the player. In a team vs team setting, it's even more complex as the AI has to decide what targets to prioritize. If you take a game like Team Fortress 2, where each individual in the game has a different role, it's even more complex because target prioritization gets even more complex.

    The examples in these papers seem to just be the "AI individuals deciding how to kill other individuals", not the complex scenario presented in an RTS. In an RTS, the scope is more limited because you are still telling the units what to do, but they still have to decide what to shoot at. There however are still many different types of units with different roles, and many many more units than in an FPS.

    I'm not saying it's impossible, I'm just saying it's going to be much harder to build a really smart targeting and movement AI even with Neural Networks. The fitness function itself will be hard to define.

    It might just be better to give the player tools to efficiently tell the units exactly what to do, and define which role-heuristics to use. Strategy will be such a big part of this game that even "optimal" AI decisions might conflict with strategic decisions.
  7. Sorian

    Sorian Official PA

    Messages:
    998
    Likes Received:
    3,844
  8. coldboot

    coldboot Active Member

    Messages:
    447
    Likes Received:
    112
  9. KNight

    KNight Post Master General

    Messages:
    7,681
    Likes Received:
    3,268
    Well yeah, Sorian Knows his stuff ;p

    Mike
  10. jseah

    jseah Member

    Messages:
    129
    Likes Received:
    2
    RE client side scripting:

    Most Spring RTS games allow this. Nothing crazy has happened so far. Most of the most powerful scripts turned out to be UI improvements, basic dumb automations (known best action, repeat ad infinitum) and information management.

    All of them were released to the community, upon which bugs were found, improvements were made and it got better.
    The custom formations widget is easily the most powerful one. A player with the custom formation widget will absolute *destroy* any player without it (provided certain conditions like "understanding the economy" are met). That widget is the result of a few years of occasional tweaks and improvements from multiple authors.

    Zero-K, a game using the engine, has elo rankings which pretty clearly track with player skill despite the presence of these widgets. The top player uses roughly the same kind of UI, automation and information widgets as everyone else.

    EDIT: So, in the light of this particular experiment in client-side helper-AIs, nothing bad seems to have been done.

Share This Page