Elemental – Data Driving the AI

By on April 29, 2010 7:51:34 AM from JoeUser Forums JoeUser Forums

Frogboy

Join Date 03/2001
+1491

image

When I wrote the AI for Galactic Civilizations, everything was hard-coded in C++.  That was nice for me but not so nice for everyone who would like to tweak things later. Moreover, it makes it very easy for things to become a mess later on as improvements rely on my memory of what technique I used to do a given thing.

Yesterday and this morning, I officially began my work on the Elemental AI.  What’s in the game presently isn’t AI, it’s just a few IF/THEN statements.  My job is to design and code a structure that allows the computer players to play intelligently and provide a challenge without having to cheat.

So…how do you start?

The first step is with XML.  You can do an awful lot just by defining lots and lots of “stuff” in the XML.

First, I start by defining AI personalities. My starting point is AI_General which is, as the name implies the general AI personality that I’ll start from.  When I’m done, modders will be able to go in and define their own AI personalities that behave completely differently.

image

Here’s an example that I whipped up last night.

I define some Priorities (Economy, Farming) and I define some things I want the AI to avoid (War, Construction Times, etc.).  Now, as I get better at this, I’ll tie together these definitions throughout all the game data. 

So for instance, items that are tagged as Economy and Farming by the “AI General” will get their priority multiplied by 3.0X and 5.0X respectively.  Someone else might come along and make AIPersonality=”RavenX” and have a totally different set of priorities.  When the game starts, it’ll eventually look for all the AIPersonalities and grab them for the different AI. We might even let people from within the game pick which AI personality they want (not in 1.0 but eventually).

I’m a n00b

I’ve been using XML for years for skinning purposes but I’ve never tried to data drive an AI before. It’s not hard, but there is no substitute for experience. So over time, it’ll get better and better so that less and less of the AI is actually hard-coded and what requires “real” coding would be provided as Python.

Eventually, we will also have all the AI difficulty levels clearly defined so that players can adjust them far beyond what you could provide in the game UI.

BTW, feel free to shoot off your own ideas on this. My “AI skillz” largely revolve on producing macro-level systems for intelligent artificial players. Implementation is not something I am passionate about so don’t feel like you’re stepping on my toes by suggesting different implementation techniques.

Locked Post 106 Replies
Search this post
Subscription Options


Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 7:56:35 AM from Elemental Forums Elemental Forums

Good luck Froggie!

Also, wow...it will be very easy to change the AI personalities in the .xml files. I love this! I know that the AI coding will be done via Python, but it's cool that a dude like me -who knows nothing about programming- will be able to change some AI related stuff via editing .xml files.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 8:14:13 AM from Elemental Forums Elemental Forums

Looks similar to the AI priority coding I helped with on Kohan II during the beta some years back. That system worked well for defining personality types while allowing modders to make broad changes fairly easily by changing a few settings.

I like it

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 8:43:16 AM from Elemental Forums Elemental Forums

I am wondering if it is a good thing to have so many different attributes with important semantic meanings used for the the same XML tag. I am not really sure that it helps extensibility (adding new priority focus). I guess only time will tell which is more usable for AI coding

You could have written your XML that way

<GamePhase Early="GamePhase_Early">
   <EndTurn>50</EndTurn>
   <Priorities>
     <Economy Value="3.0"/>
     <Farming Value="5.0"/>
   </Priorities>
   <Avoid>
     <War Value="3.0"/>
     <ConstructionTime Value="3.0"/>
   </Avoid>
   <SovereignFocus>
     <CityBuilding Value="3.0"/>
     <GoodyHuts Value="3.0"/>
   </SovereignFocus>
</GamePhase>

or that way

<GamePhase Early="GamePhase_Early">
  <EndTurn>50</EndTurn>
  <Economy>
    <Priority Value="3.0"/>
  </Economy>
  <Farming>
    <Priority Value="5.0"/>
  </Farming>
  <War>
     <Avoid Value="3.0">
  </War>
  <ConstructionTime>
     <Avoid Value="3.0">
  </ConstructionTime>
  <CityBuilding>
     <SovereignFocus Value="3.0">
  </CityBuilding>
  <GoodyHuts>
     <SovereignFocus Value="3.0">
  </GoodyHuts>
</GamePhase>

In a similar way, why define attributes Early and Middle in GamePhase instead of a Phase attributes. If your AI is XML data driven, it may be interesting to have neutral attribute name. It will surely help to reduce the number of different attributes you need to check.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 8:47:12 AM from Elemental Forums Elemental Forums

Good morning Frogboy,

Thanks for letting us in under the hood a bit.

I highly recommend this XML design article 

But the short version, unique values should be element values and attributes are generally things that each element in a section share.  So For ex. maybe break out the Priorities into their own separate elements so you can next multiple layers of priorities. This will also make it a bit easier for the Python to shuffle and append new elements in a logical manor depending on in-game events and allow for fun things such as inheritance and overriding values for specific subsets easily.

Code: xml
  1. <Priorities>
  2.      <Priority weight="20" >
  3.           <Name> Farming</Name>
  4.           <Type>CityImprovement</Type> 
  5.           <MaxBuildTime>12</MaxBuildTime>
  6.           <DefenseWeight>4</DefenseWeight>
  7.           <Priorities></Priorities>
  8.      </Priority> 
  9.      <Priority weight="40" >
  10.           <Name>Military</Name>
  11.           <Type>Units</Type>
  12.           <MaxBuildTime>15</MaxBuildTime>          
  13.           <Priorities>
  14.                <Priority weight="20" >
  15.                    <Name> ScoutingUnits</Name>
  16.                    <Type>Unit</Type>
  17.                    <MaxBuildTime>12</MaxBuildTime>
  18.                    <DefenseWeight>4</DefenseWeight>
  19.                    <PreferredAttributes>
  20.                          <Attribute weight="20">Speed</Attribute> 
  21.                    </PreferredAttributes>
  22.                    <Priorities></Priorities>
  23.                </Priority>
  24.            </Priorities>
  25.      </Priority>
  26. </Priorities>
  27. <p>
 

ok ok.. I'm rambling and Haven't had my 3rd cup of coffee yet.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 8:49:32 AM from Elemental Forums Elemental Forums

As you can have multiple attributes for the same tag, you could also write your XML that way

<GamePhase Phase="GamePhase_Early">
   <EndTurn>50</EndTurn>
   <Priority Field="Economy" Value="3.0"/>
   <Priority Field="Farming" Value="5.0"/>
   <Avoid Field="War" Value="3.0"/>
   <Avoid Field="ConstructionTime" Value="3.0"/>
   <SovereignFocus Field="CityBuilding" Value="3.0"/>
   <SovereignFocus Field="GoodyHuts" Value="3.0"/>
</GamePhase>

It is perharps more extensible since you won't need to change the DTD associated with your XML file if you want to add another category to be specifically taken into account.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 9:01:41 AM from Elemental Forums Elemental Forums

I like the Turn values provided.

Early is 50 extending out to the Middle at 200. Thus if we extrapolate, that could place from Middle to start of End game at 800 and then all HECK should break loose around Turn 1200. (just stirring the pot is all) lol

And like Tormy- Even I can change Values in an .XML file.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 9:09:09 AM from Elemental Forums Elemental Forums

Wow... I know some programming, but now I feel a sudden urge to learn Python. OK, anyone who wants to join me in learning as much Python as possible before release? A little study group of sorts...

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 9:13:18 AM from Elemental Forums Elemental Forums

That sounds seriously Awesome, Frogboy . I noticed you used my name in there...lol. You're not going to convert my personality from the forums and make me an AI are you?.....

Because that would be Awesome!!!! I can see it now....lol

*you have been killed by Noob Lord RavenX"

 

Having it all editable in XML makes it seriously easy to change things for beginers. It's also really helpful that this isn't one of those things I'll need to learn Python for. Great work!!!

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 9:20:56 AM from Elemental Forums Elemental Forums

Battlefield AI - it'll be a bit different.

In NWN, we did the AI almost entirely in script, with the engine providing the "heavy lifting" of things like pathfinding, LoS, etc. I guess I should explain that NWN was, at the heart of things, truly turn-based, but it had the "end turn" button hit every six seconds.

 

The model we used was a heartbeat script that ran during every turn coupled with an Observer pattern. The engine served as the Observer, and had a list of registered dependants (the critters/mobs) and when certain things happened (they got attacked, they perceived a player, they got blocked) it would fire off an event activation tied to the creature.

In order to keep things fast, we precompiled the scripts down and stored them in memory. You can do the same with python, the bytecode compiles to .pyc/.pyo files.

Beyond the basic model, what we did specifically was relied very heavily on the idea that we would be facing groups of enemies, and that the AI should prioritize certain foes, "focus fire," and determine who the individual monster would be best off attacking. If it had a high attack bonus, it would go after the unit that just dealt it the most damage. If it had a low attack bonus, it would swarm the weakest foe present.

The algorithims were designed to avoid waste. The monsters would not fight those who they could barely hit, but who did little damage (i.e, if there's a low damage tank, just ignore him and go straight for 300+ damage mage fireballing us, or the heavy-hitter who kills one of us a turn) which meant tanks had to be sure to "hold the line," if they wanted to be super effective. Just like a real player, the AI knew to "kill the LRMs and carriers first, forget the sentinels."

That was the base model. We had heavily-developed algorithims to handle being blocked, to determine the source of blockage and deal with it (like doors or fordable water or PCs), so the AI would be able to access a really good, intelligent function to deal with difficult situations. When the "tank" units blocked you, the AI knew that it was time to pick one tank and start smashing it.

 

=====

 

We actually went a lot further than this. It was important that our AI did not cheat, and only had access to the same informed guesses the players would have.

We had one unit set to be a "commander," and based on that commander's intelligence/wisdom score, he would have things available to him. The commander would assess strengths and weaknesses, make skill rolls, etc, and bark out orders to the individual units. The non-commander units would defer to his request except in special circumstances.

The commander knew everything there was to know about his own units, and unlike the individual AI which was weighted toward self-preservation and personal efficiency, the commander was all about weighing the multiples. If there was a ton of damage being dished out by a unit he knows is weak (his perception event has recorded that even his weakest unit has no problem doing damage to this unit) he'll prioritize them. If there's tanks holding the line, he'll prioritize destroying them. He'll deliberately sacrafice units to buy time, to protect his mages, to protect himself, and to confuse the enemy. He'll keep the mages invisible until their AoEs will be most effective, he'll have a group of rogues stay hidden, sneak past the tanks and wail on the player all at once, dealing masive damage.

This was all pretty neat because it meant two things: the AI got a lot more nastier, but could still fall back to individual mob-rules. It also meant that the players had a target that killing would result in a devastating blow.

 

We also wanted to reflect real intelligence in what units would do. Taking the blocking algorithim for example: animals with low intelligence scores don't know how to open doors. Human units could usually figure out opening a door. Smart animals might realize "bash door down," and stupid animals might just go... "dur... peekaboo, where'd it go?" This went for dealing with invisibility, everything where we realized "wait, should the AI know what to do in this instance?"

 

And we wanted to make morale not an artificial "thing" but something that was right there in the game engine, a consequence of events that was not just an on-off switch. Every time an AI got damaged, he lost morale individually. He would gain morale if he was "awesome" and just killed an enemy, or he if did a ton of damage, or when the bard made a rallying cry, or when the foes around him were just dying.

 

Here's the algoritihm we used for calulcating the morale penalty for taking damage.

Code: c++
  1. if(iDamage > i0)
  2.         {
  3.             if(!GetSpawnInCondition(AI_FLAG_FLEEING_FEARLESS, AI_TARGETING_FLEE_MASTER))
  4.             {
  5.                 int iToDamage = GetBoundriedAIInteger(AI_DAMAGE_AT_ONCE_FOR_MORALE_PENALTY, GetMaxHitPoints()/i6, GetMaxHitPoints(), i1);
  6.                 int iPenalty = GetBoundriedAIInteger(AI_DAMAGE_AT_ONCE_PENALTY, i6, i50, i1);
  7.                 if(iDamage > iToDamage)
  8.                 {
  9.                     // 61: "[Damaged] Morale Penalty for 600 seconds [Penalty]" + IntToString(iPenalty)
  10.                     DebugActionSpeakByInt(61, OBJECT_INVALID, iPenalty);
  11.                     // Apply penalty
  12.                     SetMoralePenalty(iPenalty, 300.0);
  13.                 }
  14.             }
  15. }

It'd have a specific duration, so damage that came hard and fast was frightening, but just taking periodic damage over a long time didn't fell that bad.

 Your leader fleeing, your neighbor fleeing - all could trigger more morale penalties. Spells of course affected morale.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 9:21:48 AM from Elemental Forums Elemental Forums

Quoting Raven X,
That sounds seriously Awesome, Frogboy . I noticed you used my name in there...lol. You're not going to convert my personality from the forums and make me an AI are you?.....

Because that would be Awesome!!!! I can see it now....lol

*you have been killed by Noob Lord RavenX"

RavenX AI description: "Prepare to be wtfpwned!"

<Priority War="100.0"></Priority>

 

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 9:31:52 AM from Elemental Forums Elemental Forums

OK, I find this simply fascinating. Sadly I am way to old to get into it to heavy. So please forgive any totally stupid questions I may pose, but I will pose some anyways.Maybe they will all be stupid but hey, I am old...

@drakkheim

In your example, the priorities seem set to be "on" at all times. When I see Brad's example I see set game "periods" being used. I realize I am looking at the 2 from a very simplistic view, but am curious about how, in your example, would I change the AI's focus to be a "set" time frame in game (turns), versus always using a weighted value for a specific element?


 

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 9:40:36 AM from Elemental Forums Elemental Forums

Would it be possible to randomize the AI a bit. I find it a bit disheartening that the AI will switch personality at a certain turn. I would love it if the AI switched at a random place in an interval. Then the AI would be less predictable. Some AIs will go into warmode earlier than others.

I know that you can make many personalities for the AI, where some are aggressive and some are more passive, but I would like some randomness that cannot be known in advance. Maybe this is asking far too much - I am not a game designer

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 9:41:37 AM from Elemental Forums Elemental Forums

Some last thoughts... specific things

 

Use booleans a lot to save on space... a true/false answer is good. Use integers lots, avoid generating objects if you're just going to destroy them.

Have a good cleanup method.

 

Things I'd wish I'd done from the start and wish I knew beforehand... what I wanted was an AI that would be good at any game, that was a desire. It is better if the AI is really good at this game, and it is better to be very explict about complex things.

That is, not "use what spell seems best because it is the highest level," but rather "here, this is an explict list of (all) attack spells ranked in order of bang-for-buck, use the first one on the list unless you have a reason not to." i.e, loop over the list and use the first spell on it you have that is not impacted by ingame conditions (resistance to fire etc) to the point it would go down on the list. Include "use weapon" on the list, so the AI will pull out his crossbow and shoot if all of his remaining spell choices suck.

Include a great algorithim for maximizing AoE placement.

 

And not "if he has protections, get rid of them," but rather "this is an explict list of every defense in the game, if he has one of these, evaluate whether it means something to get rid of it. This is a list of every way to defeat protections. Use the cheapest one on this list that will work."

I guess one might refer to these as recipes. Not everything is something the AI should or even can determine on the fly. Know-how based on real experience and evaluation is invaluable to supplement the computer's understanding of the game, and forces us to admit which spells really are the "best" by saying which one we'd use preferably.

 

Beware of stashing XML in memory, for a hundred units it adds up fast and eats into RAM you want to use for other things. Beware of leaving it on disk, a hundred disk reads adds up to slow. Prefetch the last two XML files used, store in memory, chances are they'll be used again. Process the XML files to be readable with methods that just fetch a value, like MyCreature.getGamePhase('early').Economy();, so you're just calling a getter method and not reinitializing your XML parser every time. XML is a language about extreme portability, but in terms of speed compared to just a simple stack or list, it is sa-slow.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 10:30:46 AM from Elemental Forums Elemental Forums

Quoting John_Hughes,

@drakkheim

In your example, the priorities seem set to be "on" at all times. When I see Brad's example I see set game "periods" being used. I realize I am looking at the 2 from a very simplistic view, but am curious about how, in your example, would I change the AI's focus to be a "set" time frame in game (turns), versus always using a weighted value for a specific element?

 

@john_hughes

Oh I just didn't include the parent containing <GamePhase>  element and whateever attributes it would have.  I was just primarily trying to illustrate a more human readable format and a deeper multi level structure so as to be able to implement overrides. (ie the Ai doesnt really have an  interest for building military units and when it does the emphasis is on building units with a high speed. 

In general I think weighting makes for a lot more granular decision making and you can use things in the game to calculate an 'actual weight'  

So if you think of the weight in the XML as a 'philisophical weight' and multiply it by the availability of a resource (ok you'd probably use  a bit more complex than straight multiplication) you can get an 'actual weight'. For ex. 'philisophical weight' * 'resource availability' / 'research required'  * 'future benefit'  / 'need for benefit'= 'actual weight'  so if the AI has a farm priority and a Farm tile available, has it researched and needs food it it's a massive priority.

Granted I'm just tossing ideas and methodology out there, I'm not an AI programmer I'm more of a graphics, tools and usability guy  

 

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 10:33:48 AM from Elemental Forums Elemental Forums

@Tcores

Wow good stuff here.  Thanks for sharing!

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 10:35:14 AM from Elemental Forums Elemental Forums

Looks good Brad, and very interesting posts TCores.

 

I'll be very happy if the AI is done this way, allowing players/modders to tweak to their hearts content

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 11:42:37 AM from Elemental Forums Elemental Forums

Quoting TCores,
what I wanted was an AI that would be good at any game, that was a desire. It is better if the AI is really good at this game, and it is better to be very explict about complex things.

Having played all too many games where the AI doesn't utilise the tools and combinations offered by the game, as a player I'm strongly in favour of these two maxims. There is nothing more frustrating than playing a game that to the human player has the complexities of chess and yet the AI plays it like checkers.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 11:43:34 AM from Elemental Forums Elemental Forums

Quoting drakkheim,

Quoting John_Hughes, reply 11
@drakkheim

In your example, the priorities seem set to be "on" at all times. When I see Brad's example I see set game "periods" being used. I realize I am looking at the 2 from a very simplistic view, but am curious about how, in your example, would I change the AI's focus to be a "set" time frame in game (turns), versus always using a weighted value for a specific element?

 
@john_hughes

Oh I just didn't include the parent containing <GamePhase>  element and whateever attributes it would have.  I was just primarily trying to illustrate a more human readable format and a deeper multi level structure so as to be able to implement overrides. (ie the Ai doesnt really have an  interest for building military units and when it does the emphasis is on building units with a high speed. 

In general I think weighting makes for a lot more granular decision making and you can use things in the game to calculate an 'actual weight'  

So if you think of the weight in the XML as a 'philisophical weight' and multiply it by the availability of a resource (ok you'd probably use  a bit more complex than straight multiplication) you can get an 'actual weight'. For ex. 'philisophical weight' * 'resource availability' / 'research required'  * 'future benefit'  / 'need for benefit'= 'actual weight'  so if the AI has a farm priority and a Farm tile available, has it researched and needs food it it's a massive priority.

Granted I'm just tossing ideas and methodology out there, I'm not an AI programmer I'm more of a graphics, tools and usability guy  

 

Cool. Thanks for the response. My initial thought was actually to have the <GamePhase> element be more flexible/pliable (arrghh wrong word).

After playing quite a bit in the Beta, and being a TB based game, it seems apparent that only certain things are actually even doable at certain phases (turns) of the game.Turn 1 (priority is defense) choices? severely limited

Obviously, as time marches on that set of elements, their priority level shift one way or another. Another major factor, again just from a simplistic viewpoint is how the AI reacts to the action of the other AI's and or players.

Defense, Offense, Research, Prestige etc. all vary and fluctuate based on action taken on a Turn by Turn basis. Sorta Chess like. I move, he evaluates. He moves, I evaluate. I move he Re-evaluates etc. etc.

Thus I might have 6 <GamePhase> entries in the first 30 Turns based on the knowledge of limited starting elements.

I am jabbering. But very fascinating indeed.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 12:22:57 PM from Elemental Forums Elemental Forums

Also, is there going to be a 'simulation' option where in people can modify the AI file(s) and then run several turns automatically to see the results?

Some of us actually like trying to maximize the AIs ability, and being able to test changes without having to actually 'play' through several turns would be nice.

 

MoO3 has this option, where you can run so many turns with the AI controlling everything and thus see how different settings (since in MoO3 you could set your advisers to handle the decisions, which is similar in concept to making AI changes) affected the outcome.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 12:25:24 PM from Elemental Forums Elemental Forums

For game phases (early/mid/etc.), a hard definition (turn 50 for early, etc.) bothers me, as it gives players some out-of-game foresight on when things will change. I'd prefer it be random, one that would vary amongst AI and change from game to game.  Also, a gradual change would be better than an abrupt one (since priorities are multipliers, instead of jumping from 3 to 4, make it more gradual).

Quoting TCores,
... what I wanted was an AI that would be good at any game, that was a desire.

For years I've awaited a stand-alone AI that we can buy and tweak, use in different games (it would plug into games, of any genre), and have it learn as it's used (and as we tweak it).  Players would compete by running their AIs against each other in games -- it'd be the cyber version of hot-rod drag racing.  The AI would assist/augment our skills, or just go without our participation.

Someday...

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 12:32:31 PM from Elemental Forums Elemental Forums

Quoting Tormy-,

RavenX AI description: "Prepare to be wtfpwned!"

<Priority War="100.0"></Priority>

 

ROFL

nice one Tormy  

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 12:36:17 PM from Elemental Forums Elemental Forums

Quoting alh_p,

Quoting TCores, reply 13what I wanted was an AI that would be good at any game, that was a desire. It is better if the AI is really good at this game, and it is better to be very explict about complex things.
Having played all too many games where the AI doesn't utilise the tools and combinations offered by the game, as a player I'm strongly in favour of these two maxims. There is nothing more frustrating than playing a game that to the human player has the complexities of chess and yet the AI plays it like checkers.
Agreed.

Also, I'd like to see AI learn during a game -- it it's attacks keep failing, have it try something else.  If their attacks are succeeding, keep at it but 'improve' on what it's doing so it's even more successful.

It would be very nice to have the AI learn from game-to-game (or have that as an option).  We as players learn from game-to-game (hopefully...) and if the AI did too that'd obviate some of the need for the usual 'difficulty settings' which usually are just AI 'cheats' (faster building, more hit points, more units, etc. instead of 'smarter' AI gameplay).

An AI that learns from game-to-game would not be constrained by the skill of the programmers to anticipate how players will act, how the game systems interact, etc. (no offense frogboy et al ).

Question -- if AI's don't 'cheat' to offer a greater challenge, then they need a 'deeper' analysis, which is more computer cycles, which slows the game?

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 12:47:40 PM from Elemental Forums Elemental Forums

Thanks for sharing the peek under the hood! We do a lot of data-driven automation protocols at work, so I always like to see how others do it.

One variable I'd like to be able to tweak would be a randomness factor. So maybe you set all your priorities, turn phases, etc., then you have a variable that adds or subtracts a % from each. That way your enemies will have some variation from game to game. Just like a real player. Some days I'm feeling aggressive. Some days I just want to see how fast I can research tech, etc.

For example, you might set your War priority for one faction to be 30. So on average that's what you'll get, but if your randomness factor is 10%, you could see War priority anywhere from 27 to 33.

That would be an easy way to mix things up/make the opponents less predictable.

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 1:07:15 PM from Elemental Forums Elemental Forums

I don't want to sound negative but a "thinking AI" may be a bit much. Take a decent Chess AI and give it unlimited time to make moves, and your a decent opponent, and you now have to shave between moves. I think that even DEEP BLUE was given a time restriction.

If an AI was to really "learn". Where would it store and or retrieve all that learned knowledge? Lucky us, we carry our around in a melon atop our shoulders.

A game AI would have to have one Library of Files, filled with "OK they did this?" which would be all selectable or disregarded predicated on another Library List of "after I did that", which would be selected or discarded from another Library of "now what?" files etc. etc.

The android DATA is a fascinating bit of futuristic imagination but the reality is. We have a very very long wait for it to even becomes anything other than a wet dream.

 

Reason for Karma (Optional)
Successfully updated karma reason!
April 29, 2010 1:22:32 PM from Elemental Forums Elemental Forums

So Frogboy has started on the AI eh? Well I don't know much about that but if it's anything like the Total War games he'll be finished by tonight.

Reason for Karma (Optional)
Successfully updated karma reason!
Stardock Forums v1.0.0.0    #101114  walnut1   Server Load Time: 00:00:00.0000328   Page Render Time: