[Current Forum ] [Archive 2003 - 2005]
[Register]  [Profile]  [Preferences]  [Search]
[Private messages]  [Memberslist]  [FAQ]  [Login]
Subsim Radio Room Forum Index » » Sub Command » » Advanced AI Torpedo Evasion Doctrine
Author Advanced AI Torpedo Evasion Doctrine
polonius


Joined: Feb 28, 2002
Posts: 11
Posted: 2002-03-10 15:46   
Well, I put a fair number of hours into it, and here's a first version of it. I don't feel like packaging it or making an installer, so anybody who wants to can run with it. In fact, I'd prefer if somebody else hosted the file. To install it, first back up your "Doctrines" directory and then copy this file in, overwriting the existing SubAvoidWeap.txt file.

Basically, it adds (close to) blue-book quality torpedo evasion to AI-controlled subs. It doesn't work all the time, but it makes those enemies a LOT harder to kill, especially at long ranges. I may have to dumb it down a bit, even. Watching the broadband waterfall and being good with the wire guidance is the key at long ranges, or you'll never hit them.

A note on doctrine language:

Blech. I program for a living, and this language is a nightmare to debug. The program gives no indication of whether your syntax is correct other than crashing or failing to do anything. Make sure you read the specs *carefully* before you try anything, and remember these tips:

1) ALWAYS declare your variables!
2) NEVER forget the whitespace between tokens!
3) READ IT TWICE or more before you test it!

Enjoy, and let me know if you like it. I might be convinced to make another pass and make it even smarter (or dumber!)

Mattias V. Bertelsen


  View Profile of polonius      Edit/Delete This Post   Reply with quote
polonius


Joined: Feb 28, 2002
Posts: 11
Posted: 2002-03-10 15:46   
Oops, i forgot the (temporary) URL:

http://www.spaceship.com/~mattias/SubAvoidWeap.txt



  View Profile of polonius      Edit/Delete This Post   Reply with quote
Tahrn80


Joined: Mar 02, 2002
Posts: 244
Posted: 2002-03-10 15:56   
Excellent idea.
I just got your file, and will try it tomorrow.

I had a look on the doctrine file. Seems good.

If you're interested in, I could send you some comments when I have tested it.

[ This Message was edited by: Tahrn80 on 2002-03-10 16:03 ]


  View Profile of Tahrn80   Email Tahrn80        Edit/Delete This Post   Reply with quote
polonius


Joined: Feb 28, 2002
Posts: 11
Posted: 2002-03-10 16:12   
The old doctrine:

If the torp is less than 16000 yds and closing and its course is within 30 degrees of its bearing to us, then:
* Try to shoot back (only works if they have detected you)
* Go to max speed
* Turn 150 to 220 degrees from torpedo bearing (tends to run directly away)
* randomly choose a countermeasure or not
* cross the layer from the torpedo (although the sub will return to the mission designer's programmed depth immediately upon reaching that depth)
* run for 3-6 minutes (randomly chosen) before checking again

With my mod:
* Try to shoot back (didn't change this)
* Go to max speed
* If the torp is less than 8000 yds away, launch a countermeasure, active if the torp was detected by active intercept, otherwise passive
* Choose a course that is about 90 degrees off of the torpedo's bearing, picking the one (of two possible) that takes it out of the torpedo's acquisition cone fastest
* Set the depth to 180 feet opposite the layer from the torpedo (if there are less than 60 seconds to impact, go as deep as possible or as shallow as possible).
* Run on the chosen course and depth for 60% of the calculated time to impact before checking again (minimum leg time is 30 seconds). It maintains the chosen depth instead of returning to the normal depth.

If the AI loses contact with the torpedo, it will return to its original doctrine for the mission.


  View Profile of polonius      Edit/Delete This Post   Reply with quote
Tahrn80


Joined: Mar 02, 2002
Posts: 244
Posted: 2002-03-10 16:53   
Just a thought -without real tests, sorry

From the Doctrine file, I understood that the sub would go to Flank only at a closer range. Isn't it? If not, it would be a good idea. The main falw in AI, according to me, is that sub go to flank and/or drop cm as soon as they hear a fish. Unlogicall, and you detect AI quite easilly...
It would be wise to go flank only against a homing active torp. Against a passive, it the worth thing to do unless it has already detected you and is very close. Maybe you could also set the speed when trying to go out of the cone depending on the six minute rule, or some simplification (in other words, if you can evade a fish at 6 knots, why would you go Flank and disclose your location to everything at 10 nm?)


  View Profile of Tahrn80   Email Tahrn80        Edit/Delete This Post   Reply with quote
polonius


Joined: Feb 28, 2002
Posts: 11
Posted: 2002-03-10 17:04   
If you want a good challenge, make a mission where it's just you against an Akula II. With their increased passive detection capabilities, and their tendency to counterfire with shkvals, it's quite a ride.

  View Profile of polonius      Edit/Delete This Post   Reply with quote
polonius


Joined: Feb 28, 2002
Posts: 11
Posted: 2002-03-10 17:06   
I originally intended to make a silent evasion mode, but I didn't feel like taking the time just yet (already put in close to 6 hours on this one, due to slow debug cycle). It wouldn't be too hard to add as you described.

  View Profile of polonius      Edit/Delete This Post   Reply with quote
Martin


Joined: Feb 28, 2002
Posts: 76
From: Scotland
Posted: 2002-03-11 07:50   
Hi,

At the weekend I was up against a destroyer
and I got the distinct impression that he
was returning fire on the bearing that he
detected the torpedos, not the bearing he
knew I was on.

The scenario was that the destroyer was
25nm to my North West. There was only the
two of us on the sonar.

I launched four passive torps at 35kts under
the thermal layer and ran them out west for
6nm then turned them towards the destroyer.

He launched a counter attack of active
torpedos which snaked towards the point
where I turned my weps.

And do they passed harmlessley 6nm to the
west of my position.

When he was closer I again ran a passive
torpedo under the layer at 35kt, right
under him, and then instructed it to do
a 180 degree turn and activated it.

Again, he shot a counterattack to the
North.

Does the doctrine language say where to
soot the "fire back" torps?

I'm glad the AI are so gullible!!

Martin.


  View Profile of Martin   Email Martin      Edit/Delete This Post   Reply with quote
XabbaRus


Joined: Feb 28, 2002
Posts: 2792
Posted: 2002-03-11 10:45   
Martin,

Firing down the bearing a torp comes from seems to be a standard thing if you get torpedo in the water but haven't picked up the target, so I guess the surface vessel was doing what was recommended..

It's a nice touch...

BTW had he picked you up?
_________________

Project 971


  View Profile of XabbaRus   Goto the website of XabbaRus   ICQ status       Edit/Delete This Post   Reply with quote
Martin


Joined: Feb 28, 2002
Posts: 76
From: Scotland
Posted: 2002-03-11 11:15   
Hi.

No I seriously doubt it. There was no sign
of a trace on the broadband array, even on
the long time averaged waterfall display.

I just had his 2 lowest frequency engine
lines on the narrowband and they only
appeared at certain depth. I only noticed
then because I happened to be searching
narrowband on an ascent to PD. 10 feet
either side of the magic depth and
there was nothing, so maybe I lucked out
with convergence duct or something.

Anyway TMA placed him at 28nm, so obviously
the towed array was doing me proud, but I
doubt if a destroyer towed array would have
been that effective up there in the shallow
water amongst all that cavitation noise!!

So I suppose his only option was to snapshot
back along the bearing of my torpedos. That
could prove to be fun against 2 destroyers.
Just run a slow passive torpedo with a huge
run to enable out to the first destroyer,
then turn it towards the second destroyer,
run it another mile then enable it.

2 birds with one stone!! Your torpedo will
hit the second destroyer, and the second
destroyer will launch torpedos back along the
bearing of the your torpedo and take out
his partner (unless he is awfully careful
with his presets).

Martin.


  View Profile of Martin   Email Martin      Edit/Delete This Post   Reply with quote
polonius


Joined: Feb 28, 2002
Posts: 11
Posted: 2002-03-11 12:17   
All I can see in the doctrine spec are the functions AttackBest and FireBest, which call into hard code. There are no parameters to choose weapon or settings.

  View Profile of polonius      Edit/Delete This Post   Reply with quote
Te Kaha


Joined: Feb 28, 2002
Posts: 1697
From: Austria & Aotearoa
Posted: 2002-03-11 15:34   
Excellent, thanks for this!

Will try it asap
_________________
Te Kaha's Missions

America's Cup 2003, Auckland, NZ; Alinghi - Team New Zealand 3-0


  View Profile of Te Kaha   ICQ status       Edit/Delete This Post   Reply with quote
polonius


Joined: Feb 28, 2002
Posts: 11
Posted: 2002-03-13 07:03   
Any feedback on this, folks? Does it suck? I've been playing 1 on 1 against an Akula II for the last few days, and while I've gotten much better at evasion myself, I can't sink that punk for the life of me. Even when I close the range to less than 10,000 yards.

  View Profile of polonius      Edit/Delete This Post   Reply with quote
Lock this Topic Move this Topic Delete this Topic
Powered by phpBB Version 1.4.4
Copyright © 2000 - 2001 The phpBB Group

phpBB Created this page in 0.041089 seconds.