• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
v.Manstein said:
Germany rushed through Belgium and got into hard fights with france near Paris.

You MUST tell me how you did that^^ I sat almost two whole days just tweaking German ai files to enforce an invasion into Belgium. First, I just changed some numbers, then I learned ai commands and tried to invent a new ai from the scratch. I got desperated and replaced the ai with good working versions such as the German eastern front ai, French ai, panda's Austrian ai against Serbia, Poland Blitzkrieg ai from Doomsday, but nothing proved successful. German troops just refused to attack Belgium in August as if there was a hard-coded handicap that delays any offensive actions.

So if you know now what has caused that problem, please share it with us :)
 
# AI NEWS UPDATE #####

I made a first progress in coding the new AI. Germany now successfully invades Belgium from the very beginning of the Great War. I am now working on a Schlieffen-Plan Phase Two AI, which focus on Paris after Belgium is beaten.

At present, most Countries lack a seperate War-AI, which means that not the full enemy strength presses on the German Borders. I'll have to see what happens then.
At present, Germany can hold the line in East (they loose Memel, in some Cases Königsberg but not more). We will see if they do when Russia gets a better AI.

I'll see if I can release something to test on the weekend.
 
v.Manstein said:
I'm really fed up with the old way. I had a really good game with the new AI I am working on. Germany rushed through Belgium and got into hard fights with france near Paris. Suddenly, France and Belgium had "Mobilisation" with about 20 new divisions appear throwing back germany to the rhine :(

but HOW? :D

only tell us what is the magic command :rofl:

okay, lately i'm very busy and for the next 2 month I will be so, but I can pull some time on AI coding, specially after that "breaking news" :cool:
 
Very strange AI thing: If Belgium has no AI file (so it loads the default values) my AI is working fine. If I give belgium an AI file which has exactly the default AI values (taken out of a safegame), the game can change completely and germany attacs only in about 50% of my games, even if Belgium is running with the same values and therefore has the same starting conditions *confused*
 
Advanced German AI Alpha 1

Description
These are the results of about 2 weeks of AI testing for a completely new AI for the upcoming 0.5 release. This package contains only a first version of the new german 1914 AI. All other nations stick with their old AI. So don't forget to make backups as this is only a first version! Please test it and report about occuring bugs here.

What's new/different
The new AI contains two default AI files (a peace-AI and a war-AI). In case of war, the AI loads one of three AI-files, which focus on specific enemies (BEL, FRA, RUS, most likely in this order)

Known issues
Probably the worst problem is the mixture of old and new AI-files. Especially the old mobilization-events possibly throws things out of balance. Furthermore, this AI is only tested up to early 1916, so I can say nothing about things may happen after 1916.
Finally, I already know that if Russia manages to push near to Berlin, the AI loads the focus_Russia.ai and won't switch back again after Russia is pushed far away from Berlin.

Download
Get the AI from here

Special thanks
...to Lothos for his help in explaining me some details about the HoI2-AI. This really helped me a lot and solved the biggest problems.


# EDIT #####
It seems that some mobilization events screw things up. So you'll have to wait for a first complete set of AIs and Events.
 
Last edited:
Has anybody tested my AI?

After some more testruns, I have to admit that it is not working that good as expected :(

Seems that there is still a long stony road ahead.
 
Maybe generic AI can be done first, worrying about specific scenarios later. 1897's ai is coming along, I'm assuming, but maybe 1911 and 1914 (and 1904 :D ) AI can be all the same.

AI can't be that hard. And we should tell everyone to completely delete their AI folders if they are simply upgrading to 0.43 version. There's alot of old, junky ai that still is left over from the Allenby days.

EDIT

Wow... the littler things in life... I'm just one more post away from 800... I feel so beautiful.
 
Hi everyone,
I'm playing as Austria-Hungary, scenario 1911. Hard/Aggressive setting.

I have a question concerning German and OTT AI - they are losing terrain too easily. Germans lost 27 divisions which they left encircled in Essen, Ottoman Empire got pounded everywhere and what's more alarming they haven't advanced even when there was no resistance on their borders (Russian Caucasus and UK Sinai) and just retreated or stood lobotomized while Russians and UK advanced.

Germans also lost almost all of Prussia and good part of their western border without much fight. Bruxelles taken (or similarly named) event fired nicely but 13 German divisions created this way were encircled (Germans never even managed to pass German - Belgian border as far as I was able to see) and quickly destroyed.

UK, France and Russian AI seems to be doing just fine. France around Marseilles and Russia around Kiev are fighting quite good.

The only thing I tampered with was editing the save game to prevent Germans and Ottoman Empire to give me Exp. forces (I've set it to 0.000) because it was too much strain on my supplies to feed their divisions :).
 
Some observations on German AI

This is mainly addressed at v. Manstein when he is back, but of course everybody can jump in and comment:

*** speculation that proved incorrect deleted ****

Some other speculation:

enemy_reinf_days is a key parameter and should be set to 0. It causes enemy units within X days (usually 6 or 7 in the various AI files) to be included in the odds calculation. Within 7 days of march in Belgium you will always have too many units, so the AI will refuse to attack.

Also, I believe that distrib_vs_ai and distrib_vs_human should be set to offensive for Germany in 1914.

But of course I am just starting to look into AI coding ...

Maybe there is some merit here, I will try it out.

Best Regards

T.
 
Last edited:
@Tegetthoff: You're right, but did you tried what happens when you set it to 0? My experience was, that it will turn the AI to be even more suicidal. But I'll give it a new try. Hope that I'll find more time to work on the AI within the next weeks.
 
v.Manstein said:
@Tegetthoff: You're right, but did you tried what happens when you set it to 0? My experience was, that it will turn the AI to be even more suicidal. But I'll give it a new try. Hope that I'll find more time to work on the AI within the next weeks.

I am now working with a save file and changing the AI directly in the savefile. This permits very quick testing with identical situations. I am using an Aug. 7 save of a 1914 scenario game. Initial situation: Germany sits on the Belgian border with dozens of divisions opposing half a dozen Belgian divisions and does nothing.

Setting enemy_reinf_days = 0 gets them to attack into Liege, then they stop.

Setting hard_attack = 5 (and adding a lot of province priorities) interestingly caused them to also attack Luxemburg and annex it.

Beyond that - nothing ...

I am now changing various AI parameters to very high and very low values and see what happens. Unfortunately, my computer time is limited.

Some suspicions that I have:

* The odds calculation is thrown off track by the changed unit stats in 1914. (See the hard_attack factor above - this is important in WWII but fairly unimportant in 1914)
* Germany gets confused when the Belgian divisions turn into French divisisions OR when French / British divisions appear in Belgium. The AI is told to behave in certain ways against FRA, ENG and BEL, faced by all three nations is is confused and does nothing

.... very interesting, but also very frustrating ....
 
As soon as Belgium is allied with france, the whole border gets french-controlled. This is the main reason why our old AI files fail.

Furthermore, I am against every change on the specific odd-modificators (hard-attack, soft-attack, river, ...). You'll see that Lothos doesn't change them in any way (furthermore, I read that these changes are ignored since version 1.2)

Concerning Belgium: Have a look into the german AI-files I posted here somewhere on the board. They're better than what we have now, but rather incomplete.
 
It might be useful when it comes to making battles longer, though. Although the problem is that battles at the beginning of the war weren't particularily long. Perhaps the 1915 or 1917 model should have a dramatic increase in defence?

Or we could just raise the GDE for France and Germany once the trench events sets in.
 
Just to clarify the terms:

One thing is unit stats, and there is some merit in changing them towards more WWI like values.

The second thing is odds modifiers, which are only in the AI and apparently are used by the AI to decide when, where and wether at all to attack.

My guess at the moment is that the German AI calculates the odds and decides that it is outnumbered and does nothing. This guess, off course, may be wrong.

Since unit stats are already changed, the odds calculations may have to be modified (regardless of what Lothos does with the WWII AI).

So far, the only odds-modifier that has resulted in a change of behavious was hard_attack.
 
Hi everyone!!

After some hard examns I have some time to spare coding AI again, expect the relese of my new AI modification in some days, I will try to explain what I improved since the first version(link on my signature)

V.Manstein Germans script didn't worked for me for some strange reason but it insipred me some changes form my original script :)

The German atack on Belguim issue isnow done with less AI cheats(only minor magic teleports), but now that I managed to convince the German AI to atack belguim I have another problem:

To force the atack on Belguim I set two files, the first one tells the AI to atack Belgium, and the second one to atack France, okay, so the AI smashes trought belguim in a week and with his targets are fulfiled he just redistributes his troops in rusia, serbia and france, THEN the second file tells him to just take paris from Belguim, but there is no troops in belguim to make the move, I'm working on this but for now the provisional solution is to magically put the divisions there(previously removed), Maybe using some garrison comand and the area_multiplier I can force the Geman AI to stay there.

Another big problem with my original AI is that his performace in 1915--> was erratic and suicidal, now is more stable and clear with his plans and moves, specially using reserves and placing his troops properly along the front.

Also the coordination betwen aliance partners has been greatly improved, now aliance have common objectives and fronts.

The middle east war is now more interresting thx to a more conservaitve Otoman behavior, now Russia and the ottoman empire consider the caucasian front totaly unimportant allowing Ottoman empire to concentrate in take and retain Suez(no more ottoman spare in Egypt) and also Russia ignores the ottoman to just try to stop the German smash in 1915.

Also al the production/garrison AI has been intensivelly revised for each country.

Shortly I will put some screens of my offhands games to properly explain some of the problems that still exists in the 1914 AI.
 
Looking forward to it. What exactly did you changed?

btw: If you manage it without any cheats, you're my friend :)