Page 1 of 1

Active target seeking

Posted: 19 Sep 2006, 02:55
by Caydr
I've realized that the problem that we've all seen, the one with gunships and other aircraft landing in the middle of combat for no apparent reason, isn't unique to aircraft.

The problem is with pretty much everything, as far as I can tell. Give a bunch of peewees to an AI player, then attack then with your own group of... thuds. Or something. They'll usually just sit there and take a beating, even though the thuds are within their visual range and their maneuverleashlength. On the rare occasion they'll fight back, but it's definitely in the minority.

The problem is that units don't actively seek targets to engage. Even if there's radar coverage, line of sight, or both, they'll just ignore everything unless specifically told otherwise. In some cases, this isn't so bad. During ground combat you can usually give specific orders. But the problem becomes much more visible when aircraft are involved, because when they don't attack they'll actually land. You can't micromanage a swarm of aircraft. There's too many of them and they're moving too fast.

Here's how unit target needs to work: If an unfriendly unit comes into your unit's LoS, they will attack them, UNLESS they are outside your unit's maneuverleashlength. If the enemy unit goes beyond double your unit's maneuverleashlength while they are being pursued by your unit, your unit will go back to the location they were in before the enemy unit came into LoS.

An example:

5 friendly aircraft are patrolling between points A and B. 10 other friendly aircraft have landed, awaiting orders. They are 1024 units away from point A and 2048 units away from point B. Their maneuverleashlength is 1024. Their LoS is 512.

10 Enemy aircraft approach the patrol zone, midway between points A and B, and are detected by a friendly fighter's LoS. The appearance of these enemies immediately spurs all the patrolling fighters into action, and they all attack the enemies. A dogfight ensues, which eventually reaches point A. At this point, the friendly fighters which have landed attack the enemy fighters.

Seeing that they are clearly outmatched, the 3 surviving enemy fighters retreat back the way they came. The friendly fighters which were landed return to their original location and land as soon as they are 2048 units away from that location. The patrolling fighters continue to chase for a short while as well, until the enemy is 2048 units away from their patrol route. After that, they return to their patrol.

Diagram:

Code: Select all

                E
F         A----------B

E= enemy fighters
F= friendly fighters
A= point A
B= point B
---= patrol route
Remove the word "land" from the above situation and replace "fighters" with "Peewees" and the same should be true.

But in both cases, it's not. The friendly units will just sit there and do nothing, probably even if they're fired upon.

~~~

Apparently, the situation with bombers is the complete opposite. Not only do they actively seek targets, they ignore orders while doing so.

http://taspring.clan-sy.com/phpbb/viewtopic.php?t=7142

Something's really borked and needs a rewrite.

Posted: 19 Sep 2006, 03:08
by Min3mat
please tell me your units were on roam?
idiotic thing to ask BUT you didn't mention it in your post x)

Posted: 19 Sep 2006, 03:55
by LordMatt
Spring unit AI is fail.

Posted: 19 Sep 2006, 04:15
by mehere101
What are you taling about. Parts of the ai are flawed. THe ais are fairly smart compared to most other games.

Posted: 19 Sep 2006, 05:01
by redcoat
I'm glad to see that I'm not the only one who thinks the units are incapable of knowing when to attack. As a newbie I couldn't figure out for the life of me where the "defend" button was. There isn't one.

I think Command&Conquer:Generals got it right. Double-click on the move command initiates a "Move to location: once there>> Guard area." (its called the "Double-click guard-move" and it can be turned off in settings). A single click would be a regular move, and an "'A' + single click" would be an "attack move."


C&C allowed there to be a distiction between moving, or being still but not going out of the way to attack, and "attack moves" or "move, then guard/attack." I realize that spring (supposedly) accomplishes this with "Hold Fire, Return Fire, Free Fire." I personally feel this requires way too much micro. ::shrug::

(and fyi: this noob only ever rolls with "free fire.")

Posted: 19 Sep 2006, 05:14
by Das Bruce
This doesn't happen in EE, I've regularly seen units move to attack another if they're just out of range if their on anything but Hold Pos.

Posted: 19 Sep 2006, 05:25
by Neddie
Das Bruce wrote:This doesn't happen in EE, I've regularly seen units move to attack another if they're just out of range if their on anything but Hold Pos.
In general, this is true, though I have had some situations with the shorter range and direct fire units prior to the last version.

Posted: 19 Sep 2006, 05:30
by Acreo Aeneas
Erm...ROFL.

I just played a 2 hour game where I had 9 heavy mechs set to patrol through the enemy AI base. They get lost half way there, turn around, walk through my base, then walk back to where they got lost, and just stopped.

I had to micro manage them until they got to where I wanted them to go.


And since this is the Spring engine, wouldn't one safely assume that the flaws of OTA would be taken care of?

Posted: 19 Sep 2006, 05:55
by nobody2u
Don't blame Spring that it still has a number of bugs. The developers of OTA and any other commercial game had a budget; Spring, being open source, has a much lower budget. The game depends on people who volunteer their time and possibly money to help make this game better for everyone else. Yes, Spring's goal is to take what OTA has left and make it better, and those voluteers are spending any time affordable towards Spring, but don't expect the best rts game anytime soon. History has shown that complaining too much can and will alienate the most important members and developers of Spring's community.

Just some information to the newer players out there.

Posted: 19 Sep 2006, 09:13
by MrSpontaneous
nobody2u

Will this can be true, it is equally true that ALL software should go through the worst trial by fire it can, in every stage of development. This is because most people will not be nice to software and abuse any portion of it they can. It maybe done intentionaly or simply missunderstood by the user. Imagine a program that could not accept letters in its sentences (crashs do to improper data type). Every one decided that they would just include the information that numbers can not be put into the program. I guarantee that some one some were is going to accedentaly put in a number. It would be much better to make the program more robust and able to deal with said problem.

Now I know my example has little to do with the ai being mentioned, but should not a tool ment to improve the game not its self be improved due to problems it may expiernce? I know this from first hand observation that when I look at a problem or proof read a paper I have been working on for a while, I start to be unable to spot many of the errors of said piece. There for it is in the interest of improving something that outside souces must be consulted in order to improve said piece of work.

So, its not a matter of blaming spring, simple a matter of pointing out its flaws so they can be fixed and improved upon.

Posted: 19 Sep 2006, 15:18
by Egarwaen
Even worse is the "Oh no, I'm being attacked" behaviour. If a unit's attacked by something out of its range on Maneuver/Fire at Will, it will travel pretty much any distance to try and take out whatever's attacking it as long as it keeps getting pinged. To make things even worse, nearby friendlies won't go with it, even if they're standing right next to it when it gets hit. When you've got an attack force waiting a little way out of range of the enemy's defences for the slower members to catch up and for everyone to stop pushing each other around, this gets really annoying.

Edit: Even stop doesn't help, as the units will go right back to charging to their death the next time they get pinged. So you wind up having to pull back, which puts you right back in Pathfinding Hell.

Posted: 19 Sep 2006, 17:52
by redcoat
Myth (by bungie) had a really cool feature that was, i think in the tools, called "yell." In short, each unit had a value for its 'yell' radius. When it got hit (or maybe even when it saw a unit), other units within the 'yell' radius would be notified of the enemy and respond with the wounded unit. Very helpful for being much more 'realistic' and providing more coherent, group responses without youro microing.

Maybe that could be something that all units with 'maneaveur' and 'free fire' could respond to?

-|2edcoaT

Posted: 19 Sep 2006, 19:38
by Soulless1
sounds like a very good idea actually - I think Cadyr's suggestions/fixes should be the priority until that's sorted to at least OTA standards but adding a 'yell' function after that would be great :-)

Posted: 20 Sep 2006, 17:25
by Forboding Angel
this may have been mentioned before...

When you give units to an ai, the ai does not know they exist and therefore does not use them. You have to give the unit an order before the ai realizes that it's there.

Posted: 20 Sep 2006, 17:49
by Egarwaen
Forboding Angel wrote:this may have been mentioned before...

When you give units to an ai, the ai does not know they exist and therefore does not use them. You have to give the unit an order before the ai realizes that it's there.
Does that matter here? I think you can even use the EmptyAI for this. The test is using the UnitAI which, if I understand right, operates independently of any SkirmishAI or GroupAI bots?