Sorry for my poor English, it's not my native language. I installed the sources yesterday and started to mess with the war declaration code. I made the distance much more important for deciding who to attack, and I made the attitude less important. Then I increased the global chances that a AI civ declares war.
It seems to work better now with many more nice wars directed against the neighbour civs (as a human would do) but I need to make extensive tests before I upload anything or ask to join the team. I think we'll all work on the Beyond the Sword version now, and probably after the first patch. Any work now would probably be wasted.
In the latest BetterAI official version (and other versions too), the attitude multiplier was 1 if friendly, 2 if pleased, 4 if cautious, 8 if annoyed and 16 if furious. Basically it means that if you were furious with somebody, you would declare war on him even if he was in the other side of the world.
The problem with that is the AI still doesn't know how to wage distant wars because it can't make sea invasions properly (Blake and Iustus stopped their awesome work before this part of the code worked properly), so right now the best idea is probably to avoid the sea invasions as much as possible. It's often much more sensible to attack one of our neighbours anyway.
More generally, the war declaration system seems flawed to me. I mean to decide if it starts a war, the AI uses a general random number, then if this number is ok, it looks to who it will attack... A human would look at the opportunities (= who we would attack), and then if the opportunity is ther, it would attack. The AI system has two major drawbacks :
- we always have 'too many wars' or 'too few wars', since the 'gobal war chances' are relatively similar between the civs... If the number is too low, the civs won't use their opportunities, and these opportunities vanish. If it's too high, we've got permanent wars everywhere.
- these wars don't feel 'human', it looks forced, since the AI doesn't look at the opportunities before deciding if it starts a war (it looks after)
I'm pretty sure we can improve that when I look at the code. We should probably remove the 'global war chance' and design an 'opportunity / goal' system. The civs could choose to go for conquest / domination victory when they're ahead.
But there's a choice we'll always have to make. You can design an AI who 'roleplays' or an AI who 'tries to win' like the player would do, or a mix of both. We can design both kind of AIs too...
It seems to work better now with many more nice wars directed against the neighbour civs (as a human would do) but I need to make extensive tests before I upload anything or ask to join the team. I think we'll all work on the Beyond the Sword version now, and probably after the first patch. Any work now would probably be wasted.
In the latest BetterAI official version (and other versions too), the attitude multiplier was 1 if friendly, 2 if pleased, 4 if cautious, 8 if annoyed and 16 if furious. Basically it means that if you were furious with somebody, you would declare war on him even if he was in the other side of the world.
The problem with that is the AI still doesn't know how to wage distant wars because it can't make sea invasions properly (Blake and Iustus stopped their awesome work before this part of the code worked properly), so right now the best idea is probably to avoid the sea invasions as much as possible. It's often much more sensible to attack one of our neighbours anyway.
More generally, the war declaration system seems flawed to me. I mean to decide if it starts a war, the AI uses a general random number, then if this number is ok, it looks to who it will attack... A human would look at the opportunities (= who we would attack), and then if the opportunity is ther, it would attack. The AI system has two major drawbacks :
- we always have 'too many wars' or 'too few wars', since the 'gobal war chances' are relatively similar between the civs... If the number is too low, the civs won't use their opportunities, and these opportunities vanish. If it's too high, we've got permanent wars everywhere.
- these wars don't feel 'human', it looks forced, since the AI doesn't look at the opportunities before deciding if it starts a war (it looks after)
I'm pretty sure we can improve that when I look at the code. We should probably remove the 'global war chance' and design an 'opportunity / goal' system. The civs could choose to go for conquest / domination victory when they're ahead.
But there's a choice we'll always have to make. You can design an AI who 'roleplays' or an AI who 'tries to win' like the player would do, or a mix of both. We can design both kind of AIs too...