Ticket #44518

How to make a reference AI and a modified AI fight each other.

Open Date: 2022-05-06 00:44 Last Update: 2022-05-06 03:37

5 - Medium
5 - Medium


Preamble :

I would like to improve AI

  • improve performance, Europe_WW1 is incredibly slow even threaded on good CPU. I guess it does way to much computations (this is my starting point, i am beginning investigations)
  • try to have mid term goals (like connect 3 nearest cities with road, for better unit movement)
  • try to define some strategic view with simple principles (make my territory convex, locate strategic places like a mountain controling a path or build a fortress to defend my frontier, only research caravel if landmass <30 and don't care if >45 ...)
  • have long term goals (like improve cities with schools then university )
  • at least stop doing incredibly stupid things like building tons of caravans (but this is rooted in decision making stuff, so in evaluation ...)

I think this will need changes in several places, including the server (for example reorder diplomacy ...)

My idea is to branch the code and affect several nations to reference AI, and other nations to a modified one , and let them fight to see if there are improvements or not.


So here is my question : how to do these tests ?

Is is possible to start several nations with 3.0.1 , and other ones with a patched version ?

(btw this could be a solution for WW1 : one instance for each nation, and a meta-server controlling all orders ?)

Ticket History (3/3 Histories)

2022-05-06 00:44 Updated by: alain_bkr
  • New Ticket "How to make a reference AI and a modified fight each other." created
2022-05-06 00:45 Updated by: alain_bkr
  • Summary Updated
2022-05-06 03:37 Updated by: cazfi

Reply To alain_bkr

Is is possible to start several nations with 3.0.1 , and other ones with a patched version ?

The simpler, and older, way to achieve something like this is by using the "Experimental" AI level (only available in builds with debug enabled). It's exactly the same as "Hard" level except for any changes you guard with "if (...->ai_common.skill_level == AI_LEVEL_EXPERIMENTAL)"

More involved one would be to set up entire AI modules for differentiating between players.

Attachment File List

No attachments


You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login