Custom AI Leaders championship

valergrad

Warlord
Joined
May 26, 2013
Messages
245
Hello everyone,

This post is an official invitation to participate in the first custom leader championship.

In early 2025, I will be hosting a tournament featuring both standard Civilization IV leaders and new, custom-created leaders. Each participant will have the opportunity to submit their own custom leader.

1. How to Submit a Leader:

At minimum, please provide the following:

  • Your leader's name.
  • The (existing) civilization they will represent. It will define your UU and UB.
  • A file containing a set of XML lines that begin with <LeaderHeadInfo> and end with </LeaderHeadInfo>. If you open the file Assets\XML\Civilizations\CIV4LeaderHeadInfos.xml, you can view these lines for all standard leaders. This is the strategy layer that defines the leader's ‘personality’. A description of most of these parameters can be found online, for example, at http://modiki.civfanatics.com/index.php/Civ4LeaderHeadInfos. However, determining what values are optimal or suboptimal is entirely up to you—you have the freedom to create any personality you like! Your leader can be a scientific pushover, a religious zealot, a ruthless warlord, or a well-rounded strategist. Ultimately, these parameters will determine your leader’s performance in the championship.

  • Totally optionally, you can create or find in some mode custom graphics for your leader. Otherwise I'll just copy some it from some of the existing leaders.

2. Can I Submit Multiple Leaders?

Yes, with the following limitations:

  • No two submitted leaders can represent the same civilization.
  • No two submitted leaders can have the same traits.
  • The iBuildUnitProb value for any two of your submitted leaders must differ by at least 20 (and remain within the range of 0-100).
This means you may submit a maximum of five leaders.

3. Championship Format:

The championship will consist of 24 rounds using the Swiss system. This means that in each round, players with similar performance will be matched against each other.

Each game will be played on a huge map with as close to 17 players as possible (the 18th slot will be reserved for an observer).

For example, if 12 custom leaders are submitted, then, combined with the existing leaders, we will have a total of 64 leaders in the championship. This would result in four simultaneous games per round, each with 16 competing leaders and one observer.

The 24 rounds will cover all combinations of the six difficulty levels (Noble to Deity) and the four game speeds (Quick to Marathon). Therefore, your AI needs to be competitive across all difficulty levels and game speeds.
But you'll have possibility to change one ( but only one! ) XML parameter between each round, so choose wisely.

4. Scoring System:

On a huge map, leaders may pursue various strategies, such as cultural victory, space race, or domination. It’s important to have a scoring system that rewards each of these approaches.

Therefore, the scoring system will be similar to the ‘mastery victory’ concept found in some mods but with further improvements. Details will be announced shortly.
 
Last edited:
Awesome idea! Hopefully you livestream important portions of this tournament. Just these questions:

What will be the map and settings? Pangaea, continents? Does it use Sullla settings (i.e. no AP, NTT, no huts and vassals), or what else? Are Diplomatic victories viable?
 
I am inclining to leave all options by default unless somebody have a good arguments for otherwise.
I understand why they turned off in other tournaments, but i want that when players will create strategy for their leaders they will take into account diplomacy, religions and vassals. Not just pure military.

Regarding the maps - I believe it should be something earth-like. I am inclined to write a script for a maps that will have 3 continents that are accessible only after an astronomy. And we can put half teams at one continent, half - on another, and third continent will be left empty for the 'new world'. In that case all three: continental domination, intercontinental trade and colonization of a new world will matter for the total success.
 
Not gonna lie, the fact you haven't shown any interest nor partipated in any such endeavours, and don't even aknowledge them.. that rubs me the wrong way.

But leaving that pettiness aside, a few random thoughts:
  • You should first gauge interest in custom AI submissions as that would greatly impact your format:
    • A lot of potential submissions? Drop the standard AIs or just hand pick a few (HC, Justinian, Mansa, etc...)
    • A few? Make them permanent guests at the top table.
    • None? Drop the map size to "Very Large" as you'll be running games with 13 AIs instead of 17.
  • "Huge" map games will take forever to run, and be mostly unreadable at first. And yet, custom AI authors would want constant feedback, which would slow even more the game. And you're planning on running nearly 100 such games!
    • My own experiment with a Swiss tournament system has shown 8-10 rounds to be largely enough. You should definitely consider dropping the number of rounds to 8. That would leave you a chance to finish it before burnout. And if you're on a roll, play 3 tournaments!
    • If only a few custom AIs, consider broadcasting only the top table game, and aiplay'ing the others (with a summary at the start of your broadcast).
  • My own tests have shown "Aggressive AI" to be a mandatory setting.
  • Custom AI authors should be allowed to tweak their AI between games: "tweaking" rules should be defined (a complete rewrite shouldn't be allowed).
  • What handicap level are you planning on using? If Deity... on a huge map, Domination seems very unlikely. If lower... games will take even longer! Unless you use "Quick speed"? And with different landmasses, Domination will never happen.
  • If the maps aren't mirrored, starting position trumps AI. Hell, even when mirrored, neighbourhood can also trump AI: Mansa surrounded by high peaceweight leaders is GG Mansa, Mansa surrounded by low peaceweights is bye Mansa.
  • Speaking of peaceweights, any rules about that? As it stands, submitting a high peaceweight AI would be ill-advised...
  • There'd been some discussion last year about what a scoring system should be, with no consensus. But anything straying from winning / not winning will be subject to controversy.
 
This reminds me this thread. Someway.

I never played with custom leaders before. There are probably some mods that gather them around I didn't search. Without the need of BUG mode installed maybe.
I just find this overwhelming to have 200 leaders in a game. Such as in realism invictus game etc.

And what is the goal here exactly? Ranking custom leaders?
 
  • My own tests have shown "Aggressive AI" to be a mandatory setting.
Also to note - you probably should turn vassals off. I believe CFC attempted AI survivor before Sullla’s version took off, and it was very uninteresting as Gandhi won super easily just by vassalling and then winning culture victories
 
Hi everybody,

Not gonna lie, the fact you haven't shown any interest nor partipated in any such endeavours, and don't even aknowledge them.. that rubs me the wrong way.

Sorry, probably I should mention other competitions like Sulla's AI survivors. I have seen thread, reads some of them though never ever commented there. Probably I will look at them more carefully as Sulla got a lot of experience that I should use. The experience and advices will be appreciated.
But it looks to me, that this tournament has slightly different approach. It seems to me that Sulla is trying to understand the strength of the current leaders in different settings and in different condition. And I am encouraging people to understand what XML settings will work best under condition 'Terra map with 18 players'.

  • You should first gauge interest in custom AI submissions as that would greatly impact your format:
I believe we can adapt based of any number of participants.
  • "Huge" map games will take forever to run, and be mostly unreadable at first. And yet, custom AI authors would want constant feedback, which would slow even more the game. And you're planning on running nearly 100 such games!

This is a thought worth consideration. I will think about it. But, just in case, nobody were speaking that this tournament will end in week or so. The idea of huge maps as these are the setting where diplomacy options starts to matter. Most of the XML parameters are about diplomacy, so this is probably will give the players ideas the opportunity to shine.

  • If only a few custom AIs, consider broadcasting only the top table game, and aiplay'ing the others (with a summary at the start of your broadcast).
Noted.

  • My own tests have shown "Aggressive AI" to be a mandatory setting.

Could you please explain a little - why? Is it because you're afraid that most games will end up with peaceful cultural/space victory by leaders like Mansa/Gandhi? I have two thoughts why I less worried about that.

First. There will be custom AI submissions. I expect many of them to be much more aggressive than existing AI. May be they will counter that peaceful sitting ducks. Why? Because we probably agree on that - the main flaw of the current AI is that it is really passive in a situation where it can just wipeout a weaker opponent and take all his cities. But I believe, that with correctly set XML settings you can create a leader that will be as aggressive comparing with Genghis Khan, as he is aggressive comparing with Gandhi.

2. The scoring system. Rules will be slightly different from the standard, and this means that every game will be actually played until time limit or elimination of everybody except one. This will give expansionists/warmongers a lot of time ( on deity it is almost twice more time) to show the advantage of their mindset.

  • Custom AI authors should be allowed to tweak their AI between games: "tweaking" rules should be defined (a complete rewrite shouldn't be allowed).

Yes, definitely. In current rules you can change one parameter each round. Do you think this is not enough?

  • What handicap level are you planning on using? If Deity... on a huge map, Domination seems very unlikely. If lower... games will take even longer! Unless you use "Quick speed"? And with different landmasses, Domination will never happen.

There will be rounds for each handicap levels ( except the several lowest). Yes, I agree that domination/conquer probably will not happen in most of the games.

  • If the maps aren't mirrored, starting position trumps AI. Hell, even when mirrored, neighbourhood can also trump AI: Mansa surrounded by high peaceweight leaders is GG Mansa, Mansa surrounded by low peaceweights is bye Mansa.

Yes, but we have many rounds ( you've actually told too many...) This should decrease 'bad luck' factor.

  • Speaking of peaceweights, any rules about that? As it stands, submitting a high peaceweight AI would be ill-advised...

Peaceweight is an XML parameter. So, you can set it for you leader(s) any values you think would be the best. As well as all other parameters.

  • There'd been some discussion last year about what a scoring system should be, with no consensus. But anything straying from winning / not winning will be subject to controversy.

If there are a lot of systems already, no harm for an inventing one more)
 
Last edited:
I can comment on Aggressive AI - the games will get super dry and boring, like I think when @Thrasybulos attempted it, he got something like a Turn 400 Shaka culture victory with 6 wars and immediately stopped further attempting run throughs without Agg AI
 
And what is the goal here exactly? Ranking custom leaders?

The goal is to participate)
So, if you have thoughts like 'what if Julius Caesar was Agg/Cha, had all noWarProbs as 0, had Favorite Civic as Slavery and Favorite Improvement as Farm - would it be killing machine or not?
Now you can create a leader like this and send it.
Or create something really different, like Gandhi with PeaceWeight = 10 ( all warmongers will respect him), make him fond of science instead of religion, make him trading techs like Mansa and vengeful and unforgiving like Monty. And name him Oppenheimer.
Or you can recreate your favorite political leader.
It's all up to you, based on your fantasy)
 
This is a thought worth consideration. I will think about it. But, just in case, nobody were speaking that this tournament will end in week or so. The idea of huge maps as these are the setting where diplomacy options starts to matter. Most of the XML parameters are about diplomacy, so this is probably will give the players ideas the opportunity to shine.
There are two time considerations here:
  • The running time for each game: I'm not sure there's gonna be a lot of interest for watching 10+ hours AI games. There is a public for those AI games (cf. Sullla's), but that's still a small crowd and I'm not sure that the subgroup of that crowd who'd enjoy / have the time for super long streams is significant.
    Have you run any kind of tests so far? Do you have any actual idea how long those games would be? Sullla's S3 Wildcard was an 11-AI game which didn't run that late (T372) and that was more than 5 hours. You're considering even bigger games, running to turn 500!
    An aiplay run for a 6-player game on a standard map ending turn 320ish takes 20 minutes.
    On a large map, double that time.
    So I wouldn't be surprised if a 500 turn aiplay on a Huge map took something like 3 hours. So even if you don't broadcast every game, and get some automated, you're still looking at some heavy time investment on your side.
  • The duration of the event: you're planning 24 rounds (96 games). So you're looking at a 6-month endeavour minimum, with a significant weekly time investment. Are you absolutely positive that you have the stamina and the RL availibility for that? And if you do, are your positive your potential audience does too?
Could you please explain a little - why? Is it because you're afraid that most games will end up with peaceful cultural/space victory by leaders like Mansa/Gandhi?
https://forums.civfanatics.com/thre...ight-championship-thread.692032/post-16675776
Yes, definitely. In current rules you can change one parameter each round. Do you think this is not enough?
I don't know, you'd have to get the feedback from those involved.
Intuitively, rather than limiting the number of tweaks allowed, I'd limit their range.
For instance, if I submitted an AI with 50/50 Science/Military flavours, I'd be allowed to tweak it to 40/60 or maybe even 30/70 but not to turn into a 50/50 Gold/Science flavours as that'd be a different personnality.

But again, I'm the wrong person to ask.

Yes, but we have many rounds ( you've actually told too many...) This should decrease 'bad luck' factor.
Not really (cf. AI Survivor).
It would take a lot more than 100 games for things to "even out".
And remember you're planning to have humans involved (AI creators): Hatty may not sulk at getting unlucky draws game after game, but Cleopatra's creator might not be so forgiving...

If there are a lot of systems already, no harm for an inventing one more)
Well, it still has to make sense, both for the onlookers and for the "AI".
For example, one thing that will happen with the settings you've described (I know, because I've seen it happen pretty often in my aiplay games): an AI turns on the culture slider early on, wins the game, and then gets wiped out.
If your system had that AI scoring poorly, it won't make sense for people watching (that AI won the game!) nor from a coding perspective (the AI was coded for trying to win the game by culture, not for becoming a juggernaut post-winning).

By the way, one thing you might consider: using a BetterAI mod.
I know that some people have asked for it, and it could be a way to set your event even further apart from Sullla's.
 
It would take a lot more than 100 games for things to "even out".
And remember you're planning to have humans involved (AI creators): Hatty may not sulk at getting unlucky draws game after game, but Cleopatra's creator might not be so forgiving...

That's true. Any ideas how to make this better? I mean, apart from having 100 rounds. I am open to suggestions.
One idea is to use a totally simmetrical map. For example, in standard scripts there is a script 'Donut', where all civilizations are placed evenly on the edge of a 'donut' ( like numbers on the clock ). It even had option to give everybody 'fair' set of strategic resources. So, starting locations for everybody were really similar and everybody has initially exactly 2 neighbors.
But I believe that script has its own problems. And also even in this scenario one can blame RNG. For example, having neighbors Gandi and Mansa would be totally not the same as Monty and Shaka.
But it is better then Terra, where some AIs can start in tundra close to ice.


Regarding 'aggressive AI' and 'no vassals' - I understand your concerns. I trust you guys that wth standard AIs and wth standard scoring system it just will be too boring and will give advantage to peaceful sitting ducks.
But I am not sure what will happen with custom AIs and custom scoring system. This needs testing.
If custom AIs will be strong and will swiftly conquer others - then having 'non-aggressive' option will make it much easier for them, and therefore, will reward courage.
 
I've been wanting to organize a competition like this, but wasn't ever going to because of the effort. Cool to see it happen now. Highly unpredictable metagame – which I find appealing, even if it'll be rather chaotic. Doesn't have to be taken all that seriously, maybe more in the spirit of Robot Wars on BBC. If a first run is kept simple and brief, then there could be a second installment that is more competitive.
 
That's true. Any ideas how to make this better? I mean, apart from having 100 rounds. I am open to suggestions.
One idea is to use a totally simmetrical map. For example, in standard scripts there is a script 'Donut', where all civilizations are placed evenly on the edge of a 'donut' ( like numbers on the clock ). It even had option to give everybody 'fair' set of strategic resources. So, starting locations for everybody were really similar and everybody has initially exactly 2 neighbors.
But I believe that script has its own problems. And also even in this scenario one can blame RNG. For example, having neighbors Gandi and Mansa would be totally not the same as Monty and Shaka.
But it is better then Terra, where some AIs can start in tundra close to ice.

Mirrored maps come with their own set of issues: as you've mentionned, they increase the importance of neighbours (and the imbalances that could stem from that), but also they create a particular set of conditions which will favour some AIs.
For instance, if the food sources are Corn + Cow, then civs starting with Agriculture are at an advantage. Make all types of ressources available to counter that? Then you have a too-rich map which will advantage techers. Etc.

The best solutions might to have a map which you re-use, ensuring AIs don't start from the same spot twice. Thus, even if some starting positions are better than others, AIs will gets their shot at them.
That's what I did with my "AI League". It does mean some more work, as you'll need to track starting positions (feel free to reuse and adapt my League Excel file if it can help: one sheet was dedicated to checking those starting positions to set up the next round).
You'd also want to fix blatant imbalances on the map(s), though: if one starting position accounts for 80% of the wins, there's little point to the competiton. Unfortunately, there's no other way than extensive testing. That said, if you do get people wishing to submit AIs, you could provide them with the map(s) used so they can test their creation... and provide feedback by the same occasion. ;)
 
Top Bottom