Unit Macro Combat Controls for the Player

Discussion in 'Planetary Annihilation General Discussion' started by Bastilean, April 3, 2013.

  1. Bastilean

    Bastilean Active Member

    Messages:
    328
    Likes Received:
    55
    Ok, so I want the UI for the units to be extremely good and robust.

    We have already asked for programmable key bindings and I think we will have those.

    I want to talk about something that came up recently and had me thinking.

    Unit Combat Controls:

    You may or may not know that currently in annihilation style games your units are programmed to target a specific kind of enemy unit if that enemy unit is in range and your unit is ready to fire an eligible weapon at it.

    However, what if you were able to modify the unit's primary target in game? For instance:
    -when raiding a base you may want to focus your fire on regular structures like factories and economy
    -when attacking a base you may want to focus on defensive towers first
    -when going for a kill you may wat to focus your fire an the enemy commander
    -when an enemy commander is shielding his forces you may want to target his normal tanks

    I think having a fire focus option might be cool and fit the macro style of play we have.

    Also, we might want to have an option to delay firing at none primary targets. For instance, if a sniper bot is primarily for killing high value targets and a peewee comes into range maybe it waits 5 seconds to select a target and fire while it waits selecting the best target to fire at. If a Krogoth sized target presented itself the sniper would fire immediately, but if the highest target was a bulldog it would fire at that after 5 seconds or so.

    Unit Engineer Controls:

    In a similar vein you may want a select group of engineers to reclaim metals before anything else, even if there are not any currently available, because you are taking them into combat and you need the metals. It will be great when they repair your tanks, but maybe the metal wreckage on the field is a higher priority and first thing is first.

    Maybe you set a few engineers to repair first before anything else even if there are not repairs currently needed. By putting engineers on patrol with a primary focus to repair you can avoid having 5 patrolling engineers assisting while your tower burns down. This would free up Uber from trying to program the perfect patrol algorithm. This would also work great with the area command assuming you could give an area command that would be a continuous first priority in a chain of ques. Que Area Repair, Que Area Metal Wreckage Collection, Que patrol/assist. If unit sees area wreckage or repairs needed it stops assisting or patrolling and goes where it is needed.

    In general, I think the wander, hold position and attack, hold fire controls should also affect engineers and could be easily used by the player to affect his engineers functionality. Attack move could have the implication for engineers to repair and reclaim in the general direction of the move.

    Even if either of these are not used removing assisting from a patrol automation would be a good idea, because if you want engineers assisting they could easily be directed to guard a fellow fabricator or structure.
  2. djunreal

    djunreal New Member

    Messages:
    58
    Likes Received:
    0
    After I read this first part of the post, all I could think was "well isn't that the point of having an "attack" command on a mouse button? You point at the specific building or unit you want to wipe out and click on it, and your army focuses on that without even looking at anything else on the way...

    I realise you're talking about a more global setting (ie "always prefer this kind of behaviour until I tell you otherwise"), but on a micro level, that's why you've got a mouse...
  3. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Hate to say: But both of you are on the wrong track.

    Expect the units to be smart. Actually a lot smarter than you are...

    Plans are having an platoon level AI which is based upon a neural network which has been trained with almost every possible situation. No need to tell them "attack this target first, then this, then use capture, then repair, then this target ...", they already know what to do.

    Why? Because the AI was in a similar situation before. And inside the neural network, it has the information stored, which action / target will lead to the biggest advantage. Not based on artificial rules, but real experience. Sure, you can go forth and give them manual commands, but they will perform worse than if you just had them decide their self what to do next.

    Only thing you SHOULD do, is to restrict the whole platoon from taking a certain type of action if it would completely mess with your strategy. E.g. setting hold fire because you don't want to give your location away. However this does not mean that you are telling the AI to "do nothing", but it rather means that you tell the AI do choose the "second best" option right after "attacking". And if the AI decides, that it can do nothing but falling back (that means "doing nothing" is worse than "moving backwards"): It's probably right about that...
  4. godde

    godde Well-Known Member

    Messages:
    1,425
    Likes Received:
    499
    Forged Alliance both improved and made the target priorities worse.
    Case in point:
    The ACU.
    In SupCom the ACU was the highest priority target for all units. After all when you destroyed this unit your opponent lose and you win.
    However in engagements between T1 units and commanders they would all target the commander. The commander had a lot of health with relatively low DPS. This meant that you could tank with the commander while your much more effective and fragile T1 units shredded the enemies T1 units.
    Targeting 20+ tanks of the enemy is hard and your units would have to remain stationary when they target the enemy tanks because if you ordered them to move they would resume firing at the ACU again which meant they couldn't dodge and that the other tanks might drive out of their range.
    In Forged Alliance they turned this around so that the ACU had the lowest priority. Now T1 engagements were much easier to manage as you didn't have to target the enemy T1 units near the ACU manually.
    However if you had a enough units to go in for the kill of the enemy ACU among a bunch of other units it is much harder to do as the units would have to remain stationary to do so. When the ACU is walking away from the attackers they would constantly bunch up at their max range and get overcharged by the ACU and every time the ACU went out of their range they would have to speed up and get in range again.
    And worse yet experimentals that could kill the ACU in just a few seconds would get distracted by anything coming its way while the laser on the Giant Colossus and Monkeylord would turn off every time the ACU went out of their range.

    I say let the player decide what targeting priorities his units shall have.

    April fools was 3 days ago.
  5. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    The platoon NN is for the AI only. Players will have to manage their own units.
  6. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    That would make no sense at all.

    First, you need an proper AI for the individual units, it is impossible to hand manage such huge amounts of units. Things were different in SupCom 2 (where the NN was already used), because the maps were designed in such way that you would never have to manage more than at most 2 frontlines at the same time. In PA, it will be impossible to babysit every single platoon by hand, simply because their can far more conflict zones at the same time. You therefore need some type of advanced AI which will release you from the pain of micromanagement. This has been discussed in all extent multiple times, and it also has been kind of confirmed, that units will get a much better AI than in classic RTS games.

    Second, it would be wasted effort to write a second unit AI, if there already was one, one which is both efficient and effective. Every AI for idle units would just aim for the same goals as the NN, except that the NN is close to the optimal solution as it is based on experience and will never act "stupid" as every hand written AI does.
  7. yogurt312

    yogurt312 New Member

    Messages:
    565
    Likes Received:
    2
    Even with micromanagement, setting your own target priorities is more or less impossible. the reason is that you generaly want your troops moving, which means letting them pick their own targets and if you didnt like what they were shooting at you had to tell them to stop and fire at one thing.

    If the ui can hamdle it id love to see a target priorities button along the lines of raiding, battle, assassination, etc. it can have more than 4 though or else it becomes clunky. also as i said it needs to be a simple part of the interface with simple options or you probably lose more than you gain.
  8. apocatequil

    apocatequil Member

    Messages:
    109
    Likes Received:
    9
    Well, first off, to address your second point, yes, there is a point to write a small, second AI (or to not use a AI for units at all), instead of using the larger one designed to control an entire faction, to make units more autonomous, a big, enemy AI can tell units where to go and what to do when they get there, but that does not mean that it will micro manage its units. Now, AI is not my strong suit, not by a long shot, so I couldn't say if this Neural Map AI system could use the same concepts to do both, but what I can tell you is that the goal is to have individual units doing as little thinking as possible to be less taxing on the computer. So one possibility is the possibility of no on board AI at all, to simply have interactions with the flow field become multiplex so you can calculate what hundreds or thousands of units would do in a single equation, which is the conclusion that 70%-90% of the people watching the livestream jumped to (even the ones that actually understood just what the flow field and cost field was), perhaps incorrectly, perhaps misguidedly, but still viably.

    Secondly, I see way way way too much Validity in your First point and it honestly just depresses me. Big ol' yay... I thought simplifying the economy and adding larger scale and greater strategic variety would lead to a smaller focus on economy and a greater focus on positioning, tactics, and warfare itself... But what you've pitched is literally the exact opposite of that... And that possibility, where my units would all react excellently to changing conditions, maximizing my economy while under fire would be time consuming and distracting forms of Micromanagement (which I probably won't do, I'll just take an inefficient model of play and work with a solid buffer for emergencies), and fire and forget battles... I don't want to be fatalistic, but that's my distopian version of this game...
  9. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    Thats not what the NN is designed for. It has no control over an entire faction (or strategy), but only gives a valid target for a single platoon each. You give the platoon a first order command, but it's up to the platoon what it will make out of it. Positioning your platoon so they will get an tactical advantage is still up to you, but lower level decisions, like which target to spike first or keeping optimum fire distance, is up to the unit AI. (Don't mistake the NN for the tactic or even strategic level AI. The AI consists of multiple layers, and the NN is only used for the lowest level of unit control. Only pathfinding is still below the NN in this hierarchy.)

    I also don't get what you mean with the flowfield? That thing has nothing to do with the unit AI, it's just an efficient method of caching for path finding, allowing for linear complexity with the number of units moving towards a common goal and also providing some type of cache for common targets.

    Well, it sure CAN be used by the AI / command system for certain decisions, like when you have a first order move command assigned and you find a secondary target, you can use the integrated cost field of the first order target to determine, whether moving towards the secondary goal would be a acceptable detour or not (cost of moving towards secondary target (this has to be computed) + difference of current cost potential - cost potential at secondary target in integrated cost field for first target), but that is already several levels above the individual unit AI.

    A unit AI just accumulates statistics about the near environment and reduces them to an abstract rating for the beneficing of the various actions available (reduction can either be performed by the NN or by hand written rules). Most profitable action (except actions which have been disabled by user choice) will be chosen and executed. Statistics include DPS grouped by range, health and unit value (strategic (like killing the commander) and economical value), but no more than 10-15 individual parameters. Valid actions are selecting a specific target, advancing, falling back or using special abilities, however moving towards a specific location with tactical advantage or automated scouting is not a valid action. Advancing and falling back does not mean that a platoon will enter or leave combat, it will only advance / fall back far enough to maximize survivability by keeping effective enemy DPS as low as possible while maintining own DPS. (E.g. a long range unit will try to stay out of range of low range units by moving backwards if expected survivability can be increased by increasing distance.)

    PS: The most stupid unit AI possible (you might recognize it from some games, e.g. Starcaft...) is rather simple:
    - If no target is selected, select nearest enemy units withing range X as target
    - If distance to enemy is greater than weapon range, advance
    - Shoot
    But trust me, you don't want that AI for your units. It's suicide to let such a unit unwatched for just a single second as it can be tricked into doing ANYTHING, including luring it into point defenses and alike. This type of AI is especially bad for every type of low range unit and requires as lot of micromanagement, including manual targeting because the target selection rule performs just horrible in most cases. An artillery unit with this AI would target the wall, rather than the commander which stands right behind the wall...
    Last edited: April 4, 2013
  10. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    The NN like in SC2 was designed to micro platoons for the AI. Individual units still respond to their own programming which is go where you are told and shoot at enemies. The intelligence they are talking about is probably doing things like repairing, selecting the right targets etc. Nothing to do with movement or orders.
  11. Pluisjen

    Pluisjen Member

    Messages:
    701
    Likes Received:
    3
    I wonder if they will introduce the option to give a unit both an attack and a move order and have it execute both at the same time. I have no idea why this hasn't been before but it seems like it would easily fix many of the issues mentioned here.
  12. apocatequil

    apocatequil Member

    Messages:
    109
    Likes Received:
    9
    Ah, simple misunderstanding on my part then. Mostly because I'm still hopeful that you are wrong. Still. Not really comforting even when you spell it out like that. Bmb's point, though more sparse, gives me more hope for the future than yours. XD
  13. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    Like all awesome things, Homeworld did it first. Quite satisfying to strafe your frigates away from incoming missiles while they kept on attacking.
  14. Pluisjen

    Pluisjen Member

    Messages:
    701
    Likes Received:
    3
    I guess that it's simply not seen before because I haven't played that game in ages :)

    Interesting how often good ideas turn out to have been tried before to good effect and then still just kinda fall by the wayside.
  15. yogurt312

    yogurt312 New Member

    Messages:
    565
    Likes Received:
    2
    TA did it first, all units attack while moving anyway making the order redundant.

    Although homeworld is super awesome.
  16. bmb

    bmb Well-Known Member

    Messages:
    1,497
    Likes Received:
    219
    TA did not allow you to move while a specific attack order was active, they would fall back on their own targetting when moved.
  17. antillie

    antillie Member

    Messages:
    813
    Likes Received:
    7
    Actually, MechCommander did it in 1998 before Homeworld did it again in 1999. ;)

Share This Page