Results 1 to 15 of 15

Thread: on genetic ai

  1. #1

    Default

    one of the catchphrases with the initial marketing of this game was 'genetic ai". i think thats what it was called where the computer would learn to adapt to your playing style.

    does anyone know if any progress has been made on this?

    ------------------
    indeed
    indeed

  2. #2
    War Story Recorder Senior Member Maltz's Avatar
    Join Date
    May 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    2,760

    Default

    Good question. I also remember seeing this somewhere but nobody ever mentioned it...

    I cannot feel that the AI is really learning... they are pretty smart, but are not really learning

  3. #3
    Member Member Koga No Goshi's Avatar
    Join Date
    Jun 2001
    Location
    Los Angeles, CA, USA.
    Posts
    2,596

    Default

    They learn up to a point. I've noticed that some of the most frustrating units when facing them in an AI army, which for me are things like archers and cav archers, the AI has adopted the habit of using religiously. I hate yari cav, so my armies rarely have them. Hence, an army of 10 samurai archers on skirmish can present quite a challenge for my army to overcome. Even when I can rout them off the field, usually they are too fast for my yari sam and monks to catch up with and kill many of before they get off the field,a nd then I have to face them again. I've noticed that sometimes the AI keeps armies entirely made up of sam archers in some of its border states with me. Also, after about 15 computer attempts to take Shinano away from me by charging up the left hand hill face (left from defender's perspective), it started going around to the right instead. So in a limited fashion it does learn and try new things against you.



    ------------------
    Koga no Goshi

    "Nandai"
    Since time began
    the dead alone know peace.
    Life is but melting snow.
    Koga no Goshi

    I give my Nihon Maru to TosaInu in tribute.

  4. #4
    War Story Recorder Senior Member Maltz's Avatar
    Join Date
    May 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    2,760

    Default

    Yes those skirmish archers are always annoying. I would do:

    1. Just ignore their fires and focus on one unit first, surround it and kill it. Then move on to the next.

    2. The daimyo! The HC of the daimyo is enough to handle one entire group of archer until the reinforcement has arrived. (but not 2 ) Once the enemy is engaged they cannot march away anymore.

    3. Get cavalry! Don't know why Koga hates it, but on the battlefield all we can afford to hate is the enemy.

  5. #5

    Default

    If they are using a genetic algorithms / genetic programming approach, that might be interesting. Coming up with a decent encoding scheme for behavior in a complex strategy game would seem to be difficult... unless, of course, they're not encoding behaviors as such, but merely army composition (still nontrivial as to whether or not it would work, but at least the encoding method is much more obvious).

    ------------------
    He is justly served; It is a poison temper'd by himself.
    He is justly served; It is a poison temper'd by himself.

  6. #6
    Member Member KumaRatta Yamamoto's Avatar
    Join Date
    Apr 2001
    Location
    Montreal, Canada
    Posts
    950

    Default

    I have also noticed that if the AI was unsuccessful in capturing a province it will try different seasons, different army composition and different general tactics.

    But does not mean that it's really learning.

    ------------------
    KumaRatta Yamamoto (Emissary of the ratta clan)Sonkei soshite yuki Ratta Ichizoku. Come and visit us : www.rattaclan.homestead.com
    KumaRatta Yamamoto Sonkei soshite yuki Ratta Ichizoku. Come and visit us : www.rattaclan.homestead.com

  7. #7
    War Story Recorder Senior Member Maltz's Avatar
    Join Date
    May 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    2,760

    Default

    Talking about learning, I guess we need to figure out the definition first:

    As human players, in STW we learn by incorporating the new information (we lose because blah blah) with existing knowledge (the weather / the army composition, blah blah). So we figure out why we lose, and try to avoid the mistake by trying something new.

    Based on Kuma, the AI probably simply chooses another behavior pattern pre-programed - increase the number of army, different seasons, different path to climb up, etc. This is not really learning because they cannot figure out the solution of their problems by massaive possibilites of trial and error. The real problem is: they should not have that kind of crappy army from the beginning - they never learn that.

    Imagine a tougher SP campaign if the AI concentrates on troop upgrades! (They get free troops anyways, why bother with farms?)

    [This message has been edited by Maltz (edited 07-30-2001).]

  8. #8
    Hope guides me Senior Member Hosakawa Tito's Avatar
    Join Date
    Dec 2000
    Location
    Western New Yuck
    Posts
    7,914

    Default

    The AI would be much tougher if it would just combine depleted units that were devastated in previous battles,and bring their units up to full strength.Ever notice that when you are repeatedly attacked,even though the total number of enemies you face might greatly out number you,the sixteen enemy units you face at the start of the battle usually have units that are at 1/3 to 1/2 strength and even less?Rout the first 16 depleted units and the enemy reinforcements never get a chance to enter the battle.
    "He is no fool who gives what he cannot keep to gain that which he cannot lose." *Jim Elliot*

  9. #9
    War Story Recorder Senior Member Maltz's Avatar
    Join Date
    May 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    2,760

    Default

    Indeed. However, I doubt the AI will be considered "tough" even if they do combine the weakened units.. they were defeated in the first place anyways

    It is really humiliating of seeing all the 10-men teams being the first 16 units. Sometimes their taisho himself consists of the entier unit, charging over and got killed by our arrows...

  10. #10
    Member Member vangersonm's Avatar
    Join Date
    Jul 2001
    Location
    California, Sacramento U.S. --*Originally from: South America Lima, Peru
    Posts
    688

    Default

    If t hey can't make the AI tough enough why dont they just add Strength, Attack, Speed....... or other such added bonuses to compensate..........

    ------------------
    If he is taking his ease, give him no rest. If his forces are united, separate them.

    Attack him where he is unprepared, appear where you are not expected.
    If he is taking his ease, give him no rest. If his forces are united, separate them.

    Attack him where he is unprepared, appear where you are not expected.

  11. #11
    Member Member HATAMOTOKILL's Avatar
    Join Date
    Jul 2001
    Location
    Leeds,England
    Posts
    402

    Default

    good point and great idea??

    ------------------
    Hato!!!
    genie of the lands!!!
    Shoko Emperor
    Die by the Sword

  12. #12

    Default

    Greetings,

    Quote Originally posted by vangersonm:
    If t hey can't make the AI tough enough why dont they just add Strength, Attack, Speed....... or other such added bonuses to compensate..........

    [/QUOTE]

    I believe that is one of the differences in the difficulty levels. The AI units are effectively better.

    -J

  13. #13
    Member Member Hiroshi-O'Duff's Avatar
    Join Date
    Apr 2001
    Location
    Chicago, IL, USA
    Posts
    98

    Default

    Also note. The concept of Genetic Algorithms doesn't NECESSARILY mean learning "on the fly" like a neural net does. For Genetic AI to function, it simply means that a certain set of rules were given, and the computer experimented with them in a fixed environment, throwing away "dead" choices.

    It would be completely appropriate to call it "Genetic AI" if they say that they simulated a million or so battles in their test lab (with no graphics), and the computer picked the best ones from those battles. Now, the computer makes decisions in real-time based on the rules the original Genetic Algorithm came up with. It doesn't have to be real-time genetic to be genetic.

    Not that I know anything about this at all.

    Besides, I'm damn sure it ain't really genetic, otherwise the f(*&ing HORDE would give up eventually.

    Duff
    Duff -
    Look for me online as HIRO SAITO

  14. #14
    Member Member vangersonm's Avatar
    Join Date
    Jul 2001
    Location
    California, Sacramento U.S. --*Originally from: South America Lima, Peru
    Posts
    688

    Default

    what??????????
    If he is taking his ease, give him no rest. If his forces are united, separate them.

    Attack him where he is unprepared, appear where you are not expected.

  15. #15

    Default

    Well, a "genetic programming" method consists of

    a) a population of candidates, which are encoded representations of strategies or algorithms, and

    b) a stochastic method for determining successive generations, usually based on some notion of fitness.

    Such methods tend to be quite analogous to meiotic reproduction, hence the word "genetic". In particular, it is not unusual for there to be both crossover and mutation operators.

    A crossover operation generically involves selecting two parent instances -- genetic sequences, if you will -- and somehow producing offspring with their characteristics. For instance, if instances are represented by bit strings, and every bit is independent (and therefore every possible bit string of the same length is meaningful), one might select one or two random locations, which divide each of the parent strings into two or three parts. These parts are then exchanged so the offspring have characteristics of both. Parents tend to be selected randomly, biased according to fitness perceived by some function (in the case of STW, say, total additional honor accrued in battle or whatever).

    A mutation operator, on the other hand, may perhaps not be strictly fitness-based in terms of whom it selects; it may just be selecting a few strings and flipping a random bit in each.

    Some implementations may allow for particularly fit individuals to survive in their entirety into the next generation, in addition to cross-over spawn and mutated members.

    Hence, these evolutionary schemes attempt to iteratively maintain and improve a set of possible strategies, and those that do well should thrive compared to relatively poor strategies. That does not mean that such a method will reach a *good* solution within a reasonable time, however, since a poor initial population combined with a poor encoding scheme and a lousy fitness function isn't likely to lead you anywhere. The latter two, in particular, are REALLY key; a poor initial population can be worked around with periodic random restarts if performance seems strangely bad.

    A basic example relevant to STW would be army composition. At a basic level, an army could be encoded as a lexicographically sorted string of up to 16 letters, corresponding to different troop types ignoring upgrades. Fitness might be tied to how they perform in battle, such as net casualties in terms of koku, net honor change, and so forth. An AI theoretically could be trained to learn which combinations work (balanced armies, say) and which tend to fail often (all ashis, perhaps). One could attach additional bits accounting for terrain and season, attack or defense, or even year if desired (since an army may be less than optimal later on, due to probable enemy developments). And so forth.

    If CA did actually use an evolutionary AI implementation, they could have performed a lot of population training before the game ever reached the gold master phase. Since I have no insider information, I don't know what they actually did. *shrug*


    ------------------
    He is justly served; It is a poison temper'd by himself.
    He is justly served; It is a poison temper'd by himself.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Single Sign On provided by vBSSO