1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Pick Your Leader Challenge 1

Discussion in 'Civ4 - Dune Wars' started by davidlallen, Dec 14, 2009.

  1. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    Using your save game I can see both wrong behaviors: in your log, you found SH before you research Faith. When I click next turn, you research Jihad, but BG founds the religion despite not having Jihad at all.

    But I cannot reproduce these from scratch. I loaded the BG game from the OP. I set my three warriors to explore, build my city, select a barracks to build, and select Faith to research. Then I click "next turn" 14 times till Faith gets researched. I found SH on this turn, not any previous turn.

    I tried to reproduce the Harkonnen problem using the game from the OP. Since Jihad is a midgame tech, I took a shortcut by granting myself Fanaticism using WB. Then I clicked next turn 26 times till I founded Jihad. I found Mahdi on this turn, and get it.

    It is almost as if in your installation, the game is causing the religion to be founded on the correct turn, but assigning it to the wrong civ. The question is why this isn't happening for me.

    Do you have python logging turned on, and are you getting any python exceptions? Do you have a local copy of BUG (or anything else) installed in My Games/Beyond The Sword/CustomAssets? I can't think of anything else that could cause a difference.

    Can you reproduce this behavior in a custom game from scratch (rather than using the PYL files)? It should not take long to reproduce receiving SH before researching Faith; that would happen quite early if it was going to happen.

    Can anybody else reproduce the problems of AP using the steps I list in this post?
     
  2. AnotherPacifist

    AnotherPacifist Deity

    Joined:
    Sep 21, 2007
    Messages:
    4,878
    No python errors. With a random game religions are founded correctly.
    So I think I'm going to stop playing the scenarios until 1.7.1 is out.
     
  3. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    IMO this is only really important in mods where there is not much variation across factions. When every faction plays basically the same, then boredom comes much quicker.
    I would strongly oppose Fremen being able to found and adopt Technocracy.
    To me, that is the sort of thing that means we no longer have a Dune mod, we have a random scifi mod with some Dune names.
    Fremen building computers and thinking machines? No way. If an AI Fremen player did this during a game I was playing, it would destroy the immersive feel for me.

    I didn't play Rhyes much, but from everything I gather the whole greater purpose of the mod design was to have actual historic earth history happening around you.
    If you want a completely ahistoric experience, why not player vanilla?

    * * *
    Very strange. Did you make sure that nothing like Choose Religions option is on by mistake (maybe from playing a different mod previously with it on?

    Could this be somehow related to the specific "pick your leader" scenario? Maybe the game somehow thinks that the Bene Gesserit Leader DAVE is the human player?
    Maybe this messes up the player ordering somehow.
     
  4. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    I can't disagree with AP's decision to stop using the PYL games, but I am disappointed it did not work. So, I will investigate some more. Could you try the experiment I described using the BG PYL? If you get SH shortly before Faith, then your game does the same as his, and something is wrong with my installation. If you don't, then perhaps something is wrong with his installation. Though I have no idea what.

    It may be that swapping the player order causes some problem. I thought that all religions were somehow being founded by player 0 (BG) no matter who researched the tech; that would fit with the two specific comments that AP made. However, in the BT save game he posted, other religions were founded properly; Landsraad and Imperium were both founded by other AI civs. But since I can't reproduce the problem on the same files, I am limited in trying any experiments. I have to reproduce it first, then hopefully I can fix it.
     
  5. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    This is my guess. Were Landsraad and Imperium founded not just by other civs, but by the civs who researched the appropriate tech first? There could still be a problem.

    I'm around 400 turns through a Tleilaxu PYL game (played at Emperor difficulty). But its pretty boring now, because I'm the most powerful by far.

    Does changing the handicap affect everyone, or just the particular human player? As in: does it just weaken the human, or does it also boost the AIs? Is it possible that it penalizes the "Dave" Bene Gesserit player and boosts the others?

    Basic strat;
    Build worker and then Stone of Prophecy, to get great prophet points, to found the Tleilaxu shrine *early*.
    Expand a lot (there are no AIs nearby), while settling great prohets in my capital and one other city.

    Get lots of spice, and go spice industry (I think I have ~38 spice at the moment, for great profit)
    This is another scenario issue that comes up. Every time you load a scenario file in worldbuilder, it regenerates an initial set of spice and Rock Arches. So on a scenario that has been loaded several times, the initial levels of spice (and rock arches) are very very high.

    I had Philsophical trait, the +50% GP wonder and Meritocracy civic, and then Mercantilism boosting out a very large number of great priests. And banquet hall in my shrine city (which gives free priests). Faufreluches and Meritocracy civic and the Tleilaxu shrine and then eventually Istislah make my priests very powerful - 3h2g1b1c.

    Should we either drop the Tleilaxu shrine to 1 free priest, or remoev the +1 gold per Zensufi city?

    I am able to run ~90% science for most of the game with no deficit, basically entirely out of settled great prohpets in 2 cities (I don't need to bother buidling gold boosters elsewhere) and priest specialists.

    I pick one AI player to trade with (Ordos), and gift them stuff to make them like me, so I trade techs with them. Otherwise, basically autarkey.

    Ecaz and Harkonnen neighbors were both very weak and fell easily, I could have taken them much earlier if necessary. When I wiped the Harkonnens, they had a ton of suspensors and vulture thopters, and a handful of rollers, but not much else.

    Nobody attacked me, because I was a long way from them and I had a powerful military.
     
  6. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    No way to tell from the save game. And I cannot reproduce the situation.

    I am sure you followed the instructions of editing the game file so that all the AI are playing at your chosen difficulty level. After I distributed the game files, I realized that one difference at the higher difficulty level is that the AI starts with more units, such as a free worker. Because my files contain the starting units, changing the difficulty will not add these free units. So I guess it was not really at Emperor difficulty, due to lack of these free units.

    BT comes out low in the autoplays. Based on your experience so far, might there *multiple* reasons for that? One reason we identified is that the AI always adopts its religion so it may be at a disadvantage for OB and tech trading. Perhaps you could choose another player in the BT PYL, autoplay or really play for a little while, and compare the AI performance as BT against yours from the other game.

    That is an interesting point, but I am a little confused. It may be true that when you load one of my PYL files, then a second set of spice and arches get added. But is there a case when you would get more than two sets? I don't understand how that could be.

    EDIT: Actually, the amount of spice is maintained to a constant level. So even if you did this, the amount of spice should not increase. I can see the rock arches would increase. I'm not sure how to avoid lots of arches, but I will think about it.
     
  7. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    I did, but does this adjust the handicap for all players? So it boosts the AIs?

    True. I *think* they get a free soldier at Emperor, a free worker at Immortal, and a free Settler at deity? In which case Emperor isn't affected much. But I'm not sure about this, they might get a worker at emperor, which would make a difference.

    I adopted Tleilaxu Zensufism on turn 1, for the culture boost.
    I am not convinced that choosing not adopt the religion is really a good thing for the human player to do (I mangaged to become very powerful with very little diplomacy), but if it is, my solution is to make the temples require that the state religion be adopted - force the human player to abandon the exploit.

    When testing AI BTl performance in autoplays, a good indicator would be to note on what turn did they build their Shrine. The Shrine is very powerful, and forms a major part of the BTl strategy. If they are late building it, that could explain weakness.

    Unfortunately it is a little too late; I am at turn ~400, and so only have autosaves back to ~380 or so, and I am so powerful that even the AI could win from that advantage.
    Letting the AI take my place would not really be a test of BTl power or behavior.

    Another possible reasonsfor BTl AI weakness:
    Poor AI civic management for a specialist economy.
    Preferred civic is Theocracy, for fluff reasons. However, this is not necssarily the *best* civic. Its ok - it does provide unlimited priests, who are boosted by the shrine, but Meritocracy is probably more powerful for the BTLs.
    The problem is that I *think* the "preferred civic" does multiple things. It:
    a) Increases AI likelihood of adopting that civic
    b) Gives diplomacy benefits to other factions who have that civic.
    c) Makes the AI sometimes demand that you adopt that civic.
    If the Tleilaxu are demanding that you adopt a civic, it should be Theocracy from a flavor perspective.
    But perhaps this weakens the AI, since they would be better off with Meritocracy/Faufreluches?
    Or we could even make them another terraformer; they're hated anyway, so the diplo penalty doesn't hurt as much, and since the Tleilaxu are experimenting with artifical spice, they might not care so much if the spice on Arrakis dries up (it makes their stuff more valuable).
    But that isn't great flavor.

    We could try two autoplays of the same file with and without theocracy as preferred civic, and see if it makes any difference. I may be able to try testing that this weekend.

    Not from the scenario method, but yes I think if you are repeatedly opening and saving a scenario file in Worldbuilder.
    But even twice could be high.

    Are you sure? I have been slowly working on the Arrakis map, and IIRC every time I load it within a game more spice is added, to the point where the total amount of spice at game start is quite high. I am not certain though.
     
  8. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    If you changed the handicap for every AI, as I instructed ("make the change 9 times"), then yes, they are all adjusted.

    Sorry, that is not what I meant. Start another new game where the AI plays the position you just played, and you play another position as observer. Compare how the AI does in the new game, against how you did in the old game.

    Oh, you mean your scenario map. Yes, in this case, you are repeatedly saving over your previous file. The code which runs in the game upon starting a new game ""assumes"" it is a freshly generated map; I did not think of scenarios here. As a workaround, when you have a mostly final version of the scenario map, you can use a text editor and globally delete the lines in your WBSave file which say "BONUS_SPICE" or "FEATURE_SPICE" or "FEATURE_ROCK_ARCH". Then when a player starts the scenario, the new game code will give it one set of spice and arches.

    I suppose this code could check first to see if there exists one spice on the map and then not add any, and the same for arches. Are there any drawbacks to that?
     
  9. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    Hmm. I might have done it wrong then and only adjsuted once, I don't recall if I hit "replace" or "replace_all" in my text editor.
    That would certainly explain the weak AI behavior, if they weren't getting their proper difficulty level bonuses.

    Ah, ok. The problem here is that I can outperform the AI for every faction, so it doesn't really help us with inter-faction balance.
    Thanks, I will try to do this.

    Hmm. I can't think of any drawbacks, but I don't understand this code well.

    Any thoughts on the issue of whether leaders should prefer civics that make fluff sense for them, or civics that might be more powerful for them?
    Or on making the temple require TZ as staet religion?
     
  10. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    It does, indirectly. We observe that BT come out low in autoplay. If you can give "them" some tips on how to play better, we can improve how they do in autoplay. In other words, if you can find some specific things the AI is doing wrong compared to what you do, then we can improve the AI.

    Let's dig a little further to establish what changes will result in real improvements.
     
  11. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    Ahh, ok. Fair point - this might be worth doing for various factions. I am guessing that late shrine and poor civic choice are probably the main issues, but I don't know how to change those. We could make a Teilaxu UB palace with a 1 priest GPP income I guess?
     
  12. negyvenketto

    negyvenketto Scientist

    Joined:
    Mar 6, 2002
    Messages:
    708
    Location:
    Hungary
    What about facedancers could take over enemy unit. It could represent they killed the commander and replaced by a facedancer who serve Tleilaxu.
     
  13. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    Would it help to locally change the <FavoriteCivic> and see if the AI does better? You can find this in assets/xml/civilizations/civ4leaderheadinfos.xml. Also, if you do look in on the AI playing, you can see whether the shrine is built. Do you know about ctrl-shift-L to change player? If you observe the AI has the chance to build the shrine but did not, you can change player, build the shrine, and then change back.
     
  14. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    You may find it interesting to read the tleilaxu mechanics thread. We discussed that and decided the player would hate it, if that happened against him. Perhaps there is some variation of this idea, or some other idea we can think of now.
     
  15. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    Yes, I will try this, maybe this weekend.

    I am guessing that the AI will build the shrine with its first great prophet, however, it may invest in great prophet points later than I did. I'm not sure if the AI actually tries to get great leaders, I think it invests in specialists only if it thinks they will give a higher value than the tile yield (and it includes GPP points as some value).
    I suspect that it doesnt' indirectly understand that priest specialists will give it the shrine.

    In my game I built the Stone of Prophecy super-early, but there's no real way to force that. Best the AI can do normally is to wait and start getting a priest specialist or two from their temple, but they probably won't do that if they can get higher yields from working tiles, and the yield value of a priest specialist is not high - until you build the shrine (and adopt meritocracy or Faufreluches).

    Hence why I suggest a 1 GPP priest income on their palace, to force the AI to get a great prophet earlier, and then weaken the shrine (make it 1 free priest) to compensate.

    Its a chicken or egg problem; a priest economy isn't powerful until you build the shrine, but you the AI can't build the shrine until it has some priests, and it won't get priests if it doesn't think they're valuable.
     
  16. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    So, did some AI testing.

    Used the pick your leader tleilaxu scenario. Noble difficulty, normal speed. Watched the AI autoplays.

    Game1
    The AI builds settler then worker, so it is still population 1 by ~turn 45.

    By turn 50 the AI has a single improvement built (the mine on the diamond).

    By turn 100 the AI has only built ~12 improvements. It has not built wells at all, for reasons unclear (it has the tech). Why is it underemphasizing wells?
    It also still hasn't researched Faith, so it can't get its shrine.
    Its doing well though relative to the other AIs, its 2nd of the 6 that it can see.
    So, adopting state religion is not hurting it in the early game.

    Turn 150, the AI still hasn't built its shrine.
    Tile values are higher than priest values before the shrine is built, so the AI doesn't get any priests, so it doesn't get a great priest to build the shrine to boost the priests.
    Its now 5th of 9, because it has stopped expanding, even though there are good city sites nearby (it still hasn't settled anywhere west of its capital).

    tleilax drops to 8th, then back up to 6th.

    Long war with Harkonnon neighbors, but ineffectual.

    By turn 200, still no shrine.
    Still hasn't colonized some good city sites on its own island (2x groundwater + 1x mesa + 2x cereal in a single BFC).
    Highest score civs are a bunch of Imperium co-religionists who are probably tech-whoring.

    Lots of facedancer units (11) and a 400EP stockpile vs the neighboring Harkonnen who they are at war with (and 500 with neighboring Ecaz), but they aren't actually using any missions. Harkonnen territory remains unexplored, there remains only 1 Harkonnen city visible.

    Also, they still haven't explored most of the world, or traded maps with anyone.

    Cities spend a lot of time building Wealth.

    A bit unlucky that Imperium religion is founded by Ecaz just north of them, and the holy city is right on their northern border (and by the late midgame game, cultural encroachment is significant, northernmost city loses most of its tiles).

    Zensufi shrine built turn 202. Finally.

    Turn 250
    8th/9 by score.
    AI is Meritocracy/Mercantilism, so it is making good specialist choices.
    It is running a priest specialist economy; capital has 2 settled great prophets, and 2 priest citizens (as well as free priests from the shrine).
    Second largest city also has 2 priests.

    So once it has the shrine, the AI is running a good specialist economy.

    Still only 4 total cities though. I don't know why. There are good cities nearby, it just isn't going for them.

    13 facedancers. Mostly just wandering through the desert outside cultural borders, accomplishing nothing.
    I'm not sure its done a single espionage mission all game, despite 1000+ EPs.
    Do Facedancers have no espionage AI? Or is the AI just dumb?

    Still at war with Harkonnen, but its all the Harks raiding with thopters and suspensors, Tleilaxu aren't invading them, or vice versa.

    AI isn't building any melee units? Its all guardsmen. Missiles troopers and heavy troopers. And a few siege.

    The AI is trading resources with other civs. I dont' really observe tech trades.

    Turn 300
    Still 8th place.
    Still haven't colonized all of home island (4 cities total).
    Did defend against and launch amphibious wars with Harkonnen.
    Is running a good priest economy. Lots of settled great priests (4 in the capital, and 2 settled great techmen in second city).
    Meritocracy/War of Assassins/Mercantilism. Good civic choices.
    Huge stores of espionage points with neighbors, but not using them at all.
    12 facedancers.
    It is building shield troopers now it has the tech for them.

    Turn 325
    Shaddam wins a diplomatic victory.
    Game replay attached.

    * * *
    Conclusions:
    1. Espionage AI is whacked. Some kind of fix is needed. High iEspionageWeight in leaderhead is leading to lots of EP accumulation and lots of spies, but they aren't being used.

    2. AI just won't build enough cities, even in excellent sites, near the capital. I don't know how to fix this.

    3. Suggest replace Tleilaxu palace with a UB that gives +1 priest GPP. That way the shrine will get founded much earlier. Take the shrine from 2 free priests down to 1 free priest (or 0 free priests and just ~+3 priest GPPs), and maybe have it add a priest specialist slot or two.
     

    Attached Files:

  17. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    This is very helpful feedback.

    Do you agree that the biggest glaring problem is failure to build the shrine? There is a python routine I added to the code for a city to choose what building to build next. It forces the AI to choose the spice corp building as soon as it has the tech. Should I try to adapt this somehow to force building the shrine? I guess what I'd need to do is interfere with the unit AI for the priest, so the first one gets used for the shrine instead of settling or whatever else. Do you remember what turn you built your shrine?

    Could you ask over on the BBAI forum about how to understand why the spies aren't doing anything useful. To confirm, you see the spies wandering aimlessly *while* the civ is at war with the Harks, right? I can see why they might have no goal when at peace, possibly.

    While you are here, it would be very helpful if you could try to reproduce the problem AnotherPacifist has had with wrong civs getting the religions founded. I get the right ones, he gets the wrong ones, and nobody else has reported. Here are the details from above:

    These two quick games would help me decide how to proceed on this problem.
     
  18. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    Yes, because the shrine is so central to the faction's design.
    Also, the worthlessness of its espionage given that is an espionage-oriented civ (and sometimes it uses a positive espionage slider, which retards its tech) is holding it back a lot.

    I don't think this is the issue. The first priest the AI had *did* build the shrine I think. The issue is that they aren't generating a great priest (and why would they? The AI doesn't understand how powerful the shrine is when selecting specialists, and can't see that buliding the shrine will boost their priests). Not that they are settling priests rather than making the shrine.
    Hence why I think my palace fix is the best idea; trying to force them into getting priest specialists could be messy. My way gets them the great prophet they need for the shrine, and then they can do the rest themselves.

    In my game, I built the shrine around turn 60 or so (Epic speed), because I beelined the stone of prophecy after building a worker.

    I can post something, but I don't know anything about AI and so I don't think I'll be able to ask some of the needed questions very intelligently.
    Can you do a quick check to make sure that Facedancers have the same AI scripts as normal spies?
    I can try to do an Ordos test too and a Harkonnen test (Vladimir has high iEspionageWeight) at some point and see if Infiltrators have the same issue.

    Some other thoughts on this:
    i) Its possible that the issue could be related to islands; they spend a lot of time wandering around on the sand, maybe they have difficulty transitioning between land and sea and back to land domains? But Ecaz were on the same island, so I don't think this was it...
    ii) There could be a slight line of sight issue, the AI didn't know where Harkonnen cities were? But again, I think they could see the Ecazi ones.
    iii) For the city poison mission, its possible the AI was in fact correctly evaluating that the mission wasn't worthwhile.
    All the mission does is add 5 unhealth for up to 5 turns. This is pretty useless, especially if enemy cities already have more health than they really need.
    So maybe the AI is smart? But it isn't stealing tech or anything else either.
    I'm pretty sure that the spy missions are in fact available to the Facedancer, I've seen them when I used facedancers as a human.
    Ok, will test.
     
  19. Ahriman

    Ahriman Tyrant

    Joined:
    Jun 8, 2008
    Messages:
    13,266
    Location:
    Washington, DC
    These are the same results I got. I load the BG scenario, pick BG as the player, did the experiment, and I founded both SH and Mahdi.
     
  20. davidlallen

    davidlallen Deity

    Joined:
    Apr 28, 2008
    Messages:
    4,743
    Location:
    California
    @ AnotherPacifist, this is confusing. Neither Ahriman nor I can reproduce your result, of the wrong civ getting the religion. Is it possible you have some game option set, or some local options file? I cannot think of any specific option which would do this exact thing, but maybe there is some unexpected interaction.

    1. Please check My Games/Beyond The Sword/civilizationiv.ini for the GameOptions line. It will contain a bunch of 0's and 1's. If there are any 1's, change them to zero and retry the quick BG experiment.

    2. DW creates a bunch of ini files. In 1.7, they should be in directory My Documents/My Games/Beyond The Sword/Dune Wars/UserSettings. However, they also *may* be in MD/MG/BTS/DW directly, or in mods/Dune Wars, or in mods/Dune Wars/UserSettings. Please delete all the ini files you find from all four directories. Then when you launch the game, it should write all new ini files into MD/MG/BTS/DW/US. Does this change the behavior at all?
     

Share This Page