🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

RPG Empire AI, whaddaya think?

Started by
19 comments, last by Wavinator 23 years, 10 months ago
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 ! )
-----------------------------Sancte Isidore ora pro nobis !
Advertisement
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.
Mmmh, you are almost reading my thoughts
-----------------------------Sancte Isidore ora pro nobis !
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.)
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...
--------------------Just waiting for the mothership...
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...
--------------------Just waiting for the mothership...
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...
--------------------Just waiting for the mothership...
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
--------------------Just waiting for the mothership...
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?
If you see the Buddha on the road, Kill Him. -apocryphal
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
--------------------Just waiting for the mothership...

This topic is closed to new replies.

Advertisement