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

A Better AI.

Discussion in 'Civ4 - General Discussions' started by Blake, Nov 4, 2006.

  1. Blake

    Blake The AI Guy

    Joined:
    Feb 18, 2006
    Messages:
    342
    Location:
    Apolyton
    No and nor should they. Since the emphasize settings can be changed very often and you don't want schitzo workers. If you are using the emphasize buttons as permament settings then basically, you are using them wrong.


    Pretty much everything which effects the AI also effects player automation and advice, possibly not exactly the same as it does the AI (ie the AI wont always get the same "Advice" as the player does) but it certainly influences the advice given. For example, the research suggestions will change (ie it'll suggest Iron Working if you have Jungle) but the AI research selection is different to the Humans Advice, since the advice for the human only looks at the available techs while the AI tech selection looks deeper - an AI might beeline to Meditation through Mysticism.

    Anyway the auto worker performs in almost exactly the same way as the AI's do (altough AI don't use auto-route or auto-improve city and have personality modifiers), the Blue Circles actually give valid advice (I use them myself sometimes because they use my logic anyway, heh).
     
  2. Commander Bello

    Commander Bello Say No 2 Net Validations

    Joined:
    Sep 3, 2003
    Messages:
    3,858
    Location:
    near Koblenz, Germany
    Blake, I have silently followed your thread over at Apolyton and I am glad to see that now you have a thread over here, where I am most often.

    First of all, I would like to congratulate for the efforts and even more, for the success!
    Based on what I have read so far, you really managed to bring Civ4 to a new level and that is something, the community cannot be thankful enough about.

    So, once again::goodjob:

    Please allow me one remark:
    There are many eager modders all over the world, some of them doing other small tweaks in the .dll files.
    Especially in our German forum, there is a very good mod compilation which makes use of a changed dll.
    I would really like to ask you to be so genereaous as to release the source coding of your changes, best if the changed lines would be given a small comment like "Blake's", if possible at all.
    This would allow the other modders to include their changes to your most valuable changes and thus, making the fine mods of theirs even more fun to play.

    I acknowledge that this would require some additional work for you and - even more important - could mean that somebody makes use of your intellectual properties.
    Nevertheless, it really could boost the output of the whole community, as far as I see it.

    Please consider and make your decision ;)

    Anyway, on behalf of the whole community: Many thanks for your efforts and good luck for further improvements!
     
  3. ToxicBones

    ToxicBones Chieftain

    Joined:
    Jun 17, 2006
    Messages:
    14
    thanks for the great improvements, blake!
    Too bad, I'm not able to install your new improvements because I also play a lot on-line. Get Firaxis to set it in an official patch again :)


    Perhaps you can make the AI more aware of other civilizations with high power, especially when their relations are bad and they are close together.
    For example, when the power of Napoleon 300k and Gandhi have 200k, they are neighbours and their relation is annoyed, gandhi will improve army. While when their relation is friendly or when Napoleon is far away he will see no reason to increase army.
     
  4. Jimdigriz

    Jimdigriz Prince

    Joined:
    May 7, 2006
    Messages:
    320
    Location:
    Wales, UK
    :goodjob: again!

    Great stuff Blake, needless to say this file has gone straight into my customassets folder - anything that improves the AI has got to be a good thing. I love it when the computer players attack my empire (well its a love/hate thing!) :)
     
  5. Arlborn

    Arlborn Legendary Noob

    Joined:
    Jul 29, 2006
    Messages:
    1,939
    So you are saying that it will be almost impossible to win in Cultural victory or other victory?? I didnt like this part at all! Is that what I understood? I almost always go for Cultura victory or Diplomacy, what then?
    And poor Gandhi! I hope you improove tihs part to make his a defender rather than a militar-useless!

    And about the difficulty level, I dont see why add improviments to the AI in higher levels than Noble because if you want to play with a AI that has no handicaps at all, you just play in Noble. I know it is too easy for most of players now, simply because the IA is not that good, but with your improviments the AI will get better and better and the players will eventually go down some levels. Ths said, I have to say that I think you should do about the difficulty level only 2 things: Or leave like that and who wants to play with a AI without bonus just play Noble, what must be really hard with your improviments in the end, or you should add more dififcult levels in the mix, because imagine, if playing against an AI with your mod one day will be really challangeing, imagine that AI haveing a lot of bonuses like it has nowadays! Almost nobody would be able to bet your last level of difficult! And this will be cool :p
    And another thing is, I(and prob a lot of other players) will feel really bad if we are playing in a level of difficult knowing that the AI dont do everything it supposed to do(for example a better city placement strategy or military), but the level up is too hard. It will feel for me worse than if I had bonuses over the AI, because now its not only about bonuses but about a less smart AI you are playting against! Argh, I prefer to have bonus agianst the AI than play againt an AI that dont use all its intelligence! I would feel really bad!

    Sorry for my englsih and for the long text, I guess you didnt understand everything I said, if you didnt read again and maybe you understand something xD
     
  6. V. Soma

    V. Soma long time civ fan

    Joined:
    Apr 13, 2004
    Messages:
    3,879
    Gender:
    Male
    Location:
    Hungary
    Blake, thanks for the answer, and hey, thanks for all efforts you make to make Civ4 even better! :)

    An idea:

    Ok, you don't want ever-changing workers (schizo).
    But still:
    I imagine an auto-worker still could lokk at the city's governor's "wishes" and say:

    "OH, you want hammer? Ok, I'll do this mine here... and I WILL FINISH this mine,
    whatever changes will be made in the governor's mind!
    and THEN, when I finish my work, I look at the Gov's wish again..."

    :)
     
  7. Blake

    Blake The AI Guy

    Joined:
    Feb 18, 2006
    Messages:
    342
    Location:
    Apolyton
    It would certainly be possible to program the AI to mercilessly slaughter anyone going for a fast cultural victory, making such a strategy only viable when very isolated. A later cultural victory may still be possible. You could of course befriend a warmonger to act as a bodyguard, I would never go so far as to make friendly AI's backstab those who are about to win. In fact I don't think I've ever backstabbed a friendly AI.
    If I do change their declare-war logic, I probably wont make them go for denial-of-win, but will definitely leave open the possibility that they'll go through you on the way to domination.

    Actually I did bug Firaxis to put some kind of "City Role" feature in but I didn't have any luck. It would require a change to the city screen (which is already sort of crowded).

    What I've done is made the autoworkers sort of guess what a city would be good for, if a city has a lot of hills and some good food it'll be terraformed for massive production (whether you want it to be or not). If you sort of just trust the autoworkers then they will come up with a reasonably coherent plan. I'm afraid that I can't really do more without a dropdown that lets the player select the city role, and that would break save games.

    Again I reiterate what I said earlier. I make a great deal of changes in tweaking the AI. I do not see how comment-labels are more useful than using a program like WinMerge to display exactly what has changed between the 2.08 stock SDK files and my updated files.

    The source is available either by subversion or as a download containing the changed files only.


    PS. I'm going to start doing work on Tactical improvements. I've changed some code to discourage pillaging their primary target - they should only pillage outlying cities as an annoyance/distraction, rather than mass pillaging the city they are actively sieging. It'll be interesting to see how it goes.
     
  8. Wlauzon

    Wlauzon Prince

    Joined:
    Oct 1, 2005
    Messages:
    573
    One thing I have always wished for since the original vanilla CIV4 is a way to set a worker to do one single task, like remove jungle. Any jungle, anywhere within the cultural boundaries.

    Not even sure if such a thing is possible, but seems like it would be similar to the "build trade network".
     
  9. Ennet

    Ennet Chieftain

    Joined:
    Jun 13, 2006
    Messages:
    11
    There are good & free programs available on the net that will compare text and highlight any differences for you. Just use one to compare the original file to Blakes..
     
  10. phungus420

    phungus420 Deity

    Joined:
    Mar 1, 2003
    Messages:
    6,296
    Wow, blake, you're actually going to program the AI to go for victories other then space race?
     
  11. DynamicSpirit

    DynamicSpirit Fear him of the pink tie Moderator GOTM Staff

    Joined:
    Dec 23, 2005
    Messages:
    5,908
    Location:
    London, UK
    Definitely sounds like some pretty cool stuff!

    One request.... Any chance when you're thinking of strategy of getting the AI to vary its victory aims? It'd be nice sometimes to, eg. see an AI obviously trying to go for a cultural victory, or getting a diplomatic victory through deliberate managing of its relations rather than just by chance.
     
  12. Blake

    Blake The AI Guy

    Joined:
    Feb 18, 2006
    Messages:
    342
    Location:
    Apolyton
    I think I'll aim for the warmongers being able to achieve domination under the right circumstances - probably all land maps.

    Diplomatic would also be a possibility, either by back door domination or by religious domination.

    I kind of don't consider cultural to be viable in a game with thinking, victory-focused opponents.

    Conquest will be very difficult for an AI, for reasons I think would be obvious - the game would end before the conquest is complete.
     
  13. Sisiutil

    Sisiutil All Leader Challenger

    Joined:
    Feb 19, 2006
    Messages:
    6,899
    Location:
    Pacific Northwest
    Blake, I think you merit a huge round of applause from fans of Civ IV everywhere.

    I've been a fan of the series since the first version; as I slowly worked up the difficulty levels in each iteration of Civ and my gameplay improved, I noticed more questionable decisions by my computer opponents. Rather than hoping for new gameplay features, my primary desire has always been for a better AI. It's heartening to see someone working so hard to make that wish come true.

    It would be very cool for you to make further strides, as you say you will above, in making the AI better at war, which is certainly its Achilles' Heel. Frightening, but cool. I am willing to be knocked down a difficulty level or two in exchange for playing a better computer opponent.

    Good work, and thanks again!
     
  14. franlato

    franlato Warlord

    Joined:
    Oct 27, 2005
    Messages:
    134
    your improvements are wonderfull Blake... but can you make the AI use the spies? Your great people improvements works well, can you make it for spying?
     
  15. drkodos

    drkodos Emperor

    Joined:
    Dec 26, 2005
    Messages:
    1,861
    Location:
    Renting-a-tent
    Think about it. Difficulty "level" is really just an arbitrary thing anyway, isn't it? And really just a fancy and indirect way of stroking our egos.

    I like playing at eleven, myself.
     
  16. 50_dollar_bag

    50_dollar_bag Imitation Louis Vuitton

    Joined:
    Jun 13, 2005
    Messages:
    977
    Location:
    36 52 S 174 45 E
    Firstly I'd just like to get in and say Great Work along with everyone else.

    But one thing about difficulty levels is that personally I always like to be increasing the level at which I play, sure there is a bit of ego involved but I do like to win especially against something which has previously bested me, e.g. Emperor level. I always like to move forward.

    I haven't installed the new patch or used your mod yet Blake but the thought of having to move down a level is a bit scary, but hey I'll just have to improve my thought processes like adding in more code for a well timed whip or better city placement.
     
  17. drkodos

    drkodos Emperor

    Joined:
    Dec 26, 2005
    Messages:
    1,861
    Location:
    Renting-a-tent
    But here is my point: If the game is improved, moving "down" a level is not moving down. It is only a issue of semantics. In fact, if the game engine is improved substantially, moving "down" one level may be the equaivalent of moving "up" one level pre-patch.


    Remember the Spinal Tap Analogy:

    11? Why not just make 10 louder?
     
  18. TAfirehawk

    TAfirehawk WoC Team Manager

    Joined:
    Aug 25, 2006
    Messages:
    2,326
    Location:
    Florida
    Great work Blake and from everything I am reading this is something we might like to put in the ViSa Modpack and would like to ask you if that is OK?
     
  19. DynamicSpirit

    DynamicSpirit Fear him of the pink tie Moderator GOTM Staff

    Joined:
    Dec 23, 2005
    Messages:
    5,908
    Location:
    London, UK
    I think you're correct if you're thinking of cultural in the way that the best human players play if they are aiming for fastest possible cultural (ie. no more than 9 cities, minimal defences, 100% culture slider), but I don't see why it shouldn't be possible to go for a cultural victory in which you do keep your defences up, perhaps even go warmongering, a bit initially, but then select 3 suitable cities and do everything you can to build culture in those. Sure, that tends to lead to much slower cultural victories than would be the case if you keep your civ small, but it does mean you can better deal with your victory focused opponent (I assume the human one since you've said you're not intending to have the AIs deliberately attack to deprive others of victory). (And a cultural victory with weak military is also much more viable if you end up alone on your continent).
     
  20. Arlborn

    Arlborn Legendary Noob

    Joined:
    Jul 29, 2006
    Messages:
    1,939
    Really? Why? I would lose to see Gandhi going for cultural victory for example. Why cant they make some gp farmer of great artists themselves and some nice production cities for wonders? Is that so hard to progamme the AI to aim more for culture? Are you going to make the AI a warmongger conqueror only cuz its hard to make them go to something else? you gave up of "fair" diplomatic(real diplomatic, not only destrying your enemies before the UN. ould be even nicer if the same AI that is aiming for cultural is also aiming for diplomatic in the same game) and cultural victory for the AI? Well if its true that is a pity then, and Im still looking for some modder to try to improve the AI in that way..Not trying to say anything bad about your actual work, this awesome actually! Just trying to push somebody, ANYBODY, to make the AI goes to any kind of victory, because its really annoying that Firaxis did put so many nice aspects in the game that the AI just dont even try to use. Ah well, still looking :p

    Keep up your work, but please see if there is ANY way to make the AI aims for ALL kind of victories! I hate warmonger games..
     

Share This Page