empusas
Corporal
Posts: 43
Joined: Sun Aug 01, 2010 6:43 pm

Modding AI Decision Making

Fri Aug 28, 2015 12:01 am

I was wandering if anyone knows a way to mod the AI"s decision making. At least how they decide what cards to play.

Far too many times I see them wasting cards on things that give no benefit, or dont use them when they should. I see them use a colonial merchants probebly the most wasteful, like on territories with over 30 Penetration and at least 15 decelopment, as well as a trading post, or no use for a trading post.

I know at least for the merchants it should be fixed with just making it impossible to use the card if the CP is over 30, like I think it was supposed to be, but surely the AI isnt thinking of playing it just to get the 5 money per turn.

Also when in competition for a territory, the AI will nearly always get beat because they are only slowly playing bribes vs treaty and bribes to gain loyalty, or will not play the outpost when it is way in the lead, instead preferring to keep building up loyalty when they are clearly going to loose the loyalty race as time goes on.

It just seems the AI could improve vastly with a few (what I would think is easy) tweeks in the decision making.

Emp

User avatar
Pocus
Posts: 24746
Joined: Wed Oct 19, 2005 7:37 am
Location: Lyon (France)

Fri Aug 28, 2015 8:58 am

You mean regional decisions? Yes, this is quite doable and the code handling that appeared after PON, but the current PON can handle that now. This is definitively within the realm of a mod. You can check the Ageod wiki or one of the latest games, like CW2 or EAW, they have decisions handled by AI (hey, even ROP gold has now that, so this is a lot of games with examples).

See
http://www.ageod.net/agewiki/Regional_Decisions
Image


Hofstadter's Law: "It always takes longer than you expect, even when you take into account Hofstadter's law."

empusas
Corporal
Posts: 43
Joined: Sun Aug 01, 2010 6:43 pm

Sun Aug 30, 2015 9:51 pm

Thanks Pocus!!! I'll check that out :)

empusas
Corporal
Posts: 43
Joined: Sun Aug 01, 2010 6:43 pm

Sun Aug 30, 2015 11:57 pm

Ok that helped, I made 2 changes in that I changed that Harbors could be deleted, but left naval bases as permanent, and changed both merchants and trading posts to 60 max CP instead of 75, giving time to build a trading post if for some reason they didnt build one and wanted to after reaching colony status.

I really wanted to find the decision making file for the AI and change that to where they wouldn't use a merchant beyond 35 cp unless they were intending to build a trading post (Ideally), but I suppose even if I found the "A.I." file that would be a tough one. Would still like to know where the logic file is and searched everywhere for that to no avail.

Thanks again for the advice Pocus!

Emp

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Mon Aug 31, 2015 3:29 pm

A long time ago I modded the AI files (primarily for combat), and got some very good results with VP and other objectives (got rid of the mega-stack with more than one key objective, it split the AI into a few smaller forces).

Anyways, I can look through my old files to see what might be in place for decisions (did not do any AI modding there, was primarily concerned with combat). Might take some time though...

empusas
Corporal
Posts: 43
Joined: Sun Aug 01, 2010 6:43 pm

Tue Sep 01, 2015 1:13 am

Cool! I'd be very happy to take a look at those and see if I can make some tweeks to make the AI a little smarter on the decision making process for regions.

Thanks a ton McNaughton!!

Emp

User avatar
McNaughton
Posts: 2766
Joined: Wed Mar 21, 2007 8:47 pm
Location: Toronto, Canada

Sun Sep 06, 2015 4:16 pm

In looking back empusas, the AI was tweaked via a series of events, looking for conditions (i.e., if Prusssia failed at defeating or going to war with Austria, then the AI priorities switched, as in who you want to be friends with, and who enemies, as well as your neighbours).

For combat, I set up a series of objectives, who wins the initial Frontier Battles sets the tone of initiative, setting the nation either offensively or defensively. I set up certain target goals for both the player and AI (so both are fighting the same war, the AI is not good at fighting a human directed conflict as humans are irrational), so both sides know what to fight for.

So I did things via events, looking for criteria and situation, setting the AI on or off, or to put goals in the eyes of both the AI and human (if the human decides to fight the war without following the goals the AI is after, they could be in trouble with morale hits). Same probably could be done with the AI and decision making, although am not familiar with the new changes, nor AI 'decisions'...

empusas
Corporal
Posts: 43
Joined: Sun Aug 01, 2010 6:43 pm

Tue Sep 08, 2015 5:47 am

Ok, cool. Thanks for checking and giving me some ideas on possibly how to make some mods too.

Emp

Return to “PON Mods”

Who is online

Users browsing this forum: No registered users and 2 guests