Jump to content
  • Advertisement
  • 07/31/99 12:43 AM
    Sign in to follow this  

    AI In Empire-Based Games

    Artificial Intelligence

    amitp
    • Posted By amitp
    AI In Empire-Based Games Courtesy of Amit Patel
    http://www-cs-students.stanford.edu/~amitp

    From: Free at last!
    To: [email="patel@shell.com"]patel@shell.com[/email]
    Subject: RE: Space Empire Games
    Date: Fri, 23 Jul 93 16:22:48 EDT

    Amit -
    I just wrote up a bit of a description about Second Conflict for another correpondant. I append it here. Its certainly what I consider Space Empire. I'm trying to clone Second Conflict which is what my editorial or side comments on extensions or computer strategies refer to.

    Thoughts and comments are appreciated. I'm still somewhat overwhelmed by the thought of programming a decent computer opponent.

    Thanks!
    Kevin

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

    Second Conflict appears to be produced by the folks who run the Galactica BBS. It has multi-player capability [possibly for BBS users?] but I've never tried that, playing purely Human-Computer conflicts. I can't really remember the premise, so I'll just talk about the mechanics [which is what I'm trying to clone right now, I'll figure out my own premise later].

    You start by selecting the game parameters. Up to 26 star systems (one per alphabet letter) and up to 10 players. Each player gets a beginning star system with 10 planets [each planet produces troops], a random number of Warships, Stealthships and Transports, a certain number of Missiles and Factories, and a random number of system defenses.

    Two basic scenarios are available with the shareware version of Second Conflict. The first is that each player gets one system. The second is that all systems are divided evenly between all players.

    The winner is the players who conquers the whole universe or who has the largest number of points when the game ends [game length can be selected].

    You can choose to build any of the ships, defenses, or factories. You can send scouts to check out other systems. Each turn every player makes orders (produce X, send ships to system Y, etc) and then all movement and combat orders are reconciled at the end of the turn.

    Stealthships are more powerful but cost 3 points to build versus 1 point for Warships. Fleets can 'Conquer' (fight until win or die), 'Probe' (attack once then retreat), or 'Raid' (seize transports and/or build points from enemy systems). Items can be wrecked to retrieve 70% of original points.

    Score points are awarded for ships, star systems, planets, troops belonging to a player at the end of the turn. More points for star systems owned, followed by planets, and then ships/defenses/factories. [So an obvious decision weight factor comes to mind: conquering a system is higher priority then building more ships unless you've got lots of ships].

    In an enemy system, one must first destroy the protecting fleet/defenses. Then you must destroy the enemy troops occupying the planets. Every turn you have un-conquered planets, the enemy can destroy your ships, possibly reducing the occupation fleet small enough so the system overthrows your rule.

    So a typical game for me starts out scouting nearby systems while building up my fleet. I try to find the nearest 'neutral' (non-player-occupied) system that has high defenses (usually an indication of a large number of existing factories; since it costs 5 points per *existing* factory to build a new one, the more already in a system, the better). Or if there are any nearby enemy systems I send raid fleets to get points to build with [the player's home system has no production limit; that is if you have extra points you can build as many of X with those points as you can, whereas other systems can only build as many X as they have factories].

    One of the tricks the computer opponent might do is to wreck factories to build stealthships. Since production in the home system is not limited by number of factories, 1 factory can build several hundred stealthships from the points recovered by wrecking the other factories. Then the computer can easily conquer several nearby systems, and use those systems' factories to build. The computer opponent only seems to do this early in the game if there are lots of nearby neutral systems. I haven't decided why the opponent decides to wreck factories later in the game.

    A weakness of the computer opponent is to send most of the fleet to attack a new system, leaving an old system relatively unprotected. If the computer has a small enough fleet, its possible to occupy the old system with little fear of successful return take-over.

    There are some other parts of the game, but thats pretty much it in a nutshell. The authors have produced a windows version that has different rules for some of the above (eg its harder to raid). Part of my motivation for making my own version is that I think their Windows interface is a dog, I'd like to learn, and the version I have has some annoying bugs (like with a large game [26 star systems, 5 players] the game will tend to have field overwrite problems, so that all of a sudden one player has got -32000 ships and is completely unconquerable).

    Some potential additions include having systems that are rich in metals versus good crop planets, taking the time to mine planets, colonization versus conquest, spy satellites, more ship types, trade, diplomacy, etc. But I'd like to get my clone working first and then extend it.



    From: Free at last!
    To: [email="patel@shell.com"]patel@shell.com[/email], [email="robert@gtx.com"]robert@gtx.com[/email]
    Subject: Medieval SimCity
    Date: Fri, 23 Jul 93 16:46:43 EDT

    Amit, someone posted this response, which I think pretty much echos your comments re: realism.

    >One tip for the Medieval Sim-City game... Ditch realism (or at least some of
    >it) and invent something that will work well from a game balance perspective
    >and make the game fun to play. Reality can be a good source of game ideas
    >sometimes, other times it can be crippling.

    Its sort of sinking in for me that I do need to concentrate a little more on playability rather than strict realism, although history provides a number of ideas that can be incorporated into a game.

    You mentioned for example that Civilization has emporers living 4500 years! This just so happens to be something I was having a little trouble figuring out how to handle the transition as the current ruler died, like what happens if the ruler doesn't produce an heir? (or multiple?) But it could just be ignored if necessary.

    Rob, you wrote:

    >I really like the idea of a leader and his group getting dumped in the middle of nowhere.

    The basic premise I was working from was the fact that around 600-700 A.D. large numbers of new villages were founded in portions of Northern Europe that had not been extensively settled. At that time, most of N. Europe was forested. What I hadn't figured out was how to explain how the potential villagers got there without a path or road, but I shrugged that off for the moment.

    This causes the game to start out to be one of resource management as the village must work to create fields using existing grain resources. Then, as exploration takes place, they will encounter traders and other villages, heathen and bandits, etc.

    The goal, in my mind, is to start with nothing like this, and develop to a successful large city [possibly the political center of a new country or a bishopric]. Obstacles include the barbarian invasions, trade wars, the black death, and the constant war.

    >Have you considered hunting & gathering as a potentially
    >bountiful resource for small populations, as a springboard until farming
    >begins to yield its returns?

    Yes, as pigs were typically fed on wild acorns as a major staple, and hunting was a significant contributor of food. I wanted to get the grain plant/yield ratios settled first but maybe I'm trying to take baby steps that are too small. I may be trying to make things too complicated by assigning different activities different costs in terms of grain eaten.

    I originally thought to require the user to select which activities to use the people on. For example, with 25 starting people they can plow 5 fields in a season if no one does anything else, but they may end up with no food because they eat all the grain. On the other hand, 5 people can build houses, 10 people can hunt, and 15 people can plow, resulting in 3 fields but enough food from hunting, _and_ a place to stay.

    >If i recall, farming without basic tools is supposed to be hardly worth
    >the effort (unless you live on a flood plain as rich as the ancient Nile).
    >Likewise, great skill in farming, even with relatively primitive tools,
    >can reap rewards.

    Right. The original plow (pre-700 A.D) was an ox-drawn edition of the original stick plow. Ideal for light Mediterranean soils but poor in the heavier soils of N. Europe. I wanted the village to start out with this plow (and consequently lower grain yields) plus a two-field rotation system.

    Then, after the development of the shoulder-harness for horses, horse shoes and the heavy mouldboard plow circa 750 AD, the village can acquire this knowledge and increase production. The additional use of a three-field rotation system can also increase production. With increased production the player can then spend more resources for building a church, grain mills, windmills, trade, and developing more of a city.

    Perhaps I'm trying to be too realistic, making it much less fun?

    Kevin



    From: Free at last!
    To: [email="fingon@nullnet.fi"]fingon@nullnet.fi[/email]
    Subject: RE: Space Strategy AI
    Date: Mon, 26 Jul 93 11:12:55 EDT

    Markus -

    >I, too, am creating space strategy game. Only part working 100% now is computer AI, :).

    Care to share details? I'm rather lost when it comes to the AI part. Both Amit Patel and Robert Eaglestone have expressed interest or ideas wrt the AI.

    At this point I've done nothing on the AI (leave the hard part for last :). I haven't even thought much on the potential computer operations, much less how the computer makes decisions between them [nor even how the computer gathers the data to make the decisions, but that should be easier].

    Is your AI data-driven? What computer operations/decision-points do you have, and how does the computer decide between them? Don't feel that you have to give everything away, any input at all would be helpful at this point.

    Thanks!
    Kevin



    From: Free at last!
    To: [email="robert@gtx.com"]robert@gtx.com[/email], [email="patel@shell.com"]patel@shell.com[/email]
    Cc: [email="routley@4gl.enet.dec.com"]routley@4gl.enet.dec.com[/email]
    Subject: Promised infrom from Markus Stenberg on Computer AI
    Date: Wed, 28 Jul 93 16:57:34 EDT

    From: US2RMC::"[email="fingon@nullnet.fi"]fingon@nullnet.fi[/email]" "Markus Stenberg" 27-JUL-1993 15:07:29.00
    To: 4gl::routley (Free at last!)
    CC:
    Subj: Re: Space Strategy AI

    > >I, too, am creating space strategy game. Only part working 100% now is
    > >computer AI, :).
    > Care to share details? I'm rather lost when it comes to the AI part.
    > Both Amit Patel and Robert Eaglestone have expressed interest or ideas
    > wrt the AI.

    I'll write something.. :)

    > At this point I've done nothing on the AI (leave the hard part for last :).
    > I haven't even thought much on the potential computer operations, much
    > less how the computer makes decisions between them [nor even how the
    > computer gathers the data to make the decisions, but that should be easier].

    Data gathering is simple - at least in my model it uses same data as players + some statistical data from preivious turns..

    > Is your AI data-driven? What computer operations/decision-points do you
    > have, and how does the computer decide between them? Don't feel that you
    > have to give everything away, any input at all would be helpful at this
    > point.

    AI I have designed uses mostly data to make decisions - some random chance has been thrown in, too. I think that the AI has to be quite game-specific - at least mine wouldn't work even in VGAPlanets, which is _very_ like my game..

    For example about planetary conquest: Computer saves all previous attempts, &c. When ship's turn comes (it handles em quite easily), it checks out 20 nearest not-own planets, and what kind of success it has had before trying to conquer em. Then it orders the ship to go to the planet &c. L8er, if some other ship thinks that the same planet is easiest conquest in terms of range/defense, it merges them to fleet before attacking. If planetary defenses were last time better than the fleet, it just flies to the system & waits until there is great enough force to wipe out the planet.

    (Planetary defenses cannot attack, as name implies)
    --
    Markus Stenberg / [email="fingon@nullnet.fi"]fingon@nullnet.fi[/email] / Finland / Europe
    Public PGP key available on request.



      Report Article
    Sign in to follow this  


    User Feedback


    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Advertisement
  • Advertisement
  • intellogo.png

    Are you ready to promote your game?

    Submit your game for Intel® certification by December 21, 2018 and you could win big! 

    Click here to learn more.

  • Latest Featured Articles

  • Featured Blogs

  • Advertisement
  • Popular Now

  • Similar Content

    • By Lauren Tuccy
      So my only coding experience is with writing Interactive Fiction games with Inform, so I get the logic and stuff, but, I'm so used to starting with a program with libraries and assets already built in, that I have no idea how to build something from scratch. 
      I'm would like to make this simulation game where the player is a student in a [magic] school, and I've got stats for the students, their personality types, and ideas on how that should effect their performance in class, and experience rates, and all this data in a google spreadsheet, but I have NO idea how to start creating this game on a code level. So, I'm just struggling on finding out how to get started. Can anybody give me some advice?
    • By MiniDarkOF
      Hello Again,
      I'm trying to create a "sound expansion"

      The Example:
      a nuclear explosion sound has 1000ft of audible sound area
      players who is next to the explosion hear it first
      players who is far to the explosion will hear after some seconds
      when the sound reaches its area limit, it ends with a "fade-out"

      The Point:
      i already know how to create fade-out sound effect in Unity
      know i want to know how i can create this "sound expansion" effect
    • By Alikberov
      In classic sound adjustment of games we having control over volume of music or sound-FX. For lots of table games or puzzles this is enough for all user preferences.
      But in more difficult games with complex sound environment such of adjustments is not enough and gamer must to use the headphones, because sounds of game environment can disturb surrounding public. But headphones can destroy the health of gamer.
      I'm not present any code at here, but I trying to build a draft of sound FX spectre of emotional perceptibility of gamer to giving more wide control over sounds in game with complex choice for favor gamma in playing sounds.
      0. Angels level Mood music, that playing in the brain at this moment Sounds of thinking like the trying for inspected prediction for action Speech synthesis of player thinking process; Player-self dialogue Inside sounds of body functions, like heart-beat, breath or beat in temples Outside sounds of body, like knuckles squeak, belly rumbling or cough Nearest subjective environment, like mosquito cheep, buddy whisper, phone speech or headphone of equipping Subjective environment, like fly hum, sleepers shore, somebody cough or slurp, speech Active subjective environment, like doors squeak, floor squeak under foots, sneakers shuffling, tick of switch Objective environment accompaniment, like leaves rustle or curtains swaying, branches rap in window, winds drone, water purl Passive objective environment, like spontaneus floor or furniture squeak, alone drop fall, wallpapers crackle Operated active technical environment, like phone ringtone, TV set or radio, claxone or gun shot Interactive technical environment, like watch tick-tick, elevator sound Active technical environment, like frigy sound or autos engine Technical environment accompaniment, like generators sound Passive environment, like waterfall noise or river purl, twitters, public hubbubs Operated environment, like battle noise or cannons shots, explosions Interactive environment, like thunder or lighting, volcano or earthquake Active environment, like hurricane or tsuname Evironment accompaniment, like public or animals screaming, animals rave, people rave or crying It's not HDR. No dynamics.
      Static normalize all sounds of game for session.
      Just, like in graphical equalizer, we can have a 20 sliders band of levels any sounds.
      If user shut down to zero all 20 adjusts, except #6, then no any sounds user can listen and hearing #6 (mosquito, whisper and equipping) only.
      (No monsters, no disasters, no cannons. The commander only!)

    • By ggenije
      My question:
      For example I have class enemy, let's say I have 100 enemy types.
      Now in Update()(each frame)
      if(enemyType==Type1) {doWhat Type1 does} else if(enemyType==Type2) {doWhat Type2 does} else if(enemyType==Type3) {doWhat Type3 does} ... else if(enemyType==Type100) {doWhat Type100 does} so in each frame I can call up to 100*enemy count
      so is there any way to avoid this , to tell it earlier what update should it do
      I am working in unity, but is there universal way or?
       
    • By Wysardry
      I am looking for suggestions on how the passage of time could be handled in a multiplayer RPG, particularly the ways a players could alter it.
      Most single player games allow the player to wait, sleep and/or fast travel, which causes their character to jump forward in time by a set amount to skip the boring parts. If this was allowed in a multiplayer game, players could become out of sync with each other.
      Does anyone have any suggestions on how this could be handled (other than not allowing those actions) in a game with 1 to 8 players?
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!