Naval AI Enhancement

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

Post Reply
pzgndr
Posts: 3789
Joined: Thu Mar 18, 2004 12:51 am
Location: Delaware

Naval AI Enhancement

Post by pzgndr »

One of the last AI enhancements I've been working on for v1.23.08 release has been to implement some additional naval transport capability. The code was OK for making amphibious invasions and I enhanced that to make some supporting invasions. But the trick was to set up some additional amphibious invasions or to redeploy forces from overseas back to home nation.

Case in point is Turkey, which usually sets up to attack Egypt. But then what? So here's what's new. I created a new function to check certain overseas minors and assign a best port. Once conquered or made a Free State, the major power will send some home forces to the port if the minor capital is not at risk. Once forces are at the port, the major power will try to send fleets with sufficient capacity to carry the forces. And once fleets and forces are ready, they can then be assigned to a new amphibious invasion or forces returned home. That's the idea.

In the screenshot, AI Turkey moved I Janissary Corps to Alexandria in June following the conquest of Egypt, and then moved I Hvy fleet to Alexandria in July. So far so good. Obviously there are some limitations to all this, particularly if the major power is at war and fleets are otherwise busy blockading enemy fleets or being blockaded by enemy fleets. But if conditions are good, then the computer opponent should be better at striking overseas targets and then returning some forces home for other missions.

Also in the past couple of weeks, I've made some other naval AI adjustments to ensure nations with naval superiority are blockading enemy fleets (sometimes Great Britain was not doing this as expected). Also, the naval AI was not verifying if forces could be loaded on a fleet when making check for possible DOW, causing potential lapse of war when the forces could not be loaded and the minor nation could not be invaded. Things are better now. I hope to get another hotfix out soon prior to wrapping up v1.23.08 for release.

Image
Attachments
Naval AI.jpg
Naval AI.jpg (1001.42 KiB) Viewed 508 times
Bill Macon
Empires in Arms Developer
pzgndr
Posts: 3789
Joined: Thu Mar 18, 2004 12:51 am
Location: Delaware

RE: Naval AI Enhancement

Post by pzgndr »

Alright. I finally have a decent update to make, after wrestling with these new naval redeployment functions and other issues over the past week. In this May 1805 screenshot, AI Turkey has conquered Egypt and has moved both the Hvy I fleet and the Nizami-Cedid corps to Alexandria in preparation for redeployment back to Turkey.

Image
Attachments
TurkeyNavalRedeploy1.jpg
TurkeyNavalRedeploy1.jpg (997.91 KiB) Viewed 508 times
Bill Macon
Empires in Arms Developer
pzgndr
Posts: 3789
Joined: Thu Mar 18, 2004 12:51 am
Location: Delaware

RE: Naval AI Enhancement

Post by pzgndr »

In this next June 1805 screenshot, AI Turkey has verified both forces and sufficient fleet capacity are present at Alexandria, has loaded the Nizami-Cedid corps onto the Hvy I fleet, moved the fleet home to Constantinople (for Turkey with its coastal capital; other nations would move to nearest home port), and unloaded the corps. Mission Accomplished.

The intent here with all this is to redeploy some of a nation's overseas forces back to the home nation under certain conditions. And what might those be? Great Britain would maintain at least 1/3 forces at home, until about 1813. Spain would also maintain at least 1/3 forces at home, unless at war with France. Otherwise, nations would try to maintain at least 2/3 forces at home. Russia, for example, might have forces in Sweden, but as it moves other forces from Russia into central Europe and drops below 2/3 at home then it should start redeploying forces in Sweden back to the nearest home port. That's the idea anyway, and these 1/3 and 2/3 thresholds are simply starting points for future evaluations (too conservative, not conservative enough, etc.). It seems to be working so I'm going to start wrapping this up.


Image
Attachments
TurkeyNavalRedeploy2.jpg
TurkeyNavalRedeploy2.jpg (976.41 KiB) Viewed 508 times
Bill Macon
Empires in Arms Developer
pzgndr
Posts: 3789
Joined: Thu Mar 18, 2004 12:51 am
Location: Delaware

RE: Naval AI Enhancement

Post by pzgndr »

In doing some 'final' playtests, I'm Spain watching the AI in 1805. Turkey again conquered Egypt and was set up to redeploy a corps back. But Turkey had DOWed Cyrenaica and should probably have used that fleet and corps for amphibious invasion to Benghazi. So I made some adjustments and reran the turn. Now the AI will make some supporting amphibious invasions when friendly forces in country are outnumbered by the enemy in country.

Image
Attachments
TurkeyAmphib1.jpg
TurkeyAmphib1.jpg (977.17 KiB) Viewed 508 times
Bill Macon
Empires in Arms Developer
pzgndr
Posts: 3789
Joined: Thu Mar 18, 2004 12:51 am
Location: Delaware

RE: Naval AI Enhancement

Post by pzgndr »

And here's the result, a successful invasion. All good.

However, on the next turn with no enemy forces remaining in Cyrenaica, the AI made another invasion with a corps from Constantinople. So now Turkey has most of its army in north Africa. What happens on the next turn? Russia DOWs Turkey.

So now I'm trying to make a few final adjustments to not make unnecessary amphibious invasions, and to expedite redeployments back to home nation when at war. The second is tricky because fleet priorities go to blockading and naval combat. Anyways, that's where I am this week.

Image
Attachments
TurkeyAmphib2.jpg
TurkeyAmphib2.jpg (1.04 MiB) Viewed 508 times
Bill Macon
Empires in Arms Developer
Post Reply

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