Artifical Intelligence for World in Flames

A forum for the discussion of the World in Flames AI Opponent.

Moderator: Shannon V. OKeets

Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

After 8 months of neglect, I am in the process of bringing my AI notes up to date. The design document now has 86 pages, but all the stuff on strategic plans for each major power are separate.

Here is a question for you all to consider:

What criteria should be used for assigning fighters to missions?

I have already done a lot on this topic, so let me give you some background.

1 - After analyzing a theater of operations (TOO - some well defined portion of the map), the AIO will know the number of fighters and other air units in the TOO and their relative capabilities. This will be for both sides: friendly and enemy. In this case I am most concerned with air-to-air ratings.

2 - Knowing the quantity of non-fighters, the AIO works out how many fighters are going to:
a - escort friendly bombers (non-fighters)
b - attack enemy bombers
c - attack enemy fighters (I think of b and c as 'shadowing' the enemy air units and only flying to intercept them)

3 - So, given that the bombers are in the air, which units do we send as escorts/interceptors?

My concern is choosing which fighters would be best to send. Here are some criteria I have come up with off the top of my head. They are not in any particular order:

A - If all else is equal, send the unit with the smaller range
B - If all else is equal, send the unit whose air-to-air number, when compared to the enemy's expected air-to-air factor best matches the relative, still organized, air-to-air relationship in the TOO overall. That is, if have slightly better fighters available, send a slightly better fighter.
C - If the mission's importance is high, and the choice of fighter can influence its chance of success, send the best fighter
D - If it is a night mission, send a night fighter
E - If it is a day mission and a night mission might happen later in the turn, do not send a night fighter
F - If an enemy fighter that is being shadowed remains on the ground, then do not send the fighter that is in the best position to reach target hexes the enemy fighter can reach
G - If there are simultaneous missions requiring fighters, then perform a post analysis after the first assignments and see if a better combination of allocating fighters is possilbe.

I am sure there are more, and I haven't thought about how to proritize within the list yet.

Any ideas? Comments?
Steve

Perfection is an elusive goal.
User avatar
composer99
Posts: 2931
Joined: Mon Jun 06, 2005 8:00 am
Location: Ottawa, Canada
Contact:

RE: Artifical Intelligence for World in Flames

Post by composer99 »

Assuming I don't fall asleep too quick, I'll try to come up with some ideas after rehearsal tonight.
~ Composer99
Incy
Posts: 336
Joined: Sat Oct 25, 2003 4:12 am

RE: Artifical Intelligence for World in Flames

Post by Incy »

I think number of bombers/ftr's in an area of operation is best kept as a couple of general background status variables, i.e. a couple of "how good/deep is each sides bomber coverage", and "how good/deep is each sides FTR coverage"

These variables should be an aide to actual combat decitions, which should be made hex by hex, based on all air units that can fly to each hex.
Each hex should be assigned a priority, and there are different tasks that can be prioritized for each hex:
-refuse enemy air to clear through
-allow friendly air to clear through
-risk to aircraft in contested hex (is there a ground strike or attack vs hex with air in it, this air should have a higher priority for flying)

In addition, there should be some general priorities:
-achieve favourable attrition
-reduce enemy ftr/bomber coverage (by drawing enemy units to battle)
-maintain friendly ftr/bomber coverage (by holding units back from battle)


The AI should evaluate all these priorities for each battle.
Example 1: A Para attack should have a really high priority to clear friendly air
Example 2: When attacking an enemy land unit with very few combat factors refusing enemy air should be a very high priority
Example 3: Achiving favourable attrition should be a general goal at all times, sort of a "background" priority
Example 4: When my enemy has 2 and I have 5 FTR, drawing enemy FTR to the battle is a high priority, because this will further increase my superiority. Maintaining my own FTR coverage is not so much a priority (but would increase if the enemy still maintained many bombers in theathre)
Example 5: when on the offence, fronts are mobile, and it's early in the turn, drawing out enemy FTR/bombers is a high priority, because it's a good chance they can later be overrun

Then, based on priorities, each hex should be eveluated for recieving escorts, bombers, and intercepts. Make a list of possible planes for each mission type. Also, make the same list for the enemy, to help the decition making.
For each decition, cycle through the relevant list to find the best match (es).

Some rules that should be implemented (no time for an extensive list this evening..):
-in big air battles (or battles where "refusing enemy air to clear" is a high priority), always try to include one low-quality "expendable" bomber. The bomber is mainly there to soak off DA and DX results
-try avoid situations where air odds become excedingly bad. For example, try not to send an unescorted weak bomber if it can be intercepted, but can't be counterintercepted. And the oposite, seek exceedingly good odds if possible
-if enemy bombers are in the air, and drawing out enemy FTR coverage is a priority, intercepting is a good idea
-if drawing out enemy ftr is a priority, sending out bombers solo (with or without possible counterintercept) might be a good idea.
-if drawing out enemy bombers is a priority, or if enemy has very weak bomber coverage, consider attacking hexes without proper FTR intercept cover to draw out the last remaining bombers
-consider aborting air battles if odds turn sour and there are no very high priorities pushing you to continue

One thing not mentioned this far is that air cover is important when choosing sites for land attack (and thus sites for possible ground strikes). When picking attack hexes, air cover should be considered first. So some air calculations should be done PRIOR TO planning stuff like land moveent and land attack!!
When doing repositioning of air (RTB or rebase), covering hexes vulnerable to attack with your own air power should always be a priority. For example, proper positioning of russian bombers and FTR (and continous adjustment of what proper positioning is) is quite critical during barbarossa. Key goals for stalin is to position air where it's safe, and where it can reach as many important places possible (an important placeis not neccesarily the most importnt place on the board, but the most important place the air can matter (because enemy air cover is weak enouh that friendly air can get through/enemy air can be denied). Since stalin is weak in FTR power early on, FTR's must be continously repositioned to create local pockets of air superiority (or parity). Preferably FTR's should be moved to cover critical areas, for instance an area of a front that is pulling back to another defencive line and is vulnerable to groundstrike in the process .
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

ORIGINAL: Incy
I think number of bombers/ftr's in an area of operation is best kept as a couple of general background status variables, i.e. a couple of "how good/deep is each sides bomber coverage", and "how good/deep is each sides FTR coverage"

These variables should be an aide to actual combat decitions, which should be made hex by hex, based on all air units that can fly to each hex.
Each hex should be assigned a priority, and there are different tasks that can be prioritized for each hex:
-refuse enemy air to clear through
-allow friendly air to clear through
-risk to aircraft in contested hex (is there a ground strike or attack vs hex with air in it, this air should have a higher priority for flying)

In addition, there should be some general priorities:
-achieve favourable attrition
-reduce enemy ftr/bomber coverage (by drawing enemy units to battle)
-maintain friendly ftr/bomber coverage (by holding units back from battle)


The AI should evaluate all these priorities for each battle.
Example 1: A Para attack should have a really high priority to clear friendly air
Example 2: When attacking an enemy land unit with very few combat factors refusing enemy air should be a very high priority
Example 3: Achiving favourable attrition should be a general goal at all times, sort of a "background" priority
Example 4: When my enemy has 2 and I have 5 FTR, drawing enemy FTR to the battle is a high priority, because this will further increase my superiority. Maintaining my own FTR coverage is not so much a priority (but would increase if the enemy still maintained many bombers in theathre)
Example 5: when on the offence, fronts are mobile, and it's early in the turn, drawing out enemy FTR/bombers is a high priority, because it's a good chance they can later be overrun

Then, based on priorities, each hex should be eveluated for recieving escorts, bombers, and intercepts. Make a list of possible planes for each mission type. Also, make the same list for the enemy, to help the decition making.
For each decition, cycle through the relevant list to find the best match (es).

Some rules that should be implemented (no time for an extensive list this evening..):
-in big air battles (or battles where "refusing enemy air to clear" is a high priority), always try to include one low-quality "expendable" bomber. The bomber is mainly there to soak off DA and DX results
-try avoid situations where air odds become excedingly bad. For example, try not to send an unescorted weak bomber if it can be intercepted, but can't be counterintercepted. And the oposite, seek exceedingly good odds if possible
-if enemy bombers are in the air, and drawing out enemy FTR coverage is a priority, intercepting is a good idea
-if drawing out enemy ftr is a priority, sending out bombers solo (with or without possible counterintercept) might be a good idea.
-if drawing out enemy bombers is a priority, or if enemy has very weak bomber coverage, consider attacking hexes without proper FTR intercept cover to draw out the last remaining bombers
-consider aborting air battles if odds turn sour and there are no very high priorities pushing you to continue

One thing not mentioned this far is that air cover is important when choosing sites for land attack (and thus sites for possible ground strikes). When picking attack hexes, air cover should be considered first. So some air calculations should be done PRIOR TO planning stuff like land moveent and land attack!!
When doing repositioning of air (RTB or rebase), covering hexes vulnerable to attack with your own air power should always be a priority. For example, proper positioning of russian bombers and FTR (and continous adjustment of what proper positioning is) is quite critical during barbarossa. Key goals for stalin is to position air where it's safe, and where it can reach as many important places possible (an important placeis not neccesarily the most importnt place on the board, but the most important place the air can matter (because enemy air cover is weak enouh that friendly air can get through/enemy air can be denied). Since stalin is weak in FTR power early on, FTR's must be continously repositioned to create local pockets of air superiority (or parity). Preferably FTR's should be moved to cover critical areas, for instance an area of a front that is pulling back to another defencive line and is vulnerable to groundstrike in the process.
Yes. I agree.

I break the use of air power down into separate decisions, with allocation of air units to a Theater of Operations (TOO) as one task and positioning air units within a TOO a second task. The latter is executed when rebasing and returning to base.

The overall allocation of bombers/ATRs/Naval air to mission types is a separate task too, and it takes into consideration many of the points you made. I think of this as after the Air Marshal assigns air units to a TOO, then either the Field Marshal for that TOO or the Admiralty (when dealing with air combat in sea areas) decides what to do with the air units at his disposal. This division of responsibility and use of resources may miss some optimal combination during the course of a game, but the ability to figure out logic and write code if vastly simplified. I believe the trade off is justified.

So, the decision as to when to send a bomber on a mission for ground strike or off/def ground support is up to the Field Marshal and he will base that decision on what he is going to do with his land units (both when attacking/advancing and defending/withdrawing).

Since a lot of the decisions concerning the use of fighters depends on what the enemy does, I believe choosing specific fighters to fly as escorts or interceptors is the hardest decision to make. The decision you make during a ground strike phase is going to have repercussions during subsequent phases. When you are the phasing player, you should know whether you are going to execute a paradrop later in the impulse and to dedicate a fighter to that mission - and it is not to be touched prior to the paradrop phase of the impulse. As the non-phasing player, it is more difficult, since do you want to always have your best fighter sitting on the ground in anticipation of intercepting an enemy paradrop? Perhaps you do, since if it prevents the enemy from doing a paradrop, it is doing good work and earning its keep.

Right now, I am trying to simply get a grasp on all the different things to take into consideration when choosing which fighters to send up. If I can understand all the pieces that are part of this puzzle, then I can start thinking about how to put them together in a structured way that I can program for the AIO.
Steve

Perfection is an elusive goal.
User avatar
coregames
Posts: 470
Joined: Thu Aug 12, 2004 4:45 pm
Contact:

RE: Artifical Intelligence for World in Flames

Post by coregames »

ORIGINAL: Shannon V. OKeets

It is the player interface to the AIA that would involve the most work, since players will want to know what the AIA is doing and exert some control over it as well. Merely defining the places where the human and AIA interact in the decision making process would require quite a bit of work. Coding those interactions and then designing reports and control forms/screens for implementing them would be a lot of work too.

I can see that would be a tricky bit of programming; when activites between a live player and an AI must be coordinated, does the player decide this? Does the AI have a mode that puts its units under temporary control of the human? How would the computer decide that such a mode was appropriate in a given situation? Perhaps there could be a 'negotiation' screen, where the various heads of state hash out how such joint operations will be handled.
"The creative combination lays bare the presumption of a lie." -- Lasker

Keith Henderson
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

ORIGINAL: coregames
ORIGINAL: Shannon V. OKeets
It is the player interface to the AIA that would involve the most work, since players will want to know what the AIA is doing and exert some control over it as well. Merely defining the places where the human and AIA interact in the decision making process would require quite a bit of work. Coding those interactions and then designing reports and control forms/screens for implementing them would be a lot of work too.

I can see that would be a tricky bit of programming; when activites between a live player and an AI must be coordinated, does the player decide this? Does the AI have a mode that puts its units under temporary control of the human? How would the computer decide that such a mode was appropriate in a given situation? Perhaps there could be a 'negotiation' screen, where the various heads of state hash out how such joint operations will be handled.
Good questions, and there are many others that come to mind. Hence my (almost certain) decision to not include this in MWIF product 1.
Steve

Perfection is an elusive goal.
CBoehm
Posts: 113
Joined: Mon Oct 31, 2005 10:53 am
Location: Aarhus, Denmark

RE: Artifical Intelligence for World in Flames

Post by CBoehm »

ORIGINAL: ptey

I would personally much rather see an ai that can do somewhat good with a preselected set of options. Than trying to make an ai that can cope with all options and therefor most likely never performing that well.
There are ofcourse some options that doesnt effect the game that much (and therefore the ai), which the player can use regardless. But perhaps some options could be given less attention in the development of the ai (which the player should be informed, when options for a game are chosen).

Are there being put any consideration into this?


I completely agree ...trying to make a ai that can cope well with "whatever" options being played ...I will think will be if not impossible then a HUGE work and I fear that a decision to not optimize the ai with a default set op options in mind will lead to a ai that simply performs poorly ...
WIF the most wonderful, frustrating, uplifting and depressing of all games...
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

ORIGINAL: CBoehm
ORIGINAL: ptey
I would personally much rather see an ai that can do somewhat good with a preselected set of options. Than trying to make an ai that can cope with all options and therefor most likely never performing that well.
There are ofcourse some options that doesnt effect the game that much (and therefore the ai), which the player can use regardless. But perhaps some options could be given less attention in the development of the ai (which the player should be informed, when options for a game are chosen).

Are there being put any consideration into this?

I completely agree ...trying to make a ai that can cope well with "whatever" options being played ...I will think will be if not impossible then a HUGE work and I fear that a decision to not optimize the ai with a default set op options in mind will lead to a ai that simply performs poorly ...

The vast majority of optional rules just change the effective factors on the unit(s) during movement or combat. Specialized units can be thought of this way as well. When designing the AIO, the only optional rule that really bothers me is No ZOC on surprise. For one thing, I personally think it is a bad rule, giving way too much of and advantage to the country that declares war on a minor. It is especailly bad for Poland and the USSR when Germany attacks. I might decide to make that rule unavailable when playing solitaire. And perhaps there are a couple of others - I haven't gone through them in detail with this in mind. Still, 95 % of the optional rules should be available when playing against the AIO. Ideally, I can make that 100%, but we'll see.
Steve

Perfection is an elusive goal.
trees
Posts: 175
Joined: Sun May 28, 2006 7:30 pm
Contact:

RE: Artifical Intelligence for World in Flames

Post by trees »

to fly or not to fly ... hmmm, what impulse is it? Do I want fighter cover for the missions I pick, or do I let my opponent dictate what my fighters do?

Last year I had an opponent (Axis) who would waste an entire impulse trying to draw up my French fighter cover to non-important hexes. My fighters were there to prevent ground strikes on the hexes leading directly to Paris and nothing else. He couldn't believe I would let ground strikes go through when I still had face-up FTRs. He also couldn't believe how long it took him to conquer France.

I would suggest a somewhat common psuedo- 'house rule' - throw out the Combat Air Patrol step of the air combat sequence.. It seems like a good idea on the surface but when playing you rarely ever use it. You either keep a FTR within intercept range of what you consider important or you don't or can't. If the AI were to try and decide when to fly CAP I think human opponents could quickly figure out how to trick the AI into doing it.
plant trees
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

ORIGINAL: trees
to fly or not to fly ... hmmm, what impulse is it? Do I want fighter cover for the missions I pick, or do I let my opponent dictate what my fighters do?

Last year I had an opponent (Axis) who would waste an entire impulse trying to draw up my French fighter cover to non-important hexes. My fighters were there to prevent ground strikes on the hexes leading directly to Paris and nothing else. He couldn't believe I would let ground strikes go through when I still had face-up FTRs. He also couldn't believe how long it took him to conquer France.

I would suggest a somewhat common psuedo- 'house rule' - throw out the Combat Air Patrol step of the air combat sequence.. It seems like a good idea on the surface but when playing you rarely ever use it. You either keep a FTR within intercept range of what you consider important or you don't or can't. If the AI were to try and decide when to fly CAP I think human opponents could quickly figure out how to trick the AI into doing it.
I agree about CAP. Personally, I never use it. If the fighter cover is really important, then can't the opponent wait another impulse when the CAP has been exhausted? If CAP lasted an entire turn or until engaged, then I would have a different attitude about it. Right now, I figure the AIO will never fly CAP.
Steve

Perfection is an elusive goal.
npilgaard
Posts: 177
Joined: Wed May 03, 2006 6:09 pm

RE: Artifical Intelligence for World in Flames

Post by npilgaard »

First: again I must say, that I am really impressed on the work being put into this project, Steve, and on the amount of communication with the players on these forums. Very, very good work indeed!

Second: don't know if the basic AI-info outlines used at the beginning of this thread are still useful, but in case they are, I have used them here.

Regarding usage of fighters I have tried to take a look at a specific, and probably somewhat 'handle-able' situation: strategic bombing in Germany:

DECISION MAKER: German Fighter Command - German theatre

(1) PROBLEM: Should a specific strategic bombing mission over a hex in Germany be intercepted?

(2) CHOICES: (a) yes (and in that case by which FTR's), (b) no

(3) INFORMATION NEEDED:
- number of bombers and strategic factors bombing the hex
- escorting fighters
- potential intercepting enemy fighters
- current date,
- current weather
- optional rules (especially oil)
- number of usable factories (which will be likely to receive resources/oil at the end of the turn) and resources in hex
- are all German factories used for production or are some not receiving resources this turn
- general axis vs allies air superiority over Germany / Western Europe,
- German / (Italian) FTRs (esp. 3-turns) on prod. circle coming up in 1-2 turns,
- US / CW strat. bombers on prod circle coming up in 1-2 turns
- US (esp. around 7-11-range) / CW (esp night and med-long range) fighters coming up on prod. circle
- overall US / CW strategy
- overall German strategy, need for US / CW fighters elsewhere
- potential reinforcement of FTR coverage of Germany (exces Italian / German FTRs elsewhere)
- other strategic missions in same theatre this impuls,
- risk of future strategic misisons this turn (including estimated turn length, weather in future impulses, uncommitted strategic bombers in theatre, unused allied HQ's (and ATR's) and their likelihood (sp?) to be used to reorganise, esp. if the strat. bombers are flying in an air impulse), likelihood that the US / CW will have the required air missions later in the turn)
- AA gun within range of the target hex
- relative size of German/Italian production
- how well are Germany/Italy and CW/US doing overall at this time of the war compared to 'planned' progress

(4) CRITERIA:
As default interception should occur (removes +1 unintercepted bonus, and strat bombers are more expensive and tend to have less air-to-air rating than fighters).

Increases likelihood of intercepting to hex:
- 2+ factories (or stored BP) combined with a higher number of enemy strat. factors
- oil production (or /stored oil and no/few factories) in hex if playing with oil rule
- many enemy strategic factors/many bombers
- general axis air superiority in theatre
- few enemy FTRs available for escorting / future missions this turn
- all factories are producing at maximum (risk of double-dipping (sp?) - if that is the case?)
- more FTRs intercepting to same hex if: multiple enemy bombers / FTRs, number of reserve covering FTRs compared to enemy strategic bomber potential for current turn is favorable.

Decreases likelihood of intercepting to hex:
- out-gunned by a certain amount in air-to-air - which odds are required depends on current relative air strength, upcoming FTRs on prod. circle which are likely to be assigned to German theatre (German, Italian, US, CW), upcoming allied strategic bombers
- only few strategic factors likely to get through (due to weather, extended range, night, AA-gun)
- few (or maybe medium) number of strategic factors getting through, but chances are that heavier strategic bombardment will occur later in the turn
- if playing with oil rule and oil reserves are nearing depletion: a general, heavy priority should be applied to all oil-using actions. Unless protecting stored oil or an oil resource, interceepting strategic bombardment should have low priority.


In case of intercepting: which FTRs to select - priority:
- high: FTR cannot intercept to any other target (or important) hex
- high: FTR has low range
- very high: FTR is night-FTR during night mission
- high: FTR has good air-to-air rating (esp. if protecting an important hex or if remaining enemy bombing potential for rest of current turn is low)
- very low: FTR is orange during day mission
- low: FTR has long range / is covering many potential target hexes
- med-high: FTR has very low air-to-air value but are intercepting together with a good front FTR
- med-low: FTR is 3-turn (i.e. more expensive)
- very, very low: allied or axis overall strategic situation/goals means that potential intercepting axis FTRs to the hex are badly needed for other missions (eg invasion may be coming up later this turn and FTR coverage of coast is essential, or FTR is scheduled to go to Russia)


These are what I could come up with initially - probably more factors will affect.

Hmm - I chose the strategic mission as an example as I thought it would be somewhat less complex than eg. ground strike missions, but it turns out that even here a lot of variables play an important role...

Well, again, thanks for the great effort! Looking very much forward to play against the AI.

Regards
Nikolaj
Regards
Nikolaj
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: Artifical Intelligence for World in Flames

Post by Froonp »

I agree about CAP. Personally, I never use it. If the fighter cover is really important, then can't the opponent wait another impulse when the CAP has been exhausted? If CAP lasted an entire turn or until engaged, then I would have a different attitude about it. Right now, I figure the AIO will never fly CAP.
There is one circumstance where CAP is useful, it is when you are nearly sure that a given mission will be flown to an hex.

An example is Paradrop mission on an hex that is very difficult to take for the opponent, of that is very important for him to take, where he just disrupted everything in the ground strike phase, and you are nearly sure that he will use his paratroopers for the extra combat factors & bonuses, or to lessen the fortification advantage. Flying CAP FTRs to this hex during the Paradrop phase may allow you to fight his paradrop raid with extra fighters, or better fighters.
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: Artifical Intelligence for World in Flames

Post by Froonp »

ORIGINAL: npilgaard
- number of usable factories (which will be likely to receive resources/oil at the end of the turn) and resources in hex
- are all German factories used for production or are some not receiving resources this turn
Why this question ? Any German factory bombed by the allies will loose PP if it is eligible to strat bombing. I mean, the German can't say that the bombed factory won't receive RP to avoid loosing PP due to strat bombings.
npilgaard
Posts: 177
Joined: Wed May 03, 2006 6:09 pm

RE: Artifical Intelligence for World in Flames

Post by npilgaard »

ORIGINAL: Froonp
- are all German factories used for production or are some not receiving resources this turn
Why this question ? Any German factory bombed by the allies will loose PP if it is eligible to strat bombing. I mean, the German can't say that the bombed factory won't receive RP to avoid loosing PP due to strat bombings.

Yes, I agree completely.

What I was thinking on was the case of the *-results. If all factories are in use, then an *-result will be significant. If more factories are available, then it won't matter so much if one is destroyed.
Also, if the 'double-dipping' (-'dibbing'? don't know how that is spelled [:)]) is allowed (a matter of rule-interpretation, I guess), then not only is production point lost during the strategic bombing step (due to the primary result of the bombing), but if an * has destroyed a factory and its production capability is thus lost, then during the production step more BP will be lost here as well (if at full production) due to wasted resources (ie no spare factories available to soak up the extra resource).

Nikolaj
Regards
Nikolaj
User avatar
Mziln
Posts: 667
Joined: Mon Feb 09, 2004 5:36 pm
Location: Tulsa Oklahoma

RE: Artifical Intelligence for World in Flames

Post by Mziln »

double-dipping

In this case 11.7 Strategic bombardment

The bombing

Example: 4 Commonwealth bombers with 20 strategic bombing factors attack Lille which is functioning as a German factory. The Germans do not fl y any aircraft to oppose them. The die roll is an 8 modifi ed to 9.

On the 19-24 column of the strategic bombardment table, this produces a result of 4*. So, 4 points are lost, which in this case is 1 production point (since the hex has only 1 functional factory). The spare points are lost unless there are any other targets in the hex.


Option 30: After implementing the above result, each asterisk in the result destroys 1 usable factory as well. Use the factory markers to show reduced factories. In the example, the red factory in Lille would have been destroyed in addition to the production point loss.
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: Artifical Intelligence for World in Flames

Post by Froonp »

My concern is choosing which fighters would be best to send. Here are some criteria I have come up with off the top of my head. They are not in any particular order:

A - If all else is equal, send the unit with the smaller range
B - If all else is equal, send the unit whose air-to-air number, when compared to the enemy's expected air-to-air factor best matches the relative, still organized, air-to-air relationship in the TOO overall. That is, if have slightly better fighters available, send a slightly better fighter.
C - If the mission's importance is high, and the choice of fighter can influence its chance of success, send the best fighter
D - If it is a night mission, send a night fighter
E - If it is a day mission and a night mission might happen later in the turn, do not send a night fighter
F - If an enemy fighter that is being shadowed remains on the ground, then do not send the fighter that is in the best position to reach target hexes the enemy fighter can reach
G - If there are simultaneous missions requiring fighters, then perform a post analysis after the first assignments and see if a better combination of allocating fighters is possilbe.
I think that in your A to G list, you gave pretty good criterias, especially B and F.

In the spirit of F, I'd add one criteria that is about "what remains after these FTR are commited". Are there remaining friendly FTR in enough number & quality to maintain or improve my air domination of the TOO, and also, do I still need to maintain or improve my air domination of the TOO. Remaining are those FTR not used, and those FTR that I can expect me and my opponent to reorganize after this impulse.

Also, I think that it boils down pretty much to the "mission's importance", as criteria C is saying. The "mission's importance" has to be gauged relatively to many parameters, that can be summed IMO into two factors to be compared : the "Threat" and the "Will to counter this threat, to avoid it to happen" :

The "Threat Factor" has to be measured :
- Is the air mission's objective hex of any importance to me ?
- How big (credible) is the threat setup by my opponent ?

My "Will factor" can be measured using the following criteria :
- Is the result of this air mission of any importance to me (do I care about this mission ?) ?
- Do I have the resources needed (FTRs) to credibly try to counter this threat ?
- Am I ready (able) to pay the price (lost units / accepted attrition rate level for this TOO) for preventing this threat to happen ?
- Is my opponent ready (able) to pay the price (lost units / accepted attrition rate level for this TOO) for making his threat happen (the more, the less my "will") ?
- Do I need to maintain or improve my air domination of the TOO for future impulses.
- Are there remaining friendly FTR in enough number & quality to maintain or improve my air domination of the TOO. Remaining are those FTR not used, and those FTR that I can expect me and my opponent to reorganize after this impulse.

Comparing the "Threat" to the "Will" is part of what will describe the FTR reaction I will have on the opponent's missions.


************************************************
Example : Late 44, western front, allied air superiority in quantity. 5-6 allied Ground Strikes coming on the frontline, good weather this impulse and expected next impulse too, high possibility of allied powerful land offensive soon.

Axis point of view for Interception step :
Threat :
- Importance of Air mission objectives ? All are of high importance (either supporting HQ or ART, or direct frontline unit that can be assaulted or blitzed) next.
- Credible threat ? Yes : Allied bombers & fighter bombers rate high is ground strike, between 4 & 6, and they are 1-3 of them on each of the targets.
The threat is very high.

Will :
- Importance of the result ? The expected disruption is very high if I do nothing. This disruption will allow for attacks that would be much harder without. The Axis really highly care.
- FTR available ? Availability is not very high, but quite honest. Allied has about 50 FTRs in this TOO, Axis have about 30. Allied have long range and can commit nearly what they want where they want even in interception. Whatever the interceptions the Axis commit to, the Allied will be able to choose to fight at +2 if wanted.
- Ready to pay the price ? Highly. Axis have a high production and can replace losses easily. 6-8 FTR are coming in next turn, and Oil while not plenty is availble.
- Opponent ready to pay the price ? Highly too. Allied have a high production too, but what they loose now is not replaced immediately, there may be high & lows in the rate of reinforcing units to this TOO for them because of transporting & distance concerns. But whatever this, they have a so large numerical advantage that they can afford loosing a bit of air domination.
- Air domination ? The Axis don't have it, but are not overwhelmed and can aim at local air superiority, and are able to stay in the same air superiority ratio / level for future impulse.

Here, the "threat" is very high, and the Axis "will" is high but not that high that they commit all they have to credibly counter those strikes. Axis would setup for minimal interception (1-2 FTR per raid, more eventually for 1-2 critical raids), but they would keep FTRs to fight another day, or to try to achieve local air superiority for future Ground support of something else if possible.
************************************************


Generaly, about the involved FTR's combat factors, when sending FTRs I'll try to match my air domination level in that TOO in the air to air fights :
- If I'm dominant, I'd try to be dominant in each A2A fight (at least +2).
- If I'm overwhelming, I'd try to be overwhelming in each A2A fight (+4 or more).
- If I'm at parity, I'd try to be at parity in each A2A fight (between +1 & -1).
- If I'm dominated or overwhelmed, I'd try to not being dominated too much on each A2A fight, trying to reach parity on some local A2A fights that I'd have to choose wisely relatively to how important they are to me.
- If I'm overwhelmed, I may not fly at all unless the threat is very high.

This level of air domination will have to be rated at the start of each impulse, and also rated in prevision for the next impulse given the Air commitments I envision. I think that Major Powers will generaly either try at improving, or at least keeping that dominance level when planning their missions.


Well, I'm not convicted of having exposed my thoughs efficiently here, nor to have thought everything sufficiently deeply for it to be really good thought, but at least it can give some leads & ideas on that matter.
Shannon V. OKeets
Posts: 22165
Joined: Wed May 18, 2005 11:51 pm
Location: Honolulu, Hawaii
Contact:

RE: Artifical Intelligence for World in Flames

Post by Shannon V. OKeets »

Nikolaj & Patrice,

Thank you. This is what I was hoping for when I posted my request. I was vaguely aware that it was a complicated decision and that a lot (3 or 4 dozen) key elements would have to be taken into consideration. And yes, Nikolaj, my original AI-info outlines are still of great value to me in gathering all the pertinent factors that should go into a decision.

Working from your lists and thoughts on this problem, I'll put them together with my own - probably expanding on them as I try to take into consideration all the different bomber & ATR mission types that can flown. Once I have my definitive list, I'll organize the items so I can structure the analysis: preliminary calculations, secondary calculations (based on the results from the preliminary ones), determining pros & cons for each possible decision/action, evaluation/comparison of each possible decision choice, and post-analysis of the selected decision(s) to see if it/they can be improved/optimized.
Steve

Perfection is an elusive goal.
npilgaard
Posts: 177
Joined: Wed May 03, 2006 6:09 pm

RE: Artifical Intelligence for World in Flames

Post by npilgaard »

(Re: post 57 in thread: AI for MWiF - USSR - since this is the AI thread and the other is for Russia strategy I found it better to reply here)
ORIGINAL: Shannon V. OKeets
Here are some excepts from the current AIO design document about the value of hexes. (...)

Very impressive!

Since the post is 1.5 years old, a lot of the stuff have probably been changed, but nevertheless, a few comments:
ORIGINAL: Shannon V. OKeets
Attacking units
Focusing on a single front line, the FM determines the land units he has available with which to attack. (...) What he now knows is the highest number of combat factors that he can bring to bear on 1, 2, 3, or more hexes.

Generally the number of combat factors are used in the description of the AI evaluation to define the 'combat-value' of a stack. However, I find it also very important (and sometimes even more important) to look at the various bonuses, especially if using 2d10 attack table. Fx. when Germany doing blitz attack in Russia from fx 3 sides against a hex, there can easily be +7 to +9 blitz bonus for ARM/MECH, which will almost guarantee a succesful attack.
Other situations where bonuses are more important than factors when attacking, are when attacking many enemy factors with fairly few factors (ie at low odds). Fx Japanese attacks on Chinese mountain hexes (using the non-MWiF Asia map), or when invading key hexes (eg Gibraltar). Even at odds 1:1 (+2) or 2:1 (+4) other types of bonuses can changes this to a reasonable attack (attacker must be ready to task loses of course), fx flipped units (up to +5), HQ support (up to +3), PARAs, etc.

This is also the case when creating a defensive line. When in the open in clear weather, any MECH is usually better than any INF no matter their combat factors, since the MECH provides a -2 modifer to attacks.
There are of course exceptions, eg.:
- it can be nice to have a 'casualty-unit' in a stack. Fx 1 ARM, 1 good DIV and then a GAR, MIL or maybe INF to take the loss. Depending on how important it is to hold the hex, compared to how important it is to avoid taking heavy loses.
- if only fairly low number of combat factors are in the hex, then a few combat factors extra have a significant effect, since attack bonuses based on odds are relative.
Fx:
One 5-factor MECH in a hex is attacked by 25 factors. This is a +10-2 = +8 attack
One 8-factor INF is defending the hex instead: +6.25 attack
This aspect is also important when flying ground support. Defensive ground support can be very effective if only a few factors are defending and the attacker gets most of his bonuses from odds (eg an invasion: 14 factors attacking 2 factors: +14; 14 factors attacking 2 factors+2 ground support: +7).
Offensive ground support are rarely that effective - usually better to ground strike. One exception is when attacking few defending factors but don't have enough factors yourself to get very high odds (i.e. attacking with 10 factors against 2 defending factors: +10. 5 ground support factors would increase this to 15 vs 2: +15 attack)

So ideally it is all about bonuses when using 2d10 - the combat factors are just one of the ways to get bonuses.
ORIGINAL: Shannon V. OKeets
Tactical mode
What the FM needs to determine is which of 4 modes of attack to use: (1) destroy enemy units this impulse, (2) disrupt enemy units this impulse so they can be destroyed in a later impulse (or turn), (3) maneuver so better attacks can be made in the future, or (4) push the enemy back.
(...)
By extrapolating the change from A1 to A2 over the remaining impulses in the turn, the FM judges whether disruption is a viable tactic for the current turn.

Most often it is a matter of disrupting enemy units for attacking the current turn also, I think.
The choice of selecting a 'full' disrupting tactic for the current impulse with no follow up land attacks until next impulse, is probably mostly related to an air-action, which is fairly uncommon.
Even during a combined impulse most powers have a decent number of air moves and can do ground strikes and after having seen their effects determine whether to attack this impulse or to wait.

Another aspect (which is somehow adressed in the AI description already, though): two major powers working together: Eg Italy doing the bombing and Germany doing the land attacking (or CW/US working together). Thus Italy trying to disrupt should not only be checked against italian benefit, but also against German benefit this impulse. (Same for invasions: one power moving ships, another doing the invasions).
ORIGINAL: Shannon V. OKeets
Direct attacks to kill enemy units is usually the best tactic but it might cause too many friendly casualties or disruptions.

Perhaps add some aggresiveness-variable for each power, which is randomly determined for each new game. So in some games eg Germany is slightly more aggressive (ie willing to attack on a slightly lower 'potential benefit per casualty') than in other games. That will add some variation and unpredictability (sp?). This may also be linked to overall strategies - ie high risk strategies (ie Sea Lion, Japan goes for Pearl Harbour) requires more willingness to do risky attacks.
ORIGINAL: Shannon V. OKeets
At the beginning of each impulse, the FM makes assessment A1 for each of his frontlines and records for each side the number of: (1) face up/down corps, (2) face up/down divisions, (3) face up/down tactical bombers, (4) face up/down strategic bombers (re: carpet bombing), (5) face up/down fighters, (6) face up/down ATRs, (7) units capable of immediate paradrops, (8) units capable of immediate invasions, and (9) offensive chits available

Maybe add some more information when determining the status of a front, than only the numbers of units. Fx combat factors (there is a large difference between a red circled 4 or 5 factor bomber, and an old regular 2 or 3 factor bomber), and potential combat bonuses (i.e. blitz bonuses, but only if clear terrain is available, and the weather is fine).
Thus some sort of point system showing 'total strength' in current front - maybe some average of number of units (more units meaning more versaility, more aircraft allows more air missions etc.), unit factors and potential unit bonuses.

ORIGINAL: Shannon V. OKeets
Based on the assessments and estimates of land units only, decide on your situation: (1) desperate defense, (2) strongly defensive, (3) somewhat defensive, (4) balanced, (5) somewhat aggressive, (6) attacking, or (7) going in for the kill. To some degree the 1st and 7th will depend on the proximity of objective hexes to the front line.

Not sure whether you have included air units in this assessment since then, but imho they are very important in determining the overall situation on the ground. If in an air superiority-situation, a few bombers make significant difference. If land-units-only suggests '(4) balanced' or '(5) somewhat aggressive' a few lucky ground strikes may make it worth attacking, while it would otherwise be far to risky.
Similarily, the defender being able to double the defending combat factors plays a significant role as to whether to attack or not.
ORIGINAL: Shannon V. OKeets
1. Hexes that have direct value in CVs define what we are trying to defend (or capture from the German point of view).
2. The relative strength of land forces in the theater of operations tells us whether we are attacking or defending.
3. When defending we look for other units that might come to our aid, be they our own units from other theaters or from our allies. Actually, we might look for other units to help even when on the attack.
4. We calculate the length of the frontline we need to hold, and the average number and defensive strength of units we can put in each hex.
5. We decide whether to hold every hex, every other hex, or every third hex depending on the strength we can muster per hex for each possibility.
6. We worry about overruns.
7. We choose hexes with good defensive terrain.
8. We try different placements protecting the more valuable hexes first.
9. We perform post evaluations of placements critically, looking for weaknesses that the attacker might exploit.
10. We reduce the number of valuable hexes we are trying to defend if the post evaluations find too much fault with the placements.

Very well tought out, I think [:)]
Maybe add some kind of 'buying time' variable - i.e. Russia may not be so interested in trying to defend her hexes as to keep her army intact and wait for her counterattack.
Placing the speed bumps will slow down the Germans, even though they are not placed as a part of a line of defence, and are 100% sure to be killed, with minimal losses for the Germans.
Also, 'hero-cities' may be worth considering.

All in all - very interesting to see how such a complex AI can be designed by keeping reducing each aspect into smaller parts. When I fist heard on an AI for WiF I thought it to be rather impossible, but I must say that I am being converted by reading about the details of this approach [;)]

Regards
Nikolaj
Regards
Nikolaj
User avatar
Froonp
Posts: 7998
Joined: Tue Oct 21, 2003 8:23 pm
Location: Marseilles, France
Contact:

RE: Artifical Intelligence for World in Flames

Post by Froonp »

Nit picking :
HQ support (up to +3),
up to +2.5 please, there is no rounding when counting HQ support.
npilgaard
Posts: 177
Joined: Wed May 03, 2006 6:09 pm

RE: Artifical Intelligence for World in Flames

Post by npilgaard »

ORIGINAL: Froonp

Nit picking :
HQ support (up to +3),
up to +2.5 please, there is no rounding when counting HQ support.

True, but iirc numbers are rounded before being compared (at least that is how I understand it), which means that if no other .5 modifiers are present, then a 5-reorg HQ will provide a +3 bonus (which is often the case).
But you are of course right - the HQ itself provides only a +2.5 bonus. [:)]

Regards
Nikolaj

Edit:
Note, however, that a defending 5-factor HQ will usually only provide a -2 modifer (if there are no additional .5 modifiers), since fx. a +10 attack will become a +7.5 attack after defensive HQ support, which will round to +8.
So often (if there are no .5 modifiers) an even-factor HQ is just as good as an uneven-factor when defending, while the contrary is the case when attacking.

Btw, if going 'strictly RaW' the rule of rounding before comparing means that an ARM DIV can prevent an ARM corps from selecting the blitz table (since the 0.5 is rounded to 1 before comparing, and as both attacker and defender thus have 1 ARM, it is defenders choice).
So unless one player have 2 ARM DIVS (which count as only 1 ARM corps after rounding), an ARM DIV is just as good as an ARM corps for purpose of selecting attack table.
Regards
Nikolaj
Post Reply

Return to “AI Opponent Discussion”