• FEATURED
• FEATURED
• FEATURED
• FEATURED
• FEATURED

View more

View more

View more

### Image of the Day Submit

IOTD | Top Screenshots

### The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.

# RPG Empire AI, whaddaya think?

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

20 replies to this topic

### #1Wavinator  Moderators

Posted 19 August 2000 - 02:01 PM

Hey all. More brainstorming on the dynamic, changing empires (or kingdoms or nations) concept and am curious what you think: An empire is made up of areas, NPCs, and objects. Areas are maps/levels. Areas can have other areas attached or imbedded. Each area has attributes. These are things like population, crime, army strength, etc. Attributes can be modified by NPCs, objects, and the player. The actions the player can take == how these are attribs are modified. Example: Decrease a population by poisoning the water supply, increase the wealth of church by donating coins, etc. As the player adventures, the empires are are making alliances, declaring war, invading each other, etc, etc. Real AI isn''t used to solve this (too expensive); instead, we cheat and use random rolls and stuff. Smoke and mirrors, but the player isn''t be cheated so they shouldn''t care. This should give better control of what''s happening in the game. Players can get in on the empire action. The AI leaders of an empire should be able to communicate their desires to the player. This creates quests. (This needs a function to compute difficulty with reward.) Who gives you what quests is based on your reputation. Your reputation is earned by accomplishing quests. What''s left? Need to figure out what goals the AI empires have. Then, how they can fulfill them. I''m stuck on figuring out when they should do one thing or another (build or fight? fish, cut bait? ). There''s prolly a ton of stuff I''m forgetting... ... man, I''m dreaming of being able to play a character right in the middle of all this!!!! -------------------- Just waiting for the mothership...

### #2Paul Cunningham  Members

Posted 19 August 2000 - 03:12 PM

quote:
Original post by Wavinator

An empire is made up of areas, NPCs, and objects.

Attributes can be modified by NPCs, objects, and the player. The actions the player can take == how these are attribs are modified. Example: Decrease a population by poisoning the water supply, increase the wealth of church by donating coins, etc.

--------------------
Just waiting for the mothership...

This is the bit that i''ve always struggled with. If the economy is large enough then the players input would not be significant enough to warrant very noticable changes. So in order for the player/characters actions to effect the economy in any noticable way then maybe his/her actions should have a domino effect of somekind. Like, as the player gains more levels/status then people look up to him/her and start doing similar things. With this sort of NPC help then the players actions could (more understandingly) would have some sort of effect on Empire economies?! Well thats just one way to do it i presume

I love Game Design and it loves me back.

Our Goal is "Fun"!

### #3Wavinator  Moderators

Posted 19 August 2000 - 04:26 PM

quote:
Original post by Paul Cunningham

If the economy is large enough then the players input would not be significant enough to warrant very noticable changes. So in order for the player/characters actions to effect the economy in any noticable way then maybe his/her actions should have a domino effect of somekind. Like, as the player gains more levels/status then people look up to him/her and start doing similar things. With this sort of NPC help then the players actions could (more understandingly) would have some sort of effect on Empire economies?! Well thats just one way to do it i presume

The idea that as your character grows his influence grows is central to my design. It''s the thing that made me realize I''m not working on a pure CRPG. In a pure CRPG, your growth is more "horizontal," in the direction of the story, and rarely do you grow "vertically," and wind up influencing an entire game world. (The story says you do, but you really don''t. I mean, honestly, the townsfolk claim that you saved the realm, but there was never really an invasion coming ).

--------------------
Just waiting for the mothership...

### #4Paul Cunningham  Members

Posted 20 August 2000 - 01:47 AM

Sound''s like a very hard Game Design you''re working on there. You sure you''re not biting off more than you can chew?! I really don''t know how you will do it but best of luck to you, sincerly

I love Game Design and it loves me back.

Our Goal is "Fun"!

### #5Wavinator  Moderators

Posted 21 August 2000 - 08:10 AM

quote:
Original post by Paul Cunningham

Sound''s like a very hard Game Design you''re working on there. You sure you''re not biting off more than you can chew?!

Oh, I know I''m biting of more than I can chew. I''ve been designing this for awhile (uh, like 2 years). Only recently have I gotten serious and started to code it. I figure I''ll either crash and burn and learn a lot in the process, or make a kicka shareware / freeware game that Starflight and Sentinel Worlds fans would enjoy (the few of us geezers left, anyway )

It was either that, or go work on something I''m not passionate about...

quote:
I really don''t know how you will do it but best of luck to you, sincerly

Maybe this is why I''ve been getting so few replies. Maybe I''ll get more feedback once people see what the heck it is I''m talking about... (gotta get that website up...)

--------------------
Just waiting for the mothership...

### #6ahw  Members

Posted 22 August 2000 - 02:48 AM

Well, as soon as I type up some of my old notes, I''ll give you some of my ideas. I think you might like them
Just one quick thought though. Fractals.

It''s funny to observe that a village is like a region, is like a continent, is like a planet, etc ... maybe if you can spot this "hierarchy", you could come up with something nice.

If you take things in the order they appear as well, I believe this can help.
Take the planet, describe it, mountains, forests, rivers, etc etc. Then build tribes, make them wander, settle, grow, build roads, and so on.

I know, I am vague, but maybe you understand what I am trying to tell you

Anyway, more later.

youpla :-P

### #7Wavinator  Moderators

Posted 22 August 2000 - 07:23 PM

quote:
Original post by ahw

Well, as soon as I type up some of my old notes, I''ll give you some of my ideas. I think you might like them
Just one quick thought though. Fractals.

Thanks, I will absolutely appreciate any help I can get. Fractals are an EXCELLENT idea. For a science fiction game, they''re one of the best ways to get a ton of territory. They''re also a genius way of getting a lot for a little (heh--comparitively speaking) bit of work.

I''m trying to understand them better now. By the way, have you taken a look at this site? It''s for pen & paper games, but it has me drooling over CRPG possibilities:

http://www.logicrucible.com/

--------------------
Just waiting for the mothership...

### #8Paul Cunningham  Members

Posted 22 August 2000 - 08:06 PM

quote:

What''s left? Need to figure out what goals the AI empires have. Then, how they can fulfill them. I''m stuck on figuring out when they should do one thing or another (build or fight? fish, cut bait? ). There''s prolly a ton of stuff I''m forgetting...

Time based actions, is that it? There needs to be a spark somewhere i''d say that will make them do something. Think of how bush fires start. Season after season branches and leaves fall of slowly building up on the ground. Each season that goes past it becomes more and more likely that a bush fire will spark somewhere, all it takes it a rock to fall and land in a hole with rock and leaves and KaChink . Maybe you could use this model design as a way of proding your empire leaders into taking actions and which actions to take.

Example: Month after month the orc tribes keep building... you get the picture?!

I love Game Design and it loves me back.

Our Goal is "Fun"!

### #9Eck  Members

Posted 23 August 2000 - 03:59 AM

On a side note....

All hail Sentinel Worlds and Starflight! Those games were super cool.

Later,
Eck

### #10Wavinator  Moderators

Posted 23 August 2000 - 08:51 AM

quote:
Original post by Eck

On a side note....

All hail Sentinel Worlds and Starflight! Those games were super cool.

Man, it warms my heart to hear that. Thx! I really want to see these two games combined. Imagine being able to exit your terrain vehicle on all those planets... or being able to board enemy ships... lots of possibilities here...

--------------------
Just waiting for the mothership...

### #11ahw  Members

Posted 24 August 2000 - 02:55 AM

Some years ago, I decided to put on paper all the characteristics I could see that would create a world.
Of course this is noon exhaustive, but I think it''s a good starting point.
But before I start writing a big list I''d like to explain the way I see things.
First, you have to design at least the solar system you are in. Because this condition the type of light you are going to have, hence the races and organisms that are going to exist on your planet. Then it would be nice to design the different planets of the system, if you plan to use an astrological system (I do).
Next, you have to design the planet the action takes place on.
As a rule of thumb : Do things in the order they happened.
For instance, first the Earth was a big lava ball. This gives you the tectonic plates. which allow you to create realistic landscape, as well as placing minerals and ores all over the place. Later these will help you have realistic locations for mines, and there content (rather than some random stuff).
As well, I believe (and that''s not based on anything scientific, IMHO) that it would also allow us to have a sort of heat map, that would influence the climate in subtle ways (different types of deserts, streams of hot water, volcanic islands, rift, etc).
Next you pour water, and you get your oceans, your rivers, etc etc. Also you have to take into account the heat at that stage. By combining heat level, landscape(altitude), and hygrometry (humidity level), you get all the different types of climates, as well as the presence of vegetation.
Once you have this, you start putting animals.
How you would develop animals would be specific to your world, but to take earth example, you would distinguish between Omnivorous (eat everything), Herbivorous (eat herbs, grass), Carnivorous (eat meat), water animals, mammals, and so on and so forth. This would influence the types of animals you would find, random encounters, or hunt animals (so you wouldn''t find extremely inconsistent things like cold blooded animals in polar regions, or unlikely animals in the desert, etc).
I don''t think you would have to actually simulate all this, but rather ork on numbers, population, rather than specific individuals.
After that you begin to put human beings (and other "thinking" animals). I think you are the one I told about the Tribe generator (in the thread "race generator", wasn''t it).But to put it briefly, given the races of your universe, you could put them in specific climates, you could have tribes of various mixes (e.g. goblinoids like orks, ogres, goblins, living together), which would gather together in specific locations (which is where the realism in the creation of the planet get handy) : the meeting point of two rivers, next to a natural mining location, top of a hill not far from a river, on a temperate coastal area, protected from the deep sea by a line of mountains, a the bottom of a volcano (volcanoes nearby area are usually extremely fertile), and so on and so forth.

Once you have tribes, you can "grow" the whole thing.
Tribes of similar characteristics will communicate, so you build roads, or form a nation, also tribes that are in favourable situation will extend their living area (a port area were there is a lot of food will develop nicely, while a desert outpost will grow much more slowly; a little village in a valley won''t have a lot of room to extend, but a tribe in a plain with forests nearby will probably extend).
As well, the location will condition things like the main activities of towns, the types of alimentation, the type of life, the level of communication between different tribes, the likeliness of them forming a vast unified nation rather than lots of little clans ... etc etc

Of course I am being very general. But you will see that there are some nice ideas in all this, the thing is that if you are actually going to implement something of the scale of an empire, the apparent amount of details in my description will actually make it much easier to get those details rather than using stupid random generators all over the place, and in a much more "consisten" manner, I believe. For instance, taking the climate into account will allow you to assign types of vegetation to forests, which in turn, depending on their type, will contain different species of trees, plants, herbs, in various probabilities. This would allow you to create Herborist skills that are useful, because it would tell you where to find what, hence to decide "OK, I need this plant to do this potion, we have to go in the mountains of the South..."
As well, your carpenters would make more or less precious types of furnitures depending on the types of forest nearby. And of course, if they need some precious wood that can only be found far from here, they would be happy to send some adventurers to buy it, rather than doing it themselves. If you have a "realistic" geology in your world, this will allow again things like a diamond mine to happen in a random but realistic manner (next to a coal mine), and this would allow a specialist to use his skills to identify and distinguish various types of minerals, tell you were to find them, and send you on quests to find the most precious ones (and of course, all this is needed because you would have a very cool magic/alchemy system ! ) Pure crystal is found in granitic mountains, limestone natural deposit nearby will increase the industry of building in one town, etc

I think you get the idea. The trick is that the deeper you go the more details you can create. But all this is done in a ''general to specific'' manner. I don''t put belladone plants before I have done the climate, the type of vegetation, the types of forests. I don''t put my tribes and then design the region around.

Well, I was gonna give a list of characteristic, but I think they are meaningless, now that I have explain my thoughts, because the characteristics are going to depend directly on the amount of details you want, and on the level of interaction you want to have between all those attributes. One word though, use a hierarchical, scalar system.

This is what I meant by fractal.

If you don''t think I am totally unrealistic by now, then I have some more ideas for tribes design (to complete a bit more the random tribe generator )

youpla :-P

(I checked out Logicrucible, one word : Sweeeeet ! )

### #12Whirlwind  Members

Posted 24 August 2000 - 03:35 AM

You might want to approach this as an RTS with CRPG added. Have the player be a piece on the map that neither computer player can control. The computer establishes trade routes, raises armies (the player can see a help wanted listing or something), makes alliances, makes war, builds castles, and settle new towns while the player completes some tasks for one of the computer players if the human player wants. Unless the player is present, battles can be handled in a random weighted series of ''rolls''. Once you get the underlying RTS installed with working AI on both sides, you can start weaving in elements into the RTS that will involve the player - add generals and the like, add weapons of mass destruction for the player to aquire, add NPC generated quests that relate to the world (rid the asteroids of rogue enemy fighters, etc) and add a mercenary system so the player can hire or recruit his own units to do jobs for him/her. A difficult path - without a good RTS underpinnings, the game will either be short or illogical.

### #13ahw  Members

Posted 24 August 2000 - 06:21 AM

Mmmh, you are almost reading my thoughts

### #14Anonymous Poster_Anonymous Poster_*  Guests

Posted 25 August 2000 - 07:56 AM

Just read the thread. Just wanted to say that it''s been done (though maybe not as in depth). There was an RPG called Inindo for the SNES. Set in fudal Japan you play your ninja guy and run around trying to get strong to kill some warlord. Every month the program would display a map of the different provinces and differnt kingdoms would try to conquer others. After a point the player could go on missions for warlords to sabotage armies and whatever to try to sway the outcome of battles in the players favor. You could also command units sometimes. NPC''s also did this sort of stuff too now and then.

When playing it I got the impression that the whole war bit was similar to strategy/war games played on the old NES. They kept the war stuff simple enough (land to land only, food,army,and weapond strength was pretty much it I think) that any sort of AI wasn''t a big deal. I think the trick is to put a bunch of well thought out simple things together to get the complicated big thing out. (Which sorta goes without saying but is good to be reminded of now and then.)

### #15Wavinator  Moderators

Posted 25 August 2000 - 10:37 AM

quote:
Original post by Anonymous Poster

Just read the thread. Just wanted to say that it''s been done

Thank you thank you! This just reinforces for me that it''s not impossible.

quote:

I think the trick is to put a bunch of well thought out simple things together to get the complicated big thing out. (Which sorta goes without saying but is good to be reminded of now and then.)

Yes, this is good. I''m thinking in terms of what sort of empire AI behavior could be emergent. Maybe rules like: "Try to get as strong as my enemies;" or "keep growing as much as possible..." might, on the "galactic" map, lead to interesting behavior. These rules would have to be composed of "how-to" or implementation rules, which would give the lower level behavior I''m looking for.

--------------------
Just waiting for the mothership...

### #16Wavinator  Moderators

Posted 25 August 2000 - 10:48 AM

quote:
Original post by Whirlwind

You might want to approach this as an RTS with CRPG added.

Absolutely! My model has been turn-based games, but the concept is sound. If the computer was playing a game of Master of Orion, with you in the middle, it would describe it perfectly.

quote:

Have the player be a piece on the map that neither computer player can control. The computer establishes trade routes, raises armies (the player can see a help wanted listing or something), makes alliances, makes war, builds castles, and settle new towns while the player completes some tasks for one of the computer players if the human player wants. Unless the player is present, battles can be handled in a random weighted series of ''rolls''. Once you get the underlying RTS installed with working AI on both sides, you can start weaving in elements into the RTS that will involve the player - add generals and the like, add weapons of mass destruction for the player to aquire, add NPC generated quests that relate to the world (rid the asteroids of rogue enemy fighters, etc) and add a mercenary system so the player can hire or recruit his own units to do jobs for him/her. A difficult path - without a good RTS underpinnings, the game will either be short or illogical.

Have you been reading my design notes?!?! As they say, great minds think alike! I''m working on building the galaxy now, and fleshing out the AI actions (hince this post).

I''ve realized that unit behavior is critical. It is what will give the interesting low level situations that suppliment the saga of inter-empire struggles. Traitorous captains, mad terrorists, heroic rebels... these kind of "units" aren''t typically found in strategy games, but they are critical to RPGs.

BTW, the mercenary system is an excellent idea. I was also considering a reputation/loyalty system as well, that would get you "units" based on your past deeds. So if you''re the hero of the Battle of Hoth (or whatever) your reputation will naturally attract folks to you...

--------------------
Just waiting for the mothership...

### #17Wavinator  Moderators

Posted 25 August 2000 - 11:00 AM

quote:
Original post by Paul Cunningham

Time based actions, is that it?

Yeah, I can see increasing values. In an example of an enemy massing on your border, this seems like a simple tolerance trigger (or set of triggers). These are examples of a present condition that can be detected and acted upon.

When to build vs. when to fight vs. when to fortify are all a bit more difficult because they imply future. Traditionally I think something like this would be solved like chess, with a bunch of maps to be depth searched for each player... unfortunately, I''m quite AI ignorant at the momemnt, so I don''t know if this is how Master of Orion or Civilization AI works or not... (requests for info on the AI board here went pretty much ignored... )

But even if it does, I''m not sure I can afford that amount of CPU time given everything else that''s supposed to be happening (it''s a CRPG in an empire game setting, not an empire game proper).

One idea might be some sort of scripting, although this tends to lead to very scripted actions... ("oh great, the Terrans are invading... like we didn''t expect that to happen...")

--------------------
Just waiting for the mothership...

### #18Wavinator  Moderators

Posted 25 August 2000 - 12:02 PM

quote:
Original post by ahw

Some years ago, I decided to put on paper all the characteristics I could see that would create a world.
Of course this is noon exhaustive, but I think it's a good starting point.

Thanks, ahw. Lots of good info!

quote:

First, you have to design at least the solar system you are in.

Just finished up a generator here. Lots of variables like infalling radiation, pressure, heat, temperature, etc. Works great for single systems, now I'm trying to adapt it to exotic binary systems and such (n-body motion is a bear to solve abstractly!!!

quote:

I don't think you would have to actually simulate all this, but rather ork on numbers, population, rather than specific individuals.

Yeah, and area I get stuck on is how much to simulate, and how to simulate it. Semi-random tables, finite state machines, and best guesses are the order of the day...

quote:

I think you are the one I told about the Tribe generator (in the thread "race generator", wasn't it).

Yup. Thx again!

quote:

Once you have tribes, you can "grow" the whole thing.

That's the trick I'm finding. I understand how to grow them, and (somewhat) how to place them logically. Behavior is a different animal. This is where I'm hoping to find some sort of emergent behavior that applies to civilizations. If it can apply to a tribe, then it can apply to an empire.

I don't expect to get this exactly right. Thank God this is a game, and not a sociological model... If it looks right, and is consistent, then I don't care how I get to it...

quote:

One word though, use a hierarchical, scalar system.

I agree. This will reduce the coding burden and make the models more managable. I want to be careful not to simulate with TOO many variables, of course, or I run the risk of buggy models that screw up the player's experience... but that's to discovered...

quote:

If you don't think I am totally unrealistic by now, then I have some more ideas for tribes design (to complete a bit more the random tribe generator )

Would love to hear them. Thx!

quote:

(I checked out Logicrucible, one word : Sweeeeet ! )

Hey, if you like that, you might like:

"http://www.best.com/~jendave/builder/galaxy/intro.html"
Not as huge, but more in depth... Hooking up these two would be something, wouldn't it... (not that that's what I'm trying to do...)

--------------------
Just waiting for the mothership...

Edited by - Wavinator on August 25, 2000 7:02:56 PM

### #19Anonymous Poster.  Members

Posted 26 August 2000 - 05:34 PM

Wavinator, have you played Alpha Centauri? In case you haven''t; each of the factions at war had an AI that represented their beliefs.(there was a Technocrat faction, a Spartan warlike faction, a Capitalist pig faction, a Greenpeace faction, etc.)

I think that once you have the base AI worked out, it wouldn''t be too hard to tweak it so that the ingame actions of each empire reflected its beliefs. Especially since the computer empire''s AI wouldn''t have to be a great opponent, except against itself. (the player is a single free agent or a small mercenary party in the game, right? in other words, not the one ''calling the shots'' for either army?) The AI would just have to exhibit interesting, convincing behavior. I think in this RPG/RTS thing you''re working on, it would be very important to give the empires some character in their behavior, beyond "I''m trying to beat the other side into submission as efficiently as possible". This works well enough in straight RTS, but if the player is not the direct opponent of the AI general, why go that route? Maybe it could even be more interesting if the AI also from time to time made believable mistakes?

### #20Wavinator  Moderators

Posted 26 August 2000 - 08:49 PM

quote:
Original post by Anonymous Poster.

Wavinator, have you played Alpha Centauri?

Yeah, this is a great game. I'm drawing a lot of inspiration from the well designed AI. The characters were pretty detailed for an empire game.

quote:

I think that once you have the base AI worked out, it wouldn't be too hard to tweak it so that the ingame actions of each empire reflected its beliefs. Especially since the computer empire's AI wouldn't have to be a great opponent, except against itself. (the player is a single free agent or a small mercenary party in the game, right? in other words, not the one 'calling the shots' for either army?)

This is a good point. The player does only play one unit. Even if the AI cheats, only the AI will know.
It's coming up with the variables that represent a government's personality that's tricky. Demonstrating them to the player is even trickier.

quote:

The AI would just have to exhibit interesting, convincing behavior. I think in this RPG/RTS thing you're working on, it would be very important to give the empires some character in their behavior, beyond "I'm trying to beat the other side into submission as efficiently as possible". This works well enough in straight RTS, but if the player is not the direct opponent of the AI general, why go that route? Maybe it could even be more interesting if the AI also from time to time made believable mistakes?

Again, very good point. It's not enough for the AI to solve win against itself like a computer. The AI has to win against itself like a fallable leader.

Right now I'm cooking up stats for NPC leaders. This should help give the empire character, as you could have leaders like Abraham Lincoln or Joseph Stalin embue the empire with a certain feel.

--------------------
Just waiting for the mothership...

Edited by - Wavinator on August 27, 2000 3:51:14 AM

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.