SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SH4 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 07-26-07, 01:29 PM   #1
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default [tec] AI settings in TM 1.4

In testing the AI i've had such varied results trying to find the optium settings that i've decided it was best to just post what i did to the AI , my rationale behind it, and how to adjust it if you feel the AI is too hard.

How tough one thinks the AI should be will vary from person to person on what they want out of the game. Some will find the AI in Tmaru 1.4 too hard. If you found stock AI hard, then you most definatly will find Tmaru 1.4 extremely difficult. If your a seasoned sub sim'er then you may find yourself scoffing at the AI thinking to yourself, "ive seen worse then this", or you may find it "just right", it all varies.


First let me explain the biggest AI sensor which effects you the most. Active sonar. Active sonar comes in two varites, and for me to classify these, im going to fall back to allied classification so that the japanese sonar classification will be easier to understand.

The allies in SH3 and SH4 have two types of active sonar.
"Type 1XX" and "Q"

In the real world they scan around side to side, like a flashlight waving itself around in a dark room, and a ship could have multiple sonars equiped.



Obviously they differer in geometry. In SH3 and SH4, a ship can only have one active sonar equiped at any given time. It may be a Type1XX or it might be a Q sonar, and they do NOT scan around. They behave more like a stationary floodlight affixed to the front of the ship.

For the most part, the Type 1XX sonars are the standard sonar quiped. The Q sonars in SH3 tended to be of shorter range, but wider beam, and deeper in depth. In SH4, they seem rather generic looking at their stats.

Now then, ive told you the two types and what they do, but to fully realize this you have to examine their stats in SH4. The three most important stats im going to list are:

Max range ( in meters, otherwise self explanitory )
Max elevation, (downward angle of the beam in degrees, how deep it can go)
sensitivity (how touchy it is to recieving a contact)

Stock Allies Type 1xx settings
Quote:
Type 123A = max range of 1200 / Max Elevation of 100 / Sensitivity of 0.04
Type 128A = Max range of 1500 / max Elevation of 100 / Sensitivity of 0.05
Type 144A= Max range of 2000 / Max Elevation of 130 / sensitivity of 0.05
Type 147A= Max range of 2200 / Max Eevation of 155 / Sensitiviy of 0.07
Stock Japanese equvilant, is the Type93
Quote:
Type93-1A = Max range of 1000 / Max elevation of 100 / sensitivity of 0.05
Type93-3A = Max range of 1600 / Max elevation of 100 / sensitivity of 0.05
Type93-5A = Max range of 2200 / Max elevation of 100 / sensitivity of 0.05
Now the japanese equivlant is the Q sonar, (type3) i've not touched at all, its quite uber. But for a point of comparision to the type 93 sonar, so you can understand how they compare to the type 93:

Quote:
Type3-1A = Max range of 2200 / max elevation of 135 / sensitivity to 0.07
Type3-2A = Max range of 2500 / max elevation of 135 / sensitivity of 0.08
( On a side note, I'll give you two guess as to what bungo petes equiped with :rotfl: )


Now that i've laid the basis on what the stock sonar settings are so you can better understand the changes ive made, here they are:
Quote:
Type93-1A = Max range of 1200 / Max elevation of 108 / sensitivity of 0.05
Type93-3A = Max range of 1600 / Max elevation of 112 / sensitivity of 0.05
Type93-5A = Max range of 2200 / Max elevation of 120 / sensitivity of 0.05
In short, i made the early war sonar longer in range by 200 meters, and ive made them all a little deeper delving, but nowhere near as deep as the allies by comparision. The overall point of this change was to get the AI to ping more at deeper depths.



So with the changes to the AI_sensors.dat out of the way, ill explain what i did to the sim.cfg, and why i did it:

Quote:
[AI Cannons]
Max error angle=4
Default is 3. The number here is basicly the degrees at which the AI could be off when gunning at you. Default, he will be within + or - 3 degrees of his mark. Ive increased this to 4, so hes not quite as accurate.

Quote:
[AI detection]
Lost contact time=30
Default is 15. Lost contact time is a really interesting item. It a few things:

- how long the escort will look for you if alerted to your presence.

- how long you must remain undetected for him to give up and go away.

- How far away units will come to look for you if alerted by another AI unit. (example: if a AI unit detects you, it broadcasts your location. Any unit that is within 30 minutes treaveling distance will be vectored into your location. Unless contact is made within those 30 mins, at 31 minutes the unit will turn around and go "home". This is why if you've ever attacked a fishing boat or what not, it felt like they had a radio when planes showed up a little bit later.

Quote:
[Visual]
Light factor=2.0
Default is 1.7, i slightly increased this to reduce the AI's visual aquity at night. I did not use a bigger number because this variable also comes into play at dawn/dusk conditions. The game is really loose with its interprretation of dawn or dusk, and this variable could come into play as early as 6PM when the sun is barely even starting to set. I was conservative with this because i was afraid of making the AI too blind.

Quote:
[Hydrophone]
Noise factor=0.4 ----------->//default is 1
Thermal Layer Signal Attenuation=2.0 --------->// default is 3.0
noise factor of 1 is on the deaf side, noise factor of 0.10 is on the uber end. Prepatch 1.3 i was using a noise factor of 0.25, in this version i was a bit easier and increased it to 0.4 to split the difference. Thermal layer effectiveness reduction was because with passive sonar, it was too much like a klingon cloaking device.

Quote:
[Sonar]
Enemy surface factor=150--------> // default is 200
Thermal Layer Signal Attenuation=4.0 ------->// default is 5.0
Surface factor is in short, how much surface area you present to the AI for him to ping off of, before he gets a ping. Default is 200, in Tmaru 1.3 i made it 150. Think of this variable as to how much "slop" you can have when pointing your bow or stern at an approaching AI to minimize your profile. I did this as an attempt to get the AI to ping more.

Thermal Layer Signal Attenuation, default is 5, i made it 4 in Tmaru 1.3. As the sim.cfg comment states, " 1 means no signal reduction, 5 equals signal reduction to 20%"


One last item under the sonar section of the sim.cfg which bears mentioning is the Detection time.
Quote:
[Sonar]
Detection time=5
I did not touch this at all, im just going to explain it. Detection time here means how long you have to be in the AI's active sonar cone before he will start pinging. The orginal Sh4 default was 20 seconds. Tmaru 1.2 made this 10 seconds, patch 1.3 made this 5 seconds. Which i thought was rather harsh, even by my standards. So i went and tested it. What i concluded was that the hardcoded AI routines where changed such, that the escorts were zipping around every which way, at such a rate, that you wouldn't be in their sonar cone for 10 seconds, which will produce an AI that doesn't ping, or at least that was my fear. In testing on a convoy in a singleplayer mission i discovered that i wasnt getting pinged alot, or at least, not to my satisifcation, which lead me to change the surface factor a tiny bit, as an alternative to messing with this variable. If you want to play with this, my suggestion is to be conservative. 6 or 8 are numbers id try first.


Another bit of reading i would suggest is this:
http://www.ducimus.net/sh4/ai.htm

Hopefully this will help understanding of the AI in SH4, the adjustments made in Tmaru 1.4, and how to adjust it yourself if your unhappy with the AI in general. If you have feedback, do share, maybe we can nail down the perfect AI settings yet.

Last edited by Ducimus; 07-26-07 at 01:56 PM.
Ducimus is offline   Reply With Quote
Old 07-26-07, 01:47 PM   #2
CaptainCox
Sea Lord
 
Join Date: Feb 2007
Location: A Swede in Frankfurt am Main
Posts: 1,897
Downloads: 4
Uploads: 0
Default

that's some deep deep digging you have done there man! RESPECT! as always. I have still to port TM1.4 (due to all the other stuff I have) but weekend is almost here so I am all set. I can't give you any feed back as such at the mo, just wanted to say RESPECT!...again
__________________
CaptainCox is offline   Reply With Quote
Old 07-26-07, 01:53 PM   #3
Jace11
Seasoned Skipper
 
Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
Default

What determines whether a destroyer uses active sonar or passive? In my experience, if you make a lot of noise they use hydrophones, even when you are very deep. They switch to active when they are close, you are shallow and quiet. Once below the thermal layer, I can't here them pinging, but then they usually lose contact...
Jace11 is offline   Reply With Quote
Old 07-26-07, 02:11 PM   #4
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

Quote:
Originally Posted by Jace11
What determines whether a destroyer uses active sonar or passive?
If he's at distance, passive obviously. Once hes on you, truthfully i don't know. My assumption has always been whichever one is recieving a signal.

Heres a big guess .. i mean.. i a wild stab in the dark in psuedocode.

ActiveContact = In sonar cone, with X amout of surface area visible, for Y seconds.


If NoActiveContact
then Listen

If HaveActiveContact
then Ping
else Listen

Only one who can say for sure is the developers. Everything i know, is what was learned from Sh3 from various sources and own observations.
Ducimus is offline   Reply With Quote
Old 07-26-07, 02:12 PM   #5
Canonicus
XO
 
Join Date: Mar 2007
Location: In your baffles...
Posts: 431
Downloads: 623
Uploads: 7
Default

Thank you for a most enjoyable read, Ducimus.
Very interesting to see the how and why as to the choices you made for the A.I. in 1.4...

It's really interesting to "get into the mind of the modder", so to speak.
Thanks for sharing you thoughts.

Cheers!
Canonicus is offline   Reply With Quote
Old 07-26-07, 02:55 PM   #6
Bando
Commodore
 
Join Date: May 2007
Location: Where you don't see me
Posts: 607
Downloads: 23
Uploads: 0
Default

Yeah, interesting stuff

Thanks Ducimus
__________________
Regards,

Bando
Bando is offline   Reply With Quote
Old 07-26-07, 03:44 PM   #7
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

One thing that i forgot to mention is that max elevation while it defines the downward angle of the beam, it also defines the blindspot of the sonar beam. The more downward angle, the longer the escort can keep contact. Under currrent settings, Late war escorts might be pretty accurate.
(see pic http://www.ducimus.net/sh3/late_war_sonar.jpg)

In the future i might change the max elevation from 108, 112, 120 to say... 108, 112, and 116. Or maybe even 106, 108 and 110. Not sure yet.
Ducimus is offline   Reply With Quote
Old 07-26-07, 04:12 PM   #8
Jace11
Seasoned Skipper
 
Join Date: Mar 2005
Location: UK
Posts: 683
Downloads: 104
Uploads: 1
Default

Quote:
Originally Posted by Ducimus
Quote:
Originally Posted by Jace11
What determines whether a destroyer uses active sonar or passive?
If he's at distance, passive obviously. Once hes on you, truthfully i don't know. My assumption has always been whichever one is recieving a signal.

Heres a big guess .. i mean.. i a wild stab in the dark in psuedocode.

ActiveContact = In sonar cone, with X amout of surface area visible, for Y seconds.


If NoActiveContact
then Listen

If HaveActiveContact
then Ping
else Listen

Only one who can say for sure is the developers. Everything i know, is what was learned from Sh3 from various sources and own observations.
That sounds quite sensible.
Jace11 is offline   Reply With Quote
Old 07-26-07, 04:12 PM   #9
caspofungin
Commander
 
Join Date: Apr 2005
Posts: 459
Downloads: 41
Uploads: 0
Default

@ducimus

the japanese never really had a functional equivalent of the british q system. the type 193 was the searchlight system they started the war with, and the type 3 was basically a copy of the german s-gerat active sonar. both were searchlight systems with a limited downward angle -- couldn't find any actual info about the specific angle.

they eventually did develop a "dipping" system to calculate a subs depth, which involved changing the angle of the sonar beam and then using some kind of mechanical calculator, but the calculation system apparently took too long to be of much tactical use. i'm sure bungo pete would've used it, though.

just some added info -- i know your philosophy is gameplay first
i might go back to sh4 now that tm 1.4 is out -- thanks for your work.

an interesting aside is that the japanese often equipped their merchant ships with both active and passive sonar systems -- how effective they were is unclear.
caspofungin is offline   Reply With Quote
Old 07-26-07, 04:45 PM   #10
Bando
Commodore
 
Join Date: May 2007
Location: Where you don't see me
Posts: 607
Downloads: 23
Uploads: 0
Default

Quote:
Originally Posted by Ducimus
Heres a big guess .. i mean.. i a wild stab in the dark in psuedocode.

ActiveContact = In sonar cone, with X amout of surface area visible, for Y seconds.

If NoActiveContact
then Listen

If HaveActiveContact
then Ping
else Listen
If your guess is right, would it be save to say that when you hear them pinging, it automatically means you're detected. Pinging is not searching but localising.
Is this correct in your opinion?
__________________
Regards,

Bando
Bando is offline   Reply With Quote
Old 07-26-07, 05:12 PM   #11
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

Quote:
the japanese never really had a functional equivalent of the british q system. the type 193 was the searchlight system they started the war with, and the type 3 was basically a copy of the german s-gerat active sonar.
I was really citing the sensors as they appear in the game, with *some* historical context for perspective. Usualy when i talk tech, its about what *is*, and rarely about what acutally *was*. Now that said, i dont recall seeing the type3 sonar being used by any unit that i looked at, but it fit the "supernatural" bungo pete pretty well.

Quote:
would it be save to say that when you hear them pinging, it automatically means you're detected. Pinging is not searching but localising.
This is kind of a trick answer. The AI doesn't ping without a reason. But pinging doesn neccessarly mean they know exactly where you are. So yah i guess "localising" is probably a good description. Where they acutally drop i think is a function of signal strength if the dev comments on thermal layers is any indicator. My guess is signal strength is a function of sonar sensitivity, surface area being pinged, enviormental variables, escort crew rating, thermal layer reduction, etc.
Ducimus is offline   Reply With Quote
Old 07-26-07, 05:19 PM   #12
chopped50ford
Weps
 
Join Date: Jul 2007
Location: Bentonville, AR
Posts: 367
Downloads: 22
Uploads: 0
Default

Quote:
Originally Posted by Bando
If your guess is right, would it be save to say that when you hear them pinging, it automatically means you're detected. Pinging is not searching but localising.
Is this correct in your opinion?
To put in my 2 cents;

If you hear pinging, it does not mean your detected. Its merely a search method used. Ducimus did a thread on how these work (good reading). Both Active and Passive Sonar are two different methods.

Passive = Listening; searching for sounds to place a bearing of target in search of.
Active = Pinging is used to find location of target after bearing has been "determined." The faster the ping, the closer the target is.

A way to deter the DD's? Go deep, below a Thermal layer if possible, and run silent.
__________________
TM2(SS)
USS Asheville - Plankowner, Shellback, "Order of the Ditch"

http://ths-i.com/
chopped50ford is offline   Reply With Quote
Old 07-26-07, 05:28 PM   #13
Ducimus
Rear Admiral
 
Ducimus's Avatar
 
Join Date: May 2005
Posts: 12,987
Downloads: 67
Uploads: 2


Default

On pinging i guess you could say, if hes pinging, he knows your around hes just trying to find out exactly where. You could say hes just "echo ranging" trying to get a good fix.

Now when you stand in front of him showing your broadsides to his "flashlight" beam, you sort of bypass the audio/hydrophone detection part and go straight to the echo ranging.
Ducimus is offline   Reply With Quote
Old 07-26-07, 05:53 PM   #14
Bando
Commodore
 
Join Date: May 2007
Location: Where you don't see me
Posts: 607
Downloads: 23
Uploads: 0
Default

Ok, thanks
__________________
Regards,

Bando
Bando is offline   Reply With Quote
Old 07-26-07, 06:39 PM   #15
CaptainHaplo
Silent Hunter
 
CaptainHaplo's Avatar
 
Join Date: Apr 2007
Posts: 4,404
Downloads: 29
Uploads: 0
Default

Whats interesting here is how active sonar is actually modelled. While the mechanics are ok themselves for usage - the Japanese escorts equipped with active sonar usually had it echo ranging constantly - whether or not there was a sub out there... Historically, some convoys were actually "heard" and tracked due to the pinging of escorts well before they were in visual range. My guess is that this isnt modeled because the engine can only "use" one sensor at a time. However, if thats the case - does is consider the oldest "sensor" of all time to sometimes be "turned off"? That sensor is the "Mk1 eyeball". I was thinking that the visual sensor routine was always checked. Any ideas?
__________________
Good Hunting!

Captain Haplo
CaptainHaplo is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 11:18 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.