Matrix Games Forums

Forums  Register  Login  Photo Gallery  Member List  Search  Calendars  FAQ 

My Profile  Inbox  Address Book  My Subscription  My Forums  Log Out

Retreat Bug?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
  Printable Version
All Forums >> [New Releases from Matrix Games] >> Gary Grigsby's World at War: A World Divided >> Retreat Bug? Page: [1]
Login
Message << Older Topic   Newer Topic >>
Retreat Bug? - 11/22/2008 11:26:37 PM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline
I'm on 1.02 playing my first ever PBEM. My opponent (Germany) beat me (SU) in a large battle in Kursk and I thought my remaining undamaged units (5 Inf, 6 Arty) would retreat to the obvious place - Moscow. Unfortunately, they retreated to Gorki and two remaining unused German armour advanced through Kursk to Moscow, took on the Inf, Arty, 2 Flak in Moscow, and won. I was losing the game anyway but the loss of 20 supply, 2 factories, 1 RC, rail, 8 units on the production cycle of which 7 were about to appear just finished me off.

Of course, I hear you say - I should have studied the rules more carefully. However, I've just read 8.5.2 and I'm completely bewildered. It says that units trace a path to the nearest friendly factory that can be reached along a valid rail strategic movement path. Well, as far as I can see, 3 regions fulfilled this criteria - Moscow, Gorki and Stalingrad. (I don't think this affects the calculations but Kursk rail is destroyed and the others were all ok). So, how do you know which one they will retreat too?

A later priority is the adjacent land region with the most combat units. I'm not sure if this is supposed to come into play or not with the above but, if it did, then Stalingrad with 8 units (3 Mil, 4 Arty, 1 Flak) should have received the retreating units. Moscow with it's 4 units would be second choice and Gorki with 2 (2 armour) third but of course they went to Gorki.

The rules also say that if several regions met the above requirements equally the region with the most supply would count. Well, I don't think this is relevant to this example but, in case, Moscow had 20 supply, Gorki 5 and Stalingrad 1.

So, if I was able to go back in time and redo my move, what should I have done to ensure my units retreated to Moscow? I haven't got a clue - can anyone help me? Is this a bug?

Playing my first ever PBEM was a great experience and I totally recommend it to anyone who has not experienced it yet, but I really don't think I can go back to WAW until I can get my head around this retreat rule.

What hurt even more was my undamaged units refused to retreat to Moscow but 2 damaged Arty, 1 damaged Inf and 1 damaged Para were happy to go there and be butchered by the Germans on the production cycle. Not very fair, I would suggest.

Tom
Post #: 1
RE: Retreat Bug? - 11/23/2008 5:30:43 AM   
Lucky1

 

Posts: 383
Joined: 10/30/2006
Status: offline
Although I have no knowledge of code whatsoever, I wonder whether the retreat issues Tom describes are related to the bug (pertaining to tracing paths) I mention in the 1.03 beta area of the forum (which evidently also exists in 1.02). Just speculative, of course. While I can't volunteer WanderingHead to look at the issue, I do know that he generally requires savegames to be able to make sense of what occurred. So, if you still have your prior turn and that of your opponent (with passwords), hang on to these in case they are requested.

I have also noticed the odd funny stuff with where damaged units are queued (for example, why does my damaged fighter invariably queue in Sinkiang)? But, I take these with a grain of salt as affecting all players roughly similarly (like dealing with a referee that makes the odd bad call - in the end, it should even out....).

Anyhow, I have never personally had the issue occur like you described. By any chance was the rail damaged to Stalingrad or Moscow?



(in reply to Tom Grosv)
Post #: 2
RE: Retreat Bug? - 11/23/2008 9:11:26 AM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline
Thanks Lucky1 - you're Mr Dependable on this forum.  No, rail was undamaged in Stalingrad, Moscow and Gorki.  Fully damaged in Kursk.  Didn't know about your posting on a retreat bug but I'll look it up.

(in reply to Lucky1)
Post #: 3
RE: Retreat Bug? - 11/25/2008 2:06:32 AM   
WanderingHead

 

Posts: 2134
Joined: 9/22/2004
From: GMT-8
Status: offline
Damaged rail does affect the retreat outcome. Units will first attempt to retreat via an undamaged (all the way from start to finish) rail line if possible.

Which patch version of the game was this? Latest?

Retreats are tough. I've tweaked them a little, but they follow somewhat generic rules and it is hard to make them always make sense.

(in reply to Tom Grosv)
Post #: 4
RE: Retreat Bug? - 11/25/2008 1:15:39 PM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline

quote:

ORIGINAL: WanderingHead

Damaged rail does affect the retreat outcome. Units will first attempt to retreat via an undamaged (all the way from start to finish) rail line if possible.

Kursk was completely damaged and Moscow, Gorki and Stalingrad completely undamaged so doesn't appear to be relevant.
quote:


Which patch version of the game was this? Latest?

1.02
quote:


Retreats are tough. I've tweaked them a little, but they follow somewhat generic rules and it is hard to make them always make sense.

That's not good. Should I have dismantled my Gorki factory and moved it to another region just to encourage my retreating Kursk units find their way to Moscow! Surely you should be able to have some control over where your units retreat to?

(in reply to WanderingHead)
Post #: 5
RE: Retreat Bug? - 11/25/2008 6:03:30 PM   
WanderingHead

 

Posts: 2134
Joined: 9/22/2004
From: GMT-8
Status: offline
quote:

ORIGINAL: Tom Grosv
That's not good. Should I have dismantled my Gorki factory and moved it to another region just to encourage my retreating Kursk units find their way to Moscow! Surely you should be able to have some control over where your units retreat to?


It's rather hard to give the player control over where they retreat. How would it be done?

My goal was to try to make retreats fairly intuitive. I tweaked things to make them retreat more towards regions with higher production and population. In your case, I would have expected them to retreat to Moscow (assuming that Moscow had more production than Gorki as it normally would).

I'd actually have to review the code to see exactly how it is done, I do not recall in detail.

(in reply to Tom Grosv)
Post #: 6
RE: Retreat Bug? - 11/26/2008 3:30:40 PM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline

quote:

ORIGINAL: WanderingHead

My goal was to try to make retreats fairly intuitive. I tweaked things to make them retreat more towards regions with higher production and population. In your case, I would have expected them to retreat to Moscow (assuming that Moscow had more production than Gorki as it normally would).



I believe (can't check at the moment) that I was getting towards the situation where I did not have enough resources in my pools to feed all the factories - perhaps the answer lies somewhere in this direction?

(in reply to WanderingHead)
Post #: 7
RE: Retreat Bug? - 11/28/2008 3:03:54 PM   
GShock


Posts: 1245
Joined: 12/9/2007
From: San Francisco, CA - USA
Status: offline
There have to be issues with the retreat algorithm...we already mentioned the fact that, many times. I always wondered how could some convoys damaged by german subs get back to base when there are german uboats everywhere in the atlantic, they just disregard this fact, and they don't take into account any MP limitation, meaning they could get to any port in the world provided it had a factory. I also happened to notice that during opfire against a sub, and during enemy turn, if a destroyer attacks your sub and you damage it, your ammo doesn't drop.

Another thing, is pertaining the ships docked in ports. If you capture the region with an amphibious assault they just disappear but there's no notification of capture/destruction/dmg+relocation, just nothing.

Considering the Japanese struggle for resources, and especially in global glory scenario...I'm used to capture an unending source of supplies, the AI keeps building on remote islands (java, borneo, etc...) but which can't be delivered due to naval blockades. It would be so damn useful to really capture these supplies...such items also vanish and they definitely don't add to my totals.

One thing is sure: as Lucky1 said, it's like a refree giving a bad call. Anyone can happen to have it, and with every faction. I hope 2by3 will get the needed time to improve this game sooner or later. Very very minor issues. The game is still very balanced and entertaining and it's definitely worth improving (for instance...i forgot to save game before alt-tabbing and when i tried to switch back, the screen remained black, the music was playing but i couldn't go on anymore).

Very minor things, really.


_____________________________

How long will you pretend you can't do anything about it? Support www.animalsasia.org

(in reply to Tom Grosv)
Post #: 8
RE: Retreat Bug? - 11/28/2008 6:54:32 PM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline
I've gone back and done some test attacks.  In the example I gave earlier about Germany attacking Kursk, SU will, as long as there is an undamaged factory in Gorki, always ALWAYS retreat to Gorki.  Mix around as many troops as you want in Moscow, Gorki and Stalingrad; play around with what you are producing in the factories, it make no odds - Gorki they go.

I previously humourously suggeted dismatling the Gorki factory to encourage retreating Kursk units to go to Moscow.  Actually, I realise this is a possible valid tactic - if it is vital to you that units retreating from Kursk go to Moscow then you MUST dismantle your Gorki factory.

Tell me that's not gamey.

(in reply to GShock)
Post #: 9
RE: Retreat Bug? - 11/28/2008 9:31:30 PM   
Lucky1

 

Posts: 383
Joined: 10/30/2006
Status: offline
Interesting! Are there any conditions in your experiment that might be relevant? Is your rail damagaed, for example? Were any of the factories 'moved' to Gorki or to other territories?

(in reply to Tom Grosv)
Post #: 10
RE: Retreat Bug? - 11/28/2008 9:51:33 PM   
Lucky1

 

Posts: 383
Joined: 10/30/2006
Status: offline
Hmm. I have been able to replicate what Tom has noted. Troops ALWAYS appear to retreat to Gorki from Kursk... I have to admit, I have never paid much attention to retreat paths before, so I don't know whether there are similar weird retreats in other critical areas (e.g. czechoslovakia, Austria).

(in reply to Lucky1)
Post #: 11
RE: Retreat Bug? - 11/29/2008 3:06:48 AM   
WanderingHead

 

Posts: 2134
Joined: 9/22/2004
From: GMT-8
Status: offline
quote:

ORIGINAL: Lucky1
Hmm. I have been able to replicate what Tom has noted. Troops ALWAYS appear to retreat to Gorki from Kursk... I have to admit, I have never paid much attention to retreat paths before, so I don't know whether there are similar weird retreats in other critical areas (e.g. czechoslovakia, Austria).


I pretty much tuned the retreat algorithm using Germans retreating in the Central European theater, so I don't think they would be all that wierd. As I recall, I actually started tuning because Germans used to frequently retreat from E Poland to Rumania, really throwing a fighting retreat off balance.

So anyway, the algorithm is something like this:
foreach candidate_region (neighboring lost region)
{
  metric(candidate_region) = supplies  + 5* (1 + factories*production_multiplier + population + rail_units)
  foreach neigb_region (same player region neigboring candidate_region)
  {
    metric(candidate_region) += (supplies  + 5* (1 + factories*production_multiplier + population + rail_units))/2
  }
}
retreat to region with largest metric(candidate_region)
So it looks for a friendly region that feels homey and developed (production and population), but also likes a region that is surrounded by other homey and developed regions. By looking at neighboring regions, it makes getting surrounded and isolated after retreating less likely.

I think that the issue with Gorki may be in part that it simply has more neighboring Russian regions. Especially if Smolensk is German controlled. The start of game (Global Glory) values are Moscow: 41, Gorki: 46 (a bit misleading, since it doesn't reflect the second factory in Moscow or the lost Kursk region).

Considering that it is a generic rule and units retreating to Moscow could reasonably be surrounded (an armor push to Gorki and Yaroslavl), I don't think the rule is performing all that far off base. I think it should, at least sometimes, pick Gorki over Moscow.

There are a few things that could happen here:
1) the weighting of neighbors to the candidate region could be reduced to 1/3 (from the current 1/2)
2) retreat directions could be randomized somewhat, spreading units out somewhat and in a less predictable way.

For example:
foreach candidate_region (neighboring the lost region)
{
  metric(candidate_region) = supplies  + 5* (1 + factories*production_multiplier + population + rail_units)
  foreach neigb_region (same player region neigboring candidate_region)
  {
    metric(candidate_region) += (supplies  + 5* (1 + factories*production_multiplier + population + rail_units))/3
  }
  metric(candidate_region) += die(10)
}
retreat to region with largest metric(candidate_region)
Just changing the weighting to 1/3 from 1/2 changes the start of game values to Moscow: 34, Gorki: 35

< Message edited by WanderingHead -- 11/29/2008 3:10:28 AM >

(in reply to Lucky1)
Post #: 12
RE: Retreat Bug? - 11/29/2008 3:17:23 AM   
Lucky1

 

Posts: 383
Joined: 10/30/2006
Status: offline
Offering my $.02, I would prefer option one. Although I have no firm objection to randomization occuring, I think that given the three month time periods, this would be less likely to occur.

Does the algorithm factor in strategic points values anywhere (I didn't notice this....)?

(in reply to WanderingHead)
Post #: 13
RE: Retreat Bug? - 11/29/2008 3:22:13 AM   
WanderingHead

 

Posts: 2134
Joined: 9/22/2004
From: GMT-8
Status: offline
quote:

ORIGINAL: Lucky1
Does the algorithm factor in strategic points values anywhere (I didn't notice this....)?


No, not currently. I thought about it, but it would only really matter for Russia. If the rule is to work well everywhere (like Germany) it seems like it should be ignored.

(in reply to Lucky1)
Post #: 14
RE: Retreat Bug? - 11/29/2008 4:09:10 AM   
Lucky1

 

Posts: 383
Joined: 10/30/2006
Status: offline
Keeping in mind that this post was initially about units not retreating back to Moscow (and the big 5 points it represents), SPs are arguably relevant to the equation (I think most games are won and lost over Russia). Would it not be possible to simply have the SP value added to the mix, with no value being added where no SPs exist?

(in reply to WanderingHead)
Post #: 15
RE: Retreat Bug? - 11/29/2008 7:13:17 AM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline

quote:

ORIGINAL: WanderingHead
Just changing the weighting to 1/3 from 1/2 changes the start of game values to Moscow: 34, Gorki: 35


quote:

ORIGINAL: Lucky1
Keeping in mind that this post was initially about units not retreating back to Moscow (and the big 5 points it represents), SPs are arguably relevant to the equation (I think most games are won and lost over Russia). Would it not be possible to simply have the SP value added to the mix, with no value being added where no SPs exist?


I like both these ideas which together would, I suppose, favour Moscow over Gorki. I understand what WH is saying about units prefering the security of Gorki rather than risk being surrounded in Moscow but surely Moscow was such a hugely important area to the Soviets, both industrially and emotionally? The Politburo tried to persuade Stalin to leave Moscow but he refused. Boy, will he be pi%%ed when his units retreat to Gorki not Moscow. I wouldn't want to be the army commander when an irate Stalin despatches Beria to "have words".

I can't make up my mind about randomization. Perhaps it would be good for units to spread out somewhat.

(in reply to WanderingHead)
Post #: 16
RE: Retreat Bug? - 11/29/2008 7:31:50 AM   
WanderingHead

 

Posts: 2134
Joined: 9/22/2004
From: GMT-8
Status: offline
quote:

ORIGINAL: Tom Grosv
I can't make up my mind about randomization. Perhaps it would be good for units to spread out somewhat.


What I liked about randomization is that if the algorithm isn't quite right, it wouldn't be so glaring since it wouldn't be all or nothing. If 5 units retreated to Gorki and 3 to Moscow it mightn't be so bad.

The priorities would still come in to it, so they shouldn't retreat in bad directions. But if multiple regions have close retreat values then units might spread out.


(in reply to Tom Grosv)
Post #: 17
RE: Retreat Bug? - 11/29/2008 9:21:28 AM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline

quote:

ORIGINAL: WanderingHead

What I liked about randomization is that if the algorithm isn't quite right, it wouldn't be so glaring since it wouldn't be all or nothing. If 5 units retreated to Gorki and 3 to Moscow it mightn't be so bad.

The priorities would still come in to it, so they shouldn't retreat in bad directions. But if multiple regions have close retreat values then units might spread out.



You've persauded me. It even feels kind of right that the game might sometimes model the confusion and chaos that could occur in military retreats. Gives another enjoyable variable to the game as well, perhaps. When I refer back to my original post, I would have been quite happy if only a part of my 5 retreating infantry and 6 retreating artillery went to Moscow.

(in reply to WanderingHead)
Post #: 18
RE: Retreat Bug? - 11/29/2008 5:05:12 PM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline
Ah ha! Now I know that supplies are important I did another experimental attack and this time packed Moscow with supplies - it worked! My retreating Kursk units went to Moscow! Well, it's better than dismantling the Gorki factory.

quote:

ORIGINAL: WanderingHead

The start of game (Global Glory) values are Moscow: 41, Gorki: 46


Could I humbly ask you for a bit more detail - I've tried following your algorithm but I can't get my sums to add up. Should have studied maths harder at school.

(in reply to WanderingHead)
Post #: 19
RE: Retreat Bug? - 11/29/2008 9:05:36 PM   
Lucky1

 

Posts: 383
Joined: 10/30/2006
Status: offline
In my experiment, fyi, Moscow always had more supply (I can check the amount). But, I still think it is a bit gamey to have to produce and stockpile supply to ensure units retreat to an area that (as indicated in SPs) was of tremendous importance in the war....

(in reply to Tom Grosv)
Post #: 20
RE: Retreat Bug? - 11/30/2008 2:37:11 AM   
WanderingHead

 

Posts: 2134
Joined: 9/22/2004
From: GMT-8
Status: offline

quote:

ORIGINAL: Tom Grosv
Ah ha! Now I know that supplies are important I did another experimental attack and this time packed Moscow with supplies - it worked! My retreating Kursk units went to Moscow! Well, it's better than dismantling the Gorki factory.


In that sense, the original rules could be better. It is clearer what to do to force the situation (just stack supplies). But that still left lots of bad decisions I found (in part perhaps because few people bothered to intentionally stack supplies).

quote:

ORIGINAL: Tom Grosv
quote:

ORIGINAL: WanderingHead
The start of game (Global Glory) values are Moscow: 41, Gorki: 46

Could I humbly ask you for a bit more detail - I've tried following your algorithm but I can't get my sums to add up. Should have studied maths harder at school.


To be fair, I didn't count these myself. I just slightly modified the program to have it easily print it out.

Also, I made a mistake in my description above :). Above, I included +5 points just for being a friendly region, which is not actually implemented. It is actually
foreach candidate_region (neighboring lost region)
{
  metric(candidate_region) = supplies  + 5* (factories*production_multiplier + population + rail_units)
  foreach neigb_region (same player region neigboring candidate_region)
  {
    metric(candidate_region) += (supplies  + 5* ( factories*production_multiplier + population + rail_units))/2
  }
}
retreat to region with largest metric(candidate_region)


The numbers:

Moscow: 5 (1 rail) + 10 (2 pop) + 5 (1 factory) = 20
Kursk: 5 (1 rail) + 5 (1 population) = 10
Smolensk: 5 (1 rail) + 5 (1 pop) + 5 (1 factory) = 15
Yaroslavl: 5 ( 1 rail) = 5
Gorki: 5 (1 rail) + 5 (1 pop) + 5 (1 factory) = 15

Moscow total: 20 + 10/2 + 15/2 + 5/2 + 15/2 = 20+5+7+2+7 = 41

(all the fractions are rounded down)

I modified my code to show it like in the image. Such visibility could be included, seems fair to me. The only risk is that it is a little misleading ... if some neighboring regions are lost then the retreat value changes.





Attachment (1)

(in reply to Tom Grosv)
Post #: 21
RE: Retreat Bug? - 11/30/2008 8:22:05 AM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline
Thanks WH, that all makes sense now.

(in reply to WanderingHead)
Post #: 22
RE: Retreat Bug? - 11/30/2008 11:46:14 AM   
Tom Grosv

 

Posts: 84
Joined: 6/20/2005
Status: offline

quote:

ORIGINAL: Tom Grosv

So, if I was able to go back in time and redo my move, what should I have done to ensure my units retreated to Moscow? I haven't got a clue - can anyone help me?


I've done some further testing using the info from WH and I now I think I understand how retreat works. Going back to my original game I realise that Moscow had 84 points and Gorki 90 points (the x3 factory multiplier is kicking in). All I would have needed to do is change the balance of supplies (remembering every supply in Moscow is worth 1/2 to Gorki). Perhaps not strictly ideal so maybe the tweaks suggested by WH and Lucky would be a good thing but the most important thing to me is I understand the process. I'm fairly sure the set up with the current algorithm suits the vast majority of retreats - players just may want to take a little care in a few critical locations.

(in reply to Tom Grosv)
Post #: 23
RE: Retreat Bug? - 11/30/2008 7:36:46 PM   
WanderingHead

 

Posts: 2134
Joined: 9/22/2004
From: GMT-8
Status: offline
What I'm thinking is to change the formula as follows
foreach candidate_region (neighboring lost region)
{
  metric(candidate_region) = supplies  + factories*production_multiplier + population + rail_units

  metric_neighbors = 0
  foreach neigb_region (same player region neigboring candidate_region)
  {
    metric_neighbors += factories*production_multiplier + population + rail_units
  }

  metric(candidate_region) += metric_neighbors/3
}
retreat to region with largest metric(candidate_region)
The changes involved in the equations:
1) eliminate the 5* for all the non-supply terms, to make supply relatively more important. This allows the player to more easily influence it directly if desired.
2) remove the impact from supplies in neighboring regions (again making it easier to influence with supply placement).
3) decrease the effect of neighbors to 1/3 from 1/2.

In addition:
4) show the retreat value in the region popup for friendly regions, so the player can see it.
5) maybe include some randomization (?)
6) maybe include strategic points (?)

As I said, the retreat value in the region popup can be a little misleading because it can change from supply production and lost neighboring regions, but with that information and this rule spelled out in the release notes we could have the best of all worlds. Most retreats should make sense by default, the player can see it and reasonably predict it, and the player can influence it with supply positioning.

(in reply to Tom Grosv)
Post #: 24
RE: Retreat Bug? - 11/30/2008 8:34:51 PM   
Lucky1

 

Posts: 383
Joined: 10/30/2006
Status: offline
Thanks WanderingHead. Your assistance (as always) has been quite instructive and I think the proposed changes will be an improvement.

Since you are explaining the mysteries of retreats, I wonder whether it might be possible to explain how damaged items trace to factories. I have always been puzzled about this and wonder (for example) why my damaged Chinese fighter (and often, other units) queues up in Sinkiang....

Cheers,

Sean

(in reply to WanderingHead)
Post #: 25
RE: Retreat Bug? - 12/1/2008 9:01:31 AM   
GKar


Posts: 617
Joined: 5/18/2005
Status: offline
quote:

ORIGINAL: WanderingHead

The changes involved in the equations:
1) eliminate the 5* for all the non-supply terms, to make supply relatively more important. This allows the player to more easily influence it directly if desired.
2) remove the impact from supplies in neighboring regions (again making it easier to influence with supply placement).
3) decrease the effect of neighbors to 1/3 from 1/2.

In addition:
4) show the retreat value in the region popup for friendly regions, so the player can see it.
5) maybe include some randomization (?)
6) maybe include strategic points (?)


I especially like no. 1).

I'd vote for no. 6) but would only introduce a small random factor, if at all.

(in reply to WanderingHead)
Post #: 26
Page:   [1]
All Forums >> [New Releases from Matrix Games] >> Gary Grigsby's World at War: A World Divided >> Retreat Bug? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

1.984