[BTS] Development thread

The current system is an interesting hybrid of coalition considerations and separate considerations. Attitude is averaged (for vassals, not defensive pacts) which determines the % of chance a particular target will be considered each turn. The comparison of military power is done by coalition and the AI will not consider attacking coalitions which are too powerful. The weighting of attractiveness of territory to capture is done separately (though attitude plays a role, power may as well) and, if all the war rolls pass, the highest weighted victim that is considered that particular turn is chosen.

The AI then picks a single target, which makes sense since there can be anywhere from ~10 to ~40 turns (Epic) before it actually declares war so the coalitions can change. This has one bad effect in that it won't bulk up defenses along its borders with other members of the coalition (yet). The other main effect is where the attacker's surprise stack moves to start the war: it always attacks the chosen single target as it should, since that's the territory it found most attractive (with some attitude-based randomness). The attacker then also prefers to keep that war and is more willing to end wars with other members of the coalition who attacked it.

Hmm, it's the shifting of alliances that makes this hard. Otherwise, I'd say, the friend of my enemy is my enemy and thus if it's the most efficient to attack this friend of my enemy, then the AI should do this.

However, with the AI's inability to shift focus once is has first determined that it will declare war and the shifting alliances during the buildup period, this is not possible or at least not wise.

There is a reason that the AI fixes its future war declaration a while before it declares war, but this inflexibility of course also has its weaknesses. It's the choice between an AI which behaves like a puppet with the human controlling its strings or an AI that is inflexible to a changing environment.

Yeah, although it's a very nice compliment, I agree with you Roland that the AI will not shift so dramatically in ability as to make any dumbing down necessary. The AI will simply never be able to plan strategically at the level to routinely beat anyone who's invested enough in civ to browse these forums at or below Noble ... it might happen occasionally, but with equal in-game resources the human brain will usually win. If it takes players a couple of games at a lower difficulty to adapt to the new AI, then I'd say that's a job well done.

Of course, I also admire the achievements already made to improve the AI. It's a great job and makes the game more enjoyable. :goodjob:
 
Could you please always upload the source code from developer (is 0.7 a developer version?) versions too (into SVN)? :)
 
Wrong thread, sorry.
 
what would be great to see is AIs dog-piling on the player that is leading score.

No it wouldn't, humans don't do this, and it's just gamey and completely ignores the Prisoner's Dilema aspect of game theory.

Now if there was a block of AIs that hated a player (whether top position or otherwise), might be cool to see them organize a dogpile from the get go. But other then that I really am against the idea of just having the AI dogpile the leader.
 
i think prisoner's dilema is not describing this case.
winning is almost guaranteed here if say 2 AIs have 1.5 more power than third and risk is not too high since 0,75 power is sufficient to have a chance to beat off. such a situations were pretty common in history (i.e. livonian war).

p.s.: just read on prisoner's dilema, theres some interesting details:
http://en.wikipedia.org/wiki/Prisoner's_dilemma
check "The iterated prisoner's dilemma" chapter
 
Hey jdog, nice job here. I have a little correction though. CAR's plot danger system changes AI's decision slightly, we did it not only for efficiency, but for improving AI too.
 
Hey jdog, quick question about compiling the source code. I have successfullt compiled 0.81 several times and built my own mod around it. I'm now trying to merge with the 0.82 version and in the building process get this error (CodeBlocks):

=== CvGameCoreDLL, Final Release Win32 ===
CvPlayer.obj error LNK2019: unresolved external symbol "void __cdecl logBBAI(char *,...)" (?logBBAI...
..\Beyond the ... fatal error LNK1120: 1 unresolved externals
=== Build finished: 2 errors, 0 warnings ===

There isn't a file CvPlayer.obj in the directory I use to compile, and this file doesn't come with the source code download... Any idea what this means?

Cheers

(wasn't sure whether to put this in bug reports or not)
 
That might be the problem I encountered (which I mentioned in a different thread):
http://forums.civfanatics.com/showpost.php?p=8598039&postcount=424

jdog's solution is here:
http://forums.civfanatics.com/showpost.php?p=8598039&postcount=425
You need to put if( gPlayerLogLevel > 0 ) on the front of it.

Thanks for this. I was looking through the code last night and found that the problem was in CvPlayer.cpp, just as you discussed in that other thread. There was a call to logBBAI, but unlike all the other calls it wasn't within an if statement which considered the value of gPlayerLogLevel. It looked like it might have been placed incorrectly by one line, as there was just such a statement immediately beneath it, so I moved it there (you can see what I mean in post 426 of the thread you linked). But like you say, I suppose you could fix it like that just as easily, and that seems to be jdog's preferred method.
 
While we're on the topic, are any of you able to compile with logging enabled?

See http://forums.civfanatics.com/showpost.php?p=8612702&postcount=9.

I ask because when logging is on the code will go inside these if statements and it's not clear to me whether that will work your setup given this other compilation issue.
 
Will you be trying to make the ai turn time faster again ? Im at 40seconds per turn on standard map and i just got to astronomy lol. I know its really good coding and its great ideas, but its not playable. I beg you to take into consideration efficiency when coding. You can have all the features under the sun but if i takes 1minute a turn time then whats the point.
 
What kind of hardware are you running?
 
If you have a game where you feel the mod is running much slower than it should and want to provide useful feedback, you can do the following:

1. Go into the worldbuilder and save your game as a world builder save, this way it can be played forward in any mod or plain BTS. (Have a friend do it if you want to avoid seeing the fully exposed world)

2. Load the world builder save as a custom scenario in the latest release of BBAI, then record the turn times for at least the next ten turns. Note that the first few turns after loading a world builder save will always be particularly slow as Civ allocates memory for things, usually turn times stabilize by the 4th turn.

3. Load the world builder save using the latest Unofficial Patch and repeat the same procedure. This is the most useful comparison in my mind.

4. If you want to try plain BTS or the CAR mod, that could be interesting/useful as well.

5. Post the results of you experiment, including of course the turn times plus other info like difficulty level, game speed, map size & type. Also please attach the world builder save so that I can peek under the hood and see what the differences are.
 
If you have a game where you feel the mod is running much slower than it should and want to provide useful feedback, you can do the following:

1. Go into the worldbuilder and save your game as a world builder save, this way it can be played forward in any mod or plain BTS. (Have a friend do it if you want to avoid seeing the fully exposed world)

2. Load the world builder save as a custom scenario in the latest release of BBAI, then record the turn times for at least the next ten turns. Note that the first few turns after loading a world builder save will always be particularly slow as Civ allocates memory for things, usually turn times stabilize by the 4th turn.

3. Load the world builder save using the latest Unofficial Patch and repeat the same procedure. This is the most useful comparison in my mind.

4. If you want to try plain BTS or the CAR mod, that could be interesting/useful as well.

5. Post the results of you experiment, including of course the turn times plus other info like difficulty level, game speed, map size & type. Also please attach the world builder save so that I can peek under the hood and see what the differences are.

dude, please

http://forums.civfanatics.com/showthread.php?t=342457

faster bts!
 
Top Bottom