Announcement

Collapse
No announcement yet.

Diplomacy Model v1.1

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

  • #61
    LGJ: That sound like a pretty reasonable way to handle it. I knew that it wouldn't be tough, I just felt that we needed a more sophisticated model than one where Civ's merely "forgot" past transgressions, regardless of differing ideologies. We could also set it up where certain government types are often at a higher level of distrust than others. For example, communism and democracy/capitolism. Certain religions are hostile to each other as well. This should all have an effect on the diplomacy between states.
    Paul

    Comment


    • #62
      Since you reached some agreement on your thread and since you're considering an "ideology" concept within diplomacy, I'd like to say that I'm preparing a proposal to include "ideologies" in the govt. model; something it lacks of right now.
      I reached the idea of ideologies through a different perspective than you have, but now I'm glad it could also be needed in the diplo model.
      I'll let you now about my ideology proposal when it's finished and mark has reviewed it.

      Anyway, IMO more discussion is needed concerning interactions between models. I don't know if I'm rushing things or it's time already to open a new thread on the subject. What do you think?

      Rodrigo

      Comment


      • #63
        Rodrigo:

        Agree we need to talk more about connections between models. There are lots of them I have in my head, but they haven't made it into the documentation in a coherent way. Go for it!
        Project Lead for The Clash of Civilizations
        A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
        Check it out at the Clash Web Site and Forum right here at Apolyton!

        Comment


        • #64
          This is just an idea that I was thinking about, Will you be able to negotiate with the "barbarian" cultures? I think it would be really interesting to make them more than just someone to beat up. If you could negotiate with them they would be more like semi-civs, which to me is better. Another question is, can they learn? Will they be able to gain technology (somehow) or just stay static. To me the former is much better.

          Comment


          • #65
            We've already got the skeleton for negotiating with barbarians cultures in the code! It's definitely something we want to do. However, because of their de-centralized nature, you won't be able to negotiate with them in exactly the same way as you do with civs. But with the correct application of lubricating factors like threats, money, and the other usual factors, you can try and get a culture to behave in a way that you would like it to. It will be difficult to be at peace with all members of a culture, since each square basically stands on its own. So, even if you are nominally "at peace" with them, you might get an occasional raid or hostile action from them, simulating that not every single square is going to behave the same way. Your diplomatic state will basically represent the average diplomatic state with a collection of tribes/small states.

            Basically, we are going to make the "cultures" as close to civs as we possibly can within the constraints of how much time we can devote to them in terms of AI etc.. Barbarians cultures will also be able to "go civ" if they have sufficient cohesion, and are presented with a large enough outside threat. The plan is that they can learn also. They will absorb technology by diffusion as well as any civ. Mostly, what they'll lack in the technology area is a strong central guiding force that can direct the technology.
            Project Lead for The Clash of Civilizations
            A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
            Check it out at the Clash Web Site and Forum right here at Apolyton!

            Comment


            • #66
              This brings up another point i wanted to make and that is that not every square should have a civ/culture to begin with since in ancient times there was much distance between places. Basically all one would need to do to take over this square is send a unit there to occupy it for a turn. This doesn't mean that there aren't any people there, just no type of gov of any real power.
              Which Love Hina Girl Are You?
              Mitsumi Otohime
              Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.

              Comment


              • #67
                LGJ:

                Well, I think whether barbarian cultures are already present in area before the civilizations get there is somewhat dependent on where you are on the map, and what the time period is. I guess it really depends on what you mean by "ancient times". Anyway, we can figure that out at a later date. I already have a provision for squares not having any people in them which we could easily use for your suggested alternative.

                [This message has been edited by Mark_Everson (edited December 24, 1999).]
                Project Lead for The Clash of Civilizations
                A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                Check it out at the Clash Web Site and Forum right here at Apolyton!

                Comment


                • #68
                  Diplomacy UI

                  One fairly major part of the Clash diplomacy model not yet implemented is any kind of Player Interface. I need your help with this.

                  I've knocked up some possibilities here. These are really bad (for my preference see point 3 below). Comments? One proviso: you can't tell me they're crap without saying why

                  Some quick thoughts...

                  1) Do we want the blood 'n guts of any dip inferface to be 'Us v. Them'?

                  2) A biggie - the Governor: if we want to give players the option to avoid diplomacy in any depth, is a 'city governor'-type interface the way to go? They were my first thought as they've been pretty much tried and tested... unfortunately ususally with mixed results. I was relying on the fact that dodgy governors extend from a dodgy AI, and as our AI will be a bit special...

                  3) The other biggie: General layout/screens available - what do players want access to and how? What options do you want available? And how do we make it 'nice' for you to use? Civ:CTP had a woefully poor diplomacy UI IMO, as it felt so shallow - I preferred the SMAC approach, with more options, all accessed via 'conversation'. Left to my own devices I'd eventually head down that road myself, it just feels nicer. Maybe this is too clumsy/inefficient? Are the majority in favour of a more slim-lined approach? Any suggested alternatives?

                  4) Maybe a more minor point - as the mockup-ups should show, I'm imagining a diplomacy interface with no numbers whatsoever, so if your Trustworthiness drops to 20 on a 100-point scale (or indeed 2 on a ten-point scale, 1 on a scale of four, however we decide to implement it...), you don't see the rating as 20%, but as titles like 'Untrustworthy' or 'Despicable b*stard'. Again, does this seem like the way to go? If so, I'd welcome suggestions for more titles. Maybe even make them age/civ dependant eventually?

                  And a related issue:

                  The Reputation Set

                  What comes under the umbrella of a Civ's reputation? Glak's concerns are valid - what will influence each variable, why, and how?

                  A 'for-instance'-

                  A basic value 'Reputation' dependant on 4 variables:

                  [you might need to resize your browser window to see this table correctly]


                  VARIABLE WHAT DOES IT MEAN? HOW IS IT DECIDED?
                  Trustworthiness Can we sign a treaty with Have we had pacts with them
                  this Civ and expect them to before? Have we heard of
                  keep their word? them breaking alliances/treaties
                  with other Civs? Why?

                  Aggression How quickly are they Have they attacked any Civs/Us
                  prepared to start a War? before? How often? Why?
                  Maybe: are they prepared
                  to see it through? Re:
                  offensive aliances etc.

                  Competence Have they mis-managed their What uprisings/revolts/
                  own Civ? Lost any battles general unhappiness is there
                  they've ever fought? Do in the Civ? What ratio of
                  we really want these guys battle wins:losses? Why?
                  in our alliance?

                  Tyranny Not completely thought out: How often military might is
                  how have they dealt with used to suppress the proles?
                  social crises in their Civ? Why?


                  You might have noticed the repeated 'why' there - I think it's pretty important to keep an eye on the context of these things. Again, comments?

                  Mark: Comments on Diplomacy AI to follow...

                  Comment


                  • #69
                    Darren:

                    I don't have time to take a stab at every question right at the moment, but I will try to give you my take on some of the more important things you are discussing. I'll take on the overall interface first.

                    I think the general interface philosophy that were heading toward, is to allow the player to put together the interface they would like out of a variety of functional pieces. We have to discuss this further, to see whether this overall goal is achievable. But its flexibility is very attractive. So, for instance, if the player always wants a small color-coded map of all the civs and cultures they have diplomatic relations with in their main diplomacy interface, they should be able to have it. Additionally, as a positioning thing, an amateur product has little hope of matching the attractiveness of a contemporary game interface, but IMO making the interface more Functional than those is easily achievable. So, I think the goal to strive for is to build up the interface out of a bunch of little functional pieces that can then be assembled in any way by the player. There will Of Course be a default version of every interface. If anyone would like to enter the discussion on this very general topic, go to the Overall Clash Interface Design thread. Darren, you already no doubt know about it, since you started the thread!

                    To my mind, there's no question that we need a hierarchical interface. The "top of the pyramid" should IMO, give an overview of the diplomatic state of this civ with respect to every significant rival, and also an overview of any major diplomatic initiatives that the AI governor has been tasked with. According to current plan, the governor will even have a face associated with him or her that should fit in there somewhere. At least that's what I want in my top-level interface. From that we can take away several pieces that should be available for the interface.

                    The first would be an area to show something like the overall diplomatic stance and relationship with each of the 10 largest civs we deal with. Ideally this would show the current diplomatic level, everyone's relative military and economic power, the recent direction in which the relationship is heading, and have an indicator to show whether the AI governor is tasked with a specific initiative with regard to that civ.

                    The second important piece of the overall interface would show the governor character for the diplomacy AI, the top few things they are pursuing, and perhaps a short statement from the character on something the AI feels strongly about. I think the stuff that you included in your governor box is generally reasonable. However, I think statements like "maximize land" are to be avoided. Instead, for each set of mutually exclusive things there should be the equivalent of a set of sliders ranking how important they are to the player. That's because things like "maximize land" are always subject to constraints like "maximize the land I can militarily defend" or "maximize land of strategic importance" etc. it is a sign of the other games extremely poor AI and design that they can simply say "maximize x" without any caveats.

                    The third, and probably least required, would be some sort of map widget that shows either the countries in their civ's color, or can be colored to show alliance blocks and such.

                    I personally think things like "us vs. them" is too limiting for the high-level interface of a game with the broad scope of Clash. IMO the us vs. them box (which we Do need) should be accessible by clicking on a particular civ in the high-level interface that shows overall diplomatic stance with each of the top 10 civs we want to deal with.

                    I don't want to imply that I think my suggestions are necessarily the Right way to go. But I do feel strongly that the customizable interface built out of GUI widgets Is the way to go. If that's the case and others agree, then all we need to do is have a widget available to allow the player to do anything that We end up doing in playing. And all, or at least most, of the widgets need to be resizable. I think that given the game will take many hours to play, people will want the flexibility to be able to arrange an interface that suits their style of play and tastes. I agree with you that the conversational interface like civ is probably the way to go for most people. If we can also give experienced players shortcuts to avoid the chatter, then they will have the best of both worlds. But I think starting with a pure conversational interface is the way to go. We can worry about the details of the shortcuts later.

                    We are all new at this, and I think the only thing we can be sure of is that we are going to make Big mistakes along the line. That's all the more reason to keep things flexible, so that if one particular bit doesn't work, we can just scrap that and move on with a better solution.

                    The above applies both to the interface, and also to the questions you are asking about the reputation model. Your initial ideas look reasonable to me! But who is to know for sure what we're going to need to get the "flavor" correct. For that reason, I think you just need to make the Reputation class flexible, knowing that it is going to have an unknown number of subelements. I like your idea of Competence, I hadn't thought of something like that, but it is Extremely important when selecting an ally! I think the preliminary sketch of tyranny is better handled through the ideology and-on to the government model at this point. Additionally, yourfirst three components of Reputation would be fairly easy to implement in Clash as it stands now, so those three are the ones I'd go with for the first version.

                    Hope this has been of help! Just keep us posted on what else you need, always happy to critique suggestions ;-)
                    Project Lead for The Clash of Civilizations
                    A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                    Check it out at the Clash Web Site and Forum right here at Apolyton!

                    Comment


                    • #70
                      Mark: excellent feedback, thanks!

                      Re: 'give an overview of the diplomatic state of this civ with respect to every significant rival ... this would show ... everyone's relative military and economic power'.

                      In what way would this information be presented? Power-graph style? I know I've read stuff on this before, sorry...

                      re: 'direction of relationship'. You mentioned the history side of Clash a few messages back (up there! See it?), promising to let us know your thoughts... might be a nice time to make them public? I want Civs to be bloody-minded and hold grudges!

                      Re: Reputation & Flexibility - couldn't agree more. At this stage I was just going to dump a pool of methods into the Rep. class dealing with each variable, but which only returns a single float for Reputation.

                      ie. Reputation.class would set the numbers for Aggression/Trust etc., but the AI just calls Diplomacy.getReputation() or even Diplomacy.getReputation(Civ myciv, Civ otherCiv), which pull a single figure from the Civ's Diplomacy object, say an average of however many variables there are. It'd let us remove variables as we grew sick of them, or add new ones with no hassle.

                      eg. MyCiv has Aggression 20, Trust 50, Competence 80 as far as neighbour OtherCiv is concerned. Diplomacy.getReputation(myCiv, otherCiv) returns 50. It's amazingly crude - if we had some kind of AI value-weighting, we could overload it to add functionality:

                      It should be possible to call getReputation(Civ myciv, Civ otherCiv, String reputationElement, int level)

                      eg. Say OtherCiv was biased against militant Civs, Diplomacy.getReputation(myCiv, otherCiv, AGGRESSION, 20) could be called to negatively weight the Reputation in some way... the Diplomacy object looks at Reputation.getAggression(myciv, otherCiv) and if it exceeds the specified level, it subtracts Aggression from the total rather than adds it... or use getDiplomacy(Civ myciv, Civ otherCiv, String reputationElement, int modifier) to multiply/divide the Aggression element by modifier.

                      LGJ: I was just thinking of a raw ourCasualties:theirCasualties ratio for use in Competence. Maybe I should modify that in some ways... according to the size of the Civ or size of the army, maybe? Make losing more advanced units more costly to Competence? Also, there would be civilian casualties to take into account too, now that I think about it, rather than plain no. of units lost.

                      Maybe Competence should be split up to deal with diplomatic victories in some way... achieving your aims/'winning' a war despite heavy losses.

                      Comment


                      • #71
                        On showing the relative power and economic strength of the civs:

                        Well, I'm thinking of something fairly simple. Using icons of different size. Let's use the ancient world as an example. Let's say that the icon for military strength is a culture-appropriate unit of the period, say a legion. And economic strength is represented by a hammer and anvil. So each civ would have a legion-type icon, and one for the economy. My thought at this point is similar to what I used in the power rings for the military power of task forces. Specifically the icon's area would indicate the relative power of the civ. So a civ with four times as strong an army as mine will show an icon twice as high, since then it's area will be 4x as big. Since in power politics it is the Relative strength of a civ that is important, rather than the absolute strength, we simply need for the icons to be scaled properly in size with respect to each other. So we just define the civ with the biggest military power that the player knows about as being a full-size icon, and the others are scaled to the right proportion. The reason that I like to use the area instead of the length, is that you can show a difference in power of up to about 10x with icons that only differ in size by about a factor of three. A factor of three is about all we can afford for a relatively small icon, for it still to be recognizable at the smallest size. Additionally anything that is a factor of 10 smaller than us is generally of very little concern. Anyway, that's the best notion I have at the moment about how we should show things iconographically in Clash. I think whatever way we choose, it should be consistent across the many interfaces in the game. Also I think that linear scaling simply won't work because of the large range of parameters the player is going to run into.

                        History, the Direction of Diplomatic Relationships, etc.

                        Well, this is somewhat of a tough subject. Curse you for noticing that I had promised to come through with something on it above . There are really two distinct subjects here. First I'll talk about the general way I envision historical information being stored in Clash. Then I'll talk about how we might use that information in the diplomatic model.

                        I'd simply like to save whatever significant information we can get away with storing in a coherent manner. People like to be able to go back to descriptions of key battles, who won which war, who was the first to discover electricity, etc. I'd like to give the player as much of this as we possibly can. A lot of the information can be saved in a relatively compact form, and only converted back into text when needed. For instance, I envision we will have maybe 30 or 40 sentences that can describe the sorts of things that happen at a strategic level in a war, and what resulted in final victory. If you have three or four sentences for each type of act, such as the treaty being signed, then no five-sentence description of two wars will ever be the same (actually, about 1 in 1000 will, but who will notice). At the end of each war we will give the player this description, and save it in compact form for future reference. This will be great for replay! Unfortunately we don't want to have to calculate what has happened in the whole of history for every diplomatic decision . That's where the next paragraph comes in.

                        First we need a scale to establish how much a diplomatic or military action affects the reputation. For right now I'll just deal with the trustworthiness aspect. The first thing we need is a " trustworthiness scale". For purposes of demonstration I'll assume a scale where a level of 100 represents complete trustworthiness (at least as far as we know so far) and zero represents a pretty much completely untrustworthy civ. Our trustworthiness number should be some sort of weighted average of actions that have happened in the past. I say weighted, because eventually, given a long enough period of peaceful coexistence, past sins will be forgiven. So on any turn that one behaves in a perfectly trustworthy fashion your "instantaneous" trustworthiness is 100 (this will be true for most turns, since there's only so many shafts there are opportunities for). Now, I don't want to lay out the whole scale here so I'll just pick one sort of diplomatic action. How about a complete and utter shaft of a nominal ally? How many points should this be? For the moment I'll use the following logic: another civ, if it's your ally, if it were to shaft you on average once every ten turns, would be a Worthless ally. It should be approximately a zero on the treachery scale (completely treacherous). So in this simple way we can describe the complete shaft of an ally to earn the perpetrator about -900 points (so on average they are near zero). Using this crudely defined scale, now I can introduce how I want to handle the treachery of a civ over time, depending upon their particular diplomatic actions.

                        I was thinking of using a straightforward technique called the exponentially-weighted moving average (EWMA) to simply handle the way that civilizations and cultures might eventually discount events in the past. The idea is relatively simple. When computing a new value for the EWMA, say due to a significant diplomatic action, you just take a certain percent (X) of the old value, and percentage (100 - X) of the new information, and combine them. Depending on the value you pick for X, this method "forgets" past information either faster or slower. But the Really important bit about EWMA, is that you don't need to keep track of All the past information, all you need is what the value was on the previous turn, and what is new on this turn, to figure the new value. So although we will have all this glorious history, that the player can potentially tap, we only need to do one calculation to update the trustworthiness each turn.

                        Now for a rigged demo! So let's say I'm a foolish trusting civ that is in alliance with Otto the Treacherous. And let's say the percentage of the old value that we're using is X = 90% (so the current turn's information gets a 10% weight). If Otto starts out with a perfect reputation of 100, what happens on a turn when Otto behaves honorably? The new value for Otto's trustworthiness is 90% of the old value, plus 10% of the value at this instant. In the case were Otto is behaving honorably, the EWMA maintains Otto's trustworthiness at 100. Now what happens on the turn that Otto shafts me? Otto's new trustworthiness = 90% x 100 + 10% x (-900) = 0. So the property of the EWMA that we can use here is that it's easy to calculate changes in the current value that result from new events. You don't have to keep track of all of history, the EWMA does it for you. Depending upon the particular number that you choose for X, the EWMA will forget either faster or slower. Now how does Otto's reputation recovery using EWMA? I'm not going to crank the math, but will just give the answers on each of the turns, starting with the turn of the shaft. I'll assume Otto behaves blamelessly after this particular shaft. Otto rebuilding his reputation looks like: 0, 10, 19,... well okay I'm too lazy . The big point is that it builds back up slowly. And long before it gets back to 100, Otto will shaft someone again, driving in back into the Stone Age. Also, the choice for X I use here forgets things rather quickly. A different value will probably be used in the game if we adopt this methodology.

                        Anyway that's My idea for how to handle it. At the start, I propose that each civ would just have a single number for their trustworthiness with Everyone in general. They would get a certain number of points, say 100, for each turn and each civ toward which they behaved honorably. (Probably this would be weighted by the size of the civ) then we'd just have to determine a scale like the one I've sketched out above for each type of shaft, and apply the penalties. Some civilizations would weigh trustworthiness extremely highly, whereas for others it might be a little less important. But we're starting to get into details that are probably beyond the scope of the first shot at it. I can't wait!
                        Project Lead for The Clash of Civilizations
                        A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                        Check it out at the Clash Web Site and Forum right here at Apolyton!

                        Comment


                        • #72
                          Don't have time to reply much but there were 3 areas i know i wanted to. Both of these have to do with reputation:

                          Agression: Things that should also factor into deciding agression level is whether or not they've demanded tributes, military build ups, perhaps over expansive land policy (not ness going to war)

                          Competence: Battle aspect should also include by how much...ie overwhelming victories or just barely victorious and if they won wars despite loosing many battles (ie remember Hanable in Second Carthaginian War with Rome? He won many battles but ultimatly lost the war)

                          Tyranny: Should also keep in mind the time period aspect. When putting down revolts from peesant uprisings or slave uprisings it may be seen as a good thing (ie competence) rather than bad.
                          Which Love Hina Girl Are You?
                          Mitsumi Otohime
                          Oh dear! Are you even sure you answered the questions correctly?) Underneath your confused exterior, you hold fast to your certainties and seek to find the truth about the things you don't know. While you may not be brimming with confidence and energy, you are content with who you are and accepting of both your faults and the faults of others. But while those around you love you deep down, they may find your nonchalance somewhat infuriating. Try to put a bit more thought into what you are doing, and be more aware of your surroundings.

                          Comment


                          • #73
                            History & reputation crossover: sounds infinitely simpler than what I was imagining, which can only be a good thing! I like EWMA... and it sounds easily implemented across multiple rep components (although, yeah, unique Civ-Civ relationships can wait till it's working!).

                            If we use EWMA, do we still move towards a multiple-variable reputation? If so, we'd have different components mattering differently for each diplomatic action (aggression might be a good thing in a military ally; trustworthiness might be meaningless in other instances).

                            Also, say it's the ancient era and moving armies large distances takes some considersble time. I'm planning a military alliance to crush the Mongol hordes raiding my Civ's borders - what goes into my selection of ally? There are going to be factors like: the potential ally's physical location, their military size and tech advancement as well as reputation stuff: say competence (can they actually be of help?) and trustworthiness (would they turn on us and attack our more weakly defended cities while our troops were on the Mongol front?).

                            How would they all go into the decision making? What importance would reputation bear? Which leads nicely onto...

                            Diplomacy AI (cf. realpolitik AI on Mark's AI Page)

                            Um, wow. I know precious little about game AI, but if your ideas work, it sounds it'd make for a much more enjoyable Civ game. I'm no doubt showing my ignorance vividly here, but for me it begs the question... 'how in the hell?!'

                            Sorry to bring this down to nuts and bolts again, but as far as implementation is concerned - how do you see these things physically interacting? I mean sideways as well as up and down: realpolitik diplomacy with rp military for instance? How do the world models abstract out appropriately so the eg. diplomacy AI gets the necessary info?

                            Are strategies then based on 10,30,100+ turn predictions? How will the AI actually do these calculations? Where do the numbers come from?

                            Comment


                            • #74
                              Darren:

                              On the different elements of reputation, I would keep them separate, and then average them for now. I mean, eventually were going to want to use them separately anyway. So each part of reputation would have its own EWMA-calculated value. And each turn we would just average each of those together in whatever ratio we think is appropriate. Then when we're ready to move on to the next stage, all these values will be available to be used in whatever way the AI and-or player deems to use them. I bet you already know all this

                              On AI:

                              Well I Think I can do it all! However, I haven't done any of it yet! (Although to our credit, the map AI concept that I worked out, and was coded by JimC seems to work pretty well!) I don't think I can add much to what I wrote in the other piece on the Web Page that is going to make sense of things in a few sentences. It looks like the time is right to go ahead and finish writing that up though. So, I'll start out by giving you part of it here! Obviously, soon we will need an AI thread so I don't clog up this one with my discussions!

                              For each calculation level in the Hierarchical AI we need a decent, but fairly simple, model of the world. The models need to be as simple as we can design them, and yet still contain the core of what needs to be known to think sensibly about that area. For example, consider the realpolitik AI. It's not its Job to do tactics. All its going to do is look at the rough size of the forces that each power has its command, their economic strengths, Roughly the arrangement in space of the powers, and the current diplomatic situation. I think this is, to a reasonable extent what I do when I'm considering a similar circumstance. So, where does the data come from? Size of forces comes from whatever my civ's best intelligence on military power of other civs is. For the arrangement in space, I had in mind to use three things: the "center of mass" of each civ's land, its total land area, and something I call the contact index. The contact index indicates essentially the length of a common border if one exists, if no border exists, then how Close are they to touching? So, this is where the information comes from. Now, bear with me as I continue.

                              For each model area we also need a simple set of rules of thumb, thought up by people who are good in the area. Then, in the simplest version of the AI, the computer would just try each rule that seems appropriate to the given situation against the model, and see how it works out. So in the case of the realpolitik AI, we would have general rules like "the enemy of my enemy is my friend", and that powers that are separated by a single intermediate civ make for good alliance blocks, because they don't have much in terms of conflicting interests, and are likely to have a common enemy. So, for instance, Spain and Germany make good natural allies against France. We must work out a Real set of rules, I'm just coming up with these off the top of my head! Now, the rules of thumb are applied to the situation at hand. So, suppose I'm playing Spain. I suspect the French are thinking of attacking me. My rules tell me that a defensive alliance with Germany is probably the best way to protect myself. The realpolitik AI would make a guess at what it would take to ingratiate us with the Germans. So we now have a plan of action that needs to be tested. (Others will also be tested, but I'm not going to give examples) First, we run this plan through a simple diplomatic-military model. (For instance, assume that a civ won't start a war unless the power of its alliance block is at least 80% as large as the power of the opposing alliance block) If the plan ends up keeping the peace, say by ending up with me being an ally with Germany then no further calculation is necessary. (that is, we assume that the balance of power is sufficient that it is likely to deter the French from any aggression). If no war is predicted, we are done and can go on to test other ideas. If our diplomatic policy fails, and war erupts, Then we run this situation through a Simulated military reality.

                              What I have in mind for the military simulation that is coupled to the realpolitik AI, is to just treat the armies of each size as "blobs" of military power, with the blobs positioned on one of the fronts that the civ has with a potential enemy, or kept in reserve at home. We are now taking the diplomatic situation as fixed. This Strategic Military AI apportions troops to the fronts as it sees fit, using another set of rules, and then "plays out" the conflict in an abstracted way. For this strategic military AI, one rule might be, that when you have a central position against two enemies, you Must attack one Immediately with most of your force, before they have time to coordinate. In each turn of this simulated strategic conflict, a battle is fought (or not) on each front, including estimates of the average terrain and fortifications level. After the battle, forces are reduced depending on the battle's outcome, and land can change hands. A number of these turns are cranked, and the result is noted. At the end, the result is gauged by what the civ deems to be most important overall. That is, its strength at the end of the war including military economic and potentially other factors. So now we have one particular result of a potential diplomatic policy. For each policy outcome that resulted in war, this would probably be done several times, so that no one strange result would'nt bias the results.

                              Finally, one input to the strategic military AI that I didn't mention. Since that AI just treats troops at a very aggregate level, and only uses average values for terrain along the front, it will need to be corrected in instances where the simplicity of that AI results in making a Big mistake. For instance, if the terrain right along the frontier is not too bad for attacking, but a few squares in is an incredibly defensible position, our crude model will screw it up. This write-up is already too long, so I will just paraphrase what I think is needed quickly. Every once in a while the Strategic Military AI will call the AI level below it. That AI will be more detailed, and handle strategic troop movements for a single front. If our high-level AI (in this case the Strategic Military AI) produces similar results to the more detailed version, then everything is OK. If the more detailed version results in either significantly more victories or defeats then is expected, it will pass the higher level AI a simple fudge factor. The fudge factor will say "That know those guys, the Big-Noses? When you fight them, you need to have 50% more troops than usual to get the result you expect". Now the fudge factor will be used in all the high-level calculations. It will be rechecked periodically just to make sure something important hasn't changed. So each model will need to have a set of carefully thought out fudge factors that will be tweaked as the game goes forward. I personally don't think this will be that difficult, although I could be wrong.

                              I Hope that this has enlightened more than confused you! Let me summarize why I think this approach will work. The reason that people typically cite for it being "hopeless" to write AI for 4x games, is because of their Enormous complexity. And they Are complex. As an example, let's suppose that there are 100 different things you can do over the next ten turns in regards to diplomacy, the economy, military actions, and governance. So if you assume you are going to search the whole space of possibilities you need to calculate outcomes for 100 x 100 x 100 x 100 = 100 million possible approaches. What the hierarchical approach allows you to do, is to use good human judgment (in terms of the rules) to prune down each of those factors of 100 to 3, or so. Now that frightening number of calculations has been reduced to something like 100 (3x 3x 3x 3 = 81), which is Clearly Manageable with modern desktop processing power. That is if you don't piss all the processing power away by making your units March around the map and other ridiculous things . Will such an AI be perfect? Of Course Not! It Will Miss A Lot Of Things. But I think it will be Much better than what we have to play against now.
                              Project Lead for The Clash of Civilizations
                              A Unique civ-like game that will feature low micromanagement, great AI, and a Detailed Government model including internal power struggles. Demo 8 available Now! (go to D8 thread at top of forum).
                              Check it out at the Clash Web Site and Forum right here at Apolyton!

                              Comment


                              • #75
                                Diplomacy Interface

                                For those of you who may have missed the Interface debate, I've been trying to get as many suggestions as possible regarding model Interfaces design.

                                At present I'm putting together a Diplomacy Governor, but I'd also like to hear suggestions for the main Diplomacy screen. What should it contain? Should there be one? Should the Diplomacy interface be split up into sections?

                                Any suggestions relating to Diplomacy-specific content should go here, any interface-specific points can be raised on the Interface thread.

                                Thanks!
                                [This message has been edited by Darren_McGuicken (edited January 20, 2000).]

                                Comment

                                Working...
                                X