![]() |
SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997 |
|
![]() |
#1 |
Subsim Diehard
![]() Join Date: May 2006
Location: Texas!
Posts: 971
Downloads: 78
Uploads: 3
|
![]()
Back into DW again
![]() ![]() So I was playing a typical "attack the convoy" mission and something occurred to me watching the replay... that AI surface ships don't evade a detected enemy sub contact until torpedos are in the water. Which begs the question... what *should* a half-way decent response to a hostile sub be? Sure they will shoot ASROCs and helos at the sub, but it seems like course changes and defensive sprints are lacking. Would it be appropriate to default the AI response for a "turn tail and run" behavior or more specially a course change to 90-150 degrees from the hostile sub and flank speed for a good sprint away (with the exception being if a ship has an attack order built into the mission, then a kamikaze headon sprint, may be more appropriate). Opions?
__________________
"Seek not to offend or annoy... only to speak the truth"-a wise man |
![]() |
![]() |
![]() |
#2 |
Navy Seal
![]() |
![]()
For a sub contact the AI should.
1) Turn the convoy or CVBG away from the contact 2) Dispatch two or more Frigates to the contact to flush it out with active sonar 3) Use ASW aircraft to locate and proscute the target. |
![]() |
![]() |
![]() |
#3 |
Silent Hunter
![]() Join Date: Jun 2004
Location: Along the Watchtower
Posts: 3,810
Downloads: 27
Uploads: 5
|
![]()
Can doctrine commands recognize a formation and give separate orders to different ships? My guess is no...
Sort of a doctrine miracle-working, all we have is individual AI instead of squad-based AI. It's like we're stuck in the world of the original Rainbow Six and never got the AI upgrade in Ghost Recon.
__________________
![]() |
![]() |
![]() |
![]() |
#4 |
Ocean Warrior
![]() Join Date: Sep 2006
Location: Connecticut
Posts: 2,507
Downloads: 145
Uploads: 0
|
![]()
I've always had trouble getting formations to behave in ANY way that I would want them to. I think you're right that you can't get doctrine commands to individual ships in a formation.
I rarely EVER use formations anymore. I just jury rig things to LOOK like a formation. The most common issue I have with them is that when an attack starts coming in, they all scoot in random directions and then try to re-form. When they re-form, they all decide to go all bumpercars on me, crash into each other and sink (Even when I put them 10 miles apart). I've had far better luck having each ship be a single solitary ship. They tend to avoid each other a little better that way (But not always). ![]() Collision avoidance needs a lot of work in DW. I havn't tested it out in SC yet. I've also tested out putting two formations that would bisect each other at a point with collision avoidance turned on for all ships. The ships in each formation were miles apart. The two formations just plowed into each other, made no attempt at avoidance and rammed each other. I think Collision avoidance is bugged personally.
__________________
![]() ![]() ![]() ![]() |
![]() |
![]() |
![]() |
#5 | |
Commodore
![]() Join Date: Sep 2006
Location: Germany
Posts: 609
Downloads: 36
Uploads: 0
|
![]() Quote:
The problem, as already mentioned, is, that the doctrines cannot affect other platforms nor 'read' sensors from them. A doctrine script is too limited IMHO. Ideally you would need an exit to python or a similar script language and have read access to the complete NSE environment and write access to all AI platforms. |
|
![]() |
![]() |
![]() |
#6 |
Subsim Diehard
![]() Join Date: May 2006
Location: Texas!
Posts: 971
Downloads: 78
Uploads: 3
|
![]()
So taking a look at the CIWS doctrine (the default doctrine for ships) their's two doctrine coded reactions.
1) sub detects plane/missile/helo and activates its CIWS Attack against air targets 2) sub detects torpedo and starts evasive manuevers. That's about it. Apparently there is no doctrine language for its Asroc, torp, helo attacks, so it must be hard coded into the engine. Also its not clear on how the AI handles "linked" targets, because any replay shows that the AI is obviously sending helo/planes/Asrocs from offboard assets to attack an enemy but there's no doctrine language for it so the *something* controlling the AI attack response seem to be hardcoded... This is kindof in contrast to the Submarine Doctrines "subdef" which has a long of doctrine scripts for detections/tracking/attacking/evading of both subs and surface contacts in the doctrine itself... one could argue on how good/bad it works for AI subs. Maybe replicating the SubDef doctrine to Surface ships in the CIWS attack doctrine would be beneficial? I'll see what I can come up with for testing.:hmm:
__________________
"Seek not to offend or annoy... only to speak the truth"-a wise man |
![]() |
![]() |
![]() |
#7 |
Subsim Diehard
![]() Join Date: May 2006
Location: Texas!
Posts: 971
Downloads: 78
Uploads: 3
|
![]()
So here's what I have so far... mind you that this is *completely* untested and I have no idea if it works. Its up for testing to those with the time and/or patience to do so.
Unfortunately I'm going on vacation today and won't be back until next week to test it myself. For what its worth, draft #1 is: CIWS doctrine changes: Code:
; $Header: CIWS.txt Wed Dec 15 17:34:41 EST 2004 mike $ ; $Revision: 4 $ ; $Copyrt1: Copyright (c) 2003, Sonalysts, Inc. All rights reserved. $ ; ; CIWS Self-defense var CMTimer ; New Track IF NEWTRACK THEN { ; Set Tactic IF TgtClass $= "MISSILE" OR ( TgtClass $= "AIR" ) THEN { SETTACTIC "CIWSAttack" } ENDIF ; Auto Evade Torps IF TgtClass $= "WEAP" AND NOT ( TgtType $= "SONOBUOY" ) THEN { SETTACTIC "SurfEvadeWeap" } ENDIF ; Steer away from a hostile sub IF TgtClass $= "sub" AND ( TgtID $= "Hostile" ) THEN { DEBUGOUT "target bearing" DEBUGVALUEOUT TgtBrg SETTACTIC "SurfAvoidSub" } ENDIF } ENDIF Code:
; SurfAvoidSubDef var LegTimer var Avoid var DoctrinePriority var InitSpeed var LegTimer var RunTime var InitTime IF INIT THEN { Avoid = true InitSpeed = OwnSpd LegTimer = -1 InitTime = TIME } ELSEIF ( LegTimer = -1 ) AND NOT ( LostTrack ) THEN { SetPriority DoctrinePriority IF TgtRng < ( ( 80000 + RND 5000 ) ) AND ( TgTID $= "HOSTILE" ) THEN { IF ( TgtID $= "HOSTILE" ) and ( Order $= "ENGAGE" ) THEN { IF AssignedTarget THEN { DebugOut "Switching from Avoid to Attack" Avoid = False SetTactic "SurfAtkSub" } ELSEIF TgtID $= "HOSTILE" AND NOT AssignedTarget THEN { DebugOut "Avoiding Hostile Sub!" IF ( TgtRng < ( 50000 + RND 10000 ) ) THEN { DEBUGOUT "Very Close! Evading!" SetCrs ( TgtBrg + 70 + Rnd 50 ) SetSpd MaxSpd LegTimer = 900 + Rnd 300 IniTime = Time } ELSE { DEBUGOUT "Enemy afar, circuling around" SetCrs ( TgtBrg + 80 + Rnd 10 ) LegTimer = TgtRng / OwnSpd } ENDIF } ENDIF IF TIME > InitTime + LegTimer THEN { LegTimer = -1 } ENDIF } ENDIF Code:
; SubAtkSubDef -- SCX 1.3 Edited by LoBlo 10/20/2008 for surface ships var LegTimer var MinFiringRng var OrigSpeed var ClosingSpeed var TargetOpening ; 0 = Closing target, 1 = Receding target var ApproachAngle var DoctrinePriority ; priority of this action, modified by game var SnapShot ; indicates if we did a shot already at active pinger var PingSolve ; Wait for Ping ... Plot Snapshot var Solution2 var Solution3 IF ( INIT ) THEN { MinFiringRng = ( 4500 + RND 2500 ) DoctrinePriority = 200 ApproachAngle = TgtBrg SnapShot = FALSE PingSolve = ( Time + 15 + ( TgtRng / 1700 ) ) Solution2 = ( 30 + RND 20 ) Solution3 = ( 50 + RND 20 ) } ELSE { ; let surf attack sub IF ( DoctrinePriority > 0 ) THEN { ; if the guy is actively pinging us, lets waste him! ; attack active intercept IF ( ( TgtSource $= "Active Intercept" ) AND ( TgtID $= "Hostile" ) ) AND NOT ( SnapShot ) THEN { IF ( TIME >= PingSolve ) AND TgtRng <= AttackRng THEN { DebugOut Ownname DEBUGOUT "Attacking Active Ping" ATTACKBEST snapshot = TRUE } ENDIF } ELSE { SETPRIORITY DoctrinePriority ; Store current speed IF ( NEWTRACK ) THEN { OrigSpeed = OWNSPD } ENDIF ; Avoid Friendly ; ID IF ( TgtID $= "UPD" ) THEN { SETPRIORITY DoctrinePriority ; DebugOut "Prosecuting UPD" ; New Leg IF ( TIME > LegTimer ) THEN { ; Approaching? IF ( TgtSilos > 0 ) THEN { TargetOpening = TRUE ClosingSpeed = ( OWNSPD + TgtSilos + 10 + RND 2 ) } ELSE { TargetOpening = FALSE ClosingSpeed = Abs ( TgtSilo ) + RND 10 ) ; Compute oblique angle for leg IF ( TgtAOB < 0 ) THEN { ApproachAngle = ( TgtBrg - 30 - RND 30 ) } ELSE { ApproachAngle = ( TgtBrg + 30 + RND 30 ) } ENDIF } ENDIF LegTimer = ( TIME + 300 + RND 120 ) } ENDIF ; Proceed on leg, or pursue IF NOT ( TargetOpening ) THEN { SETCRS ApproachAngle } ELSEIF ( TgtRng > 2000 ) THEN { STEERTO } ENDIF ; Minimum speed IF ( ClosingSpeed < 4 ) THEN { ClosingSpeed = 4 } ENDIF SETSPD ClosingSpeed } ELSEIF ( TgtID $= "HOSTILE" ) OR ( TgtID $= "UAE" ) THEN { SETPRIORITY DoctrinePriority ; DebugOut Ownname DebugOut "Prosecuting Hostile" ; New Closing Leg IF ( TgtRng > MinFiringRng ) AND ( TIME > LegTimer ) THEN { ; Approaching? IF ( TgtSilos > 0 ) THEN { TargetOpening = TRUE ClosingSpeed = ( OWNSPD + TgtSilos + 3 + RND 2 ) } ELSE { TargetOpening = FALSE ClosingSpeed = Abs ( TgtSilo ) + RND 10 ) ; Compute oblique angle for leg IF ( TgtAOB < 0 ) THEN { ApproachAngle = ( TgtBrg - 30 - RND 30 ) } ELSE { ApproachAngle = ( TgtBrg + 30 + RND 30 ) } ENDIF } ENDIF LegTimer = ( TIME + 480 + RND 120 ) } ENDIF ; Proceed on leg, or pursue IF NOT ( TargetOpening ) THEN { SETCRS ApproachAngle } ELSEIF ( TgtRng > 2000 ) THEN { STEERTO } ENDIF ; Minimum speed IF ( ClosingSpeed < 4 ) THEN { ClosingSpeed = 4 } ENDIF SETSPD ClosingSpeed ; Attack IF TgtRng < AttackRng THEN { ATTACKBEST SnapShot = True } ENDIF } ENDIF ; PostLaunch IF ( WEAPONAWAY ) THEN { DEBUGOUT "Avoid after shooting" SteerEvasive } ENDIF } ENDIF ; if not active ping } ENDIF ; let sub engage } ENDIF
__________________
"Seek not to offend or annoy... only to speak the truth"-a wise man |
![]() |
![]() |
![]() |
#8 |
Silent Hunter
![]() Join Date: Nov 2006
Location: Jakarta
Posts: 4,794
Downloads: 89
Uploads: 6
|
![]()
Well I played the Akula on a mission to sink Japanese Navy ships bent on invading the Sakhalin island.
My first move was launching two Anti ship missile to an active pinging target. Immediately afterwards, I noticed course changes in at least two other detected hostile sonar contacts. They were both frigates and they were both coming directly to my position. Because they detected the launched missiles. I thought wow that was great. Or was that only my imagination? I didn't look at the replay though. Perhaps DW scenarios are just as good as the mission designer. I admit that SH3 AI is much better than DW. I feel like fighting a crewed ships in SH3 but I don't get the feeling that the enemy in DW is alarmingly smart. I think the AI response depends much on scripted waypoints and tactics. But what do I know I never build a scenario. And LoBlo I'll try those new doctrines.
__________________
Last edited by Castout; 10-28-08 at 06:32 PM. |
![]() |
![]() |
![]() |
#9 |
Silent Hunter
![]() Join Date: Nov 2006
Location: Jakarta
Posts: 4,794
Downloads: 89
Uploads: 6
|
![]()
LoBlo I have got a stupid questions due to my shallow understanding on things in DW.
How do I test the seemingly new doctrines SurfAvoidSub and SurfAtkSub? When will these two be invoked or called? They seem to be new doctines altogether. The stock and LWAMI have none named as those two. Yet their names are somehow familiar to me. Don't tell me thay are exclusively for Sub command and cannot be used for DW. Edit: I did a test with attack tactic for a DDG to hunt for my sub. and an avoid tactic for an LPD. The DDG did increase its speed upon active sonar detection of my sub but when I fired 2 torpedoes at it it didn't maneuver to evade the incoming torpedoes. The LPD was seemingly oblivious of my sub though. Maybe it would be best to change the LPD to a platform capable to detect a sub. I don't know what to test or to look for in the testing though. It would be best imo if you explain to us what you try to do with the modified CIWS doctrine and the new doctrines(SurfAvoidSub and SurfAtkSub). Edit 2: After further testing I can conclude that I see no difference with or without either SurfAvoidSub and SurfAtkSub doctrines. It is as if they were not there at all. The enemy behaved exactly the same with or without them.
__________________
Last edited by Castout; 10-28-08 at 08:51 AM. |
![]() |
![]() |
![]() |
#10 | |
Naval Royalty
![]() Join Date: Jun 2005
Location: Washington, DC
Posts: 1,185
Downloads: 0
Uploads: 0
|
![]() Quote:
I don't know if you guys remember me harping about the limiting lines of approach? I think I put an example of it in the NATO EX WAR Exercise and RIMPAC CSG scenarios. It's just kinematics and geometry. The idea is that if the submarine is slow relative to the group of warships, then there's only a limited space in the ocean, from which a submarine could approach the warships and end up within it's weapons launch range. From the perspective of a group of warships trying to defend themselves against a submarine then, the goal would be to turn so that the limiting lines of approach do not intersect the area of uncertainty surrounding their initial sub contact. This is where the decision making gets fuzzy. What assumptions do you then make about how fast the enemy submarine might be going? What assumptions do you make about the enemy weapons? Is the intelligence informing your assumptions correct? If it's inaccurate, how inaccurate is it? If you don't even know what type of submarine you're facing, what assumption do you make? Well... if it was me I'd assume it was the fastest submarine out there which would be a nuclear boat. Okay... but a nuclear boat might not be constrained by the limiting lines of approach. They can easily be faster than a lot of ships. It gets very difficult to program an AI that would accurately reproduce the kinds of thinking that would go on in all situations. The whole thing is scenario dependent. What adversary are you facing? How much do you know about that adversary? Can he go fast and silent or does he cavitate if he goes much faster than 7 knots? That's the sort of thing which only ever really gets captured in multiplayer games. There's other things too. Let's suppose you do make the correct assumptions about the nature of the adversary or at least guess a good direction to turn at random. Now you've got to decide how quickly to turn. If you detect him far out, then maybe you can evade with a gentle turn and laugh the whole thing off as your helos or an orbiting P-3 prosecute him. If you detect him close in, it might not matter how quickly you turn because he's almost in torpedo launch range anyhow. This is the stuff that makes wargaming fun if you ask me. Unfortunately, it's also why AIs will always be boring. In order to capture the uncertainty in the decision making, they either have to be painfully stupid in the sense that they make excessively conservative assumptions about course changes and what not, or else they end up being so random that you're left thinking, "what the heck is that thing doing?" Last edited by SeaQueen; 10-29-08 at 06:21 PM. |
|
![]() |
![]() |
![]() |
|
|