SUBSIM Radio Room Forums

SUBSIM Radio Room Forums (https://www.subsim.com/radioroom/index.php)
-   SH5 Mods Workshop (https://www.subsim.com/radioroom/forumdisplay.php?f=249)
-   -   [WIP] IRAI (Intelligent Random AI) (https://www.subsim.com/radioroom/showthread.php?t=171973)

BowfinSS287 07-17-10 11:59 PM

this is great work....i had a 5 hour long depth charge attack
90 + dc were dropped all around and some too close for comfort
i had to play possum for 1 hour....then at 1 knot....i slipped away

the only thing funny i noticed was a DD going backwards??
maybe has something to do with random heading after pause
maybe if it gets a random heading behind the ship,the DD takes
the shortest route to that heading...can new heading be set to
an arc in front of the DD....120 to each side?

i don't know if this is the problem that causes DD to travel backward
it's just i guess on my part....thanks for all your great mods

Trevally. 07-18-10 05:57 AM

Hi TDW, thanks for the mods you create :yeah:.

I have noticed the same DD behaviour as Bowfin.

I attacked a convoy (mid1942 IRAI v0.9 (my attacks are from further out with each upgrade to this mod:up:) ), dived deep to avoid searching DDs. After some very close calls with DC the escorts reformed with the convoy and moved off. I surfaced to periscope depth and spotted what I thought was a DD "camping out". After a few mins watching, I notice that it is in fact going backwards in a wide arc away from the rest of the convoy.

sergei 07-18-10 06:02 AM

I'm not 100% sure this is the Mods fault.

I seem to remember in one of my stock games seeing a DD do this after losing track of me.

TheDarkWraith 07-18-10 08:55 AM

Quote:

Originally Posted by BowfinSS287 (Post 1447212)
the only thing funny i noticed was a DD going backwards??
maybe has something to do with random heading after pause
maybe if it gets a random heading behind the ship,the DD takes
the shortest route to that heading...can new heading be set to
an arc in front of the DD....120 to each side?

Quote:

Originally Posted by Trevally. (Post 1447356)
I surfaced to periscope depth and spotted what I thought was a DD "camping out". After a few mins watching, I notice that it is in fact going backwards in a wide arc away from the rest of the convoy.

Quote:

Originally Posted by sergei (Post 1447361)
I'm not 100% sure this is the Mods fault.

I seem to remember in one of my stock games seeing a DD do this after losing track of me.

If I were to set an arc that the escort only could take that would defeat the whole randomness of the mod. The escorts under script 'control' are always given throttle orders of forwards not backwards so this sounds like a stock game bug. Nowhere in my scripts do I ever issue backwards bells for any ship.

EDIT:

how are the airstrikes now with v0.0.10? Have they decreased in number? How about night attacks by aircraft? Have they decreased in number?

BowfinSS287 07-18-10 10:20 AM

i do think it may be a stock bug,but can the new heading have 3 inputs
is this the command line ?

newheading = ship : random (0, 360);

could it be changed to :

newheading = ship : random (0, 160, 200);

this might stop the DD from picking a course directly behind it
if you can use 3 inputs....what do you think?

TheDarkWraith 07-18-10 10:29 AM

Quote:

Originally Posted by BowfinSS287 (Post 1447513)
i do think it may be a stock bug,but can the new heading have 3 inputs
is this the command line ?

newheading = ship : random (0, 360);

could it be changed to :

newheading = ship : random (0, 160, 200);

this might stop the DD from picking a course directly behind it
if you can use 3 inputs....what do you think?

Random function has only two inputs: min and max and it returns a real number between those two values.

I looked over my code for the AI searches. Here's how the AI picks a new location to search in:

Ship:WaitAction(waittime);

newheading = Ship:Random(0, 360);
Ship:TurnToHeading(newheading, 1.0);
rundist = Ship:Random(HK_MIN_NEXT_SPIRAL_DISTANCE, HK_MAX_NEXT_SPIRAL_DISTANCE);

it searched a place and now waits a random time (at all stop) then it chooses a new random heading, turns to that new heading at full throttle, then chooses a new random distance from it's curent spot to go to and search again.

Now maybe when it turns to it's new heading the game allows it to go backwards :06: I'll update the code to force it to go forwards a small distance before executing the turn to the new heading. I'll release a new version here shortly with this change.

BowfinSS287 07-18-10 10:39 AM

thanks for taking the time to review this stock problem

i hope your new version fixes this, good luck

i haven't seen any planes lately , but i have been more
careful lately.....i got shot up real bad on my last patrol
i'll keep looking for those aircraft....report later

W_clear 07-18-10 09:25 PM

Hi @TDW
I've tested new AI MOD.Destroyer is not an accurate search for submarines,Therefore, it is still blind launch DC.

Thanks:salute:

TheDarkWraith 07-19-10 01:01 AM

Quote:

Originally Posted by W_clear (Post 1447850)
Hi @TDW
I've tested new AI MOD.Destroyer is not an accurate search for submarines,Therefore, it is still blind launch DC.

Thanks:salute:

after your comment above I decided to do some testing....and the results of that testing was that I found a bug in my ship AI script. It's not a bug as in typo or anything - it's a timing bug. Here's the problem:

you are detected by a ship. If the ship is outside the range of the full throttle range then it goes to full throttle heading to your last known position. Once inside the full throttle range it drops back to the DC setup speed and if you are still detected it starts maneuvering to your position. Once it's in the DC setup distance range it goes to DC run speed. It stays at DC run speed (dropping depth charges) until it goes DC run distance. Now here is where the bug rears it's ugly head. Once it's at DC run speed and passes over you it's lost contact with you. The bug is then it immediately switches to a spiral search pattern. Not what I intended the AI to do! So I had to add a timer to give the ship time to complete it's DC run and turn around. When that timer expires if the ship hasn't redetected you then it goes into a spiral search pattern.

The consequences of fixing this bug are the AI is even more deadly now with their DC attacks. Sorry :D fix will be in v0.0.11 which I'll have available soon.

TheBeast 07-19-10 01:17 AM

Quote:

Originally Posted by TheDarkWraith (Post 1447932)
The consequences of fixing this bug are the AI is even more deadly now with their DC attacks. Sorry :D fix will be in v0.0.11 which I'll have available soon.

This new evolution in the AI sounds like fun and U-Boat skippers better be vary carefull when using this MOD.:doh::dead::|\\:rock:

Will-Rommel 07-19-10 05:44 AM

Great ! :woot:

rascal101 07-19-10 08:01 AM

This mod is fantrastic - the game has suddenly becoe a challenge - now instead of sinking the entire British Merchant marine every time I leave port I am lucky if I bag one or two Tommies

OUTSTANDING - except I wonder if your mod AI is slightly too refined

Was attacking a convoy, I was ahead and to their prot side, 90 degrees on- perfedct - single destroyer passes at about 1.5km's - I'm on silent running - I let him pass and wait for the merchants - I start my attack - fire off two torps at one ship and two more at another - but the escort is already after me even before I've hit aything - nothing has happend to indicate that I am there except my scope -

Does your mod allow escorts to detect scopes if they are above the water line for too long - this is ok in clear weather, but I also experienced the same when attacking in heavy fog - surely its slightly too sensitive

Best mod and thanks - would appreciate some comment on the above

Regards
Rascal

TheBeast 07-19-10 08:11 AM

Quote:

Originally Posted by rascal101 (Post 1448119)
This mod is fantrastic - the game has suddenly becoe a challenge - now instead of sinking the entire British Merchant marine every time I leave port I am lucky if I bag one or two Tommies

OUTSTANDING - except I wonder if your mod AI is slightly too refined

Was attacking a convoy, I was ahead and to their prot side, 90 degrees on- perfedct - single destroyer passes at about 1.5km's - I'm on silent running - I let him pass and wait for the merchants - I start my attack - fire off two torps at one ship and two more at another - but the escort is already after me even before I've hit aything - nothing has happend to indicate that I am there except my scope -

Does your mod allow escorts to detect scopes if they are above the water line for too long - this is ok in clear weather, but I also experienced the same when attacking in heavy fog - surely its slightly too sensitive

Best mod and thanks - would appreciate some comment on the above

Regards
Rascal

The escort may have heard your Torpedo Doors Opening/Closing or the escort may have heard the Torpedo it the water.
Either way, I do agree that visual detection is a little to strong and environmental conditions and or day/night seems to have little effect on the enemies ability to detect you.

TheDarkWraith 07-19-10 08:20 AM

Quote:

Originally Posted by rascal101 (Post 1448119)
Was attacking a convoy, I was ahead and to their prot side, 90 degrees on- perfedct - single destroyer passes at about 1.5km's - I'm on silent running - I let him pass and wait for the merchants - I start my attack - fire off two torps at one ship and two more at another - but the escort is already after me even before I've hit aything - nothing has happend to indicate that I am there except my scope -

Does your mod allow escorts to detect scopes if they are above the water line for too long - this is ok in clear weather, but I also experienced the same when attacking in heavy fog - surely its slightly too sensitive

the escorts use all available sensors. So yes they can detect scopes poking out of the water. What probably happened is they heard the torpedoes on their hydrophones and sent a scout to investigate. How many escorts were sent to investigate you?

Zedi 07-19-10 09:26 AM

They see the topedo wake if is steam powered. And at night, this wake is more visible than daylight. And the merchants.. gotta love them now. I'm addicted to charge the unarmerd/escorted convoys at surface by night, such a tense battle.. they really do their best to ram you or do anything just to stay alive, so now the game is a pure joy.

Wonder why TDW got no emblems, medals nor "the moder of the year" title so far :hmmm: At least for this mod which is completely change the gameplay of SH5. The management don't play SH5 or use mods?

An the jokers from Ubi.. they should pay the man and deliver this mod as a patch. This is not a mod anymore, it's a gamefix/patch.


All times are GMT -5. The time now is 09:40 PM.

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