Our chat on the Civ3 AI with Soren Johnson. In red, the operators. In
blue, Firaxis team members
[Wexu] Soren_Johnson_Firaxis, I still think AIs should be more aggressive at the beginning against undefended cities.
[Demonic2k] QUESTION: Is the AI scripted (and in which language) or is it hardcoded? Will there be a SDK?
[^UvaSabre^] nah Wexu
[^UvaSabre^] maybe in the harder difficulties
[Pembleton] Yes, and you shouldn't chop down all forests either, since they may contain rubber, and something else, I forgot
[Sheltem] Can the AI "see" things like strategic resources, that it shouldn't be able to yet?
* TheDarkside think SDK would rock
[gamadictG] Soren, I don't know if this has been addressed before, but do you think low-tech units have too good of a chance to defeat higher-tech units...??
[LoQtus] soren: not very historically accurate though: first found a city, then figure out why the site is import...
[gamadictG] Or was this intentional...??
*** ACS_MarkG sets mode: +m
[Soren_Johnson_Firaxis] Mark13: I am glad you brought this up. The AI get NO combat bonuses of any kind at any difficulty level. I understand that many people have a hard time believe this but let me give an anecdote...
*** Guest has joined #Apolyton
[ACS_MarkG] moderation on, questions from [nidz-onehalf] [Argeye] [TheChief]
[ACS_MarkG] remain unanswered
[ACS_MarkG] thank you for your patience
[Soren_Johnson_Firaxis] ...at one point in the project, people complained that combat was unfair, so I said I would change some things, and what I did was give the _human_ a combat bonus. Then people told me that combat was once again "fair." It is all in the eye of the beholder
[Soren_Johnson_Firaxis] i'm sorry, i missed a bunch of questions while answering that one
[ACS_MarkG] i'll voice the three mentioned
*** ACS_MarkG sets mode: +v Argeye
*** ACS_MarkG sets mode: +v nidz-onehalf
[nidz-onehalf] you go first Argeye
*** ACS_MarkG sets mode: +v TheChief
[Argeye] Thanks :) well mine is right there *points up* :)
[ACS_MarkG] We'll try making me requests from answers on #apolyton-open.
[ACS_MarkG] for questions that is :)
[connorkimbro] i'll repeat for everyone's benefit "Is the AI building cities in remote places, without any resources at all near them a bug in the AI that makes them just want to build and expand no matter what the surrounding area is like? I've taken over MANY cities through culture that are just usless to the AI civ =/"
[connorkimbro] That's what Argeye asked.
[Soren_Johnson_Firaxis] gamad...: concerning the loss of firepower. Firepower added needless complexity to the game. For example, there is no significant difference between a unit with an offence of 10 and a firepower of 2 and a unit with an offense of 20 and firepower of 1... however
*** ACS_MarkG changes topic to 'Civ3 AI Chat with Soren Johnson- NOW - ask questions on #apolyton-open.'
[Argeye] that was answered.. i just went in a bit deeper asking about AI building cities in places that were so far away from their own buildups, just because there happened to be 3 squares of open space.. French were doing it like mad on my last game
[Soren_Johnson_Firaxis] having said that, the later age units in Civ3 ARE less powerful than they are in Civ2. This was a design decision based on the resource system. We didn't want the game to be totally hopeless if you were unable to build the newest type of unit because you don't have resource X
[TheChief] .10Soren, when does the AI give up on trying to attack me? The Egyptians have often attacked me for what seems like forever and all they accomplish is some improvement destruction around the city. It doesn't seem to be worth the units.
[Soren_Johnson_Firaxis] The AI likes to expand, as I'm sure all of you know. It is not a bug although I am looking at some specific issues involving cities which will almost certainly be lost to culture for the patch...
[ACS_MarkG] on to TheChief's question. thannk you argeye
*** ACS_MarkG sets mode: -v Argeye
[Soren_Johnson_Firaxis] The Ai doesn't give up on attacking you until a) peace or ) s/he is on the defensive. If the AI can hurt you, it will.
[Soren_Johnson_Firaxis] Mark: what was that?
[TheChief] .10Soren, when does the AI give up on trying to attack me? The Egyptians have often attacked me for what seems like forever and all they accomplish is some improvement destruction around the city. It doesn't seem to be worth the units they're losing.
[Soren_Johnson_Firaxis] see above :)
[ACS_MarkG] nidz-onehalf please repost your now. thanks
[nidz-onehalf] QUESTION: does the AI ever "backstab"? like: This CIV has a kinda small military, but a great scientific advancing. So first I'll trade all techs, then wipe 'em out. Or any other form of skeems?
*** ACS_MarkG sets mode: -v TheChief
*** Patrick_Dawson_Firaxis has joined #Apolyton
[nidz-onehalf] (may have follow-up Q's depending on answer)
[Soren_Johnson_Firaxis] the AI is more willing to make peace if the war has gone on too long, however...
*** ACS_MarkG sets mode: +v Demonic2k
[ACS_MarkG] next [Demonic2k] QUESTION: Is the AI scripted (and in which language) or is it hardcoded? Will there be a SDK?
[Soren_Johnson_Firaxis] The AI does backstab when the opportunity presents itself...
[nidz-onehalf] do they do that to all players, or just other AI, or just Humans?
*** connorkimbro sets mode: +v Patrick_Dawson_Firaxis
[Soren_Johnson_Firaxis] ...however, it will not do thing like what you mentioned just b/c it would make the game less fun...
[Soren_Johnson_Firaxis] ...iow, the AI was not programmed to be a "perfect Civ 3 opponent"
[Soren_Johnson_Firaxis] they backstab other AI opponents as well
[Soren_Johnson_Firaxis] hi pat
[nidz-onehalf] do they exploit other Civs in any way?
[Patrick_Dawson_Firaxis] Hi Soren, net is back up here, since I like to state the obvious.
[ACS_MarkG] Greeting to Patrick Dawson!
[nidz-onehalf] (then i'm done)
[connorkimbro] Hellp Patrick_Dawson_Firaxis: welcome, thanks for coming :)
*** Dan_Magaha_FIRAXIS has joined #Apolyton
[connorkimbro] I mean, Hello
[ACS_MarkG] i was just about to ask: Where is Dan Magaha Patrick? :D
*** connorkimbro sets mode: +v Dan_Magaha_FIRAXIS
*** Mike_Breitkreutz_FIRAXIS has joined #Apolyton
[connorkimbro] Welcome to Dan_Magaha_FIRAXIS as well. :)
*** connorkimbro sets mode: +v Mike_Breitkreutz_FIRAXIS
[Dan_Magaha_FIRAXIS] go winstar
[connorkimbro] Oh my, the gangs all here :)
[nidz-onehalf] yey!
[ACS_MarkG] the cavalry is here! Soren is saved :)
[Soren_Johnson_Firaxis] Demonic: The AI is not scripted... it is all in C++. There are no current plans to release a SDK. I am interested in project that give more freedom to the mod community to alter the AI. The Civ3 AI, however, was written to be as flexible as possible, so that it can deal with many (most) changes to the BIC file.b
[Soren_Johnson_Firaxis] hi dan
[Dan_Magaha_FIRAXIS] hows the hot seat Soren? =)
[ACS_MarkG] [Snowhawk0011] I have a question about the AI's goverment choices. I noticed via editor that certain civs, like Russia despise the use of democracy, yet in every game I have played so far, the other Civ's always use Democracy if it is available. Does the goverment preference have any effect on the AI ?
*** ACS_MarkG sets mode: +v snowhawk001
*** ACS_MarkG sets mode: -v nidz-onehalf
*** ACS_MarkG sets mode: -v Demonic2k
[ACS_MarkG] HOTSEAT? :D
[Dan_Magaha_FIRAXIS] tsk tsk Mark!
[ACS_MarkG] LOL
[Soren_Johnson_Firaxis] The government preference does have an effect on government choice. However, I erred on the side of "best government" instead of SMAC-style social choice, so if Democracy is the best choice at the time, it will often go that way.
[ACS_MarkG] ok everyone, you did not read the above lines!
[Soren_Johnson_Firaxis] so are you all having fun?
[ACS_MarkG] [krib] hey..i got here late. referring to his comments on "goal AI", are there conditions in which the AI will declare war to get strategic/luxury resources, or in cases where the player has them offer a "fair" trade deal for them? (eg offer a resource + tech for the player's resource)
*** ACS_MarkG sets mode: +v krib
[Patrick_Dawson_Firaxis] And I want to know if anyone has beat Diety legit.
* connorkimbro repeats for the benefit of newcomers. . ".1The channel is on moderated mode, due to the flood of questions we were recieving. If you hav a question you'd like to ask, please join #apolyton-open to ask."
[ACS_MarkG] Patrick, if you mean from Apolyton, i dont think so
[Soren_Johnson_Firaxis] The AI will go to war for strategic reasons, including goods and their availablility.
[ACS_MarkG] [Congestion] This has been semi-answered before, but once again, for the record: Does the AIs treat each other the same way as they treat the player, or are they biased against the player (in a Regent level game)?
*** ACS_MarkG sets mode: -v krib
*** ACS_MarkG sets mode: -v snowhawk001
*** ACS_MarkG sets mode: +v Congestion
*** libredr has left #Apolyton
[Soren_Johnson_Firaxis] The AI, however, is plenty happy with fair trade deals. It is a good way to keep your neighbors friendly, in fact.
[ACS_MarkG] [[XSS]] QUESTION: When does the AI consider suing for peace, in most of my games the AI is just so stubborn i can't make peace with them and im stuck in mobilization
*** ACS_MarkG sets mode: +v [XSS]
[ACS_MarkG] [SITS1] Mike - any progress on the save game issue?
*** ACS_MarkG sets mode: +v SITS
[Soren_Johnson_Firaxis] Congestion: The AI is essentially blind concerning whether a particular opponent is a human or an AI. For example, there is an AI_declareWar() function which determines who the AI would like to sneak attack, and nowhere is that function do I make a call to is_human() to see if a specific civ is AI or human.
[ACS_MarkG] cool soren :D
[Congestion] Thanks! That'll shut a few people in the newsgroups up. :)
[Mike_Breitkreutz_FIRAXIS] I haven't had a chance to look at the saved games yet but I'll be looking at them later today.
[Soren_Johnson_Firaxis] XSS: hmm... the AI is supposed to take into account its recents victories and/or losses in determining if it wants to go to peace or not. I have seen it work, but perhaps I should look at it a little more.
[[XSS]] Thanks!
[Soren_Johnson_Firaxis] I meant "nowhere in that funtion do I
[Soren_Johnson_Firaxis] "
[Soren_Johnson_Firaxis] hi mike
*** ACS_MarkG sets mode: -v Congestion
[Soren_Johnson_Firaxis] the gang's all here!
[[XSS]] Soren_Johnson_Firaxis: How many pages of code do you estimate the AI code takes?
*** ACS_MarkG sets mode: -v SITS
*** ACS_MarkG sets mode: -v [XSS]
[ACS_MarkG] [Argeye1] Question: Does the AI ever start making actual "fair" trades? It seems to me they'll never ever trade unless the deal is tipped in their favor.
[Dan_Magaha_FIRAXIS] I'm considering leaving and coming back as RodLosAngeles =)
*** ACS_MarkG sets mode: +v Argeye
[ACS_MarkG] Dan, Rod has got himself a two weeks ban from the forums :)
[ACS_MarkG] wnat one too? :D
[Soren_Johnson_Firaxis] XSS: there are 5 main AI files (leaderAI, cityAI, unitAI, diploAI, gameAI), and they probably average around 3-4000 lines. I know unitAI is over 10,000
[Dan_Magaha_FIRAXIS] ouch!
[Argeye] I've had this problem with trades even after being the "nice guy" and giving away a tech for nothing in return to a Civ.. seems I can never get anything from them unless I give More in return :(
[ACS_MarkG] [Congestion] Here's another one: What was the resoning behind deciding not to let aircraft be able to sink ships?
[ACS_MarkG] [Wexu] FIRAXIS: Could we possible have more info about cities' defenders at the main screen in the future? Maybe a little S-letter for a air-superiority unit in city and small A-letter for a artillery unit? Something like that? It would help arranging defensive units to cities.
[Soren_Johnson_Firaxis] Argeye: well, that is a subjective question... the AI is more picky about its deals at the higher dificulty levels, but I don't think it ever want more than a 10-15% mark-up on what it considers to be a fair deal... there have been circumstances in which I have gotten the AI to give me 2+ luxuries in exchange for 1. It all depends
*** ACS_MarkG sets mode: +v Wexu
[Mike_Breitkreutz_FIRAXIS] Soren's AI code is responsible for the largest functino in the entire game....
[ACS_MarkG] [LoQtus] re: flexible AI. What if I'd want to change AI personality in the middle of a scenario? (FE WWII 'Parisian' France -] Vichy France). Is that possible?
[Soren_Johnson_Firaxis] Argeye: if you are the most powerful civ in the game, it can sometimes be hard to get fair trades...
[Wexu] now we can only see best defensive unit standing in the city and small lines which tell how many units there are.
*** ACS_MarkG sets mode: +v LoQtus
[Patrick_Dawson_Firaxis] Also, I have found if I have a high level tech the AI wants but doesn't want to research, I can get an awful lot of gold per turn for it.
[ACS_MarkG] mike, is that he is second under jeff briggs on the credits? :)
[Soren_Johnson_Firaxis] Mike: grrrr...
[Argeye] Gold per turn is broken and you can get however much you want from them reguardless.. is what I read on the forums anyway.. haven't tried to test it myself though :-/
[Soren_Johnson_Firaxis] LoQtus: that's an interesting idea. I mean, the AI does change dynamically anyway, but I assume you want a more scripted response. More fun for Mike, I guess...
[Wexu] could someone answer please?
[Soren_Johnson_Firaxis] Argeye: yeah, there is an integer overflow bug involving gold/turn. I CAN let everyone know that that is going to be fixed.
[Soren_Johnson_Firaxis] Wexu: what?
[LoQtus] thanks. yes, it should respond scripted. So Mike: any plans in that area? :)
[Wexu] Could we possible have more info about cities' defenders at the main screen in the future? Maybe a little S-letter for a air-superiority unit in city and small A-letter for a artillery unit? Something like that? It would help arranging defensive units to cities.
[Wexu] now we can only see best defensive unit standing in the city and small lines which tell how many units there are.
[Soren_Johnson_Firaxis] that's a good idea... i'll add it to the pile.
[Soren_Johnson_Firaxis] :)
[Wexu] thanks! :)
*** ACS_MarkG sets mode: -v Wexu
[ACS_MarkG] [Congestion] Here's another one: What was the resoning behind deciding not to let aircraft be able to sink ships?
*** ACS_MarkG sets mode: -v Argeye
*** Mike_Breitkreutz_FIRAXIS has quit IRC (Ping timeout.)
*** ACS_MarkG sets mode: -v LoQtus
[ACS_MarkG] though luck locutus :)
*** ACS_MarkG sets mode: +v Congestion
[ACS_MarkG] [[XSS]] QUESTION: Tell us something funny that occured when programming the AI or the overall game.
[Congestion] What was the reasoning behind not allowing aircraft to sink ships?
[Soren_Johnson_Firaxis] Congestion: game balance. We felt that air units were too powerful in the previous SMAC/Civ games, so know you need at least some sort of a navy in order to sink other naval ships. I should note, that naval ships can't fire back, which evens it out somewhat
*** ACS_MarkG sets mode: -v Congestion
[ACS_MarkG] [ChrisTheCat] QUESTION: How does the AI prioritize use of Workers?
*** ACS_MarkG sets mode: +v ChrisTheCat
*** Patrick_Dawson_Firaxis has quit IRC (Ping timeout.)
[Soren_Johnson_Firaxis] XSS: well, at one point we had a bug which allowed the AI to think it could sail from the north pole to the south pole even though it actually couldn't, so the result was that we saw all sorts of AI ships hanging around the north pole and couldn't figure out why. That was a fun one...
*** Dan_Magaha_FIRAXIS has quit IRC (Ping timeout.)
[ACS_MarkG] lol! next question by ChrisTheCat above
[ACS_MarkG] there goes the firaxis connection again :)
[ChrisTheCat] I'm asking about the AI's workers, not my workers on 'automate'
[ACS_MarkG] i think it's the same
[ACS_MarkG] right soren?
[ChrisTheCat] I've had several instances where I had to send my own workers to another continent to build roads to the AI's resources in order to get the AI to trade them with me...and it seems they run about without doing much a lot of the time
[Soren_Johnson_Firaxis] wow, that was too long
[Soren_Johnson_Firaxis] maybe you can see the resources and the AI can't...
[ChrisTheCat] no, I gave him the techs too :)
[ACS_MarkG] [MadLordSnapcase] QUESTION: In your experience, how well does the AI respont to wild changes of the game rules, say a multiplication of every numerical value by three?
*** ACS_MarkG sets mode: +v MadLordSnapcase
[Soren_Johnson_Firaxis] well, once they get the techs, it will take a few turns for a worker to free up and make its way to the resource...
[ACS_MarkG] [[XSS]] QUESTION: Did you "program til you drop" or did you have a working schedual during the making of Civ3?
[Soren_Johnson_Firaxis] or maybe the AI already has access to the resource (but only one) in which case it isn't a high priority...
[Soren_Johnson_Firaxis] Mark: yes, the AI worker AI and automare is basically the same...
[Soren_Johnson_Firaxis] XSS: um, no comment... I'll just say that all my CD's are at work.
[MadLordSnapcase] Crazy value changes?
[ACS_MarkG] [Sunstone11] In the forums we found out, that all AI players behave the same, in one point : EXPANSION. They ALL expand like hell in the beginning. Couldn´ t you implement a little more variety, esp. concentrating on a few big cities ?
*** ACS_MarkG sets mode: +v Sunstone2
* ChrisTheCat thinks that the AI should consider scarcity of resources and potential profits from trading them when sending workers to build roads then...
*** ACS_MarkG sets mode: -v ChrisTheCat
[Soren_Johnson_Firaxis] ChrisTheCat may be right.
[Soren_Johnson_Firaxis] Sunstone: well, there is some variety... I know that some AI's will aim for culture sooner, but expansion is very important. It seemed like the main problem with the previous SMAC/Civ AI's was that they didn't expand fast enough, so one of my main goals was fixing that.
[MadLordSnapcase] So, again, if you missed my question above: How robustly will the AI handle extreme values in the editor? Say 30 instead of 3 hit points per unit or extreme conflict between government types.
[ACS_MarkG] [SITS1] Question - how can I get the AI to stop attacking another AI? Also if I have a mutural protection pack with two civs and they attack each other how does the comp decide which one I will defend?
*** ACS_MarkG sets mode: +v SITS
[Sunstone2] yes but the players have to do the same : EXPAND otherwise you´ll be stomped.
[Soren_Johnson_Firaxis] Snapcase: well, there is only one way to find out. I don't think hit points will screw with the AI. Changing the standard government fields should be fine too.... although I can't say that the AI worried about some fo the more obscure gov modifiers like conversion adjustment.
[ACS_MarkG] i have to say that mutural protection pack are very tricky. you should be very carefull with whome you agree such a thing :)
[MadLordSnapcase] What about the obvious "AI control" modifiers in the Civilizations screen? Does the AI respond to those well?
[ACS_MarkG] [Argeye1] I've got a question.. not for the team.. for anyone here that can tell me :) What is better on wheat/cattle ect.. a mine or irrigation? My automated workers take too much time changing from one to another sometimes =/
[Soren_Johnson_Firaxis] SITS1: Good question... one way is to attack one of the civs since they don't like being in multiple wars unless they have to (via MPP or Military Alliance)...
[Soren_Johnson_Firaxis] Snapcase: do you mean the build priorities?
[MadLordSnapcase] For example.
[Sunstone2] it´s an "expand as fast as you can- race" in the beginning. AI building towns in your territory. Always !
[SITS] Thanks - another question - how does the AI use Shakespeare's Theatre? With units not being supported by a city how does having 8 happy citizens in one city help matters?
[Soren_Johnson_Firaxis] It should respond well to those. The "often" flags will simply double the AI's value for those types of units or buildings. The never flag will mean that it will never build them (although sometimes there is overlap, so it might require clicking multiple flags to prevent the AI from building a Harbor...)
[MadLordSnapcase] Sounds good. Thanks, Mark, you can devoice me now.
*** ACS_MarkG sets mode: -v MadLordSnapcase