FoF AI

From the creators of Crown of Glory come an epic tale of North Vs. South. By combining area movement on the grand scale with optional hex based tactical battles when they occur, Forge of Freedom provides something for every strategy gamer. Control economic development, political development with governers and foreign nations, and use your military to win the bloodiest war in US history.

Moderator: Gil R.

Post Reply
User avatar
siRkid
Posts: 4177
Joined: Tue Jan 29, 2002 10:00 am
Location: Orland FL

FoF AI

Post by siRkid »

Last night I was happy to get into a huge detailed combat, 90K on each side. I was on the defense so I set up like I normally do, a line mid map running from top left to bottom right. It was raining so visibility was low. To my horror the entire Union army showed up on my right flank. I thought I’m in for it now. However, the AI made a very bad move. It slid all of its units across my line to the left flank. By the time it repositioned, I had decimated the Union units. Looking back the AI almost always shifts to my left flank but never really makes a forceful attack. If the AI had of slammed into my right flank with everything, it would have won the battle.
Former War in the Pacific Test Team Manager and Beta Tester for War in the East.

Image
Rexor
Posts: 295
Joined: Wed May 04, 2005 2:41 pm
Location: The Oort Cloud

RE: FoF AI

Post by Rexor »

This is an excellent point. I think FoF already has an unusually strong AI, it just needs a few tweaks to become formidable.
"Human history becomes more and more a race between education and catastrophe." (H.G. Wells)
User avatar
2ndACR
Posts: 5524
Joined: Sun Aug 31, 2003 7:32 am
Location: Irving,Tx

RE: FoF AI

Post by 2ndACR »

I noticed that tendency awhile back. My left flank is the strongest. Once the AI hits my lines, it will always start shifting to the left.
User avatar
Xerkis
Posts: 115
Joined: Sat Sep 06, 2008 12:19 pm

RE: FoF AI

Post by Xerkis »

Good to hear it wasn't just me thinking this. no matter what the terrain or situation.
"Out flank em boys.."
"Which flank sir?"
"To the left son. Always to the left."
 
mishagoe
Posts: 2
Joined: Wed Jun 08, 2005 5:23 pm

RE: FoF AI

Post by mishagoe »

Noticed the same thing on large engagements.  AI starts on my right and slowly moves to my left, all the while getting chewed up and eventually breaking and retreating off the map.  AI could have had a chance and cleaned up my act, but never follows up the initial attack, and never concentrates on any one point in my defensive line.  Looks as if it's always trying to outflank my left, can't, and get's broken in the process.  Can someone who knows, explain what the AI is trying to do?  Is the code really looking to outflank the enemy or is it just getting confused with too many units to control?  Trying to keep moral up, maybe?  In either case, play would be more challenging if AI simply picked a random point to mass against and pounded that part into the proverbial ground.  As much as I enjoy the tactical battles, the larger engagements are no challenge because of this AI behavior, smaller or midsize still remain fun though. 

Just to be clear, AI does attack at difference points in my line, but the general movement seems to be from my right to my left every time. AI may attack on my left (maybe because of a victory hex on my left, let's say), but again does not follow up the initial attack, regiments route, and moves off to left, next unit saunders by, but most likely is already low on moral having been shot up on it's way down the line, rinse and repeat.
Michael
User avatar
ericbabe
Posts: 11848
Joined: Wed Mar 23, 2005 3:57 am
Contact:

RE: FoF AI

Post by ericbabe »

It's difficult to have the AI "close in the for the kill" at just the right moment.  Code designed to do this all too often ends up making the AI engage in suicidal attacks -- then people write "why does the AI engage in suicidal attacks?"  We spent a while tweaking the aggressiveness of the AI to get it where it's at.  If we were to work on improvements, I think a good mechanism would be to vary the aggressiveness of the AI between battles, so players can't as easily predict just how hard the AI will move at them.  We are working on a FOF patch right now, and I may be able to insert a randomized aggression factor, or to vary the level of aggression during the course of a battle based on global parameters, without too much extension to our schedule. 

For what it's worth, for COG:EE we have made many improvements to the AI along these lines -- both on offense and defense.  If we do a full FOF expansion some day, we may be able to fit many of these improvements back into the FOF engine.

As for explaining how the AI works, the core movement routines for the detailed battle AI are almost 5,000 lines long, so it's not easy to explain the algorithm with anything like concision.  There are several different modes of movement the AI can be in depending on the global situation (advancing, fighting, falling back, retreating, etc.) and there are some variant routines among these modes (different routines for advancing, for instance).  The core of the fighting mode optimizes the best attack a unit can make relative to the best attacks that can be made on that unit from that position, multiplied by a scalar factor.  There are other factors applied to this, such as the vicinity of friendly units, supply, terrain, and so forth.  The way these factors work, the AI does preponderately try to keep its lines together and avoid taking large casualties at the expense of making a strong attack.

Image
mishagoe
Posts: 2
Joined: Wed Jun 08, 2005 5:23 pm

RE: FoF AI

Post by mishagoe »

Thanks for the detail on AI routines.
 
Re delaying the patch, I would vote to not delay it.  Randomizing the agressiveness may or may not accomplish a better detail battle experience.  Another solution might be for me to go on the attack to up my entertainment value.  Longer term though it would be nice if the AI routines could be improved (that's of course always nice).  If the new COG:EE routines are a step up, maybe they could ported back into FoF with a future patch? 
Michael
Mutation2241
Posts: 35
Joined: Thu Sep 25, 2008 4:31 pm

RE: FoF AI

Post by Mutation2241 »

Another point relating to this: I've noticed the AI will send vastly understrength units (brigades that have been badly mauled in previous battles, sometimes containing less then 1000 men) as the first wave of attack in detailed combat, while it has several full-strength units in the 2nd and 3rd wave. The weak brigades are of course more easily repelled than brigades of 2500 or 3000, so its no good for AI's will to fight to do so.
Perhabs there's a possibility that can be applied to AI routines not to make the initial attacks with vastly understrength brigades but rather send his send full-strength units into action first!?
Post Reply

Return to “Forge of Freedom: The American Civil War 1861-1865”