Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Just a different idea: Genetic AI

13»

Comments

  • mrcalhoumrcalhou Member UncommonPosts: 1,444

    He's saying that the great majority of gamers won't notice why it's happening, only that it is. I'm pretty sure the gist of his arguement is that if the gamers don't notice why, then it's more cost efficient to implement a system that mimic whats you want, in terms of the final product, while cutting back on the man-hours that it takes to develop it. Basically, your idea would most likely be too expensive relative to the outcome, thus, in terms of development money, it's inefficient. Developing a more basic AI, that takes less time (money) would be better if the players don't know any better.

    --------
    "Chemistry: 'We do stuff in lab that would be a felony in your garage.'"

    The most awesomest after school special T-shirt:
    Front: UNO Chemistry Club
    Back: /\OH --> Bad Decisions

  • AmarantharAmaranthar Member EpicPosts: 5,852

    Originally posted by mrcalhou

    He's saying that the great majority of gamers won't notice why it's happening, only that it is. I'm pretty sure the gist of his arguement is that if the gamers don't notice why, then it's more cost efficient to implement a system that mimic whats you want, in terms of the final product, while cutting back on the man-hours that it takes to develop it. Basically, your idea would most likely be too expensive relative to the outcome, thus, in terms of development money, it's inefficient. Developing a more basic AI, that takes less time (money) would be better if the players don't know any better.

    "That it is" happening is what it's all about. How could a game mimic this without having GMs constantly making changes on a 24/7 basis? Playing the MOBs themselves? The only way to mimic this is to do...this.

    And "why" it's happening isn't important to the player. Only that it is. It changes an entire world from static and predictable to a living world that's not predictable and full of adventure. 

     

    Once upon a time....

  • wisesquirrelwisesquirrel Member UncommonPosts: 282

    I like the idea of mobs "thinking", but I have to agree that mobs becoming stronger over time is not noticeable to the player (He did not experience the mob's past).

    I'm wondering if advance mob behavior can be done (a goblin party ambushing players and stealing some of their gear, a rabbit running away as soon as the player is detected, the enemy calling for help from his comrades or a herd running away or protecting their members).

    Mob learning didn't seem practical (More fun than complicated), but mob variety (Mob type A is different from another Mob type A), orc clans with different combat styles and objectives would add a touch of life to a world.

    Another fun thign would be mobs fighting other mobs in order to reach their objectives (tribes could fight each other every once in a while to fight over a resource node or shrine due to their beliefs).

     

     

    But what I want to add to the table:

    Is advanced behavior possible if mobs are a lot fewer (Instead of mobs lying in the field, the field is empty and the mobs are minding their own business in their own environment such as villages, wandering in the forest, fishing at the river).

    This would be a great addition to any RPG (I should probably try it out in a singleplayer rpg in order to experiment).

  • AmarantharAmaranthar Member EpicPosts: 5,852

    Well, MOBs looting a player corpse is nothing new, and neither is a MOB stealing directly from a live character. MOBs running away isn't new. MOBs picking up an item off the ground is not new.

    But having MOBs plan a raid on a camp site of players, and stealing a particular thing, without it being pre-planned and scripted in detail, that's not something I've seen or heard of. And that would require quite a bit of work for that sort of intelligence. I think it could be done, but that's beyond the sort of thing I'm thinking about here and I think it would be impractical until processing power gets quite a bit more powerful. This is something I think would be in the future, and built on top of this idea's AI programming.

    See, basically, this idea is a combination of several things.


    • A long list of "If this, then %this or %this or %this". Sometimes started by a "send" kicked out by another source, sometimes started by the MOB detecting something on it's own.

    • Adding a perception to the MOB, so that it doesn't always "see" something, modified by circumstances. This makes it more realistic, as well as unpredictable unless it shouldn't be.

    • Adding several "knowledge" mechanisms. Some of these would be permanent knowledge, some of them would be temporary. For example, the MOB walks through a doorway, it drops an invisible marker and "knows it came in from here, so that it can know the way out. These markers would go away under several circumstances, and always eventually go away unless the MOB still lives and is still in the area. This gets more detailed as we get into more things you've asked about.

    • Permanent knowledge- skills are permanent knowledge. Skills have a chance to be performed when they are called on. Like in the run/hide scenario I talked about before. As a skill is used, it gains in skill, and thus becomes more likely to be used. If a MOB survives long enough, it will buold all skills it is made with to max. But this is going to be very rare. This does not address the issue of learning to use a skill from others. But it's not really that, it's more like getting the idea to use that skill by seeing another do it. A simple boost to the chances, won't always happen, just more likely. I'm using skills here in place of actual decision making. It's a simulation, after all. And it's weighted by the ability of the skills.

    • New permanent knowledge might be introduced in a form similar to players finding "Blueprints". Several ways to do that as far as introduction to the MOB.

    But here's where we get into you final question. Groups, communities. You need to go to a "Leader" AI here. So an Orc Clan would pick a Leader in some way. Then this Leader starts issuing orders to run the community. The Leader has a new layer of AI. The Leader determines, as a group, what they do. This can get very complicated or just a little complicated.


    I'd stay with "just a little complicated", comparatively speaking. So this Leader, every so often, is told to "take stock of situation". This is in general running of the community, not encounters with enemies. So the Leader at this time determines what they need, and issues orders accordingly. Think strategy games here, like Ages of Empires, but modified to include individual AI.


     


    So, lets say this is a brand new leader of a new, small Clan. He "Takes stock", and they have no camp, and they are hungry. They are at a basic hunter gatherer level at this point. The Leader compares the needs for food or camp, modified. He issues the order to either move in the hunt, or make a camp. Needs for weapons can be added here too. basic skills to make sharpened wood spears, and skills developing to make flint spear tips, etc. Same for fighting weapons as skills develop, or maybe they already have the skills among them and the weapons.


     


    lets skip forwards quickly. The Orc clan grows, and Leadership skill grows, and the Orcs move to a permanent camp, and build onto that in a strategy game form, They add a food pit, a wood pile, and as building skills develop they build walls and huts. They then develop more skills, like stone working, and they can start buildinf stone structures instead of wooden.


     


    And the way I picture this working is to use the already established skills and AI. The Orc Leader issues an order to fill the Food pit. Orcs that are better at hunting than anything else go hunting. Orcs that are better at fishing go fishing. There'd need to be a mechanism here for each set to group up as they leave. And sub-leaders.


     


    Without writing all night, am I getting the idea across?


     


    There are all kinds of things that can be included, or not. But this can build a live world for players to run around in. A very successful Clan might build a mountain kingdom, a failing clan would end quickly. Natural selection based on weighted random rolls.

    Once upon a time....

  • AxehiltAxehilt Member RarePosts: 10,504

    Originally posted by Amaranthar

    Originally posted by mrcalhou

    He's saying that the great majority of gamers won't notice why it's happening, only that it is. I'm pretty sure the gist of his arguement is that if the gamers don't notice why, then it's more cost efficient to implement a system that mimic whats you want, in terms of the final product, while cutting back on the man-hours that it takes to develop it. Basically, your idea would most likely be too expensive relative to the outcome, thus, in terms of development money, it's inefficient. Developing a more basic AI, that takes less time (money) would be better if the players don't know any better.

    "That it is" happening is what it's all about. How could a game mimic this without having GMs constantly making changes on a 24/7 basis? Playing the MOBs themselves? The only way to mimic this is to do...this.

    And "why" it's happening isn't important to the player. Only that it is. It changes an entire world from static and predictable to a living world that's not predictable and full of adventure. 

     

    Correct, and my criticism is aimed at "why" being incredibly costly to implement compared to the "that it is" part.

    Implementing varied AI:


    • Programming cost: moderate

    • Player benefit: high

    Having evolution be the way that AI varies:

    • Programming cost: moderate

    • Player benefit: minimal  (because they can't see it and it isn't important to them as you just said)

    Using evolution as the method the AI varies is the problem.  The variance itself is fine and can be programmed regardless of how it gets assigned to mobs.  Even just randomly assigning it would work.

    "What is truly revealing is his implication that believing something to be true is the same as it being true. [continue]" -John Oliver

  • DeivosDeivos Member EpicPosts: 3,692

    My take.

     

    It's dynamic content, implemented much akin to the things that have been mentioned for Guild Wars 2. A similar thing has been done in prior games like Asheron's Call and Darkfall with enemy mobs progressing in skill. Creature pahting is taking a more freeform approach in many games, many shooters, RTS, and even MMOs use pathing mechanics that aren't pre-scripted anymore.

     

    Depending on how one implements stats and creatures in the game, if it all pulls from a common pool of data, then half the required information for such a system is all ready there. All the creatures would be working off a table of stats and skills that can be swapped and modified universally across creatures, models, etc.

     

    Just as well, depending on how the AI for the game is built that factors into the difficulty as well.  Scripting individual AI behaviors for each mob type may be a quicker route to getting a fundamentally varied group of enemies made like Axe said. However, every time new game content comes out, either you're releasing rehashed looks on the same AI over and over, or you're having to add even more types, which increased the cost of supporting the game over the long run.

     

    Spending more time building an AI using some kinda 'node' setup to add behaviors to allows more variance at reduced overhead in the long run by letting two things happen. One, the AI can be rebuilt rapidly to suit new creatures for expanded content. And two, weighting the values of the behavior 'nodes' allows an option to add variance within a single AI type.

     

    Automating such a thing isn't actually that hard. It's just assigning a randomly generated value to the AI's behavior, stats, and skills using their core type as a modifier. This gives both reliability that most mobs of the same type will behave the same way, while also giving the ability to have the potential for different unaccounted for reactions.

     

    That is then taken to the 'genetic' phase. If a given mob survives attack, time, and/or other trials & tribulations long enough for a new spawn cycle, their data can be automatically pulled as a secondary modifier template, giving the opportunity for the mobs to see an overall shift in their basic stats and skills over time within a given community.

     

    The difficulty of implementing such things goes down to the creativity and pre-planning taken in developing such things in the first place. In a purpose driven AI, sure it'll be hard. Because you just did it wrong. In an AI built at it's base to be re-slotted freely, it's just a matter of creating all the same things you need to make for the purpose driven AI, but as separate 'nodes' you can socket at-will.

     

    EDIT: As for players noticing it. Given the rate at which mobs tend to die and re-spawn in games, it's safe to say a genetic generation within the context of game worlds is somewhere between a rat and some of the more vigorously breeding bacteria in the world.

     

    Given that factor, the speed at which players will be able to experience noticeable differences in the behavior and skills used by an enemy of a given type should actually be pretty fast and frequent. More than likely you'd have to add intentional inhibitors or static aspects to the creatures to keep them behaving fundamentally the same as originally intended to one degree or another, like flagging all original values as a kinda 'core aspect' and force generations to occasionally breed back towards it. Or even more simply, always pull the original creature template and mate it with the present template.

     

    Thing being, players will notice it. If they're used to seeing crazy orcs with two axes charging at them, they'll be certainly surprised when another group of orcs turn around and pull into a defensive position instead. They'll notice when a dryad gores from normally lurking in forests stalking to breaking down a village.

     

    They'll certainly notice. Even if they only observe it's effects in passing, they'll notice and they'll respond.

    "The knowledge of the theory of logic has no tendency whatever to make men good reasoners." - Thomas B. Macaulay

    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." - Daniel J. Boorstin

  • anemoanemo Member RarePosts: 1,903

    Here's some fun example.  In this case the AI works closer to how pre-rendering works for graphics(spend TONS of time before the simulation starts to get a high quality low costs output).   In this case the AI doesn't really work "better" than a simulation AI(that simulates the whole of the game).  but the memory costs of the genetic AI is considerably less,  and the genetic AI would run a bit faster than the simulation based AI and it reaches the point of "good enough"(after formation anyways).  

    I would say that tic tac toe isn't the best example since there are a limited number of states(this is actually explained in further links).   But it's also kind of nice compared to how the average child learns tic tac toe.

    I've seen bigger examples where it was a simple FPS that would adapt by choosing spawn logic, base line stats, and non-genetic AI routines(sadly I've lost it and since it was like 7 years ago that I saw it's probably lost for good).   This game actually didn't need 30,000 some rounds the tic tac toe game did as the developer didn't use an "academic AI"(where the AI starts with nothing) and had other logic to push the AI along faster.

    genetic AI isn't a magic bullet.   It's just an intuitive way to allow a computer to learn over time.   The players are unlikely to see any differance the first time though game play.   But if the player comes back after a time(amount dependant on the AI and how much non-genetic pushing you're doing and how often content is used) the play through will be different.    I think the developers would have some fun looking at online guides as they become less effective due to changes(and players are likely to think the developers love messing with them if they weren't told the AI adapts).

    __________

    Genetic AI isn't particularly solely acedemic anymore.   It is used occasionally in anything that uses logistics(shipping, cellphone network design/optimization), automated design, and then things that are just annoying to define like sound/voice recongnition(the amount of input required by a programmer to do those from scratch  would be utterly insane without some form of learning).  There is even an example of NASA designing a few sattelite anttenni from a genetic AI, though mostly as an experiment(examples were used, and were something a human designer would have never have designed).

    Practice doesn't make perfect, practice makes permanent.

    "At one point technology meant making tech that could get to the moon, now it means making tech that could get you a taxi."

  • Death1942Death1942 Member UncommonPosts: 2,587

    Originally posted by Deivos

    My take.

     

    It's dynamic content, implemented much akin to the things that have been mentioned for Guild Wars 2. A similar thing has been done in prior games like Asheron's Call and Darkfall with enemy mobs progressing in skill. Creature pahting is taking a more freeform approach in many games, many shooters, RTS, and even MMOs use pathing mechanics that aren't pre-scripted anymore.

     

    Depending on how one implements stats and creatures in the game, if it all pulls from a common pool of data, then half the required information for such a system is all ready there. All the creatures would be working off a table of stats and skills that can be swapped and modified universally across creatures, models, etc.

     

    Just as well, depending on how the AI for the game is built that factors into the difficulty as well.  Scripting individual AI behaviors for each mob type may be a quicker route to getting a fundamentally varied group of enemies made like Axe said. However, every time new game content comes out, either you're releasing rehashed looks on the same AI over and over, or you're having to add even more types, which increased the cost of supporting the game over the long run.

     

    Spending more time building an AI using some kinda 'node' setup to add behaviors to allows more variance at reduced overhead in the long run by letting two things happen. One, the AI can be rebuilt rapidly to suit new creatures for expanded content. And two, weighting the values of the behavior 'nodes' allows an option to add variance within a single AI type.

     

    Automating such a thing isn't actually that hard. It's just assigning a randomly generated value to the AI's behavior, stats, and skills using their core type as a modifier. This gives both reliability that most mobs of the same type will behave the same way, while also giving the ability to have the potential for different unaccounted for reactions.

     

    That is then taken to the 'genetic' phase. If a given mob survives attack, time, and/or other trials & tribulations long enough for a new spawn cycle, their data can be automatically pulled as a secondary modifier template, giving the opportunity for the mobs to see an overall shift in their basic stats and skills over time within a given community.

     

    The difficulty of implementing such things goes down to the creativity and pre-planning taken in developing such things in the first place. In a purpose driven AI, sure it'll be hard. Because you just did it wrong. In an AI built at it's base to be re-slotted freely, it's just a matter of creating all the same things you need to make for the purpose driven AI, but as separate 'nodes' you can socket at-will.

     

    EDIT: As for players noticing it. Given the rate at which mobs tend to die and re-spawn in games, it's safe to say a genetic generation within the context of game worlds is somewhere between a rat and some of the more vigorously breeding bacteria in the world.

     

    Given that factor, the speed at which players will be able to experience noticeable differences in the behavior and skills used by an enemy of a given type should actually be pretty fast and frequent. More than likely you'd have to add intentional inhibitors or static aspects to the creatures to keep them behaving fundamentally the same as originally intended to one degree or another, like flagging all original values as a kinda 'core aspect' and force generations to occasionally breed back towards it. Or even more simply, always pull the original creature template and mate it with the present template.

     

    Thing being, players will notice it. If they're used to seeing crazy orcs with two axes charging at them, they'll be certainly surprised when another group of orcs turn around and pull into a defensive position instead. They'll notice when a dryad gores from normally lurking in forests stalking to breaking down a village.

     

    They'll certainly notice. Even if they only observe it's effects in passing, they'll notice and they'll respond.

    This is exactly why i like to focus more on procedural content and not pre scripted stuff.  Sure it might take a little longer to make a procedural system, but once it's done you have thousands and thousands of different combinations to play with.  Basically spend a little more time now and you end up spending far far less time later.

    I do expect more and more games to take the procedural route more often.  We are starting to lean towards it in the shape of dynamic events in guild wars 2 and Rift.

    MMO wish list:

    -Changeable worlds
    -Solid non level based game
    -Sharks with lasers attached to their heads

  • UU-OUU-O Member Posts: 8

    Originally posted by anemo

    Genetic AI is one of the most purposful AIs computer science has available right now, when given enough time.

    An MMO is actually a very good place to impelement genetic AI since the same thing happens SOO many times(how many people have killed XX rat) and it is SOO easy to determine a sucess value for a MOB(longest survival time, did most damage, or whatever else).

    Basically the randomness is just there because the computer is too stupid(or it would be too hard to code) to make intelligent choices.   So it instead makes 15 to 5000 random choices and chooses the best(s) at the end of it's round.

    ____________

    Genetic AI would help the developers do a few things.  


    • A) not have to worry about PvE builds of the month as eventually the AI will eventually find a soloution

    • B) makes the developers have to worry a tiny bit less about new content balance, as the AI will reach the difficulty level you want it to(if you have a target instead of just aiming for the MAX)

    • C) Plain just changes the content over a period of time(Whatever you choose as a condition the AI can change, the AI will eventually do.  So if spawn location is something it can change it will do that eventually,  if the attacks/stats are changable it will change that eventually, if the core level AI(Heal/attack/run routines) are changable that will change eventually).

    • D) makes PvE a tiny bit closer to PvP in the sense that the AI will be different and will "learn" given enough rounds to make mistakes

    I stumbled accross your post and in a way it is similar to what we are building into our mmorpg.  Have a read on the forums, whete there has incidentally been placed an article reagring AI in most games and how we are implementing it in unknown universe.

    http://unknown-universe.com

    Edit: Its under the Unknown Unverse -> Gameplay Forum titled Introduction into Unknown Universes AI

    The unknown awaits you

Sign In or Register to comment.