Announcement

Collapse
No announcement yet.

Conversations with Richard Myers (Azmel)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    quote:

    Originally posted by WesW on 02-06-2001 04:20 PM
    Here are a couple of questions that Harlan and Locutus have asked before, and that I would like for us to work on.

    > > The responses to your questions brought a couple of questions into my mind.
    > > First, what is the scale of trust and attitude towards other civs, and second,
    how can one check to see exactly where the other civs are on these scales?


    But at any given time, there are concrete numbers for
    each civ, not just general tendencies. For instance,
    Civ2 might have a trust of 153 and attitude of 203 on
    turn 5. So my questions are what are the ceilings and
    benchmarks for those numbers? For instance, maybe you
    can have a max of 1000 attitude, and anything over 800
    means the AI wants to have peace with you. But who
    can say with the info we've got? We're just groping
    around in the dark. And my second question is how to
    know exactly where each civ stands at any given time
    on all of these. Instead of getting a vague notion
    that a civ is "wary" of you, as a scenario maker I'd
    want to know what the concrete number was. In the
    pre-release, there was a debug version of the game
    that had extra tools allowing one to find out stuff
    like this, but now they're gone.

    Wouter


    Both attitude and trust are on a scale from 0 to 1000.
    The break down is as follows:

    0 - 100, hot war (Goals with TargetOwner: HotEnemy)
    101-300, cold war (Goals with TargetOwner: ColdEnemy)
    301-700, neutral (Goals with TargetOwner: Neutral)
    701-900, friend
    900-1000, allied

    The first three also say which goals will be pursued against foreign nations that you have a particular attitude toward. For example, you'll only do HotEnemy goals against foreigners you have a regard of 100 or less with. Going to war will also induce an automatic hotwar regard.

    Trust is on the same scale. An AI will not sign certain treaties or agreements unless trust or regard is above a certain point. That can be redefined using your own diplomatic response logic.

    A scenario writer can use the slic functions to get teh absolute number using:

    GetPublicRegard
    GetEffectiveRegard (adjusted for being at war)
    GetTrust

    quote:

    Originally posted by WesW on 02-06-2001 04:20 PM

    Here's a pipedream: maybe he could send us the final
    debug version of the game, if he still has it?

    Wouter


    Of course I have this code on our servers at work, but sending it to you would certainly violate all sorts of non-disclosure documents I signed. Infact, I have no doubt that armed marshals would be at my door in no time to serve me papers it this got out.

    Personally though, I think it would be good for CTP as a brand and Activision as a company to make this code available in some way. Perhaps you could start a grass roots effort to open source game code after some number of years of release. The folks at Loki arranged a "hack-a-thon" at LinuxWorld (?) for CTP1 inwhich a group of people off the street could sit in a specially network-isolated room to look and modify the code. Maybe somone can talk Activision into doing that again. I wouldn't hold my breath, but who knows.

    quote:

    Originally posted by WesW on 02-06-2001 04:20 PM

    Do you have any idea of what the effect would be if I used SLIC to clear
    every stacks orders every turn? As I see it, this would force the AI to
    re-analyze the situation every turn and give all its units new orders every
    turn and thus all AI actions would be based on the latest information. I
    realize this will probably make the AI slower but if the AI also becomes
    smarter then this might be worth it. Would the AI actually become smarter?

    Wouter


    This might make the AI smarter in some situations, but would certainly make it slower. You might see some oscilation behavior too, so I'd at most clear the orders every few turns, maybe every 3 or 5; not every turn. Maybe clear every third stack every third turn to spread out the time hit. It's a very good question though and selectively clearing the orders for AI units under situations other than running into an enemy would be a very good idea. Adding more logic to this part of the AI was always part of the plan, but not fully implemented due to time contraints.

    -- Richard

    Comment


    • #17
      quote:

      Originally posted by Alpha Wolf on 02-09-2001 03:52 AM
      So it should also be possible to force the barbarians to use the barbarian strategy every turn even if they want to become civilized?

      I'm with Wes about the the fuzzy eyes. I thought I understood how changing the maxeval and maxexec affects game play even tho I didnt know the exact details behind it. But the defend example has thrown me. Say the AI has a city that due to whatever reason is lightly defended. I'm moving towards it with say 5 units. Between me and the city are 3 stacks (4,2,5 units). Is Richard saying that only one of those stacks will move to defend the city?




      No. There's some confusion here. It will match with all three stacks (4,2,5) and assign units from each to defend the city until the level of force matching has been reached. If it only needed the first two armies, then the third one can be assigned to some other goal.

      -- Richard

      Comment


      • #18
        quote:

        Originally posted by Locutus on 02-08-2001 01:35 PM
        possible some of this is incorrect. If anyone (esp. Richard himself) can correct me where I'm wrong, that would be very helpful.




        From my reading, I'd say you've got it right. Thanks for putting in the time to sus it out. If I had more more time I'd make up a spread sheet that shows how this works, but your description goes a long way to making things clearer.

        quote:

        Originally posted by Locutus on 02-08-2001 01:35 PM
        .
        .
        .
        least one turn (maybe they'll fortify). Another option might be that they'll still be available for other goals, like Harassing, but if that is the case I don't quite see why Richard presents this as a problem (it's not ideal but not really a problem either, if you ask me).


        In your example, if in fact all six attack goals had higher matching values for your armies than any other goals and could not be fulfilled, the armies matched against those goals would just fortify that turn. Though not ideal, it rarely happens with the default settings.

        In a degenerate scenerio they wouldn't be available for harass goals unless some of the armies matched a harass goal before an unfulfillable attack goal. I'd like to reiterate that having six attack goals that can not be fulfilled is rare; that the match values for those attack goals should be higher for every army than any other goal is rarer still. Something to keep in mind though as you make changes to the strategies.txt file.

        -- Richard

        PS> As a side note, this AI system is essentially the same as that used in CTP1, Dark Reign 1 and parts of StarTrek: Armada. We can thank Dr. Ian Davis for the original algorithm; I don't know where he got it from originally though. Ian has his own company now called maddoc software.

        Comment


        • #19
          Thanks for your answers, Richard. They should be very helpful to us in our mod efforts.
          Richard also sent me replies to my last two letters to him, which I have pasted below.

          As for my text questions, one that comes to mind is from the Goals.txt.
          What does the "PowerBonus" flag do? What does it read and what effect does it have on the AIs decisions? This is the one thing from that file that I still can't figure out.

          Richard: the PowerBonus would be the opposite of the ThreatBonus. You if the goal is in the cell with the largest amount of "allied" power (not enemy) then it gets the full powerbonus. As with most of the other bonuses, it's a normalized value so cells with less than the highest allied power get less bonus.


          Also, in the explanation of the Personalities.txt in the modification section, there is this explanation of the conquest flag:

          Conquest -
          Sets the desire to resolve disputes through war or diplomacy. Valid
          values: Passive, Neutral & Lawful.

          Should the Lawful setting actually be Agressive?

          Richard> Yes, that would be a typo. My own description for that trait is:
          "This describes the liklihood that the AI will attack. This can also be considered the disposition of the personality."


          That's all I have for right now, though there are a number of things that I posed in the forum thread, and I have not really gotten into the diplomacy aspect of the game yet.
          Thanks for your help. I know it must have been hard reading all the negative things said about the AI in the forums, but with any luck we can change all that in the coming weeks.

          Richard: Thanks for the questions Wes! Some of that negative stuff on the boards does sting, but in general I take it all with a grain of salt. I know that people wouldn't be so upset if 1) they didn't like the game to some degree, otherwise they wouldn't care and 2) there wasn't some grain of truth to their complaint.

          -- Richard

          Hi Richard.
          Have you had a chance to scan the AI forum recently?
          Anyway, I was looking through the goals.txt and Orders.txt and found some more questions for you.

          1)What is the difference between the Attack and Harass goals? Also between Harass City and Siege? They seem like the same thing to me.

          Richard: Notice that the Attack and Siege goes have different force matching than the harass goals. Harass goals have lower priority and are used to throw units at an enemy to keep them on their toes until a large enough force to attack or seige has been created.

          2a)In the Orders.txt, I think the TargetPretest for Injoin and Sue are mixed up. The Target for Injoin is Enemy Trade Unit, and the Target for Sue is Enemy City.

          Richard: Yikes! That could cause problems all right. I tried it out switched and I noticed that my lawyers did not injoin cities unless I swapped those values. I assume the same is true for sue'ing enemy trade units.

          Apolyton note: I have corrected this for the beta.

          2b)Also, for Sue Franchise, the Unit Pretest is "CanSueFranchise". Could this not be changed to "CanSue", just to simplify things? I didn't come across the "CanSueFranchise" flag in the units text.

          Richard: The difference is that you sue francises to get rid of them from cities, which is different from sue'ing to destroy a trade unit. My guess is that CanSue will work too though.


          2c)I have made most all unconventional warfare units able to be sued, as a way of destroying them without going to war. Is there anything wrong with changing the Sue order's Target Pretest to "Enemy Special Unit"?

          Richard: No, that should be fine. This should also enable this option for players on their pulldown menu.

          2d)Were you the person supplying Mark with the Data File Definitions? If so, we could really use one for Units.txt, and perhaps one for Orders.txt as well.

          Richard: I'm not the expert on Units.txt, or Orders.txt except for the pretests. Sorry. I can probably answer specific questions about both though.


          3)Is there something wrong with the Paradrop order? Among other things, the Target Pretest for it is Enemy City, which would seem to indicate that the AIs would only Paradrop into unoccupied enemy cities.

          Richard: The paradrop command should let the AI unload paratroopers from planes directly into occupied enemy cities. I don't remember off hand how well this goal was working.


          4)Many people have complained that the AIs will load troops onto Cargo Helicopters, and fly into enemy territory, but they will never unload their units. Is there anything in the Orders.txt, or some other text file, which might be able to rectify this?

          Richard: I'm sorry, but this is a difficult issue to fix. There might be some way in SLIC to force helicopters to unload, but when to do it is tricky.


          5)Finally, I looked at the Data File Definitions for the Personality text, and many of the Valid Values listed do not match the game values. Could you look this over, and perhaps give Mark the correct info?

          The values should be:

          // This describes the extent to which an AI will send out units to explore
          Exploration: Wide, Medium, Minimal

          // This describes the magnitude of an AI's empire and the speed to
          // which it will expand
          Expansion: Maximum, Average, Minimum

          // This describes the degree to which the AI will focus on
          // scientific discovery and the area or branch of specialization.
          // As well as the primary motivation for diplomatic interactions.
          Discovery: Scientist, Military, Economic, Ecotopian, Diplomatic

          // This describes the liklihood that the AI will attack. This can
          // also be considered the disposition of the personality.
          Conquest: Agressive, Neutral, Passive

          // This describes how likely the AI will be to violate agreements
          // and follow through on threats. It also specifies how the
          // regard of an AI will be changed by the dishonest actions of
          // others.
          Trustworthiness : Chaotic, Neutral, Lawful

          // This describes in general terms the methodology used by an AI
          // to accomplish its goals and whether or not the AI cares if its
          // actions cost the regard of other empires. Evil actions might
          // include killing settlers, the use of slavery and the first
          // strike launch of nuclear weapons. The regard consequences of
          // an evil act will be less for an evil empire than a neutral or
          // good one.
          Alignment : Evil, Neutral, Good

          // Send this greeting if stronger militarily
          StrongGreeting: a stringID

          // Send this greeting if weaker militarily
          WeakGreeting: a stringID

          // Follow through percent
          ThreatFollowThrough: a number

          // Description show in Intelligence Details
          Description: a stringId

          Comment


          • #20
            Richard,
            Thanks a ton for taking the time to read my explanation and reply to it. Good to know I interpreted your explanations correctly (Good to know that my usefulness to the CtP(2)-community isn't limited to being a SLIC-guru alone ). One question though:

            quote:

            In a degenerate scenario they wouldn't be available for harass goals unless some of the armies matched a harass goal before an unfulfillable attack goal.


            The way I had thought it worked is that if even one attack goal has a higher priority than the highest harass goal, all attack goals would be force matched before any harass goals would be. In this sentence you seem to suggest however, that goals are executed by priority, regardless of their type. Example:

            Attack Goal 1 (A1): Matching Value 410,000
            Attack Goal 2 (A2): Matching Value 390,000
            Harass Goal 1 (H1): Matching Value 405,000
            Harass Goal 2 (H2): Matching Value 400,000

            I originally thought that the order in which these goals would be executed should be A1, A2, H1, H2. Now you seem to suggest the order should be A1, H1, H2, A2. Which is the case? The latter seems the more logical situation to me but that's not how I originally understood it.

            Thanks again,

            Wouter
            [This message has been edited by Locutus (edited February 20, 2001).]
            Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

            Comment


            • #21
              Hi Richard,

              I noticed that you have the Activision Title again. Does that mean that you are working for them again, or is it just a snaffu in the forums? Also, if you are working for them again, does that mean that Activision has reconsidered their support for CTP2?

              Regards,

              Timothy Pintello

              Comment


              • #22
                What would it take to replicate the CTP AI in CTP2, given that the same engine is used?



                ------------------

                Comment


                • #23
                  Hey Wes,

                  I can't seem to find your original questions to Richard. Would you please direct me to their location?

                  Thanks!
                  "Living thing = autonomous agent = autocatalytic molecular set capable of completing a thermogenic work cycle" -- Stuart Kauffman (paraphrased)

                  Comment


                  • #24
                    When Richard initially offered his help, I sent him the AI files like the strategies.txt that I had altered, and asked him to look those changes over. I then asked him a few specific questions.
                    Richard replied with selected comments on my text changes. Those are the first few comments you see above. The letter I sent replying to his reply is what I pasted in above.
                    My initial questions to him are included in the paste, but since his opening remarks are comments on my text changes, there are no initial questions for them.

                    Comment


                    • #25
                      quote:

                      Originally posted by Locutus on 02-20-2001 03:25 PM
                      Richard,
                      Thanks a ton for taking the time to read my explanation and reply to it. Good to know I interpreted your explanations correctly (Good to know that my usefulness to the CtP(2)-community isn't limited to being a SLIC-guru alone ). One question though:

                      The way I had thought it worked is that if even one attack goal has a higher priority than the highest harass goal, all attack goals would be force matched before any harass goals would be. In this sentence you seem to suggest however, that goals are executed by priority, regardless of their type. Example:

                      Attack Goal 1 (A1): Matching Value 410,000
                      Attack Goal 2 (A2): Matching Value 390,000
                      Harass Goal 1 (H1): Matching Value 405,000
                      Harass Goal 2 (H2): Matching Value 400,000

                      I originally thought that the order in which these goals would be executed should be A1, A2, H1, H2. Now you seem to suggest the order should be A1, H1, H2, A2. Which is the case? The latter seems the more logical situation to me but that's not how I originally understood it.

                      [This message has been edited by Locutus (edited February 20, 2001).]


                      Wouter, the latter ordering is indeed correct (A1, H1, H2, A2). Remember that each match between a particular army and goal generates a match value. As the matches are executed, the army in the match is assigned to the goal. When a goal has sufficient armies assigned, then the goal is 'executed' and the armies assigned actually begin moving toward the goal.

                      Goals can be interleaved because the matches are sorted based on their match utility, but goals (like defense) that have very high base priorities
                      will probably all sort to the top of the list together.

                      Hope this helps,

                      -- Richard

                      PS> Sorry for not being around for awhile, I was out of town and had a cold that knocked me out for awhile.

                      Comment


                      • #26
                        Yes, this helps a lot, thanks again.
                        Administrator of WePlayCiv -- Civ5 Info Centre | Forum | Gallery

                        Comment


                        • #27
                          Richard

                          Welcome back and thanks for your help in answering our questions; it's greatly appreciated. So I've got some more for you.

                          The first one is of largely theoretical interest. This AI is so neat (that's a comment you don't hear very often, eh) that I've become obsessed with trying to understand how it works.

                          1) In his discussion of how the AI matches units with goals, Wouter gave as possible goals "Seige Liverpool" or "Attack army near London". Is it really this specific, i.e., does the AI evaluate targets on a cell by cell basis? (I didn't think my computer was that good.) In CTP1 there were some map grids in strategic_AI_config.txt, with cryptic comments by the Mad Dr I. suggesting that they were used by the AI to evaluate threats. There's no similar file in CTP2 but I guess the same thing is going on. Is it?


                          2) Several times above you've mentioned adding in new strategies. Not a lot of people have tried this yet so could you elaborate a bit on the discussion in AI Customization of the various strategic state events and functions. There's an incredible ammount of information crammed into a very small space there and I, for one, don't think I've grasped it.


                          2.1) We can use the INIT_STRATEGIC_STATE event and the SET_STRATEGIC_STATE function to give a player either a different existing Discovery strategy or a completely new Discovery strategy of our own. Is it possible to use this combination of event and function to give him, say, both a new Discovery strategy and a new Start strategy? (I couldn't get it to work.)


                          2.2) The CONSIDER_STRATEGIC_STATE function has the form:

                          CONSIDER_STRATEGIC_STATE(player, priority, StrategyDB(index),-1,-1,-1),

                          where the three -1's are from an example of how this is used in one of the scenarios. What are they for? More importantly, the examples of priorities I've seen range from 500 to 9999 and you mentioned above to Wes that he should use 1000. What's the total range and is there a recommended usage for different types of strategy?


                          3) I've been experimenting with these functions and just to see if I understood how the strategies, and buildlists they contain, were working, I tried to introduce a new default discovery strategy that completely focused on building buildings. It had limited success up to turn 80 (co-incidently ?, the end of ancient or opening gambit time in CTP1). At this point the AI insisted on turning out tons of military units, in spite of the fact that I thought I had totally incapacitated it's ability to do this. The details are tedious, but could you give us some hints on what we have to do if we want to add new BuildListSequenceElements? In theory, I guess, this is just like adding a new goal but the results should be more easily observable. And like I say, when I tried it I didn't get the results I expected.

                          3.1) In particular, are the priorities assigned in the BuildListSequenceElements just a straightforward linear ordering or does this involve complications of the goal matching magnitude that we saw above?

                          3.2) I assigned the BuildListSequence that I wanted to emphasize to the Top 1.0 ProductionCities and the others to 0% of whatever they had previously been assigned to. But this doesn't seem to work and I can't see why not. Incidently, when I put BuildListElement { Infrastructure } at the top of some BuildListSequences, I end up with empty build queues. Surely this can't be working correctly.


                          4) Finally, I have a vivid recollection of seeing a post from St. Swithin where she mentioned some codeword that you could type into the chat screen and get the AI to take over for 100 turns. But I forgot to record it and now can't find it anywhere. Does such a thing exist?

                          Thanks,

                          Peter

                          [This message has been edited by Peter Triggs (edited March 29, 2001).]

                          Comment


                          • #28
                            All i gotta say is......

                            Excellent! Considering the AI is hoplessly incapable of doing anything right

                            -------------------------------------------------
                            'Return CTP2 and then on to more important matters like Civ3'

                            Comment


                            • #29
                              We know thats all you've got to say, and you've said it in a hundred different ways in a hundred different posts - Point Made!. If we don't know how it works, it can't be fixed.

                              Concrete, Abstract, or Squoingy?
                              "I don't believe in giving scripting languages because the only additional power they give users is the power to create bugs." - Mike Breitkreutz, Firaxis

                              Comment


                              • #30
                                quote:

                                Originally posted by Immortal Wombat on 04-18-2001 06:37 AM
                                We know thats all you've got to say, and you've said it in a hundred different ways in a hundred different posts - Point Made!. If we don't know how it works, it can't be fixed.





                                Your probably the only 'Ignoramoose' here who actually enjoys playing them.

                                Many of us are still mad at them

                                I complain when I want and where I want so mind your own business you twit

                                Comment

                                Working...
                                X