.com.unity Forums

.com.unity Forums (http://forum.shrapnelgames.com/index.php)
-   WinSPWW2 (http://forum.shrapnelgames.com/forumdisplay.php?f=139)
-   -   Bug: AI purchase routine problem (http://forum.shrapnelgames.com/showthread.php?t=48305)

_Tim_ February 1st, 2012 06:06 PM

AI purchase routine problem
 
1 Attachment(s)
I am playing the Long Campaign as Great Britain vs Germany.

The previous game (in 5/41) was a Defend scenario at Tobruk. When the game ended prematurely I checked the German unit list and was surprised to see very few units. There must have been a problem with the purchase routine for the AI.

The next battle (in 6/41) is also a Defend at Tobruk and the same has happened, AI purchases very few units.

I ran the routine again for the 6/41 battle. The battle type is a meeting engagement and the AI purchases what looks like a full complement of units. This might narrow the problem down to the scenario when AI has Assault.

Because of the number of games already played in this campaign my core has a lot of experience and a very high points value (about 25,000). This means that the AI value may be so high that it is running into some sort of maximum which it can't handle and the end result is a very small points allocation that doesn't buy many units.

T0 save files for both Defend games attached. I have a save file for the meeting engagement if required.

Note because I reuse save slots T0 for the earlier game is in 273 and T0 for the second game is in 235.

cheers,

Tim

Mobhack February 1st, 2012 06:21 PM

Re: AI purchase routine problem
 
Quote:

Originally Posted by _Tim_ (Post 794002)
I am playing the Long Campaign as Great Britain vs Germany.

The previous game (in 5/41) was a Defend scenario at Tobruk. When the game ended prematurely I checked the German unit list and was surprised to see very few units. There must have been a problem with the purchase routine for the AI.

The next battle (in 6/41) is also a Defend at Tobruk and the same has happened, AI purchases very few units.

I ran the routine again for the 6/41 battle. The battle type is a meeting engagement and the AI purchases what looks like a full complement of units. This might narrow the problem down to the scenario when AI has Assault.

Because of the number of games already played in this campaign my core has a lot of experience and a very high points value (about 25,000). This means that the AI value may be so high that it is running into some sort of maximum which it can't handle and the end result is a very small points allocation that doesn't buy many units.

T0 save files for both Defend games attached. I have a save file for the meeting engagement if required.

Note because I reuse save slots T0 for the earlier game is in 273 and T0 for the second game is in 235.

cheers,

Tim

MAX_DEFEND is about 26000 points - and a regular battle will limit you to that even if you enter maximum points in preferences.

It may well be that the campaign code is screwing up the total though, and it could well wrap round to a negative number or whatever. I'll check it out.

Andy

Mobhack February 2nd, 2012 01:29 PM

Re: AI purchase routine problem
 
Quote:

Originally Posted by _Tim_ (Post 794002)
I am playing the Long Campaign as Great Britain vs Germany.


T0 save files for both Defend games attached. I have a save file for the meeting engagement if required.


cheers,

Tim

You forgot the .CMT files - a save game consists of 2 files...

Please don't do that in future, its a pain having to manually make .CMTs to match

Andy

Mobhack February 2nd, 2012 01:55 PM

Re: AI purchase routine problem
 
I really need the last turn of the game before the current one. (The ones you have already have a German force bought, so cannot be used to debug the AI purchasing since its been done by that point.)


Andy

_Tim_ February 2nd, 2012 02:43 PM

Re: AI purchase routine problem
 
1 Attachment(s)
Files for the preceding games as requested. CMT included, and apologies for my error yesterday.

Tim

Mobhack February 2nd, 2012 03:05 PM

Re: AI purchase routine problem
 
Quote:

Originally Posted by _Tim_ (Post 794093)
Files for the preceding games as requested. CMT included, and apologies for my error yesterday.

Tim

Those are not really required - I manually made some CMTs to fit.

I do require the previous end of game turn, so I can debug the purchase routine

(The AI had about 1 tank coy, 1 engineer platoon, 1 rifle coy, 1 battery of 75mm + misc support platoons. Obviously insufficient given your core of what must be 150 platoons of (+) arty.... )

Andy

_Tim_ February 2nd, 2012 04:42 PM

Re: AI purchase routine problem
 
The files in the second zip are the previous end of game turns as instructed.

File 272 is T49 for the 4/41 game. This is the last save file I have for this game.

The 5/41 battle is Gbr defend vs Ger assault & the AI purchase is very small. If I have interpreted your instruction correctly the AI purchase routine that you want to check occurs after T49 of the 4/41 game.

The 6/41 battle is also Gbr defend vs Ger assault. This battle also has an incorrect AI purchase. That is why the last turn of the 5/41 is included, this is file 234.

I hope this clears up the confusion.

Tim

Mobhack February 2nd, 2012 05:45 PM

Re: AI purchase routine problem
 
The points value of the core is just over the maximum allowed for a defender in total.

The regular battle code seems to be handling that OK. However the campaign code is not, and the number generated rolls over the local integer value - thus making it a smaller amount than the defender of course.

Fixing that now. Will be fixed in the next release.

I would dump that campaign for now, and restart with something far less expensive & make sure the core does not get up there until the next release.

Andy

gila February 2nd, 2012 08:46 PM

Re: AI purchase routine problem
 
You are maxing the game out to beyond it's limits,not many do this,but you have.

Sell off a major amount of your huge Uber core and sandbag the points godforbid! to get within something the current AI can deal with:)

gila February 2nd, 2012 11:51 PM

Re: AI purchase routine problem
 
When playing a very long campaign,you need to consider your force value.

If it gets too large some battles will be a train wreck for the AI as far fairness ie: too many elite units,spending every point just because you can seems over kill against the pathetic AI IMO.

Rant over:D


All times are GMT -4. The time now is 05:22 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©1999 - 2025, Shrapnel Games, Inc. - All Rights Reserved.