AI for MWIF - Sweden
Posted: Tue May 19, 2009 5:35 am
Sweden setup AI
Sweden Forces
6-3 INF wp, 4-2-3 HQI, 5-4 MTN wp, 5-4 INF, 4-1 GAR, 2-4 SKI DIV
RES: 4-2 MIL, 3-3 MIL
1939: 5-5 MOT, 5-1 GAR, FTR2
1940: 6-5 MOT
1941: 7-6 MEC wp, 1 TAC
1942: 1-4 SKI DIV
1943: 8-5 ARM wp, 1 FTR , 2 CA
1944: 1 TAC
8 CA, 1 TRS, 6 CP
Sweden has one basic setup strategy:
* Region defence (Normal defence): Sweden is divided into regions and each region is given units to face the threat to it, depending on the size of the threat and the priority of the region
Sweden has two special setup strategies:
* Capital defence: Is just as the name suggests a setup where the Sweden
land units are setup to defend Stockholm.
- Primary Region: Stockholm
* Hero city Stockholm and Gothenburg defence: When faced with a mighty enemy the chance of holding the border is slim, the Swedish land units are setup around Stockholm and Gothenburg
- Primary Region: Stockholm and Gothenburg
Sweden has three extreme strategies:
* Attack Norway: An attacking force of units, not needed in defence against the current threat or factory defence, are placed near Norway to attack it if the chance is given.
- Primary Region: OsloBorder, NarvikBorder
* Attack Finland: An attacking force of units, not needed in defence against the current threat or factory defence, are placed near Finland to attack it if the chance is given..
- Primary Region: FinlandBorder
* Attack Denmark: An attacking force of units, not needed in defence against the current threat or factory defence, are placed near Denmark to attack it if the chance is given
- Primary Region: Malmö
Declaration of war
Given a GE/IT declaration of war and Western allies/USSR control of Sweden OR USSR/Western allies declaration of war and GE/IT control of Sweden. The suggested reasoning for the AI could be as below.
Threats to guard against:
* Threat of enemy land units entering Sweden from Finland
* Threat of enemy land units entering Sweden from Norway
* Threat of enemy land units entering Sweden from Denmark
* Threat of paradrop on/close to Stockholm
* Threat of paradrop on/close to Gothenburg
* Threat of paradrop on/close to Luleå
* Threat of invasion from Baltic Sea
* Threat of activation of Finland
* Threat of having the land unit disrupted
* Threat of a marine walkover from Åland
Good hopes:
* Chance of intervention from controlling power
* Chance to try to capture Narvik
* Chance to try to cut of Petsamo
* Chance to try to conquer Norway
* Chance to try to conquer Denmark
* Chance to try to conquer Finland
* Chance to try to conquer one of the Baltic states
* Chance to try to step on facedown allied/axis unit(s)
Simplified data for the setup script:
Threat Levels
Small: 1-3 DIV or 1-2 CORP/ARMY or 1 CORP/ARMY + 1-2 DIV
Medium: More that Small and less than Large
Large: 5+ CORP/ARMY OR 8+ DIV
Swedish Forces groups:
1939
Poor: 2-4 SKI DIV
Fair: 4-1 GAR
Good: 6-3 INF wp, 5-4 MTN wp, 5-4 INF
HQ: 4-2-3 HQI
1940
Poor: 2-4 SKI DIV
Fair: 4-1 GAR, 5-1 GAR
Good: 6-3 INF wp, 5-4 MTN wp, 5-4 INF, 5-5 MOT
HQ: 4-2-3 HQI
1941
Poor: 2-4 SKI DIV
Fair: 4-1 GAR, 5-1 GAR
Good: 6-3 INF wp, 5-4 MTN wp, 5-4 INF, 5-5 MOT, 6-5 MOT
HQ: 4-2-3 HQI
1942
Poor: 2-4 SKI DIV, 4-1 GAR
Fair: 5-1 GAR, 5-4 INF, 5-5 MOT
Good: 6-3 INF wp, 5-4 MTN wp, , 6-5 MOT, 7-6 MEC wp
HQ: 4-2-3 HQI
1943
Poor: 2-4 SKI DIV, 4-1 GAR, 1-4 SKI DIV
Fair: 5-1 GAR, 5-4 INF, 5-5 MOT
Good: 6-3 INF wp, 5-4 MTN wp, , 6-5 MOT, 7-6 MEC wp
HQ: 4-2-3 HQI
1944
Poor: 2-4 SKI DIV, 4-1 GAR, 1-4 SKI DIV
Fair: 5-1 GAR, 5-4 INF, 5-5 MOT, 5-4 MTN wp
Good: 6-3 INF wp, 6-5 MOT, 7-6 MEC wp, 8-5 ARM wp
HQ: 4-2-3 HQI
Swedish Regions
FinlandBorder // All border hexes within 5 hex from Luleå
Name: Finn
Hexes = BorderHexWithin(5,Luleå) AND Border(Sweden, Finland) + 1 // 1 hex inland from border
Priority = 5 //1 highest, 7 lowest
NarvikBorder // All border hexes within 1 hex from Narvik
Name: Narvik
Hexes = BorderHexWithin(1,Narvik) AND Border(Sweden, Norway) + 1 // 1 hex inland from border
Priority = 4
OsloBorder // All border hexes within 3 hexes from Oslo
Name: Oslo
Hexes = BorderHexWithin(3,Oslo) AND Border(Sweden, Norway) + 1 // 1 hex inland from border
Priority = 4
Malmö //Malmö and all hexes around
Name: Malmo
Hexes = Malmö +1 // 1 hex around
Priority = 3
Gothenburg // Göteborg and all hexes around
Name: Gote
Hexes = Gothenburg +1 // 1 hex around
Priority = 2
Stockholm // Stockholm and all hexes around
Name: Stock
Hexes = Stockholm +1 // 1 hex around
Priority = 2
Norrköping // Norrköping and all hexes around
Name: Norr
Hexes = Norrköping +1 // 1 hex around
Priority = 5
Karlskrona // Karlskrona and all hexes around
Name: Karl
Hexes = Karlskrona +1 // 1 hex around
Priority = 6
Sundsvall // Sundsvall and all hexes around
Name: Sund
Hexes = Sundsvall +1 // 1 hex around
Priority = 7
Simplified logic of the primary rule of the setup script
1 Set the threat level for all Swedish regions
2 Calculate the number of units needed to meet the given threats for all Swedish regions
3 Calculate whether there are extra or too few units to handle all threats
4 Consider using a special defense
5 For all Swedish regions decide how many units each it is assigned.
5a If a Normal defence is chosen, modify allocation of defending units to each Swedish region depending on whether there are extra or too few units.
5b If a Special defense is chosen, the defence has coded how many of the available units the primary region(s) is assigned. The rest of the units are assigned like by Normal defence.
6 Sort all Swedish regions according to their threat level and priority
7 For all Swedish regions pick which units it is assigned.
7a Assign 1 poor unit to each region with a Small threat level, until there are no more poor units, or no more regions with a Small threat level. The purpose behind doing this is to limit the number of good or fair units given
to regions with a Small threat level. Note that this does not apply to
regions with a No threat level that have 1 unit allocated (e.g., regions with
a priority of 1 or 2).
7b Assign 1 good unit to each region with a Large threat level, until there are
no more good units, or no more regions with a Large threat level
7c Distribute any remaining units
8 The exact placement of units in each region is decided by a special AIO routine.
Sweden Forces
6-3 INF wp, 4-2-3 HQI, 5-4 MTN wp, 5-4 INF, 4-1 GAR, 2-4 SKI DIV
RES: 4-2 MIL, 3-3 MIL
1939: 5-5 MOT, 5-1 GAR, FTR2
1940: 6-5 MOT
1941: 7-6 MEC wp, 1 TAC
1942: 1-4 SKI DIV
1943: 8-5 ARM wp, 1 FTR , 2 CA
1944: 1 TAC
8 CA, 1 TRS, 6 CP
Sweden has one basic setup strategy:
* Region defence (Normal defence): Sweden is divided into regions and each region is given units to face the threat to it, depending on the size of the threat and the priority of the region
Sweden has two special setup strategies:
* Capital defence: Is just as the name suggests a setup where the Sweden
land units are setup to defend Stockholm.
- Primary Region: Stockholm
* Hero city Stockholm and Gothenburg defence: When faced with a mighty enemy the chance of holding the border is slim, the Swedish land units are setup around Stockholm and Gothenburg
- Primary Region: Stockholm and Gothenburg
Sweden has three extreme strategies:
* Attack Norway: An attacking force of units, not needed in defence against the current threat or factory defence, are placed near Norway to attack it if the chance is given.
- Primary Region: OsloBorder, NarvikBorder
* Attack Finland: An attacking force of units, not needed in defence against the current threat or factory defence, are placed near Finland to attack it if the chance is given..
- Primary Region: FinlandBorder
* Attack Denmark: An attacking force of units, not needed in defence against the current threat or factory defence, are placed near Denmark to attack it if the chance is given
- Primary Region: Malmö
Declaration of war
Given a GE/IT declaration of war and Western allies/USSR control of Sweden OR USSR/Western allies declaration of war and GE/IT control of Sweden. The suggested reasoning for the AI could be as below.
Threats to guard against:
* Threat of enemy land units entering Sweden from Finland
* Threat of enemy land units entering Sweden from Norway
* Threat of enemy land units entering Sweden from Denmark
* Threat of paradrop on/close to Stockholm
* Threat of paradrop on/close to Gothenburg
* Threat of paradrop on/close to Luleå
* Threat of invasion from Baltic Sea
* Threat of activation of Finland
* Threat of having the land unit disrupted
* Threat of a marine walkover from Åland
Good hopes:
* Chance of intervention from controlling power
* Chance to try to capture Narvik
* Chance to try to cut of Petsamo
* Chance to try to conquer Norway
* Chance to try to conquer Denmark
* Chance to try to conquer Finland
* Chance to try to conquer one of the Baltic states
* Chance to try to step on facedown allied/axis unit(s)
Simplified data for the setup script:
Threat Levels
Small: 1-3 DIV or 1-2 CORP/ARMY or 1 CORP/ARMY + 1-2 DIV
Medium: More that Small and less than Large
Large: 5+ CORP/ARMY OR 8+ DIV
Swedish Forces groups:
1939
Poor: 2-4 SKI DIV
Fair: 4-1 GAR
Good: 6-3 INF wp, 5-4 MTN wp, 5-4 INF
HQ: 4-2-3 HQI
1940
Poor: 2-4 SKI DIV
Fair: 4-1 GAR, 5-1 GAR
Good: 6-3 INF wp, 5-4 MTN wp, 5-4 INF, 5-5 MOT
HQ: 4-2-3 HQI
1941
Poor: 2-4 SKI DIV
Fair: 4-1 GAR, 5-1 GAR
Good: 6-3 INF wp, 5-4 MTN wp, 5-4 INF, 5-5 MOT, 6-5 MOT
HQ: 4-2-3 HQI
1942
Poor: 2-4 SKI DIV, 4-1 GAR
Fair: 5-1 GAR, 5-4 INF, 5-5 MOT
Good: 6-3 INF wp, 5-4 MTN wp, , 6-5 MOT, 7-6 MEC wp
HQ: 4-2-3 HQI
1943
Poor: 2-4 SKI DIV, 4-1 GAR, 1-4 SKI DIV
Fair: 5-1 GAR, 5-4 INF, 5-5 MOT
Good: 6-3 INF wp, 5-4 MTN wp, , 6-5 MOT, 7-6 MEC wp
HQ: 4-2-3 HQI
1944
Poor: 2-4 SKI DIV, 4-1 GAR, 1-4 SKI DIV
Fair: 5-1 GAR, 5-4 INF, 5-5 MOT, 5-4 MTN wp
Good: 6-3 INF wp, 6-5 MOT, 7-6 MEC wp, 8-5 ARM wp
HQ: 4-2-3 HQI
Swedish Regions
FinlandBorder // All border hexes within 5 hex from Luleå
Name: Finn
Hexes = BorderHexWithin(5,Luleå) AND Border(Sweden, Finland) + 1 // 1 hex inland from border
Priority = 5 //1 highest, 7 lowest
NarvikBorder // All border hexes within 1 hex from Narvik
Name: Narvik
Hexes = BorderHexWithin(1,Narvik) AND Border(Sweden, Norway) + 1 // 1 hex inland from border
Priority = 4
OsloBorder // All border hexes within 3 hexes from Oslo
Name: Oslo
Hexes = BorderHexWithin(3,Oslo) AND Border(Sweden, Norway) + 1 // 1 hex inland from border
Priority = 4
Malmö //Malmö and all hexes around
Name: Malmo
Hexes = Malmö +1 // 1 hex around
Priority = 3
Gothenburg // Göteborg and all hexes around
Name: Gote
Hexes = Gothenburg +1 // 1 hex around
Priority = 2
Stockholm // Stockholm and all hexes around
Name: Stock
Hexes = Stockholm +1 // 1 hex around
Priority = 2
Norrköping // Norrköping and all hexes around
Name: Norr
Hexes = Norrköping +1 // 1 hex around
Priority = 5
Karlskrona // Karlskrona and all hexes around
Name: Karl
Hexes = Karlskrona +1 // 1 hex around
Priority = 6
Sundsvall // Sundsvall and all hexes around
Name: Sund
Hexes = Sundsvall +1 // 1 hex around
Priority = 7
Simplified logic of the primary rule of the setup script
1 Set the threat level for all Swedish regions
2 Calculate the number of units needed to meet the given threats for all Swedish regions
3 Calculate whether there are extra or too few units to handle all threats
4 Consider using a special defense
5 For all Swedish regions decide how many units each it is assigned.
5a If a Normal defence is chosen, modify allocation of defending units to each Swedish region depending on whether there are extra or too few units.
5b If a Special defense is chosen, the defence has coded how many of the available units the primary region(s) is assigned. The rest of the units are assigned like by Normal defence.
6 Sort all Swedish regions according to their threat level and priority
7 For all Swedish regions pick which units it is assigned.
7a Assign 1 poor unit to each region with a Small threat level, until there are no more poor units, or no more regions with a Small threat level. The purpose behind doing this is to limit the number of good or fair units given
to regions with a Small threat level. Note that this does not apply to
regions with a No threat level that have 1 unit allocated (e.g., regions with
a priority of 1 or 2).
7b Assign 1 good unit to each region with a Large threat level, until there are
no more good units, or no more regions with a Large threat level
7c Distribute any remaining units
8 The exact placement of units in each region is decided by a special AIO routine.




