RE: Supply Revisions (Full Version)

All Forums >> [New Releases from Matrix Games] >> World in Flames



Message


Incy -> RE: Supply Revisions (5/28/2010 12:42:25 AM)

Yes. I pop a japanese CP into the med at first opportunity as a standard practice. Makes life for Italy a lot easier.




Shannon V. OKeets -> RE: Supply Revisions (5/28/2010 1:49:32 AM)


quote:

ORIGINAL: Incy

Yes. I pop a japanese CP into the med at first opportunity as a standard practice. Makes life for Italy a lot easier.

Yes, but that supply can be blocked by the CW with a combat unit (air or sea) if the CW is at war with Italy.




paulderynck -> RE: Supply Revisions (5/28/2010 3:54:22 AM)


quote:

ORIGINAL: Incy

Yes. I pop a japanese CP into the med at first opportunity as a standard practice. Makes life for Italy a lot easier.

It used to. The FAQ answers make it real simple for the Wallies to cut.




Shannon V. OKeets -> RE: Supply Revisions (5/28/2010 11:54:29 PM)

I finally got the code for overseas supply lines working for secondary supply sources. Here are two examples. Next up are tertiary supply lines (from 'secondary' supply sources that can not reach a primary supply source but can reach another secondary/tertiary supply source.
===


[image]local://upfiles/16701/A187AAE4B169440EA67DECC1F2141DB9.jpg[/image]




Froonp -> RE: Supply Revisions (5/29/2010 11:05:33 AM)


quote:

ORIGINAL: Shannon V. OKeets

I finally got the code for overseas supply lines working for secondary supply sources. Here are two examples. Next up are tertiary supply lines (from 'secondary' supply sources that can not reach a primary supply source but can reach another secondary/tertiary supply source.
===

Why is there a falco displayed in both screenshots ?




Shannon V. OKeets -> RE: Supply Revisions (5/29/2010 10:18:48 PM)


quote:

ORIGINAL: Froonp


quote:

ORIGINAL: Shannon V. OKeets

I finally got the code for overseas supply lines working for secondary supply sources. Here are two examples. Next up are tertiary supply lines (from 'secondary' supply sources that can not reach a primary supply source but can reach another secondary/tertiary supply source.
===

Why is there a falco displayed in both screenshots ?

I haven't gotten to supply for individual units yet, so the counter being shown is simply the one I clicked on to bring up the Supply Status screen (I never change it).

I'll rewite the code to show the HQ for now - assuming the player has clicked on one of the HQs in the supply sources list on the left. Eventually, I'll let the player click on individual units, which will displayed at the bottom of the form (I've cut it off for these screen shots).

I guess I'll just leave the unit image blank if the player clicks on a suply source that is a city.[&:]




Anendrue -> RE: Supply Revisions (5/29/2010 11:04:49 PM)


quote:

ORIGINAL: Shannon V. OKeets


quote:

ORIGINAL: Froonp


quote:

ORIGINAL: Shannon V. OKeets

I finally got the code for overseas supply lines working for secondary supply sources. Here are two examples. Next up are tertiary supply lines (from 'secondary' supply sources that can not reach a primary supply source but can reach another secondary/tertiary supply source.
===

Why is there a falco displayed in both screenshots ?

I haven't gotten to supply for individual units yet, so the counter being shown is simply the one I clicked on to bring up the Supply Status screen (I never change it).

I'll rewite the code to show the HQ for now - assuming the player has clicked on one of the HQs in the supply sources list on the left. Eventually, I'll let the player click on individual units, which will displayed at the bottom of the form (I've cut it off for these screen shots).

I guess I'll just leave the unit image blank if the player clicks on a suply source that is a city.[&:]

Or provide an image of a hex with a city icon? Perhaps the city name could be added to that display.




Shannon V. OKeets -> RE: Supply Revisions (5/29/2010 11:22:51 PM)


quote:

ORIGINAL: abj9562


quote:

ORIGINAL: Shannon V. OKeets


quote:

ORIGINAL: Froonp


quote:

ORIGINAL: Shannon V. OKeets

I finally got the code for overseas supply lines working for secondary supply sources. Here are two examples. Next up are tertiary supply lines (from 'secondary' supply sources that can not reach a primary supply source but can reach another secondary/tertiary supply source.
===

Why is there a falco displayed in both screenshots ?

I haven't gotten to supply for individual units yet, so the counter being shown is simply the one I clicked on to bring up the Supply Status screen (I never change it).

I'll rewite the code to show the HQ for now - assuming the player has clicked on one of the HQs in the supply sources list on the left. Eventually, I'll let the player click on individual units, which will displayed at the bottom of the form (I've cut it off for these screen shots).

I guess I'll just leave the unit image blank if the player clicks on a suply source that is a city.[&:]

Or provide an image of a hex with a city icon? Perhaps the city name could be added to that display.

The insert map already does that.




Anendrue -> RE: Supply Revisions (5/30/2010 12:00:43 AM)


quote:

ORIGINAL: Shannon V. OKeets


quote:

ORIGINAL: abj9562


quote:

ORIGINAL: Shannon V. OKeets


quote:

ORIGINAL: Froonp


quote:

ORIGINAL: Shannon V. OKeets

I finally got the code for overseas supply lines working for secondary supply sources. Here are two examples. Next up are tertiary supply lines (from 'secondary' supply sources that can not reach a primary supply source but can reach another secondary/tertiary supply source.
===

Why is there a falco displayed in both screenshots ?

I haven't gotten to supply for individual units yet, so the counter being shown is simply the one I clicked on to bring up the Supply Status screen (I never change it).

I'll rewite the code to show the HQ for now - assuming the player has clicked on one of the HQs in the supply sources list on the left. Eventually, I'll let the player click on individual units, which will displayed at the bottom of the form (I've cut it off for these screen shots).

I guess I'll just leave the unit image blank if the player clicks on a suply source that is a city.[&:]

Or provide an image of a hex with a city icon? Perhaps the city name could be added to that display.

The insert map already does that.

Oh duh... face slap to self.




Shannon V. OKeets -> RE: Supply Revisions (5/30/2010 5:02:30 AM)

quote:

ORIGINAL: Froonp


quote:

ORIGINAL: Shannon V. OKeets

I finally got the code for overseas supply lines working for secondary supply sources. Here are two examples. Next up are tertiary supply lines (from 'secondary' supply sources that can not reach a primary supply source but can reach another secondary/tertiary supply source.
===

Why is there a falco displayed in both screenshots ?

Here are two screen shots of an improved version, showing the HQ unit if its path is being displayed. I fixed a bug in the search routine so it now finds a supply path for Umezu.

The colors are still for Italy since the Italian player is the current decision maker.

[image]local://upfiles/16701/65AF4DEAD51642FBBBC370050640D2F4.jpg[/image]
EDIT: I messed up cropping the top and bottom of the JPG file.[:@]




Froonp -> RE: Supply Revisions (5/30/2010 11:30:15 AM)

quote:

ORIGINAL: Shannon V. OKeets
Here are two screen shots of an improved version, showing the HQ unit if its path is being displayed. I fixed a bug in the search routine so it now finds a supply path for Umezu.

On the right panel, the one labelled supply path, it would be good if the China hexes crossed by rail supply path indicated "Rail". Or the reverse, that the hexes crossed using Basic supply path indicated "Basic Supply Path", or "Basic" or "BSP".




Froonp -> RE: Supply Revisions (5/30/2010 11:31:13 AM)

It would also be good if on the inserted map (and why not on the main map too) the hexes listed in the Supply Path table were highlighted.




lomyrin -> RE: Supply Revisions (5/30/2010 5:27:51 PM)

As Froonp stated in the above 2 posts I also would like to see what he proposes.

Lars




Shannon V. OKeets -> RE: Supply Revisions (5/30/2010 6:52:20 PM)

quote:

ORIGINAL: Froonp

quote:

ORIGINAL: Shannon V. OKeets
Here are two screen shots of an improved version, showing the HQ unit if its path is being displayed. I fixed a bug in the search routine so it now finds a supply path for Umezu.

On the right panel, the one labelled supply path, it would be good if the China hexes crossed by rail supply path indicated "Rail". Or the reverse, that the hexes crossed using Basic supply path indicated "Basic Supply Path", or "Basic" or "BSP".

I agree. What I intend to do is count the basic path hexes in the rightmost column. That will start at zero (the beginning of the path) and only increment when a basic paht is 'consumed' to get to the next hex. For example, the overseas portion will be all zeroes but the port where the overseas link terminates would always increase the Basic Path Hex count by 1.

When I get to units using a secondary and tertiary soucre(s) then the Basic Path Hex count will reinitialize at each secondary/tertiary source.




Froonp -> RE: Supply Revisions (5/30/2010 7:02:05 PM)

quote:

ORIGINAL: Shannon V. OKeets

quote:

ORIGINAL: Froonp

quote:

ORIGINAL: Shannon V. OKeets
Here are two screen shots of an improved version, showing the HQ unit if its path is being displayed. I fixed a bug in the search routine so it now finds a supply path for Umezu.

On the right panel, the one labelled supply path, it would be good if the China hexes crossed by rail supply path indicated "Rail". Or the reverse, that the hexes crossed using Basic supply path indicated "Basic Supply Path", or "Basic" or "BSP".

I agree. What I intend to do is count the basic path hexes in the rightmost column. That will start at zero (the beginning of the path) and only increment when a basic paht is 'consumed' to get to the next hex. For example, the overseas portion will be all zeroes but the port where the overseas link terminates would always increase the Basic Path Hex count by 1.

When I get to units using a secondary and tertiary soucre(s) then the Basic Path Hex count will reinitialize at each secondary/tertiary source.

It seems very good to me.




Shannon V. OKeets -> RE: Supply Revisions (5/30/2010 7:03:24 PM)

quote:

ORIGINAL: Froonp

It would also be good if on the inserted map (and why not on the main map too) the hexes listed in the Supply Path table were highlighted.

No.

I do not want to add more graphics at this point. The clutter in each hex is only borderline acceptable to me as it stands. More is not better in this case. Players should be able to understand what the supply path is from the information given in this form. As an assist to that understanding, the insert map centers on the selected hex as you click on hexes in the supply path. So, when you click on one of the sea areas, the insert map centers on the zero section box of the sea area (for the side tracing supply).

EDIT: clarity.




Incy -> RE: Supply Revisions (6/4/2010 12:21:52 AM)

The utility depends on your favourite ruleset and strategy, of course.

It's of cource useless as the only supply for a serious combat effort. However, it has many uses.

We play with isolation, and it's not really that convenient for the wallies to maintain a unit in med zones at EOT if Italy doesn't want it there. Italy can fly air only and make life miserable for the poor CW units having to go out and replace 'the previous unit' every so many times a turn. They will not always manage/give it priority, and Italy can manouvre and reorg intermittently. A single japanese CP can be cheap compared to the extra burden for CW.

We happen to play without SIF and without pilots, which make both naval units and naval aircraft more rare.

Also, even with CW units, the CP can transport resources, for example if Syria is Vichy, or the Cyprus resource, or from a contested/partisaned greece/yogu, or if Bulgaria has fallen to Stalin (and the turkey res needs transporting overseas).




Shannon V. OKeets -> RE: Supply Revisions (6/4/2010 5:01:40 AM)

I am late with the monthly status report and that is because I decided I would get secondary supply working before I took time out to write up the month's activities. I have that working now, so I will try to get to the monthly status report tomorrow morning.
===
Here is one of the tst cases I was using for finding a rail path. Notice that the search algorithm uses rail hexes if available, but will take a direct route to to a primary supply source if the rail path is too far out of the way. I monitored this search's decision making from start to end and the route shown here consists of just the "first choice" hexes - there were no dead ends explored.

[image]local://upfiles/16701/571B59F9F14D422999B2C829664CEBAF.jpg[/image]




Shannon V. OKeets -> RE: Supply Revisions (6/4/2010 5:04:53 AM)

2nd in a series of 3. Here is one that I found interesting. The algorithm looks for rail paths without overseas supply first. It just has enough Basic Path hexes available to reach Dacca from Rangoon. Of course if the weather changes it will have to go by sea.

[image]local://upfiles/16701/48F1F75C29ED4285BADC3032B2377717.jpg[/image]




Shannon V. OKeets -> RE: Supply Revisions (6/4/2010 5:12:01 AM)

3rd and last in the series.

The way the overseas supply routines work is that for each port controlled by the given major power or its allies, a path is attempted to be found to a primary supply source. The search goes through the ports from north to south, so a lot of the British units trace to Belfast! Once the ports have been identified, the sea areas that are adjacent to the port are tested for viability (not being interdicted by the enemy) and overseas supply is propagated to adjacent sea areas around the world. Finally, secondary supply sources that do not have overland railway supply paths to a primary suply source attempt to reach a port that is adjacent to one of the sea areas through which viable supply can be traced. The results of this are manifest in this screen shot.

[image]local://upfiles/16701/AB5EF9CEBB98497DA49E83FA882DBF26.jpg[/image]




Zorachus99 -> RE: Supply Revisions (6/4/2010 5:36:38 PM)

I look forward to testing this revision.  [&o]




Incy -> RE: Supply Revisions (6/4/2010 9:19:29 PM)

I'm curious about the effectiveness of not always calculating an optimum path. I think you might be better off exhausting all paths up to lenght 2 before trying lenght 3 paths, and then lenght 4 paths.

You'll have to (try to) calculate a lenght 2 path sooner or later anyways, as the weather changes. Especially for paths that don't change much this might become expensive.

Take a complex (i.e expensive) lenght 3 path.
-Every time weather changes to rain/storm/blizzard it must be exhaustively calculated, and will not find a path, so will end up OOS and no path will be stored.
-every time weather improves it must be recalculated, and will find a path
-possibly it will have to be recalculated when the weather changes from fine to snow again too

Especially the first search is a problem because it will be exhaustive, and it will be done repeatedly for many units/sources. You might well end up with a long calculation time whenever rolling the weather.

I predict that if you always make computations that 'guarantee' an optimal result, and if you store the path even if to long (under current weather), you will end up doing much, much less calculation. A greedy but optimal search is not on average much more expensive than a greedy non-optimal search. In such a scenario weather changes will only involve recalculations because hex supply caracteristics change, i.e frozen lake hexsides & frozen ports.




Incy -> RE: Supply Revisions (6/4/2010 9:23:00 PM)

btw, a very effective optimisation could be to start by calculating 'connected rail segments', i.e. a lists of rail hexes that make up uniterrupted rail grids. With each 'connected rail segment' you should also store the distance the segment has to a supply souce.

If you do this in an initial search, all secondary->primary searches will become a matter of searching for the nearest hex in a 'connected rail segment'.  An exhaustive search would never exceed 4 hexes in lenght.

Example:
Initial search for euroaxis finds and stores 3 'connected rail segment':
-all rail hexes in central europe/west europe/Italy/Balkans (dist 0) (plus baltic, It coast and east med)
-all axis rail hexes in north africa (dist 1)
-a semi-isolated pocket around Stalingrad (dist 3)
All secondary supply sources (that need recalculation) test all rail hexes within distance 4 (starting with the closest first) to see if any hex is in a 'connected rail segment'. 
If one or more connected rail hexes are found, compare the distance to the closest one, add the 'connected rail segment' distance to primary supply, and there you have the lenght of your primary path




Shannon V. OKeets -> RE: Supply Revisions (6/5/2010 12:30:11 AM)


quote:

ORIGINAL: Incy

I'm curious about the effectiveness of not always calculating an optimum path. I think you might be better off exhausting all paths up to lenght 2 before trying lenght 3 paths, and then lenght 4 paths.

You'll have to (try to) calculate a lenght 2 path sooner or later anyways, as the weather changes. Especially for paths that don't change much this might become expensive.

Take a complex (i.e expensive) lenght 3 path.
-Every time weather changes to rain/storm/blizzard it must be exhaustively calculated, and will not find a path, so will end up OOS and no path will be stored.
-every time weather improves it must be recalculated, and will find a path
-possibly it will have to be recalculated when the weather changes from fine to snow again too

Especially the first search is a problem because it will be exhaustive, and it will be done repeatedly for many units/sources. You might well end up with a long calculation time whenever rolling the weather.

I predict that if you always make computations that 'guarantee' an optimal result, and if you store the path even if to long (under current weather), you will end up doing much, much less calculation. A greedy but optimal search is not on average much more expensive than a greedy non-optimal search. In such a scenario weather changes will only involve recalculations because hex supply caracteristics change, i.e frozen lake hexsides & frozen ports.


The search algorithm is pretty optimal as it is. It is a directed search heading towards the closest supply source (which is sometimes a port that leads overseas).

Note that if a path with fewer Basic Hexes is available, it will be longer because it will use more rail hexes. Longer paths are more vulnerable to being cut by the enemy.

If a previous path fails (e.g., due to weather) then the program will search for a path with fewer available basic path hexes. Finding one, that will become the new 'previous' path. The next time the program needs to find supply for the the unit/secondary supply source, it will try to use the previous path. So, if a path with 2 Basic Path Hexes becomes required, that will become the new default.
==
I thought about recording rail networks, but there is a maintenance task associated with keeping them up-to-date (due to the presence/absence of enemy units). I'm pretty happy with just recording the segments that are in use and the units depending on them. Note that the only time rail paths are used is from secondary to primary sources, so they aren't used all that often for supply. For shipping resources, they get a lot more use, but that is only one per turn.




paulderynck -> RE: Supply Revisions (6/5/2010 2:14:53 AM)

deleted




Shannon V. OKeets -> RE: Supply Revisions (6/5/2010 2:16:47 AM)

quote:

ORIGINAL: paulderynck


quote:

ORIGINAL: Shannon V. OKeets

2nd in a series of 3. Here is one that I found interesting. The algorithm looks for rail paths without overseas supply first. It just has enough Basic Path hexes available to reach Dacca from Rangoon. Of course if the weather changes it will have to go by sea.

[image]local://upfiles/16701/48F1F75C29ED4285BADC3032B2377717.jpg[/image]

Why is the path showing 4 hexes in length. Shouldn't it be 3?

From Yenangyaung to the nearest rail hex in India is 4 Basic Path hexes. Going by rail to the hex NW of Mandalay doesn't help.

EDIT: You can't cross the alpine hexsides.




paulderynck -> RE: Supply Revisions (6/5/2010 2:18:19 AM)

Damn! you're quick! Didn't see the Alpine hexside.

Is there any way to deduce the hex numbers when viewing these pics?




Incy -> RE: Supply Revisions (6/6/2010 12:48:47 AM)

quote:

If a previous path fails (e.g., due to weather) then the program will search for a path with fewer available basic path hexes. Finding one, that will become the new 'previous' path. The next time the program needs to find supply for the the unit/secondary supply source, it will try to use the previous path. So, if a path with 2 Basic Path Hexes becomes required, that will become the new default.


The problem is with paths where the optimal lenght is 3 or 4.
-when the weather turns bad you'll do an exhaustive search and fail, no path being recorded.
-when the weather turns good you'll do another search and succeed
This will repeat over and over again. Worse, where paths are longer than 4 you'll end up doing exhaustive searches every time anything at all is checked.

Units with paths longer than 4 (or with no path) can be very expensive. As the game proceeds potentially hundreds of units could be without a 4-lenght or better path. Given that they have no path, every such search should be expensive, too.

The problem is that whenever anything happens that can affect supply, all of those units will have to be retested. So in the late game you may end up testing potentially hundreds of paths everytime a zoc or a hex changes.




Shannon V. OKeets -> RE: Supply Revisions (6/6/2010 1:53:54 AM)

quote:

ORIGINAL: Incy

quote:

If a previous path fails (e.g., due to weather) then the program will search for a path with fewer available basic path hexes. Finding one, that will become the new 'previous' path. The next time the program needs to find supply for the the unit/secondary supply source, it will try to use the previous path. So, if a path with 2 Basic Path Hexes becomes required, that will become the new default.


The problem is with paths where the optimal lenght is 3 or 4.
-when the weather turns bad you'll do an exhaustive search and fail, no path being recorded.
-when the weather turns good you'll do another search and succeed
This will repeat over and over again. Worse, where paths are longer than 4 you'll end up doing exhaustive searches every time anything at all is checked.

Units with paths longer than 4 (or with no path) can be very expensive. As the game proceeds potentially hundreds of units could be without a 4-lenght or better path. Given that they have no path, every such search should be expensive, too.

The problem is that whenever anything happens that can affect supply, all of those units will have to be retested. So in the late game you may end up testing potentially hundreds of paths everytime a zoc or a hex changes.

It's not that bad.

Only the rail paths from secondary to primary are ever more than 4 hexes away, so those searches are fast. Most of the seconary to primary never change (i.e., the cities are immobile). For example, tracing from capitals captured by the Germans (or aligned to Germany) to a German city remains the same throughout the game for the most part.

I am keeping the last successful path for each unit, even if it has since failed. This means that if a unit has supply with a path of 4 and the weather changes to 2 and all paths fail (i.e., the unit is out of supply), I still have the last successful path, so if the weather gets nice again, the path should work again. Storing paths is easy and takes very little memory. Checking them is also very fast to do.

EDIT: Existing overseas paths are easy to validate too, with the caveat that some are rail paths. From testing the new supply determination code in detail, the worst case I have seen is Ethiopia when it is held by the Italians. That secondary supply source is virtually never able to trace back to a primary supply source, but it has to be checked continuously to see if a miracle has occurred.




Froonp -> RE: Supply Revisions (6/6/2010 5:06:33 PM)

Maybe it was said below, but an idea to save time in calculating supply, would be to have units stacked with another non hq unit from the same country to use the same supply path as that unit.




Page: <<   < prev  1 [2] 3   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.78125