AND SVN Build Thread

Although I agree with you Vokarya, there has to be a middle ground where the AI aims for whatever is the most efficient.

There is a reason why the metagame in many competitive games like Starcraft or DOTA for instance - evolves and adapts trying to perfect itself, yet all the while the best players in the world are all very similar, yet somehow different. They have worked out the best way to play the game. There are sort of common practices, and yet each has slight variations/revisions of their own. Nonetheless, it usually doesn't differ very much from what other players will try and execute. Hard to explain I guess, just that, as long as what the AI is doing is what we commonly consider 'smart' - it sounds like great progress to making a competitive AI.

Caveman2cosmos had an ongoing issue of being too easy imo. Even on Deity you could get obscenely far ahead to the point where it became boring well before the modern era. People just wouldn't finish games (myself included), because they felt like there wasn't much point, due to the the game feeling like it was won already, without nearing victory conditions. The further AND2 gets away from this and the tougher the AI becomes (without stretching the boundary of unfair advantages too much), is a great achievement imo.
 
I don't think it's a good thing if the AI's are following one strategy exclusively. It makes it too easy to outflank them. I have found it fairly easy to go Archery-Warfare in the early game and be almost guaranteed to get the free Archer and first Great General. In the Medieval Era, the AI seems obsessed with Feudalism-Guilds and leaves Theology, Holy War, and Papacy for later, making it really easy for me to get Christianity, King Richard's Crusade, and the Apostolic Palace.

I agree, but I think Literature is an exception to the rule. Literature unlocks the Library, which is easily the strongest science building in the mid/early game. Acquiring this building in your cities lets you research much faster. The tech is not the same as the techs you listed above, you can't ignore your science output or you will fall behind and it won't matter what units you have.

The AI is acting rationally here and I have no problems with it.
 
Revision 816

  • Rewrite selection groups to use std::vector and stdext::hash_map storage (like cities and units now use)
  • Fix bug in reverse iterating cities
  • Rewrite cycleCities in CvGameInterface to account for ids no longer necessarily being in order
  • Resync code for CvTeam/CvTeamAI
  • Multiplayer Auto-Resynchronization for OOS is now enabled (experimental!)
 
I agree, but I think Literature is an exception to the rule. Literature unlocks the Library, which is easily the strongest science building in the mid/early game. Acquiring this building in your cities lets you research much faster. The tech is not the same as the techs you listed above, you can't ignore your science output or you will fall behind and it won't matter what units you have.

The AI is acting rationally here and I have no problems with it.

To tell the truth, this behaviour is starting to look strange to me too. In every test I've made with the latest revision this weekend (autoplay, at least 6 of them), AI always beelined for Literature and Polytheism was founded way before Judaism. Moreover I've seen that there are usually 1 or 2 civs which are far far ahead of everyone else and starting renaissance they hit other eras way too early, while other civs are falling behind not only to that civ but even to where they're expected to be. Looking at the logs, it seems that more ore less civs are hitting the right era at the right time; but aren't those values averages? I mean they look more or less right but it's because there is some civ very far ahead and others very far behind of where they're supposed to be at given time. I still have to make a full test playing a game without autoplay, but I'm a bit worried by this behaviour that Vokarya pointed out.
 
45°38'N-13°47'E;13453307 said:
To tell the truth, this behaviour is starting to look strange to me too. In every test I've made with the latest revision this weekend (autoplay, at least 6 of them), AI always beelined for Literature and Polytheism was founded way before Judaism. Moreover I've seen that there are usually 1 or 2 civs which are far far ahead of everyone else and starting renaissance they hit other eras way too early, while other civs are falling behind not only to that civ but even to where they're expected to be. Looking at the logs, it seems that more ore less civs are hitting the right era at the right time; but aren't those values averages? I mean they look more or less right but it's because there is some civ very far ahead and others very far behind of where they're supposed to be at given time. I still have to make a full test playing a game without autoplay, but I'm a bit worried by this behaviour that Vokarya pointed out.

From games I've been playing, I noticed that the AI that manages to get great scientists is most able to pull ahead technologically. Great scientists allow construction of academies, which provide huge science boosts and 1-2 of these and you are generating 50-150 more science per turn than other civilizations. Great scientists are the best great person, by far (second best going to great engineers).

Check your AI autoplay games and see if the leader civs have more academies.
 
Revision 817

  • Academy is a national wonder, 1 per player
  • Selecting a city in the domestic advisor brings the city build list up
  • Fix bug with Blarney castle when time victory is off
  • Fix bug where alt-upgrading units did not upgrade all of the units of that type
  • Espionage mission to incite city revolt now causes an increased revolution index over several turns instead of a large revolution increase for one turn
  • Fix bug with resyncing the temp unit & empty player slots
 
Revision 818

  • Early work on Espionage AI
  • Added iMinimumPerWorld to Bonus XML
  • Added iMaximumPerWorld to Bonus XML

45* and Vokarya:

Ok, so the new 2 tags for Bonus XML. They are very powerful and should finally put an end to complaints about unfair resource allocations. They scale with map size (according to the ResearchPercent in the WorldSize XML).

So if you set say, Stone, to a minimum of 10, the SDK will ensure that there is always at least 10 stone on the map. How the extra spots on the map is calculated is by checking the map for every valid location stone could be placed, and placing it *farthest* from existing stone deposits. This will result in an even, balanced allocation around the world.

Similarly, if there are too many resources, and the number of stone exceeds the maximum, of say, 25, the game will remove stone closest to existing other deposits of stone, preserving the balanced allocation.

The tags are optional. I added them to a few bonuses just to show how they can be used.

For added help, I added a new log, ResourceAllocation.log, which will print out the initial distribution of resources (before the new tags are applied), the extra added resources, and the final allocation for comparison.

As for the espionage AI, not much of it is done yet. What is done is a bit of the defensive AI. The AI will now guard it's own cities with spies intelligently. No other work has been completed.
 
Revision 819

  • Tweak AI resource scarcity valuation
  • Improve AI city founding site valuation, bring it into line with increased coastal value tiles
  • Tweak city AI to be a bit more oppertunistic with very early game settlers & workers
  • Tweak city AI threat levels for barbarians (was considering barbarian threat to be the same as full war with another player, overestimating threat)
  • Fixed bug where diplomacy screen showed AI to have more gold than they actually had (thanks buck_beach)
 
Revision 820

  • Fix bug in Machu Picchu, when a city has no peaks nearby
  • Fix a bug in Revolution mod, when examining a city from another player, was showing revolution hover text as if you were the owner (and not the text for the real AI owner)
  • Decrease propensity to accept AI war ally offers, this may have been causing the AI to be entangled in too many wars
 
I don't have performance issues with AND, so I'm not bothered. :p
 
Revision 821

  • Add new denial types for trades
  • Fix bug where wonders would be overvalued in tech choices causing AI to beeline inappropriately (Literature beeline bug)
  • Fix bug in selecting city in domestic advisor

The AI beelining for literature has been fixed.

In addition, the AI will be less likely to trade in certain situations. Very religion AI's (like Isabella) will not be able to be bribed to declare war on members of the same religion. AI's in financial difficulty will not be able to be bribed to declare war either either.
 
hey affpress,

could you write please on which files you wrote the code regarding:

Added iMinimumPerWorld to Bonus XML
Added iMaximumPerWorld to Bonus XML

CvGame.cpp/CvGame.h, in addition to the regular CvInfos.cpp.
 
Revision 822

  • Remove Foreign Trade Modifier from Barbed Wire
  • Seaport receives 100% production modifier for Expansive trait (was financial previously)
  • Harbor, Port, International Port receives 100% production modifier for Expansive trait
  • Financial no longer receives production modifier from Airport
  • Jewellery, Bazaar, and Bank receives 100% production modifier for Financial trait
  • Temples, Cathedral, and Monasteries receive 100% production modifier from Spiritual (prev 10%)
  • Social Justice Organization receives 100% production modifier from Humanitarian (was prev 60%)
  • Workhouse receives 100% production modifier from industries (was prev 60%)
  • Workboat, Modern Workboat receives 50% production modifier from Expansive(was prev 25%)
  • Protective Trait receives Drill 1 and Drill 2 promotions for archer, gun, siege, and hitech units (was previously only drill 1)
  • Imperialist trait has all cities start at 2nd culture level
  • Agriculture trait receives +1 food/city
  • Updated Financial Trait to give +15% domestic connectedness commerce
  • Format trait help text better (was spaced funnily in the civilopedia)

A few of the traits were quite underpowered. Namely imperial, protective, agriculture, and spiritual. I gave imperial free 2nd culture level, which is pretty powerful. I gave agriculture +1 free :food:, also powerful. I gave spiritual a bit faster production of cathedrals, monasteries, and temples. Protective gets Drill 2 as well, as Drill 1 is pathetically weak.
 
Isn't Imperial really a bit powerful? A creative and Imperial traits seem like a good combo if a culture victory is your aim?
 
Isn't Imperial really a bit powerful? A creative and Imperial traits seem like a good combo if a culture victory is your aim?

Imperial's free culture level is barely any total culture. It's actually very little, since the first level is fairly easy to attain. The overall impact on culture is nearly zero over a long game.

It's meant as an aid for quick expansion. It doesn't grant any recurring, per turn culture so it's no real boost to overall culture.
 
Back
Top Bottom