Coding the Move on Suez

World in Flames is the computer version of Australian Design Group classic board game. World In Flames is a highly detailed game covering the both Europe and Pacific Theaters of Operations during World War II. If you want grand strategy this game is for you.

Moderator: Shannon V. OKeets

Post Reply
User avatar
Greyshaft
Posts: 1979
Joined: Mon Oct 27, 2003 1:59 am
Location: Sydney, Australia

Coding the Move on Suez

Post by Greyshaft »

This post started out as a general examination of MWiF strategy guidelines but then drilled down into one particular task – the seizure of Suez by the Italians. That particular objective is no more deserving of analysis than half a hundred others but it just happened to be where my keyboard took me. I’d be interested in reading other opinions on how you can teach a computer the best method for selecting and seizing a target in WiF.

Victory in WiF is determined by control of Objective Hexes. There are 67 Objectives Hexes in total, but geo-political realities limit each player to subsets of that total. Adolf would not take too kindly to Benito claiming Munich as an Italian hex.

A rough division of territory between the Axis powers might see Italy tasked with securing (or assisting the conquest of) of Aden, Athens, Baghdad, Belgrade, Bucharest, Budapest, Buenos Aires, Calcutta, Cape Town, Colombo, Dakar, Delhi, Diego Suarez, Gibraltar, Istanbul, Jerusalem, Madrid, Marseilles, Milan, Paris, Prague, Riyadh, Rome, Suez, and Teheran. These objectives can be grouped by location and ease of conquest. For example, if Italy has just taken Suez then Jerusalem is the obvious next step. Aden and Calcutta are also in the same general direction but will not be as easy. So how does Italy decide where to go next and whether it will have the manpower to do the job when it gets there?

Rule #1: An objective is not valid unless it belongs to a country with which you are at war. Choosing whether to declare war on other countries is a separate discussion

A first (rather obvious) criteria is to consider which countries are at war with Italy. Let us presume it is early 1940 and Guderian can see the Eiffel Tower from the cupola of his Panzer. Benito reluctantly signs the declaration of war on CW and France and is now in the game. What does the Italian Army do from this point onwards?

Rule #2: An objective is not valid unless you can trace a valid movement path to it. This brings up the concept of secondary objectives – locations which are strategically important in the game but do not rate as Objective Hexes eg factories, resources, oil, Malta, the Ardennes, the unnamed hex in Egypt where the map is only one hex wide. Once again, lets leave that for a later discussion

After the DoW on France and the CW, Aden, Baghdad, Calcutta, Cape Town, Colombo, Dakar, Delhi, Gibraltar, Jerusalem, Marseilles, Paris, Suez and Teheran are now all legal targets for Italy. Unfortunately British control of Suez and Gibraltar cuts the list of immediately achievable targets to Gibraltar, Jerusalem, Marseilles, Paris and Suez.

Rule #3: Gaining new Objective Hexes should not be done at the expense of losing existing Objective Hexes.

It is a fair bet that most of France’s attention will be focussed up north against Guderian and his Panzers, but there will still be a few French Corps guarding the Alpine passes. Since Italy will have to position some troops to guard against those French units it is worth considering whether we should allocate additional resources and turn our Alpine Shield into an Alpine Sword. Remember that Marseilles will (probably) hold the French Mediterranean Fleet which could launch a surprise amphibious assault against Rome or Genoa or some flipped Italian air units.

Let’s presume that we have allocated most of our land and air forces against our Froggy Foes and we still have sufficient military forces left to go adventuring in other places. We will select Suez as our goal and aim to take it during the Sep-Oct 1940 game turn. Italy starts the 1939 campaign with 10 INF, 1 MTN, 2HQ, 2 FTR, 2 TAC and gets 6 build points per turn. Garrisons for the two Alpine passes plus a few other critical hexes (say… Genoa, Rome, Tripoli ) will cut our offensive force down to 4 INF, 1 HQ, 1 FTR ,1 TAC. Presuming that at least one turns production goes to expansion of the Fleet and another turn goes towards making good the losses incurred during the approach to Suez, this leaves an additional 18 build points of production which will be on-map and in-Theatre for the assault on Suez. I’m not counting any units appearing in Jul-Aug 1940 since they will still be on the Italian mainland.

Suppose we use our 18 points to purchase 4 INF, 1 FTR and 1 TAC. In a perfect world we will now be attacking Suez with an HQ plus 8 INF and 2 TAC supported by 2 FTR. For simplicity sake I will use average factors for the counters. I have obtained these numbers from Patrice Forno’s web page at http://perso.wanadoo.fr/froon/WiF/wif.htm, My thanks to him and the others whose work is represented there.

Suez is adjacent to 4 hexes however three of them are protected by river/canals so those attackers are halved. In 1940 the average Italian infantry strength is 3.75 while the average CW infantry strength is 4.67 which would give 30 factors attacking 9.3 factors in defence… well worth the risk especially since there is an Italian HQ who can reorganise the Army for a second strike. Of course the two Italian TAC could be used to ground strike the defenders which may improve the odds but then the CW could throw in their TAC as defensive factors which tips the balance the other way.

If the Italian advance has been eastwards across Egypt then the CW may still be holding the Canal hexes to the NorthEast and East of Suez which limits the Italians to attacking Suez across two hexes - one of them at half strength so the odds would drop to 1:1 which is certainly not a good chance.

So after a very simple analysis I recognise that I will need a significant commitment of Italian effort to take Suez. It is possible, but not an assured victory. Experienced Wiffers may chortle at my plan and point out that a better strategy is to take Jerusalem first via an amphib assault so that the CW must split his small garrison between Alexandria and Suez rather than defending first at Alex and then at Suez. They may well be right.

My thesis is that each Objective Hex in WiF has its own multi-tiered geography which is immediately obvious to any experienced WiF player but would be very challenging to code as a set of abstract principles which can be applied to all Objective Hexes. Therefore it may be necessary to build up a set of specific preconditions for taking each individual Objective

1. Select valid Objective - Suez
2. Allocate sufficient force – 1 HQ, 8 INF, 2 TAC 2 FTR
3. Achieve preconditions
...a) Safe supply line from Italy to attack hexes
...b) Safe airbases within TAC range of Suez
...c) Capture of Alexandria and/or Jerusalem
4. Select optional support move
...a) Add an additional TAC and FTR to the invasion force
...b) Co-ordinate attack with other attacks by coalition partner – Japanese attack on Columbo
...c) Attack any CW land units or Transports in range of Suez
...d) None of the above
5. Go to it!

My question is, do these preconditions and optional support moves have to be individually researched for each of the 67 objective hexes (for each side!) which creates a giant multi-threaded but scripted campaign, or are there certain rules of engagement which apply to all objectives.

What are those rules and how would you code them?
/Greyshaft
User avatar
Neilster
Posts: 3002
Joined: Mon Oct 27, 2003 1:52 pm
Location: Devonport, Tasmania, Australia

RE: Coding the Move on Suez

Post by Neilster »

Nice post. My friend and I were talking about this last night. Perhaps at the strategic level some kind of scripting might be a good idea, but at a lower, operational or grand-tactical level, I think a more general system would be more flexible.

Couldn't we assign mathematical weights to hexes to indicate their importance? I think you were getting at this when talking about the "multi tiered geography". Then the AI could be programmed to attempt to aquire and defend high value hexes. The presence of enemy forces might decrease the rating proportional to their strength, hence making it less attractive to the AI (there's no point in losing units in futile assaults on a well defended hex, no matter how vital it is).

Their values could change dynamically as well; ie if a city hex suddenly becomes the last supply source for a large group of enemy units, then it's value (and hence the AI's inclination to take and hold it) would increase enormously.

Chess computers often use this type of heuristic. For example, in chess, the control of the centre of the board is usually vital to winning. For this reason, chess computers/programs assign a higher value to centre squares, and take this into account when considering moves. That is, they favour moves that put their pieces in the centre of the board. It's simple and it works very well. Chess computers (if they're any good) always have a position that is defensively sound and that gives them lots of flexibility in attack (until you do something "human" like a mobility enhancing sacrifice. This sort of thing can throw a spanner in the computer's works but can also end in tears).

I think this idea can be generalized to include Naval/Air actions as well. The boxes in Sea Areas could have dynamic values and hence encourage or deter sorties/movement. Hexes with enemy HQs could "attract" TAC to ground-strike. Factory hexes could attract strategic bombers. Attacks on coastal hexes could attract naval bombardment.

Seeing as the AI has to decide what type of impulse to do, a system that weighs up the merits of each using a common method might be handy.

Cheers
Neilster
Cheers, Neilster
User avatar
Greyshaft
Posts: 1979
Joined: Mon Oct 27, 2003 1:59 am
Location: Sydney, Australia

RE: Coding the Move on Suez

Post by Greyshaft »

I agree there will be multiple levels of AI play.

* The Strategic Level AI which decides to take Suez rather than Malta or Gibraltar. This module selects the target, assigns the forces and then forgets about the whole thing until the assault force is released by the Operational level AI. That release would come when the Operational AI has either achieved the objective, run out of the assigned time (say six months) or has taken casualties beyond an acceptable level and the operation is then cancelled.

* The semi scripted Operational AI which is where the multi-tiered geography comes into play. There are probably only half a dozen ways for Italy to take Suez.
>>> OPERATION LAMBRUSCO: offensive eastwards along the Egyptian coastline
>>> OPERATION SPUMANTE: take Jerusalem and drive south
>>> OPERATION ZAMBUCCA: paradrop on the city if it is undefended
>>> OPERATION FRANGELICO: combination of the above
>>> OPERATION SAKI: Japanese support through the Red Sea
>>> OPERATION SANGRIA: <insert your own variation here>
I suggest that an experienced Wiffer takes each each of these methods and determines the requirements and relevent geography for that operational plan. For example, the Egyptian offensive needs to take Alexandria plus other specific hexes for TAC bases. OTOH the paradrop option planner might consider that taking Cyprus as a staging base is essential. At the end of the day the AI can randomly select one of these offensive plans and already KNOWS what the intermediate objectives are in order to execute that plan.

* The Tactical AI which moves the Italian units from one hex to another, counts the odds, blows away the opposition then does it again for the next hex. This is RobertC's area.

Since the player does not know which Operational Plan the AI is executing at the start of the operation then the "scripting" which is being used does not affect their gameplay. By the time the player sees the buildup of INF and TAC at Tripoli and figures out that there is a land offensive coming then they are really just using the Intel that is available to any player in a wetware game of WiF.

Your chess analogy is good. In this case the WiF betatester has handed Robert a series of plans, each of which specifies a slightly different "centre of the board" set of objectives for the AI to achieve along its path to the seizure of Suez. All we need to do is to come up with half a dozen different offensive plans for each Objective (or resource) hex. This also starts to bring in the idea of updating the data file where new plans could be added to the Operational AI. Maybe a MWiF Offensive Construction kit where all players could design their own operational offensives for upload/download at Matrix. We all agree that the AI won't match wetware, so why not collate a few thousand different offensive options from all the eager and experienced Wiffers out there and use that as the operational AI? Mind you, none of this may fit into Robert's grand plan for the AI... I'm sure he'll let us know.
ORIGINAL: Neilster
Couldn't we assign mathematical weights to hexes to indicate their importance? I think you were getting at this when talking about the "multi tiered geography". Then the AI could be programmed to attempt to aquire and defend high value hexes.

I agree that mathematical weights are important. Those weights are affected by:
* the hexes intrinsic contents (objective, resource, capital city)
* the multi-tiered geography - if I want to take Suez then I need to consider taking Jerusalem first. According to the value tables laboriously prepared for Matrix by legions of MWiF betatesters I know that when Italy implements Operation Frangelico to take Suez that Jerusalem will be assigned a weight of 5 while Alexandria has a weight of 8. So I would normally prefer to take Alexandria rather than Jerusalem. Both would be nice.[:)]
* Defence of the hex - How many land factors in it? How many air factors can reach it?
* a random factor (say +/- 20%) to prevent players anticipating perfect plans... now that the AI has taken Smolensk he will push onto Moscow... uh... hang on... why is he encircling Kiev?

I also agree that any hex with an enemy HQ is (by definition) a target hex. Likewise with flipped air units.
/Greyshaft
Post Reply

Return to “World in Flames”