AI enhancement ideas

Empires in Arms is the computer version of Australian Design Group classic board game. Empires in Arms is a seven player game of grand strategy set during the Napoleonic period of 1805-1815. The unit scale is corps level with full diplomatic options

Moderator: MOD_EIA

User avatar
Marshall Ellis
Posts: 5630
Joined: Tue Oct 02, 2001 3:00 pm
Location: Dallas

AI enhancement ideas

Post by Marshall Ellis »

Hey guys:

I have a list of AI things I would like to do and I know there are AI ideas all over the forums but I wanted to start a thread JUST for AI improvement ideas. My plans are to focus the next patch more on AI (And critical fixes of course) improvements.

Let the creativity begin...

Thank you

Marshall Ellis
Outflank Strategy War Games


Grimrod42
Posts: 92
Joined: Thu Jan 10, 2008 4:01 pm

RE: AI enhancement ideas

Post by Grimrod42 »

I think a major issue is that the AI declares war seemingly at random and then does not really do much to fight them.
bresh
Posts: 936
Joined: Mon Aug 08, 2005 9:10 am

RE: AI enhancement ideas

Post by bresh »

Share/loss of pps in combined battles.
The possibility of lending corps with leaders.
 
Seems quite critical for the game in my opinion
 
But sure, AI-comes to :)
 
Regards
Bresh
User avatar
fvianello
Posts: 532
Joined: Tue Aug 06, 2002 12:23 pm
Location: Italy

RE: AI enhancement ideas

Post by fvianello »

I think that a good start could be several pre-planned grand strategies for every MP containing:
1. alliances
2. declaration of wars
3. objectives
4. exit procedures

After choosing a strategy, the AI MP should evaluate a set of conditions to verify that strategy is feasible

If the strategy is not applicable, switch to another strategy.

Example:

Austria AI choose strategy "grand coalition attack"
Alliances: Prussia, Russia, Great Britain
declaration of wars: france
objectives: lombardy, bavaria
exit procedure: conditional peace with france

Austria AI evaluates the strategy key conditions:
Alliance with Prussia (+10)
Alliance with Russia (+10)
Lombardy french controlled (+5)
austria can declare / is at war with france (+10)
prussia can declare / is at war with france (+10)
russia can declare / is at war with france (+10)
gb can declare / is at war with france (+10)
peace with turkey (+10)
france at war with Spain (+15)
france at war with Turkey (+5)
france is dominant (+10)

after checking the key conditions, the "acceptability" of the grand strategic plan is 75; Austria AI goes for it.

After a few turns, the situation is changed; for example, france is no more dominant and prussia asked for a separate peace with enforced 12 months. the acceptability goes down to 55, so Austria AI start to evaluate a new strategy, using the exit procedure "conditional peace to france" to try to get out well...

The above will be used only to define the GRAND strategy; moves, corps placements and similar should be handled by another procedure that considers also the current grand strategy.

I think the best way to handle this kind of decision flow is a data-based expert system, with a forward inference engine....you probably know what I'm talking about. Of course, the AI will never be smarter than the data used by the engine, so the big work is to create good inference rules.


In any case, what you should try avoid at all costs is a procedure that reevaluates everything every turn, without considering the past events. IMO this kind of approach brings to a lunatic AI that declares war to turkey one turn and make an informal peace the next.
H. Barca,
Surplus Consuls Dispatcher
pzgndr
Posts: 3518
Joined: Thu Mar 18, 2004 12:51 am
Location: Maryland

RE: AI enhancement ideas

Post by pzgndr »

This thread here had several suggestions for more immediate enhancements.
Bill Macon
Empires in Arms Developer
Strategic Command Developer
ndrose
Posts: 612
Joined: Fri Oct 13, 2006 4:07 pm

RE: AI enhancement ideas

Post by ndrose »

Some of the big problems (single corps attacks, random DOWs) have been discussed elsewhere, and I'm sure will be hashed out in great detail in this thread. Here are some smaller but still significant problems:

1) Not thinking far enough ahead. For instance, AI Russia usually declares against Sweden in Jan, and sends its army into Finland. Once Finland falls, it sees that it needs to get into Sweden to prevent lapse of war, so it sends an army across the northern frontier. But then supply all the way to Stockholm is too expensive that way, so it just sits there until eventually it is allowed to starve, and the war lapses. Result: if I get control of Sweden, I can always keep it.

2) No backup plan. Example: When AI Turkey invades Egypt, it sends a force south into Sinai, and then tries to move around the Egyptian army to reach Cairo without risking a field combat. But if you place the Egyptian army in the area that blocks access from Sinai to Egypt, the Turks still go south, then sit there, waiting for you to clear a path. If you just sit and wait long enough, they eventually starve. Again, result: if I get control of Egypt, I can always keep it.

3) Too amenable to informal peace. For example: playing France or Prussia or some other far-away country, I may have manipulated alliances in the Caucasus. Russia declares war, giving me all those minors as free states. Russian army marches in, with no possible opposition anywhere in the region. Yet if I offer an informal peace, even though they have expended PPs to declare war, and will shortly be able to conquer the minors, they will often accept peace. Result: free minors for me, loss of PP for them. Sometimes you can quickly build your empire just by doing this repeatedly on the frontiers of an indecisive AI.

4) Unnecessary foraging. If the AI has to move its forces quickly--to defend the capital, for instance--it will often not bother creating a depot where it's going, even though it's within its own territory. In fact, it will create a depot the next month, having already incurred huge foraging losses.
Grognot
Posts: 409
Joined: Thu Dec 06, 2007 10:37 pm

RE: AI enhancement ideas

Post by Grognot »

- Needs to consider more amphibious assaults, and invasion supply when land routes are long

Ex. Russian plan on Sweden -- one method is DOW in Jan.; march a single 
Cossack into Finland to prevent lapse of war; then amphibious raid on Stockholm in March.  Since there's no economic phase until later that month, and it's not easy to attrit the forces in Stockholm before March regardless, a DOW in Jan. instead of March does not increase Swedish army size.

Ex. re Egypt -- One force through Sinai, one force landing by Alexandria, makes a forward blocking position in Sinai untenable and forces a retreat to Cairo.



- Breaks far, far too many rules -- keeping commanders unstacked; letting John escape from (my, and I wasn't releasing him) French prisons four months in a row (and placing an unstacked John in a field wholly occupied by French corps, to be immediately recaptured when a French corps moves there); moving into enemy-held fields without land combat occuring; moving into territory it ceded, without having any access or war; buying factors it can never place, like Prussian artillery


- AI Turks never, ever seem to stand down feudal corps even if they don't really have a use for them at the moment and are bankrupt.

- AI Turks prioritize "using MP for forage" over "lifting siege of Constantinople" or practically anything else, like stopping a small Russian expeditionary force

- AI chooses surrender conditions randomly, even conditions which are inapplicable

- AIs call allies for silly wars, and calls are accepted (like France calling for Turkish DOW against Prussian aggression, when the Turks are nowhere any Prussian lands; don't have permissions to go overland; and haven't even successfully waged war on Austria, let alone Prussia)

- AI depot placement is very weird; sometimes placing them *next* to large stacks even when large stacks are on a supply source presently w/o depot

- AI tactical management inconsistent; sometimes ignoring a large threatening stack to split into munchable raiding groups threatening minors, sometimes making utterly pointless moves

ex. AI takes over my France, which has just DOW'd Prussia; one small French stack is just east of Prussian Savoy (no garrison to speak of); instead of attacking Savoy, the stack marches one region NW towards nowhere in particular

ex. same AI takeover; AI splits my Napoleon-led French+minors stack and sends Napoleon with a single corps *through* Prussian corps to sit next to a Prussian stack in Berlin... triggering exactly zero battles -- neither logical nor legal

- AIs never appear to ask humans for any assistance whatsoever other than ally-call -- e.g. AI Turkey with French human ally does not ask France for money, even when France is being very successful and can probably spare it

--
Not a grognard.
Not an optimizer. It's a game to me, not a job.
User avatar
JavaJoe
Posts: 214
Joined: Sun Sep 11, 2005 11:43 pm
Contact:

RE: AI enhancement ideas

Post by JavaJoe »

For PBEM the easiest AI is to use the Uncontrolled Major Powers rule in EiA. This way the nations that don't have a player will have a player.

Vice President Jersey Association Of Gamers
JerseyGamers.com
User avatar
Jimmer
Posts: 1968
Joined: Wed Dec 05, 2007 9:50 pm

RE: AI enhancement ideas

Post by Jimmer »

I've noticed that the British don't seem to "notice" Amsterdam if the right number of French ships are in port in the right places. She will also greatly over-blockade ports.

There are several "sweet spots" in blockading that the AI should understand. All that follows assumes 1.02, since it requires the proper functioning of blocades:

Let's say the French have 10 ships in port (ignoring for now the heavy/light stuff). If GB blockades with 6 ships, she has a 56% chance of successfully keeping the ships in port. If she blockades with 8 ships, the odds go up to 67%. Notice that 7 ships does no better than 6 does. This is because of the step-function used in naval combats (round multiples of 5%). I call the number 8 a "sweet spot" against 10 ships. There's another sweet spot at 10 ships (the odds jump to 89%). The final sweet spot is at 15 ships, where the odds get to 100%.

If the French player is smart, she will have four fleets plus the Holland fleet, forcing the British player to make these calculations for five different ports.

What GB needs to do is calculate the best average odds she can get, and make sure she uses the "sweet spot" in every port she blockades. If GB gives France six rolls to get out of port, then she darn well better have given herself better than 5 in 6 chances of winning each one, else France will make the attempt at all, and succeed at one (on average). One French corps in London means the British are toast.

PROVIDED the corps is large enough to do some damage before it dies foraging.

That brings up the flip side of this: The French should be spreading out those fleets as much as possible. 9 heavy and 5 light ships is the ideal number. It forces GB into a "sweet spot" that is not as much to her liking.

The AI currently will always blockade the port that has the french Transport ships with 30+ heavy ships, no matter how few combat ships you place there with the transports (I haven't tried zero, though). Well, a 1-factor fleet can NEVER break out of port, as long as the blockader has at least one ship. There's not really a good reason to blockade with 36, all heavy. The AI is a computer; it ought to be able to figure this out. If only 1 ship is required for 100% odds of winning, then 1 ship it is!

Etc.
At LAST! The greatest campaign board game of all time is finally available for the PC. Can my old heart stand the strain?
Tater
Posts: 60
Joined: Tue Dec 25, 2007 7:06 pm

RE: AI enhancement ideas

Post by Tater »

1) The AI does way to much solo Corp activity. And tends to place best leaders with lone Corp.
2) The AI doesn't seem to know how to build an army. I find over and over again that I am facing a mostly militia force with very little Cav.
3) AI can't manage a supply chain. In one game (as Ruski) I noticed France had almost all his depots on the board...in France, with not a single French corp in position to need/use the depots.
4) AI's seem to forage their forces into oblivion for no good reason.

IOW...
Stacking for battle...
Building an army...
Supply managment...
When to forage...

Enhance/fix those 4 areas and you get an AI that might be a challenge.
Later-

Tater
eske
Posts: 258
Joined: Wed Jan 02, 2008 12:26 pm

RE: AI enhancement ideas

Post by eske »

Once you have the AI actually manage an army, avoiding the basic poor decisions listed here, you will want the AI to consider what to do with its army. Han Barca has some good pointers about making preplanned strategies.

That can be done on a smaller, tactical scale too, in preplanned tactical maneuvers, like:
- Let the low moral parts of the army reinforce into the battle.
- Prevent reinforce attempts by a attacking both stacks
- Invade that blockaded port and scuttle his fleets
- GB takes double move to abandon blockades for a large scale attack/port attack, then resume blockading positions next month.
- France double moves to eliminate enemy supply
- limit enemy movement using depot garrisons
- limit enemys retreat options, to the worst possibly... achieve lapse of war or capturing forces/leaders.
... and all the rest of the tricks

Specific geografic triggers:
My army is in area ??. From here I can reach both XX and YY. Which one does he protect?

There must be lots and lots. Will help the AI performing coordinated actions involving more stacks. Specially if they take two or more months to do.
Alea iacta est
eske
Posts: 258
Joined: Wed Jan 02, 2008 12:26 pm

RE: AI enhancement ideas

Post by eske »

I think someone posted an excellent idea somewhere:

Let the individual AI's have "personallity traits".
Of course you need to adapt your playing style to the preconditions of the various nations.
But a good deal of decisions is still a matter of personal taste:

I do not like to declare wars so I wait for some one else to.
I attack any weaker forces I can reach
I do like that cordon chit. I think most people underestimate it.
I do not want militia in my army !
I want my army concentrated, even if its expensive

It should increase replayability and could also include diplomatic relations.
Some like lots of talk, others hate disturbance etc. etc.

Or the choosing of overall strategies - again referring to Hanbarcas post above.

Sid Meyers old civilization has an - maybe exaggerated - but classic example.
Alea iacta est
User avatar
peskpesk
Posts: 2592
Joined: Thu Jul 17, 2003 5:44 pm
Location: Stockholm, Sweden

RE: AI enhancement ideas

Post by peskpesk »

1) The AI should create one (or if having a strong army two/three) ”killer stack” (stack
optimized by good leader, mix of forces etc) more often and try taking out enemy stacks.

2) When advancing/on the offensive, the “killer stack” should be flanked by flanking forces to minimize risk of being cut of from supply, reinforcements etc.

3) The AI should try to break supply chains

4) The AI should guard own supply chains

5) The AI should expect war if nations builds up troops close to the border

6) The AI should try to use a expendable, outflanking force more often, to hit isolated garrisons, supply depots, week crops and “annoy” the opponent, forcing him to react on it.

7) The AI should be wearier on facing the double move, (France/ Great Brittan moving last and then first. When calculating the risk of being attacked. Too big risk is taken now.

8) The AI should not fall for the “pull trick” (A weaker enemy fleet/corps is in range of the AI. The AI moves a force there and attacks it, just to be pulverized the next move by the enemy’s waiting “killer stack” that waits out of range)

9) The locations of the major generals for each nation. Napoleon, Wellington, Blucher etc should war the AI of possible increased risk of war with that nation or increased risk major offensive taking place there.

10) When faced with a two front war (or more), the AI should decide on a strategy. The strategy should be re-evaluated each turn:

• Try to finish of one opponent and ignoring the other(s) at the risk of facing high cost at the other fronts.
• Decide to face them all and divided his forces among the fronts and for each front decide a strategy for the front.

a. Hold the ground

b. Retreat

c. Be on the offensive

d. Ignore the front due to lack of forces or threat from the opponent.

11) When at war try to buy of difficult/strong opponents with if possible “cheap”/quick conational or informal pace. Face the easier opponents in battle.

12) Avoid futile declaration of wars. When declaring war on minors the AI should calculate the risk of the likely controlling major power is at war with another major that in turn moves before the AI nation and has quick access to the minor. (Ex Great Brittan is at war with Russia. The Turkish AI declares war on Georgia. Russian forces moves in and assaults the capital before turkey has the chance. Due the fact that Russia is at war with Great Brittan that controls Georgia and moves before turkey.

13) The Turkish AI should take more use/risks with the feudal forces and “bleed” them in combat/force marsh/invasions etc if December is closing by and the capital of the feudal force is expected to be friendly controlled when renewal phase happens.

14) Avoid declaring war in winter turns. Due to high supply cost.

15) Avoid being in low forage areas in winter turns if no supply depots/chain is present and the AI has enough money for the cost.

"'Malta - The Thorn in Rommel's Side"
User avatar
delatbabel
Posts: 1252
Joined: Sun Jul 30, 2006 1:37 am
Location: Sydney, Australia
Contact:

RE: AI enhancement ideas

Post by delatbabel »

There needs to be an AI strategy as well as an AI tactic. eske hit on this above. That should vary from nation to nation, e.g. France should be aggressive and go all out to attack either Prussia or Austria from the start of the game, whereas Prussia should not (as it does now) start declaring war on one and all -- the number of times I've seen Prussia declare war on GB is phenomenal, when there is absolutely no reason or gain in doing that.

However there are variations in this:

* Super Aggressive France -- go to all out war against both Austria and Prussia at once, and once they are done attack Spain.
* Mildly Aggressive France -- only go to war with them one at a time, aiming for destruction of armies when you can.
* Not Very Aggressive France -- aim for 36 month peace and never attack Spain.

I think the number one thing that needs fixing now is for France not to be stupid with its corps. Sending Napoleon out with a single (often guards or even artillery) corps is just stupid. Napoleon gets 6 corps including 1 cav and Murat, Davout and Massena work in cooperation, and Soult and/or Bernadotte act as rear guards.

Sorry if this doesn't provide too many concrete ideas -- I don't know where to start really. The current AI is so bad that I'd be inclined to throw it away and start again, it seems to have a habit of making deliberately stupid mistakes. A program that just stuck to the basics of stacking corps and depots together in an appropriate manner and moved them around randomly would probably do much better.
--
Del
User avatar
La Provence
Posts: 156
Joined: Sun Jul 16, 2006 12:58 pm
Location: Toulouse (FRANCE)

RE: AI enhancement ideas

Post by La Provence »

I see that my proposal was good !!!!  [;)]
 
It's the best way to made AI very unpredictable and to keep difficulty control.
 
The player choose the AI doctrine for each nation with infinity of possibilities :
 
- Agressive
- Intermediate
- Passive
 
with
 
- Economic agressive (bonus)
- Economic standard
- Economic limited
 
with
 
- Agressiv Politic
- Standard politic
- Limited politic
 
and so on .....
etc.....
 
- Possibility change between them during game
Salut et fraternité

La Provence
User avatar
Marshall Ellis
Posts: 5630
Joined: Tue Oct 02, 2001 3:00 pm
Location: Dallas

RE: AI enhancement ideas

Post by Marshall Ellis »

Wow! I see that I have asked the right crowd, the right question LOL!
The single corps attacks (or just stupid attacks) seem to be happening quite a bit. Does anybody have a good test game where multiple corps could have been sent to battle BUT only one was actually sent?
 
Appreciate the help guys!
 
Thank you

Marshall Ellis
Outflank Strategy War Games


User avatar
Jimmer
Posts: 1968
Joined: Wed Dec 05, 2007 9:50 pm

RE: AI enhancement ideas

Post by Jimmer »

ORIGINAL: eske

- Let the low moral parts of the army reinforce into the battle.
On this one, a strategy I've found very effective, for France, is to start the battle with one army, but finish it with another. This works 5 out of 6 times, and prevents the nasty effect of Nappy losing a battle:

Launch into combat with Davout or Massena (depending on the size). Then, have Nappy next door, in clear terrain not across a river. Nappy reinforces on any good chit pull. Also, the size of the Nappy stack is a number of corps which would put the combined stack up to an even multiple of six corps.

This doesn't work if the enemy has a huge pile, because even Davout can get hammered in one round against a very large army. France would prefer to have numbers at least as large as the enemy does.

The REALLY nice thing about this tactic is that, if Davout's chit pull is bad, Nappy is still next door come the opponent's next move. So, it somewhat protects Davout's stack for a whole turn, even if it loses.
At LAST! The greatest campaign board game of all time is finally available for the PC. Can my old heart stand the strain?
User avatar
delatbabel
Posts: 1252
Joined: Sun Jul 30, 2006 1:37 am
Location: Sydney, Australia
Contact:

RE: AI enhancement ideas

Post by delatbabel »

ORIGINAL: Marshall Ellis

Wow! I see that I have asked the right crowd, the right question LOL!
The single corps attacks (or just stupid attacks) seem to be happening quite a bit. Does anybody have a good test game where multiple corps could have been sent to battle BUT only one was actually sent?

Appreciate the help guys!

It's very simple to generate. France does it nearly all of the time.

Start a game as Prussia against all AI players. In about March 1805 or so declare war on France, and advance a big stack under Hohenloe towards the French border. Almost at once you will see Napoleon single stacked with the guards corps faffing about in one of the German minors nearby. Attack, squash, rinse, lather, repeat.

My general strategy for beating France AI in this game is to wait for this to happen with all of the good French leaders (or at least Napoleon, Murat, and Davout). Then when they are out of leaders start squashing their leaderless corps. I'm not sure what I'd do if France became hard to beat.
--
Del
User avatar
delatbabel
Posts: 1252
Joined: Sun Jul 30, 2006 1:37 am
Location: Sydney, Australia
Contact:

RE: AI enhancement ideas

Post by delatbabel »

The other major major thing I would like to see fixed in the AI is the inability of AI players to coordinate at all.

If I am playing France in a game of FTF EiA, and declare war on Prussia in early 1805, I expect to see Austria and Russia and Britain join in on the Prussian side. I expect to have to fend off Charles with a large army, and I expect to see British cash pouring into the Prussian economy. That never happens if I'm playing against AI players, which means that playing France against the AI is too easy. Far too often I see AI players do completely daft things -- Prussia declaring war on GB or vice-versa, while both are at war with France.

Playing Prussia I would expect to see Austria and Britain combining their forces against France when I am at war. I can "request" money from GB but far too often it doesn't turn up and I get a +1 nuisance factor for the die roll -- which is completely stupid if we are both at war with France and there is surplus cash in the GB war chest. I can "request" corps on loan or attacks by the Austrian AI player but they rarely happen either.

Stick to the alliances against the big players -- EiA isn't a balanced game but that and the diplomacy element are what makes it fun to play.
--
Del
Killerduck
Posts: 16
Joined: Thu Nov 29, 2007 4:39 pm

RE: AI enhancement ideas

Post by Killerduck »

Grand strategy for AI.... I see no way to go other than make a custom strategy for each nation that they start with, then, after early goals are met (or AI gives up on them) change to "Beat on the leader" strategy.

Early in the game, the player leading is the one with biggest army (fleet) and economic strength (potential army and fleets). Only very late in the game should the AI consider the one leading in VPs the threat.

Handling wars... figure out if you are going to win or not. If you are losing, offer conditional immediately. On the other hand, dont surrender unconditionally unless you are being overwhelmed.

Even though passive strategy for most countries is a good idea, tactically aggressiveness is the right call. When in doubt, attack. Defence _cant_ win a war. Target armies, depots and capitals (in that order). Always go for ridiculous numerical superiority if you can. Never attack if you are likely to be outnumbered.
Save a lot of money and pay for supply. Mobile militia beats immobile infantry.
If economic manipulation is available, use it. Instability zone is the death of any empire.

Early strategies:

France
-EARLY attack Prussia with everything, get extended peace and go after Austria.
-DELAYED Attack 3-5 minors untill there's nothing left to conquer. Build the guards and artillery, then attack Prussia or Austria.
-LONDON now. Join with Spain and slug it out on the open seas.

Britain
-DENMARK now, right now.
-LAND with a small force on French port to force a fleet out.
-STACK everything on the english channel and defend only.

Spain
-EXPLODE all over the minors, DOW Portugal, Morocco, Algiers and Sardinia. Send a single coprs to each.
-CONSERVATIVE attack on minors. One at a time. Start with Portugal.
-SINK the royal navy in alliance with France. Try to land in England.
-JOIN Britain. Let him have Portugal. DOW France when France DOWs Prussia/Austria.

Turkey
-OTTOMAN empire is your goal. Start with Egypt and Tunis and work your way from there.
-WAR with Austria as soon as war with Austria and France breaks out.
-SLEEPY Turkey only takes Egypt, then manipulates for +1. Take a nap and dont give a damn about europe.

Austria
-ATTACK France with Prussian help. Ask Russia to help also, but go for it anyway.
-HOARD minors, then fight France with Prussia.
-PEACE. But get as many minors as you can. Help Prussia if she is attacked, but dont ask for trouble.

Prussia
-Same options as Austria, but you may or may not create Poland.

Russia
-WAIT and see. Take Sweden. Build.
-COALITION attack on France. Lend a few corps to Prussia or Austria. Let them keep them for the whole war. Take Sweden anyway.
-GREEDY attack on minors. Take Sweden, then Denmark. Work your way to Germany.
-ITALIAN option. Go for Naples with everything you can transport from Corfu.
-TURKISH attack. You need your fleet in Blacksea. Threaten to land on Constantinople.

General gameplay rules for each country:
-If you have double move, use it. Beat on a stack that is weaker than yours, then move first and beat it again. With fresh troops if possible.
-Concentrate to attack. This just cannot be overemphasized. Concentrating for defence is not half as important or profitable. Odds of 5 to 1 are preferred.
-Britain shouldnt give money out at random. Find out who's the dangerous country (France) and give money to those who destroy (French) troops. Give it proportionally to their success in killing French units. 1$ for each infantry is a good rule of thumb.
-Britain shouldnt trade with everyone. Only trade with your allies.
-Austria and Prussia should not declare war on eachother. Maybe after France is completely devastated.
-Take care of your fleets. This means every nation. Garrison of 1 just doesnt cut it.
-When a coalition forms, it must act together. Lend those units!
Post Reply

Return to “Empires in Arms the Napoleonic Wars of 1805 - 1815”