Jorrig
Private
Posts: 38
Joined: Mon Feb 09, 2009 3:27 pm

Some remarks on the AI

Thu Feb 12, 2009 8:28 pm

I noticed several strange behaviour in the AI in my game. I'll make a short list, which is surely not complete.
(All of this applies to the movement doctrine in 1914)

1. The AI seems to be over-aggressive in winter time. While I stand still because attacks are costly, the AI runs into my well-prepared defenses again and again losing sometimes 14 divisions in one turn (by Russia). Can't the AI flee before this happens or be a bit more reluctant with attacks in winter?
2. I had a stack of units right before Paris, in Compiegne. There was a strong French force guarding the capital, 5 divisions plus reserves. I wouldn't move next turn, because it was winter and I thought that I had conquered a good position in the woods. What does the AI do? She draws away the troops further direction Amiens. Ok, I had Lille occupied, but why leave the own capital undefended? Next turn I entered Paris and conquered it in one turn.
3. The AI seems not to replenish its forces. I saw several divisions of the French and the Russians in wounded status. However, it could be that they exceeded their limit for the armies. But I don't think so, not that many.
4. The AI does not calculate with interceptions, it seems. I intercepted her several times inflicting high casualties. I mean, I made this mistake, too, but only once.
5. The AI called D'Annunzio to war, but did not invest in good relationships to Italy. The consequence was that Italy declared war on the Entente. Is this normal? Maybe they could at least do this only when Italy's diplomacy value is more favorable for the Entente and then they should invest some diplomats into Italy in that turn.

Another of my wishes would be a better summary of all the NW events. Why not create one event with a better overview, say, one event with all inflictions on NW for a big battle or the loss of a fortress, civil production and so on. Or even one event with all modifiers on NW this turn for each country. Or even make this be selectable by the user.
Apart from all my critics: Good Work! And please keep improving, I think this game deserves it!

patrat
Captain
Posts: 161
Joined: Mon Dec 29, 2008 11:27 pm
Location: Illinois USA

Thu Feb 12, 2009 9:49 pm

ive noticed that quite often the AI just abandons its own frontline. or it leaves it full of holes.

if its possiable, i think it would be a good idea to make keeping a continous front line a high priority for the AI.

User avatar
calvinus
Posts: 4681
Joined: Mon Dec 19, 2005 4:52 pm
Location: Italy
Contact: Website

Thu Feb 12, 2009 9:53 pm

patrat wrote:ive noticed that quite often the AI just abandons its own frontline. or it leaves it full of holes.

if its possiable, i think it would be a good idea to make keeping a continous front line a high priority for the AI.


As soon the 1.06 is released, this will be my priority #1 for AI! :thumbsup:

User avatar
calvinus
Posts: 4681
Joined: Mon Dec 19, 2005 4:52 pm
Location: Italy
Contact: Website

Thu Feb 12, 2009 9:58 pm

Jorrig wrote:1. The AI seems to be over-aggressive in winter time. While I stand still because attacks are costly, the AI runs into my well-prepared defenses again and again losing sometimes 14 divisions in one turn (by Russia). Can't the AI flee before this happens or be a bit more reluctant with attacks in winter?


Good suggestion. I will add several checks for meteo conditions.

Jorrig wrote:2. I had a stack of units right before Paris, in Compiegne. There was a strong French force guarding the capital, 5 divisions plus reserves. I wouldn't move next turn, because it was winter and I thought that I had conquered a good position in the woods. What does the AI do? She draws away the troops further direction Amiens. Ok, I had Lille occupied, but why leave the own capital undefended? Next turn I entered Paris and conquered it in one turn.


Linked to what reported by patrat.

Jorrig wrote:3. The AI seems not to replenish its forces. I saw several divisions of the French and the Russians in wounded status. However, it could be that they exceeded their limit for the armies. But I don't think so, not that many.


I think this is caused by low stock of RPs flow or limits, but I will investigate.

Jorrig wrote:4. The AI does not calculate with interceptions, it seems. I intercepted her several times inflicting high casualties. I mean, I made this mistake, too, but only once.


Other good suggestion! :)

Jorrig wrote:5. The AI called D'Annunzio to war, but did not invest in good relationships to Italy. The consequence was that Italy declared war on the Entente. Is this normal? Maybe they could at least do this only when Italy's diplomacy value is more favorable for the Entente and then they should invest some diplomats into Italy in that turn.


Yes, though point here. What I can do is to tweak the modding file, disadvantaging that option.

The game is incredibly complex. The final version of the big manual is finished: 227 pages.... :siffle:

Jorrig
Private
Posts: 38
Joined: Mon Feb 09, 2009 3:27 pm

Fri Feb 13, 2009 1:13 am

Thanks for the feedback, Calvinus, I believe you that it's a complex game and first effort goes to stability and gameplay before improving the ai.
To point 3: It was not lack of RP, Russia had about 50, but was still fighting with damaged units. It was even attacking with those units! Does the AI know everything? Maybe you could train it some memory like "last turn I attacked there, and there were that many squadrons".

User avatar
calvinus
Posts: 4681
Joined: Mon Dec 19, 2005 4:52 pm
Location: Italy
Contact: Website

Fri Feb 13, 2009 8:33 am

Jorrig wrote:To point 3: It was not lack of RP, Russia had about 50, but was still fighting with damaged units. It was even attacking with those units! Does the AI know everything? Maybe you could train it some memory like "last turn I attacked there, and there were that many squadrons".


Thanks Jorrig, your suggestions are great!
You should work with me on the AI, really! :thumbsup:

Indeed I must say that the AI already creates a lot of .SEQ files where he stores her knowledge and strategies!
In fact, the option "Use AI all behaviours" is intended exactly for what you mean. Unfortunately it's currently disabled, because it was causing severe slow downs...
So I have to refactor that portion of the code.
In addition, I recently discovered that most of the reported crashes were caused exactly by the creation of these .SEQ files (folder: Data/AI/Behaviours), intercepted by the antivirus, even if in text format (!), that made the game crash randomly! :bonk: :grr:

The worst cases concerned the NationStrategies.seq and PlayerStrategies.seq files, but also the battle ones (LandOptions.seq, NavalOptions.seq, SiegeOptions.seq).

The current (incoming) version 1.06 will store only:
GarrisoningConstraints.seq (where the AI is required to leave garrisons)
Espionnage.seq (the espionnage events played against the AI, to be counter-attacked or voided)
MilitaryKnowledge.seq (where the AI stores her knowledge about the enemy stacks)

Well, these three files are to be kept, of course. And I believe that if the antivirus makes the game crashes simply because it stores informations there... well, the antivirus is to be deactivated, unless you want a totally stupid AI. :D

However, I'm wondering to add a check-box in the WW1 Configurator tool in order to let you disable this SEQ files too, like I did for the "AI Logs" stuff. :neener:
This could be very soon, in 1.06a for example, provided we will publish the 1.06 today, as a beta-patch, and we will make the 1.06a as official on next monday, so providing you the full week-end to test the stability improvements due to the deactivation of the first bunch of SEQ files (NationStrategies, PlayerStrategies & CO). ;)

Kaiser1918
Corporal
Posts: 63
Joined: Thu Nov 13, 2008 7:04 am
Location: Singapore

Fri Feb 13, 2009 9:11 am

Hi Calvinus,
I my opinion, you should not do a mixed approach. Either you disable all seq or none, since even one could lead to a crash, correct? I suggest you make this an option and add a hint, that antivirus is to be disabled for those experiencing crashes.
What are those files good for? Does the AI learn from them?

User avatar
calvinus
Posts: 4681
Joined: Mon Dec 19, 2005 4:52 pm
Location: Italy
Contact: Website

Fri Feb 13, 2009 9:29 am

Kaiser1918 wrote:Hi Calvinus,
I my opinion, you should not do a mixed approach. Either you disable all seq or none, since even one could lead to a crash, correct? I suggest you make this an option and add a hint, that antivirus is to be disabled for those experiencing crashes.


You got the point. Indeed the 1.06 is going to be published as beta.
If the crashes remain, I will add the "Disable SEQ files" option in the WW1 Configurator tool, that will disable all SEQ files, as you suggested.
But I repeat, disabling all SEQ files will made the AI unable to recall his knowledge about enemy stacks, enemy espionage and the garrisoning priorities!!! :(

Edit: I currently disabled the SEQ files creation that was most heavy and more recurrent... So I believe this should be enough for the nasty antivirus programs! :love:

Kaiser1918 wrote:What are those files good for? Does the AI learn from them?


I explained something in my previous post.
I will go back with some details later.

Jorrig
Private
Posts: 38
Joined: Mon Feb 09, 2009 3:27 pm

Fri Feb 13, 2009 9:45 am

Do you work with neural networks? I really like this approach of designing an AI, at least to some degree. I thought about something like this here:
http://www.onlamp.com/pub/a/onlamp/2004/09/30/AIforGameDev.html
If you save input factors, decision and feedback of each game, the AI improves from game to game. If you should manage to share all game results from all players, the AI could become a very good adversary. ;) In any case, I can't help you improving the AI without knowing how it works. I could only give you some ideas then.

Frank
Posts: 246
Joined: Wed Nov 30, 2005 10:12 am
Location: Nürnberg, Germany

Fri Feb 13, 2009 9:49 am

If you ask me i would prefer rather a good ai and some crashes than a bad ai and no crashes. But WW1 runs accurately on my pc so i now it is easy to have this opinion. :love:

User avatar
calvinus
Posts: 4681
Joined: Mon Dec 19, 2005 4:52 pm
Location: Italy
Contact: Website

Fri Feb 13, 2009 10:05 am

Jorrig wrote:Do you work with neural networks? I really like this approach of designing an AI, at least to some degree. I thought about something like this here:
http://www.onlamp.com/pub/a/onlamp/2004/09/30/AIforGameDev.html
If you save input factors, decision and feedback of each game, the AI improves from game to game. If you should manage to share all game results from all players, the AI could become a very good adversary. ;) In any case, I can't help you improving the AI without knowing how it works. I could only give you some ideas then.


Yes, I use NNs. Old versions of WW1 used also genetic algorythms combined with NN. If you wish I can share with you the source code of the AI engine!
Do not hesitate in sending me a PM, so we can coordinate ourselves! :thumbsup:

User avatar
Franciscus
Posts: 4571
Joined: Fri Apr 20, 2007 8:31 pm
Location: Portugal

Fri Feb 13, 2009 12:18 pm

Frank wrote:If you ask me i would prefer rather a good ai and some crashes than a bad ai and no crashes. But WW1 runs accurately on my pc so i now it is easy to have this opinion. :love:


Sorry to disagree here, but, athough I am a solo player, to me crashes are not acceptable. What is the use of a good AI in a game that is not playable due to crashes ?? :bonk: . Fortunately, this is not the case of WW1 :)

User avatar
calvinus
Posts: 4681
Joined: Mon Dec 19, 2005 4:52 pm
Location: Italy
Contact: Website

Fri Feb 13, 2009 2:04 pm

Franciscus wrote:Sorry to disagree here, but, athough I am a solo player, to me crashes are not acceptable. What is the use of a good AI in a game that is not playable due to crashes ?? :bonk: . Fortunately, this is not the case of WW1 :)


Yes, game stability are always the priority #1 for every game developer.
But I ask: there's some way to tell the antivirus that WW1 is a trusted application??? :bonk: Why I should remove a feature so making the game AI dumb, only because the antivirus does not trust in my I/O operations?? :grr:

tagwyn
AGEod Guard of Honor
Posts: 1220
Joined: Tue Apr 17, 2007 4:09 pm

Anti-virus?

Fri Feb 13, 2009 7:33 pm

How can we be expected to master WWI with +200 Page manual when we cannot think to turn the anti-virus on/off when playing this great game? t: confused: :blink:

vonRocko
Colonel
Posts: 385
Joined: Tue Jul 29, 2008 5:28 pm

Fri Feb 13, 2009 8:33 pm

I am not turning my antivirus off for any game! If you can't make this game run with it on,then that is pretty lame.

User avatar
calvinus
Posts: 4681
Joined: Mon Dec 19, 2005 4:52 pm
Location: Italy
Contact: Website

Fri Feb 13, 2009 8:51 pm

vonRocko wrote:I am not turning my antivirus off for any game! If you can't make this game run with it on,then that is pretty lame.


It's exactly what I'm doing. :)
For example, I'm going to use a different file extension: .txt
Also, right now I added the check-box option in WW1 Configurator to disable all AI Memory Store procedures...

vonRocko
Colonel
Posts: 385
Joined: Tue Jul 29, 2008 5:28 pm

Fri Feb 13, 2009 9:02 pm

calvinus wrote:It's exactly what I'm doing. :)
For example, I'm going to use a different file extension: .txt
Also, right now I added the check-box option in WW1 Configurator to disable all AI Memory Store procedures...


That's great Calvinus, I have full confidence in your abilities! :thumbsup:
Thanks

tagwyn
AGEod Guard of Honor
Posts: 1220
Joined: Tue Apr 17, 2007 4:09 pm

Fri Feb 13, 2009 9:02 pm

Perhaps what is "lamed" in Pa. is different? t

vonRocko
Colonel
Posts: 385
Joined: Tue Jul 29, 2008 5:28 pm

Fri Feb 13, 2009 9:05 pm

tagwyn wrote:Perhaps what is "lamed" in Pa. is different? t


Whatever you say t ! :neener:

Frank
Posts: 246
Joined: Wed Nov 30, 2005 10:12 am
Location: Nürnberg, Germany

Fri Feb 13, 2009 9:39 pm

Because i never had used a antivirus program in my life i have a question. (i am working only with mac computers and playing my games with my offline windows notebook, so i haven´t much clue about viruses :wacko :) Isn´t it possible to configure the antivirus software to exclude a specific order for monitoring? And how difficult is it to turn the antivirus off before starting the game. Do you need to restart the computer?
I have high hopes of using neural network in the near future so it would be sad if it fails because of a antivirus program. :(

Marquee
Sergeant
Posts: 84
Joined: Thu Mar 08, 2007 3:59 pm

Fri Feb 13, 2009 9:54 pm

I can't be certain, but I think most antivirus software have settings that allow an indicated application to be excluded from scrutiny. If not, certainly some are available that do. While general AV software should be considered, some of the hypersensitive settings that bog down everything should not be given allowance by the game.

User avatar
calvinus
Posts: 4681
Joined: Mon Dec 19, 2005 4:52 pm
Location: Italy
Contact: Website

Sat Feb 14, 2009 8:22 am

Yesterday night I tweaked the save of MilitaryKnowledge.txt, Espionnage.txt and GarrisoningContraints.txt files, that are now stored on the HD only when the game quits! This should help a lot in our "battle" against the antivirus! :D

Bern
Lieutenant
Posts: 122
Joined: Mon Dec 08, 2008 11:46 am

Sat Feb 14, 2009 10:19 am

Marquee wrote:I can't be certain, but I think most antivirus software have settings that allow an indicated application to be excluded from scrutiny. If not, certainly some are available that do. While general AV software should be considered, some of the hypersensitive settings that bog down everything should not be given allowance by the game.


You're correct. In all of the AV programs I've used there are settings which allow exclusions from the check process. However, these settings can be quite difficult to find. I use AVG and have WWI included in a list of exclusions.

There is a general problem with these types of program - they quite frequently treat some files as threats, whilst st the same time allowing viruses, particularly well-written tracker viruses through.

Bern

Return to “Help improve WW1!”

Who is online

Users browsing this forum: No registered users and 13 guests