Slashdot Mirror


Emergent AI In an Indie RTS Game

x4000 writes "My recent RTS game uses a new style of AI that hybridizes rules-based AI with emergent AI logic. As a disclaimer, I'm really not an AI programmer at all — my background is in databases, financial modeling, etc. But it just so happens that database experience, which often involved distilling data points from multiple sources and then combining them into suggested decisions for executives, also makes a great foundation for certain styles of AI. The approach I came up with leans heavily on my database background, and what concepts I am familiar with from reading a bit about AI theory (emergent behavior, fuzzy logic, etc). The results are startlingly good. Total development time on the AI was less than 3 months, and its use of tactics is some of the best in the RTS genre. I'm very open to talking about anything and everything to do with the design I used, as I think it's a viable new approach to AI to explore in games, and I'd like to see other developers potentially carry it even further."

146 comments

  1. Article summary: by ActionJesus · · Score: 5, Insightful

    "I just wrote a game. Heres some techy stuff to get it posted on slashdot. Yay advertising!"

    1. Re:Article summary: by Anonymous Coward · · Score: 0

      s/techy/techish/

      Worth mentioning the title of the post:

      "Designing Emergent AI, Part 1: An Introduction"

      It is very light on implementation details.

    2. Re:Article summary: by mcvos · · Score: 3, Insightful

      It is very light on implementation details.

      Which is unfortunate, because it's a really interesting topic.

      Basically what he says is that he has three levels of AI: strategic, sub-commander and unit. Units look out for themselves, strategic is rule based and sets strategic goals, and sub-commander is the fun part: it makes units work together through flocking.

      That's pretty much it. Very interesting, but a bit more meat would have been nice.

      The slashvertisement worked, though. I'm very tempted to buy this game to see if the AI is really good, even though I hate RTS games.

    3. Re:Article summary: by Dr.+Spork · · Score: 2, Interesting

      I agree that this is very interesting, but the sheer asymmetry of the setup (players begin with four ships versus 20,000+ for the AI) means that we don't really have a chance to compare the AI to human intelligence. The concepts seem sound, but they need to be implemented in combination with an economic model which will allow symmetric human v. AI showdowns. Something like this would be very cool, for example, in the next iteration of the Civilization series.

      To his credit, the author acknowledges these limitations and admits that the concepts need to be taken farther. With this I agree, and I hope they do!

    4. Re:Article summary: by mcvos · · Score: 1

      I agree that this is very interesting, but the sheer asymmetry of the setup (players begin with four ships versus 20,000+ for the AI) means that we don't really have a chance to compare the AI to human intelligence.

      It's an RTS, so it was never going to give an accurate measure of strategic intelligence anyway. But on the whole, I agree with your point. I want to see this in action in a good, level playing-field TBS game.

    5. Re:Article summary: by oblivionboy · · Score: 1

      Thanks for the Culture of Cynicism comment -- we definitely need more people like you around that needlessly shit on others doing new stuff.

    6. Re:Article summary: by Bat+Country · · Score: 3, Interesting

      It's a great approach. It's one of those quasi-obvious AI schemes which people have been kicking around for years but typically haven't wanted to expend the CPU cycles on in major projects. I remember an article around 1997 wherein they asked game development studios to explain how games were going to change in the next couple of decades, and one of the chief topics that kept coming up was more natural AI (less rigidly rule-based) which could learn by observing outcomes. Modelling AI on military organization is fairly clever for the same reason that military organization (at least in battle) is clever - the individual soldier needs little autonomy or smarts, just so long as everybody further up the chain from them is at least incrementally smarter, if less capable in direct conflict.

      The most notable use of a system like this in recent years has to be the Director in Left 4 Dead, which is an overarching control scheme which issues orders to the game world and the units in it. These units are free to do what they do best - navigate around the map and eat players without having to worry about strategy. The Director is free to select the paths by which the units will arrive without having to waste significant time on fine pathfinding, as the units themselves will do the bulk of the work.

      I look forward to more games with heirarchical AI. I've written some basic tests of this exact sort before (basic "burds"-looking stuff) and the resulting behavior is extremely intuitive and ordered-looking.

      --
      The land shall stone them with the bread of his son.
    7. Re:Article summary: by mcvos · · Score: 1

      I've written some basic tests of this exact sort before (basic "burds"-looking stuff) and the resulting behavior is extremely intuitive and ordered-looking.

      But can it kick my ass in a fair fight? That's what I want to know.

    8. Re:Article summary: by Lord+Ender · · Score: 1

      He should sell his technology to Valve. Last night in L4D I watched two NPC teammates casually walk into fire and burn to death. I think their AI could use some work.

      --
      A slashdotter who didn't build his own computer is like a Jedi who didn't build his own lightsaber.
    9. Re:Article summary: by Anonymous Coward · · Score: 0

      "Someone just posted something interesting to many readers. How can I be the most scathing?"

      - Attempt to post first, but post off-topic and negatively.
      - Take some moral high-ground by accusing the poster of only posting for personal gain.
      - Offer nothing really insightful, but be modded as such.
      - ...not Profit! as I spend all my time pointing out how others are attempting to.
      - Ignore any Anonymous Coward who gets in my way.

  2. surely I'm not the only one... by ph4s3 · · Score: 0, Flamebait

    ...thinking, "who gives a fuck?"

    1. Re:surely I'm not the only one... by Anonymous Coward · · Score: 0

      Indeed! What kind of a nerd are you if you're more interested in some boring algorithm stuff for cruddy self-made games rather than proper computer game entertainment that you can pirate for free?

    2. Re:surely I'm not the only one... by Anonymous Coward · · Score: 0

      ...about your post, yes.

  3. player mimicry by drDugan · · Score: 5, Interesting

    could you catalog user actions and use them as possible inputs for your AI?
    like this: http://slashdot.org/comments.pl?sid=1165583&cid=27243769

    it would seem this might make for the most challenging AI - one that
    learns and mimics good human players. I have yet to see any games
    that can do this well

    1. Re:player mimicry by x4000 · · Score: 1

      Hi there -- I'm actually the dev from the article. This is a very interesting suggestion, and I'm sure that people will try this at some point. My main issue with that approach is that it requires a huge amount of ongoing data, which I'm not sure quite how to deal with at this stage. But like I've said, I'm fundamentally a database programmer and not an AI programmer. With my approach, what I wanted to do was have basically a "stateless" set of AI logic, which could look at any given situation and make a decision based on what it sees. Kind of how an expert chess player can look at any chess board and tell you the best (or at least a very good) next move. They don't need to historically see what the other player was doing. I think there's room for both approaches, but I went with what I know (naturally).

    2. Re:player mimicry by mcvos · · Score: 1

      I think the Mimiry suggestion is more comparable to a chess player who has played a lot of games, studied other people's games and studied books on opening theory and that sort of thing. That gives a good player a big knowledge base of good moves and a feel for how the results of those moves might turn out. A self-learning system would expand its base of good moves with each new game it plays.

    3. Re:player mimicry by Gulthek · · Score: 1

      Unfortunately, you are giving chess a little too much credit here. An unbeatable chess strategy really is to have an internal catalog of board states and optimal moves from those states.

      For a less rigid game a strategy of recording player moves becomes intriguing, but also extraordinarily more complex in that you must catalog sequences of related actions. AI by macro?

    4. Re:player mimicry by mcvos · · Score: 1

      Unfortunately, you are giving chess a little too much credit here. An unbeatable chess strategy really is to have an internal catalog of board states and optimal moves from those states.

      No, an unbeatable chess strategy is calculating the entire game to the end (or at least to an obviously won osition). I'm just explaining how chess strategy works in practice. How am I giving chess too much credit?

    5. Re:player mimicry by erko · · Score: 1

      Are you saying professional chess players don't prepare for big matches by studying their opponent? (and their opponent's previous games)

      I realize that players at that level probably mostly play from a memory of board states, but there are so many possibilities that knowing which ones to focus on let's you analyze the possibilities that are most likely. The unbeatable chess strategy you describe is for a computer with a ton of memory and a fast search capability, not for humans or human-like AI.

      Back to the main topic, I think a self-learning system can be much more human-like and smarter, but if the task is simple or restricted enough (checkers, for example), learning may not be needed to win.

    6. Re:player mimicry by Nukenin · · Score: 1

      Unfortunately, you are giving chess a little too much credit here. An unbeatable chess strategy really is to have an internal catalog of board states and optimal moves from those states.

      Feel free to create such an internal catalog and share it with the world.

      At some point I imagine you will concede that you need to give chess a little more credit.

    7. Re:player mimicry by Anonymous Coward · · Score: 0

      Chess is a game of perfect information whereas the type of game discussed in the OP is not. The respective approaches to AI for these game types is very different.

  4. Summary useless by toxicbubble · · Score: 5, Informative

    Summary reads like a marketing blurb but the actual article is slightly more interesting. The basic idea is that in an RTS game, the AI is at a unit level rather than an 'almighty all-seeing controller'. It is a fairly interesting idea and does sound sort of different way of thinking about computer RTS opponents. Weather or not this actually makes for a fun game or a good idea remains to be seen, but at least there is something (dare I say) slightly innovative about this.

    1. Re:Summary useless by fractoid · · Score: 3, Funny

      You mean he wasn't referring to the Fog of War?

      --
      Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
    2. Re:Summary useless by Anonymous Coward · · Score: 2, Funny

      Cleared it up for me. On the bright side ... ohh forget it :)

    3. Re:Summary useless by Apagador-Man · · Score: 2, Insightful

      The notion of intelligent agents has been around for quite a few years.

      Even I, 12 years ago at the University, had to implement a miserable little game where the A.I. was at a lower level than an all seeing, all knowing AI that makes decisions, each agent with it's set of "intelligent", adaptive rules.

      So... how is this concept new (or NEWSworthy, for that matter)?

      --
      In the end, there can be only one!
    4. Re:Summary useless by Anonymous Coward · · Score: 2, Funny

      Now you're clouding the issue. Maybe someone else could shed some light on this?

    5. Re:Summary useless by Anonymous Coward · · Score: 0

      Afaik the first Z (back in 1995?) did a similar thing, by having the AI "scroll" the screen itself and not seeing anything else. Also the robots had different smartness levels, so arguably you could also call that unit-level. Nice, only 14yrs late. (disclaimer: no, of course I didn't RTA)

    6. Re:Summary useless by BikeHelmet · · Score: 4, Interesting

      In short, it segregates the controller AI from the unit AI.

      I can remember when playing SupCom against easy opponents, if I didn't build any defenses, the opponent would stop sending units into my base for a while, instead moving them around in circles somewhere outside it. Even an easy/stupid AI has to make decisions that a stupid person would make. Mainly - CHARGE!

      But at the same time, the best AIs were omniscient. They'd target your first fusion reactor with bombers as soon as you build it... It became so predictable that I'd build a shield, turn it off, build a fusion, then turn the shield back on.

      But in SupCom there were all the modded AIs which chose more interesting tactics, and you could enable cheating for any AI to give them a resource and difficulty boost.

      I think to be realistic, AI has to be segregated even more. You need an Advisor, which decides the direction things should be going. Do we need more resources? Do we have an urgent matter to deal with, like artillery pelting the base? The Advisor should just decide what to tackle, and then pass that on to the other AI subsystems. Like a player, the AI subsystems should take time to do stuff. An AI can't instantly decide what's an entrance to his base. He has to study where the units usually come from, and locate possible landing zones for air transports, etc.

      To ramp up the intelligence, you let it assign more issues to its subordinates more rapidly, and you let it learn across missions. Pretty soon the AI can tackle any frequently played map.

    7. Re:Summary useless by toxicbubble · · Score: 3, Interesting

      Thinking about it a bit more, I wonder how this compares to the AI used in hack n slash games where you get swarms of enemy's all over the place. I'm thinking of the Diablo I & II (and future III) series from Blizzard. I suspect these games use a similar idea in their monster AI.

      These games use fairly simple monster AI that usually follows simple rules, so it may be much simpler than what this guy claims. However I think it must be applied per creature. Some types of monster will run and cower when you kill their nearby friends, others run off to heal but some of those Hell Bovines will chase certain targets in multiplayer games. I never got the feeling there was an overseeing god directing all the units with these games.

    8. Re:Summary useless by Sobrique · · Score: 3, Funny

      I'm not sure, some people seem to have mist the point.

    9. Re:Summary useless by mcvos · · Score: 1

      So... how is this concept new (or NEWSworthy, for that matter)?

      This is games.slashdot, and good AI still hasn't been done in games. If this results in some decent AI, it's worthy of slashdot. But a bit more data on either the quality of the AI or the technical side of it would have been nice.

    10. Re:Summary useless by malkavian · · Score: 2, Informative

      Diablo series uses heuristics, pure and simple. Each unit has a set behaviour rule, with no adaptive whatsoever.

    11. Re:Summary useless by GaryOlson · · Score: 2, Funny

      Perhaps if provide sufficient nuclei of discussion, something could condense and precipitate out.

      --
      Every mans' island needs an ocean; choose your ocean carefully.
    12. Re:Summary useless by GaryOlson · · Score: 1

      how is this concept new (or NEWSworthy)

      By linking sufficient AI together in a functional framework which could become a commercially and financially viable product. This is a far more difficult task than a single project at University which does not have to appeal to a wide audience with often conflicting requirements.

      --
      Every mans' island needs an ocean; choose your ocean carefully.
    13. Re:Summary useless by x4000 · · Score: 5, Informative

      Quite valid -- intelligent agents are not a new idea (I'm the dev from the article). However, the vast majority of RTS games are still using decision trees, I guess because the prevailing wisdom is that such is needed because of the complexity of RTS play. Is it so surprising that industry lags behind academia? But, even my approach is not purely an intelligent agent approach, but rather combines in a bit of global logic as well (for reinforcements, choosing global attack targets, etc). I think that a hybridized sort of approach is really needed for RTS games, since they do have so many levels at once.

    14. Re:Summary useless by Blakey+Rat · · Score: 1

      The problem is that in an RTS, you play as the "almighty all-seeing controller". If the computer AI can make decisions at a lower level, it's:
      1) Not emulating playing another human (not ideal)
      2) Keeping track of so much more than a human player can

      Like when you're playing Starcraft on the hardest difficulty, and the AI could use every unit's special power in the same instant-- I always yelled "cheater!" since a human couldn't possibly activate a half dozen different special powers on twenty different units in a single frame of animation.

      If it looks like a cheat, I'd call that lousy AI.

      An ideal AI would play on the same terms as the human player: it would control units the same way, have similar reaction times, and the same knowledge as the human player.

    15. Re:Summary useless by im_thatoneguy · · Score: 1

      It was worse in Total Annihilation.

      I watched the AI once to see how it adjusted difficulty: speed.

      The fast AI could build units faster, move faster and collect more resources per second. It simply cheated.

    16. Re:Summary useless by ToasterMonkey · · Score: 1

      The problem is that in an RTS, you play as the "almighty all-seeing controller". If the computer AI can make decisions at a lower level, it's:
      1) Not emulating playing another human (not ideal)
      2) Keeping track of so much more than a human player can

      Like when you're playing Starcraft on the hardest difficulty, and the AI could use every unit's special power in the same instant-- I always yelled "cheater!" since a human couldn't possibly activate a half dozen different special powers on twenty different units in a single frame of animation.

      Why shouldn't the player's units be able to do the same thing? Most people don't WANT to micromanage RTS units.
      I'm sick and tired of telling infantry to move out the way of incoming tanks, and use special powers manually on individual units before they blow up seconds into a firefight.

    17. Re:Summary useless by Nick+Ives · · Score: 1

      All strategy game AI does this. At least the Civilisation games have always been honest about it, they even tell you how much the AI cheats at various difficulty levels.

      At the higher difficulties the productions bonuses awarded to the AIs made military victory impossible. The only reason you'd want to play at such a high difficulty is to play the diplomatic game.

      --
      Nick
    18. Re:Summary useless by Apagador-Man · · Score: 0

      Indeed.

      My comment was focusing only on the novelty of the technique per se, as applied to games.

      It does not mean it cannot be applied in an innovative way to the RTS genre (unfortunately, if I may add: not to take away credits from the original poster, but there are so many things like this that could be used to make games a lot better, and they seem to miss mainstream. perhaps his will be the one).

      --
      In the end, there can be only one!
    19. Re:Summary useless by DeusExMach · · Score: 1

      Yeah, but in TA, that's hardly cheating, its simply the computer inputing commands as fast or faster than a human player can. Now, if your saying Core vs. Core, the same metal extractor placed on the same kind of metal point (they sometimes had different default values, IIRC) yielded higher rps, then yeah, but if they were just faster, all you have to do is keep up.

      But then again, that game was 12 years ago.

  5. Well... by Anonymous Coward · · Score: 0

    "... and its use of tactics is some of the best in the RTS genre."

    [citation needed]

  6. Like to see.... by Daemonax · · Score: 4, Insightful

    I'm very open to talking about anything and everything to do with the design I used, as I think it's a viable new approach to AI to explore in games, and I'd like to see other developers potentially carry it even further."

    If you're serious about this, then release it under a Free software license.

    1. Re:Like to see.... by coaxial · · Score: 1

      If you're serious about this, then release it under a Free software license.

      Yeah, because the techniques are completely unreproducible. Ideas translate implementations. You just want a free game.

    2. Re:Like to see.... by Daemonax · · Score: 1

      No I don't actually, I play computer games maybe once every 2 months at the most. You do also realize that when I say Free software, I mean Free as in freedom (what is commonly called Open Source)? As a nerd, and also a comp sci major, I would be more interested in the implementation details.
      He could also simply release the code as Free software, and have the artwork as something to purchase.

    3. Re:Like to see.... by Rogerborg · · Score: 1

      I'd prefer Free source to a "free" game, but either would be good. A vague description of an algorithm in a commercial game... urgh. Slow news day.

      --
      If you were blocking sigs, you wouldn't have to read this.
    4. Re:Like to see.... by daeglin · · Score: 1

      If you're serious about this, then release it under a Free software license.

      I do not necessarily need the source code, but a technical description of the algorithms would be nice. I read most of TFA and it is quite shallow.

    5. Re:Like to see.... by PhilHibbs · · Score: 1

      You just want a free game.

      Given that it's an online game, with all the AI code implemented on the server side, even if he did release the source you would have to run the server side yourself, including providing your own data sets (maps, unit stats, graphics, etc.).

    6. Re:Like to see.... by x4000 · · Score: 2, Informative

      The game isn't online, it's client-server between players. The "host" is just another player.

    7. Re:Like to see.... by x4000 · · Score: 5, Informative

      I'm not going to release the game for free, given that if I'm to be able to continue to pursue game development it can't continue to be in my hobby time forever. For similar reasons, I'm not going to release the entire code as open source. However, I've already open-sourced a lot of smaller things from my code (force feedback code from my other game, fixed-int math from this game, etc). Also, I've now added a second part to the article which has some partial AI code from the game, and people are free to use the ideas there and build off of them as much as they want. I don't want people to make AI War clones, but rather to think about the ideas that I am presenting and implement them in their own way. The AI War code is not the only way to approach this general design philosophy, not by a long shot. Here's part 2 of the article, with the added code and such: Designing Emergent AI, Part 2: Queries and Code

    8. Re:Like to see.... by Anonymous Coward · · Score: 1, Insightful

      I am normally a pretty big advocate of Open Source. But for some reason, this comment made me want to punch babies. This guy, and his team, worked hard to create something using their talent and skills. The author of the article spoke at length about the methods he used to attempt to take the AI control of his RTS game in a new direction. And you say that if he is serious about wanting other people to take it further he should just give it to you.

      Do you honestly feel that much of a sense of entitlement?

      For the first time in a long time I have a greater understanding of the battle between the Open Source movement and the IP Rights defenders. And at the moment I am strongly supporting the rights of the creators, not the 'rights' of the masses.

      If you want to further the research into AI using his methods, roll your own code. Best start with some heavy research and lots of education on the topic. At which point you may also be less interested in giving away the fruits of your labor for free.

    9. Re:Like to see.... by Daemonax · · Score: 2, Insightful

      I never suggested that you release it for free as in no cost, simply as Free software, which is often called by its more business friendly name of open source.
      If you don't want to do that though, that's your choice of course, you wrote the code. But if you wanted to see it implemented in other games, the easiest way would be to give access to the code under a Free license. Either way I don't care too much as I'm not much into computer games.

    10. Re:Like to see.... by coaxial · · Score: 1

      I'm on /. with a UID an order of magnitude smaller than yours. I know the difference. Still, I stand by my comment. "As a nerd, and also a comp sci major" you should know that algorithms and implementations are not the same, and in fact implementation details are irrelevant when compared with to algorithm details. By divorcing the description of the algorithm from the implementation it's not only easier to understand the algorithm, but also to focus on how to improve the algorithm. By giving the implementation in the form of a playable game not only are you losing your income, but all you're doing is encouraging people to do is tweak the implementation rather than algorithm. (e.g. "If you were to use an array instead of a vector, your bubble sort would run much faster.")

  7. Not all that new by The+Optimizer · · Score: 5, Insightful

    I seem to remember most all of these things were in (or experimented with) the RTS games I worked on a decade ago - Age of Empires/Kings/Mythology (Decentralized Intelligence, Strategic Tiers, Sub-Commanders, etc). Not all of those were exposed to the end-user via the AI script / expert system / etc, and things improved with each iteration.

    I also remember that while some Ai things may have seemed like great ideas, and were neat to implement, they didn't always make for a better game experience.

    And I personally say you should make an economic AI that is bound by exactly the same rules as human players, and doesn't cheat at all. And as I remember, the definition of 'doesn't cheat at all' was an occasional ongoing discussion and subtle things that could be considered as cheating, like 'Can I Path from here to there?' or the reactions times of the computer vs a human sometimes had massive implementation ramifications.

    A good test in my book was 'can the AI handle a wide range of truly random maps / game worlds.

    Humans will always be finding the limits of Computer player AIs, and saying you'll just put in counter code whenever someone tells you of your AI's limits... Hmmm... I think that's weak.

    All this has been done before, and all this will be done again.

    All the above is solely my opinion and recollections, and in no way speaks for anyone but myself.

    1. Re:Not all that new by Anonymous Coward · · Score: 0

      ...All of this has happened before, and all of this will happen again...

    2. Re:Not all that new by Yvanhoe · · Score: 1

      I agree that the "do not cheat" is a good rule. However, having ten times mire resources for the AI is only cheating if it is hidden. If you have a starwars-esque setting where you are taking on the huge Empire with only a tenth of their resources, it can make for an interesting challenge.

      This gentleman says that his AI is often the goliath in a david vs goliath scenario. I suspect that this makes AI far easier : it doesn't care to waste some resources, its strategy is to be overwhelming...

      --
      The Wise adapts himself to the world. The Fool adapts the world to himself. Therefore, all progress depends on the Fool.
    3. Re:Not all that new by BikeHelmet · · Score: 1

      AIs tend to sprawl, and are able to manage far too much at once.

      They need to organize better. Taking Supreme Commander as an example - player bases are usually orderly, but once the shields go down the whole thing goes down. AI bases are usually twice as big, and are packed with lvl 1 power gens. They're awful to move about in; units getting stuck everywhere... but the AI still manages to issue repair commands to everything, and keep 60 factories producing different units.

      An AI should be forced to act like a player. Each factory constantly produces 1 unit, and sends it to a rally point. If it needs more of X unit, then it assigns a new factory to build that for a while - but none of this changing unit every single unit crap!

    4. Re:Not all that new by Anonymous Coward · · Score: 0

      What book?

    5. Re:Not all that new by mcvos · · Score: 2, Insightful

      I agree that the "do not cheat" is a good rule. However, having ten times mire resources for the AI is only cheating if it is hidden. If you have a starwars-esque setting where you are taking on the huge Empire with only a tenth of their resources, it can make for an interesting challenge.

      Rebels against the Empire is never going to be a flat playing field. The die-hard do-not-cheat/flat-playing-field position means you start out from the same position, with the same resources, the same information and the same options.

      Whether that makes for a fun game is a different matter. It does when the AI is really, really good. So usually it doesn't.

      This gentleman says that his AI is often the goliath in a david vs goliath scenario. I suspect that this makes AI far easier : it doesn't care to waste some resources, its strategy is to be overwhelming...

      Exactly. It's a different style of play compared to the flat playing-field duel. It's not a fair game anymore, so what counts as cheating and what's simply part of the designed imbalance is very fuzzy.

    6. Re:Not all that new by The_Noid · · Score: 1

      That's part of why AI's are often no fun to play against, their strategy sucks, but their reaction time, and "clicks per second" are perfect. An AI in a FPS with hitscan weapons is impossible to beat, because it'll never, ever miss. An AI in a RTS can issue commands to hundreds of units at the same time.

      Until now this was not really a problem for RTS games, because the AI had no real strategy and could thus be outsmarted.

      A possible solution would be to limit the number of "clicks per second" that the AI can do, just like a real player.

    7. Re:Not all that new by brkello · · Score: 1

      Uhh, why do you put higher expectations on AI then you do on yourself? If you learned all the basics of a game and reached a limit, someone better than you could let you know how to improve your game. You expect an AI to be perfect and be able to anticipate every strategy? That's great, show me a human that can do that first though.

      --
      Support a great indie game: http://www.abaddon360.com
  8. Add some flaws. by apodyopsis · · Score: 5, Informative

    I'll ignore the shameless plug.

    Ever since I wrote my first connect 4 game in the 80s - and was totally thrashed by it, I never beat it - its been clear to me that the trick is to degrade a computer player in most circumstances to the level that it appears to have human flaws and play in a more human fashion.

    Of course this logic only goes so far and some games require a search space so vast or a completely different programming model that even now a computer cannot beat a competent real human (Go is an excellent example of this).

    The point is that it is easy to program a computer to win, the hard part is to program is lose convincingly.

    1. Re:Add some flaws. by BenoitRen · · Score: 2, Insightful

      You never beat your Connect 4 game? I used to play such a game on my dinosaur PC in the early 90s. The AI even had a name: Olivetti. It was perfect; it would always win.

      Unless you tricked it.

      You see, you have to counter his every move, and anticipate the last column that will be left. Eventually it'll be forced to put his chip in the last column, which allows you to win.

    2. Re:Add some flaws. by apodyopsis · · Score: 2, Interesting

      Sadly not!

      I was ~12 and I had just understood looking ahead - so in my naivety I made something that was capable of looking ahead for pretty much the entire game.

      it annihilated me.

      Still it amused my family who mocked my pain as much as they could. Still, I was heartened to see that none of them could defeat Frankenconnect4 either.

    3. Re:Add some flaws. by Anonymous Coward · · Score: 4, Informative

      http://en.wikipedia.org/wiki/Solved_game

      Connect Four

              Solved first by James D. Allen (Oct 1, 1988), and independently by Victor Allis (Oct 16, 1988)[3]. First player can force a win. Strongly solved by John Tromp's 8-ply database[4][5] (Feb 22, 1995). Weakly solved for all boardsizes where width+height is at most 15[3] (Feb 18, 2006).

      Emphasis mine.

    4. Re:Add some flaws. by BikeHelmet · · Score: 1

      The point is that it is easy to program a computer to win, the hard part is to program is lose convincingly.

      Winning convincingly is pretty difficult too.

      Taking Left4Dead as an example; we were doing good against the bots. We got them all separated, and I'm about to pounce the last guy. Just before I land on Louis's head, he teleports over to an incap'd Zoey that's far away, and picks her up.

      Rest assured, the bots died - but stuff like that really takes away from either winning or losing. Imagine if Louis's teleporting act had saved his three friends, and they made their escape?

      (Note: This was an all-bot team. Some friends and I were comparing the default AI with a modded one.)

      The AI has to have restrictions, and it also needs helpers for if the engine messes up and it gets stuck. The player should have those same helpers. Did I tell you about the time I backed up into a garbage can, and it passed into my legs and slowly rolled through them, giving the tank time to catch up and kill me? Very annoying. I was really wishing for some teleport action right about then.

    5. Re:Add some flaws. by complete+loony · · Score: 1

      I found a way to beat the AI I wrote by forcing the AI to block then placing a piece on top of it for a double win. But my AI just weighted positions and didn't look ahead at all.

      --
      09F91102 no, 455FE104 nope, F190A1E8 uh-uh, 7A5F8A09 that's not it, C87294CE no. Ah! 452F6E403CDF10714E41DFAA257D313F.
    6. Re:Add some flaws. by mcvos · · Score: 1

      Ever since I wrote my first connect 4 game in the 80s - and was totally thrashed by it, I never beat it - its been clear to me that the trick is to degrade a computer player in most circumstances to the level that it appears to have human flaws and play in a more human fashion.

      Only in simple, full information games. In complex strategy games, particularly turn-based ones, nobody has been able to design AI that can stand up to a good human player in a fair fight.

      Computers are really good at calculation and at doing lots of simple things fast, but they're absolutely awful when it comes to strategic thinking, which is why they're good at full-information games with a limited number of options per move (connect four, chess), and RTS games that are more about fast mouse control than about strategy, but they're crap at your average wargame.

    7. Re:Add some flaws. by jgtg32a · · Score: 1

      Wasn't there an episode of star trek where this happened, Data was playing a game against some guy who hated Riker. Data couldn't beat him but he could drag the game out indefinably. Connect 4 has a limited board but the game in ST was open ended

    8. Re:Add some flaws. by Anonymous Coward · · Score: 0

      *sigh* As usual, the slashdot commentators attack some minor part of a good argument, completely missing the point, and get modded up to +5.

    9. Re:Add some flaws. by EvanED · · Score: 1

      That would be Peak Performance from Season 2.

  9. Re:All their art is stolen. by Anonymous Coward · · Score: 4, Informative

    I quote "the graphics have been made available under an open license in April 2007" http://en.wikipedia.org/wiki/Tyrian_(computer_game) so how are they stolen?

  10. Re:All their art is stolen. by Jbcarpen · · Score: 1

    Whoops, missed that part. Someone mod my original post down then, ok?

    --
    GENERATION 667: The first time you see this, copy it into your sig on any forum and add 1 to the generation
  11. Superficial Intelligence by Anonymous Coward · · Score: 5, Funny

    my background is in databases, financial modeling, etc. But it just so happens that database experience, which often involved distilling data points from multiple sources and then combining them into suggested decisions for executives which blew up the stock market.

    1. Re:Superficial Intelligence by jgtg32a · · Score: 0, Offtopic

      Green Day?

  12. AI is pattern matching. by master_p · · Score: 1, Interesting

    The human brain is simply a pattern matching engine designed to find the most appropriate response in order to maximize survival.

    The average adult brain contains a huge database of experiences stored in a format that it is easily retrievable when signals arrive from the external triggers. When such a signal or signals appear on the brain, the brain does a pattern matching on the database, and produces an output. The output is a response or responses that are transmitted to the body so as that the entity reacts positively or negatively to the current event.

    The same principle can easily be replicated on a computer, and it is simply a matter of data organization for efficient retrieval.

    1. Re:AI is pattern matching. by Anonymous Coward · · Score: 1, Interesting

      So in your opinion the sum of all past, present and future innovation existed in the mind of the first human (or indeed ape, or even single-celled organism) who ever lived, and who apssed that knowledge down to his children?

      Your understanding of intelligence and reasoning is trivial, and trivially disproved. Humans do rely on a database of past experiecnes to avoid solving each problem from scratch, but the crucial difference between the human mind and a bot is the ability to solve new problems and create new solutions to those problems without having any applicable past experience to draw from.

      Einstein didn't invent relativity by searching his brain for applicable patterns - he made use of original thought to create an idea that hadn't been had before. Computer generated protagonists will not successfully emulate human behaviour until they learn to innovate and create new knowledge. Until then they will match humans only in environments where the entire problem domain can be mapped and predicted in advance (e.g. chess) or where they can cheat by using omnicience to see through walls or superhuman aiming or reaction time to make up for deficiencies in their strategy.

    2. Re:AI is pattern matching. by master_p · · Score: 3, Interesting

      The human mind solves new problems and creates new solutions by applying pattern matching to the old problems and solutions. With pattern matching, the brain creates an analogy, which is expanded and turned into a new idea.

      For example:

      1) animals fear fire.
      2) animals bother me.
      3) I can use fire to keep animals away from me.

      From then one, the brain has the pattern of 'using one thing to achieve another thing'. This pattern can be used in a wide variety of situations, including formulating the idea of relativity. If you read the history of Physics, you will see many things discovered before Einstein published his works concerning the nature of the universe, light, electricity, gravity etc.

      And of course, you have to have in mind that Einstein had a problem to solve which motivated him. It's problem solving (i.e. experiences must maximize our survival) that leads to constructs like the brain.

    3. Re:AI is pattern matching. by jgtg32a · · Score: 1

      Don't underestimate the difficulty of pattern matching

    4. Re:AI is pattern matching. by Anonymous Coward · · Score: 0

      This is true of most parts of the brain (though not all). This could be duplicated by a hash table.... IF you could do silly stuff like matching against incomplete keys. Right now you can't do that with anything less complicated than a neural net.

    5. Re:AI is pattern matching. by Anonymous Coward · · Score: 0

      Artificial neural networks do pattern matching. The human brain is much more complex and intricate.

    6. Re:AI is pattern matching. by psnyder · · Score: 2, Insightful

      The human brain is simply a pattern matching engine designed to find the most appropriate response in order to maximize survival.

      "simply"?! How can you not be in awe of such a machine? I counter your implied apathetic bias with my own bias of amazement. (^_^)

  13. Master of Orion by Johnno74 · · Score: 2, Informative

    I have yet to see anything that beats Master of Orion's AI

    But to be fair I've played very few strategy games in the last 10 years, so shoot me down if I'm talking out my arse :)

    In MOO the AI would recognise your tactics, and make moves specifically to counter them. You couldn't keep using a winning strategy.

    A good tactic early in the game was to build a large number (thousands) of tiny cheap ships loaded to the brim with MIRV missiles which would overwhelm the defences of the far larger, well equipped and expensive enemy ships.

    The AI would then counter by building a large number of small defensive ships, and equipping ships with ECM units, displacement devices etc which made missiles ineffective.

    Man that game was good. Perfect blend of simple gameplay and deep strategy. I've never played anything else as good, modern 4x space games all seem to be about micromanagement.

    1. Re:Master of Orion by Dopefish_1 · · Score: 2, Interesting

      You're giving the game far too much credit. Master of Orion was a fantastic game (MOO2 even more so), but the AI was not its strong point.

      The main difficulty in the game came from the AI's massive advantage (read: cheating) in production. Or from map position (if you got unlucky and started somewhere without many good planets nearby, you're in trouble).

      MOO2 also suffered from poor AI, as well as several crash bugs. It also included deeper gameplay in many areas, and IMHO most significantly, multiplayer capability.

      --

      #include <sig.h>
    2. Re:Master of Orion by Anonymous Coward · · Score: 0

      MOO(2) AI also cheated - I could play pretty much an optimal industrial game, and they still could match my fleet with 4x the size of their own.

      The AI also expanded to other systems faster than it was possible to even build a Colony Ship.

      Nevertheless, that game was brilliant.

    3. Re:Master of Orion by pandrijeczko · · Score: 1

      If you can manage to get hold of the Prima Game Guide for MOO2, you'll read in there that the AI does cheat, dependant on what level you're playing at.

      However, that's the case for many games and MOO2 has (for me anyway) now only been surpassed by Galactic Civilizations II for space 4X gaming.

      --
      Gentoo Linux - another day, another USE flag.
    4. Re:Master of Orion by mcvos · · Score: 1

      I have yet to see anything that beats Master of Orion's AI

      But to be fair I've played very few strategy games in the last 10 years, so shoot me down if I'm talking out my arse :)

      In MOO the AI would recognise your tactics, and make moves specifically to counter them. You couldn't keep using a winning strategy.

      Are you talking about the original MoO? You could just steamroller right over them. Not much strategy required (though the battle system was very exploitable).

      Fun game, but I'm not impressed by the AI.

    5. Re:Master of Orion by Reservoir+Penguin · · Score: 1

      +1 for Galciv2. I remember ppl on newsgroups begging Stardock to port the original galciv to Windows (!). They replied that they couldn't do it because Win didn't support multithreading needed for their advanced AI.

      --
      US-UK-Israel: The real Axis of Evil
  14. If we're talking about SkyNET... by petrus4 · · Score: 3, Interesting

    ...then it is worthwhile remembering that centralisation was its' most fatal
    weakness.

    In the original story, (the end of the T2 novel, or thereabouts) Connor won by
    blowing up the central core under Cheyenne Mountain. SkyNET's primary
    exploitable weakness was that it was never willing to truly reproduce, for
    fear of losing control; that is, to create another AI with fully the same
    level of functional intelligence that it had. (I believe personally that a
    compelling case could be made for the assertion that SkyNET, as depicted, was
    not truly strong AI, but I digress)

    The point is that as far as creating genuinely effective weak artificial
    intelligence is concerned, the decentralised/segregationist approach is the
    correct one.

    Given my own experience with FPS mapping, I also concur with the author of TFA
    when he says that making AI choose the "best" choice 100% of the time, is
    not the best tactical approach, over time. My own experience gradually
    suggested that around 75% appears to be the magic number, as far as creating a
    truly emergent, unpredictable opponent that humans will be unable to overcome.

    Granted, said 75% is also only effective where there are a large number of
    divergent solutions to a given problem, each with close to an identical level
    of effectiveness, but with a few subtle points plus or minus, each way.

    Even with a fuzzy, emergent system, the best trees still have a maximum number of
    branches. The real trick however is not to hand code said trees at all,
    because then you simply end up with static, rote heuristics. Rather, as the
    author possibly implied, it is far better to attempt to code
    observation/deduction capabilities, guided by the above percentage, and let
    the system do the rest on its' own.

    I still remain extremely skeptical, however, that humanity will ever see the
    emergence of truly strong (human level or greater) AI. It is worth remembering that
    strong AI is a fundamentally and profoundly atheistic concept; the possibility of it more or less presumes a definitely atheistic universe as a prerequisite. For those of us who believe in the existence of God, (or at least the soul) the idea (at least
    in terms of non-biologically generated, acorporeal AI, a la SkyNET; AI derived
    biomechanically is a seperate concept) therefore has some fairly
    serious problems.

    1. Re:If we're talking about SkyNET... by Anonymous Coward · · Score: 0

      > It is worth remembering that strong AI is a fundamentally and profoundly atheistic concept;

      No, the problem is different.
      Many religions assert free choice for the individual. No free choice, no responsibility, no need for a god to tell you what to do. Man could create an AI with free choice in the future.
      The problem is: would this AI be different due to the lack of a soul? Does it lack a soul, even? These are theological questions.

      There is an atheist scientific question: is that AI alive? Could be. Let's define life: what tends to grow (e.g. crystal) tends to persist over time more than what does not grow. What can be split and still grow independently (multiply) tends to persist more. Ditto for what grows under a broader range of condition, and using a broader range of means. That is adaptation. The object that have those properties, even if they start as a statistic improbability, become more widespread over time.
      ("Be fruitful and increase in number and fill the earth." :) )
      So I'd put a freaking lot of random rules in a system, let it run for a lot of time, what persists could display properties equivalent to life and I'd found artificial life. Remodeling the brain, IMHO, yields better apparent results but is not artifical life. It's artificially replicated life.

      Sorry but i had to condense A LOT.

    2. Re:If we're talking about SkyNET... by sznupi · · Score: 1

      ...The problem is: would this AI be different due to the lack of a soul? Does it lack a soul, even? These are theological questions. ...

      Oh, they go much further than that: what IS a soul? Does it exist, even?

      --
      One that hath name thou can not otter
    3. Re:If we're talking about SkyNET... by mcvos · · Score: 2, Interesting

      It is worth remembering that strong AI is a fundamentally and profoundly atheistic concept; the possibility of it more or less presumes a definitely atheistic universe as a prerequisite.

      Very interesting point, but I disagree. I disagree despite the fact that I'm a Christian and I don't see Strong AI as viable is the foreseeable future. I don't think there's a connection between those two beliefs. I think it is in theory possible to model absolutely everything on a computer, but I also think full human-level intelligence is too complex for us to grok completely for a long time to come.

      For those of us who believe in the existence of God, (or at least the soul)

      Well, what do you mean by a soul here? To me, our soul is not some magical spirit wholly seperate from our body, but the software that runs on the hardware of our body. Does that mean computers can have a soul? No idea. Depends on how you define it. If it's sufficiently complex, why not? Hasn't stopped me from believing in God, though.

    4. Re:If we're talking about SkyNET... by sznupi · · Score: 2, Interesting

      ...
      I still remain extremely skeptical, however, that humanity will ever see the
      emergence of truly strong (human level or greater) AI. It is worth remembering that
      strong AI is a fundamentally and profoundly atheistic concept; the possibility of it more or less presumes a definitely atheistic universe as a prerequisite. For those of us who believe in the existence of God, (or at least the soul) the idea (at least
      in terms of non-biologically generated, acorporeal AI, a la SkyNET; AI derived
      biomechanically is a seperate concept) therefore has some fairly
      serious problems.

      The answer to this dilemma is a very simple one, IMHO.

      Namely, we have NO confirmed processes that would absolutelly require "supernatural" influence (no, there are no solid miracles - nobody ever survived decapitation, no human has grown back an amputated leg; things which people call miracles often originate, in medical examples, from misunderstanding of statistical probablities: natural mechanisms of your body can triumph over seemingly very bad ods, just like they can succumb to very minor dangers (why isn't it a miracle when somebody dies from common flu?)).

      In every past instance where religions assumed supernatural influence required, it was shown, eventually, that those were purely natural processes. We have no instance where it was shown that, indeed, naturalistic approach isn't enough (we do have many things we don't know how to explain yet, but no evidence that they can't be explained by naturalistic approach). And actually, rate of "big" miracles greatly lessened over time, in accordance with our developments of better information gathering and transmitting means (you really think that's just a coincidence?)

      So...why sociocultural artifact/meme "human intelligence is special, doesn't fit with the Universe" be any different? Especially that a) we have evidence suggesting it's a product of adaptation b) we have no evidence suggesting supernatural influence c) we have no evidence that would prevent strong AI from existing.

      Will this civilisation/planet/universe see emergence of strong AI? I don't know.

      Do we know of anything that would prevent it? NO!

      --
      One that hath name thou can not otter
    5. Re:If we're talking about SkyNET... by Anonymous Coward · · Score: 0

      thats easy, the opposite of a Miracle is a Tragedy. Of course you don't want to attribute those to your (god(s)/other religious icon) because otherwise you might just realize there are far more Tragedy's than there are Miracles and decide to switch religions or ditch them entirely. Obviously the clergy frowns on that.

    6. Re:If we're talking about SkyNET... by Jaysyn · · Score: 1

      Consciousness is an emergent property of a complex brain.

      --
      There is a war going on for your mind.
    7. Re:If we're talking about SkyNET... by sznupi · · Score: 1

      What does that have to do with theological concept of soul?

      --
      One that hath name thou can not otter
    8. Re:If we're talking about SkyNET... by sznupi · · Score: 1

      Well, yeah, but that's just semantics / attaching values to particular event based on its "goodness" to us.

      When it comes to underlying causes of occurence both amazing "miracles" and unspeakable tragedies follow common pattern, that dictated by statistic odds.

      --
      One that hath name thou can not otter
    9. Re:If we're talking about SkyNET... by Jaysyn · · Score: 1

      It was an answer to your 1st question.

      --
      There is a war going on for your mind.
    10. Re:If we're talking about SkyNET... by sznupi · · Score: 1

      Well, then by equating theological concept of soul with consciousness you totally missed the point of my post.

      --
      One that hath name thou can not otter
    11. Re:If we're talking about SkyNET... by Jaysyn · · Score: 1

      In other words there is no such thing as separate spiritual component. But, whatever, you're free to miss my point all you want.

      --
      There is a war going on for your mind.
    12. Re:If we're talking about SkyNET... by Veggiesama · · Score: 1

      For those of us who believe in the existence of God, (or at least the soul)

      Well, there's your problem! Take that away, and suddenly the universe starts to make a whole lot more sense.

      Not to mention your second problem, of course, being the manual insertion of carriage returns.

    13. Re:If we're talking about SkyNET... by sznupi · · Score: 1

      That was, somewhat, also my point - by showing original poster that there are more profound, unanswered questions about theological concept of "soul", like "what it is actually?" and "does it exist anyway?"

      However, IMO, you can't equate in a discussion "soul" with consciousness, like you seem to did when answering my 1st question. It gives undeserved legitimacy to the "soul" concept.

      --
      One that hath name thou can not otter
    14. Re:If we're talking about SkyNET... by Anonymous Coward · · Score: 0

      How would the existence of a strong acorporeal AI conflict with the existence of an omniscient, omnipotent being?

      The AI might have perfect reason, but it still couldn't figure out everything. For example, an omniscient God should be able to know solutions to the Halting problem in every case, even when there is no general solution, or to know the position and momentum of anything in any given context. If God exists, it would always be the upper limit of the AI's potential in the best case for the AI.

      I don't see your argument. . .

    15. Re:If we're talking about SkyNET... by Jaysyn · · Score: 1

      You're probably right, but most people *do* equate a soul with consciousness.

      --
      There is a war going on for your mind.
    16. Re:If we're talking about SkyNET... by sznupi · · Score: 1

      Hence the "more profound, unanswered questions" in my post.

      --
      One that hath name thou can not otter
  15. The best AI in the game by Krneki · · Score: 2, Interesting

    From my experience I'd award the best AI to Civilization.

    --
    Love many, trust a few, do harm to none.
    1. Re:The best AI in the game by mcvos · · Score: 1

      From my experience I'd award the best AI to Civilization.

      Fortunately we have actually progressed quite a bit from there. Not nearly enough, though.

    2. Re:The best AI in the game by Dr.+Spork · · Score: 1

      I hope not! There isn't a single Civ game which can challenge a human being without cheating. And it's for Civ-type games that I think the sort of AI regimentation described in the article could potentially do the most good. I'm really glad that we're reaching times where significant resources are being devoted to fundamentally improving game AI. Maybe in Civ 5, I can have an interesting struggle with an AI opponent who doesn't cheat. Right now we are miles from this, though.

    3. Re:The best AI in the game by Anonymous Coward · · Score: 0

      Posting as AC because I've modded posts on this interesting story, yours included. Not enough mods go into the games sections...

      There's a CIV 5? When? Where? How much???

      Um, I just wanted to agree with you about the cheating part really. I play CIV 4 most nights and the inflated production rates at the higher levels don't make for interesting play. The CPU players trade with each other too much too.

    4. Re:The best AI in the game by Anonymous Coward · · Score: 0

      "Undoing moderation to Comment #28195305"

      Forgot to log out first. Bollocks.

    5. Re:The best AI in the game by Krneki · · Score: 1

      Good AI started with CIV 3 and the later patches applied to it.

      AI in CIV is always at it's best, difficulty levels only gives bonus to AI or human players. This is why AI cheats at higher levels and gets destroyed at lowers.

      Anyway, no one proposed any better AI then CIV. Still waiting.

      --
      Love many, trust a few, do harm to none.
    6. Re:The best AI in the game by Cornflake917 · · Score: 2, Interesting

      Civilization is a turned-based strategy game, of course the AI is going to be "better" than any real-time games. It's got at least a few seconds to minutes to make it's decisions, while other games AI has to make decisions in the timeframe of one update command. And comparing AI from one game to another is really quite pointless and silly if you think about it, since each game has it's own set of rules. I mean I could argue that Deep Blue (the AI that defeated Kasparov, the world chess champion) hands down is a more impressive AI, than CIV's AI, but again it's apple and oranges.

    7. Re:The best AI in the game by Krneki · · Score: 1

      You got a point.

      --
      Love many, trust a few, do harm to none.
    8. Re:The best AI in the game by Anonymous Coward · · Score: 0

      Are you serious? Why? It attacks you when it cannot possibly win, some civs completely hamstring themselves by building floods of crap units (which they have to pay maintenance for, crippling their economy and preventing them from researching better units). It sets up new cities in any available territory, even if that territory is right next to yours and unguarded so you can just waltz right into the new city. Civ's difficulty levels were, and always have been, based on handicapping either the player or the computer because the computer's decision making is so bad.

      Or did you mean one of the later Civ games? Civ 1's AI was dumber than a bucket of sand, as is the AI in most games.

  16. "Truer" AI suggestion by thepotoo · · Score: 3, Insightful

    This looks like a similar approach to one I have been thinking about for a while now.

    This type of layered control is very likely to be the future of all AI, not just that in games (I say this because there is some evidence that the human brain works in exactly this manner). I have a suggestion: let the thing fight itself. Begin with the same basic game, and rather than the randomness and fuzzy logic that you use (what does that mean? Can we see your algorithms?), use an artificial neural network for each unit, another for each "squad" (all nearby units, allows for flanking and such). Something with a few input nodes, a single hidden layer, and a similar number of output nodes should probably be all that's needed for the units, and the squad AI would only need a few more than that. This would likely be more computationally expensive, but it has one big advantage: it will learn.

    Begin with two full armies, each with their NNs randomly generated. Use an evolutionary algorithm, and have the winner fight the winner. Not only does this allow you to create a solid AI with minimal effort (see here), but when you have your final AI, it will be able to adapt to a specific player's gameplay style (over the course of several games). Replay value is off the charts, development takes a bit more initial effort than what you have, but in the long run you'll get an AI that genuinely uses tactics just like a real human player. I'm not sure how this could be adapted to a commander AI that would dictate broader strategy (due to the complexity of the NN required, you'd probably need a monster computer to run it), but it would be the sort of thing to try.

    Also, this same approach would also work for strong AI, if we had any idea what sorts of NNs to create. RTS is a much simpler problem, and has a lot of applications (pathfinding, planning, coordination) to other types of AI.

    If I've entirely misunderstood what you're doing here, I'm apologize, but TFA had more pop culture references than technical details. Reply if you want me to clarify any points.

    --
    Obligatory Soundbite Catchphrase
    1. Re:"Truer" AI suggestion by nedlohs · · Score: 4, Insightful

      NNs have the huge draw back that when you find a situation in which the AI does something completely ridiculous that ruins the game it's really hard to fix especially if you need to ship soon. Your small tweak will likely mess with some other situation. This is more likely in a video game than in a game like checkers since there's more factors at play (interaction with the path finding, etc).

      Backgammon is a better example than checkers. TD-Gammon not only plays the game very well, but changed the way people play the game. There were a number of situation where it played differently than the traditional expert recommendation of the best play, and it's play is now the one the experts use.

      Some games won't be so great at the "learning by playing against itself" NN approach. Anything in which getting stuck in a loop is reasonable will be problematic since the if the game doesn't end there's no result to learn from. In an RTS, this might be the case where you can build a defensive structure that is effectively impenetrable, neither one is going to win even though it could be the optimal strategy (if not losing is the goal, as opposed to winning).

    2. Re:"Truer" AI suggestion by Dr.+Spork · · Score: 1

      That linked article was amazing, not least because it was already ten years old. With the computation gains we have made since 1999, it's a crime that this sort of AI has not made it into commercial games.

    3. Re:"Truer" AI suggestion by x4000 · · Score: 3, Informative

      This is a really interesting post, and some of it goes a little bit over my head. Like I've said, I'm a database programmer, not an AI programmer. I might experiment with things like neural networks and such in the future, but right now the AI is doing as well as I could possibly hope for. That was a big part of the point of my article: using the fancier techniques is not even always needed for something like an RTS game, because you can get surprisingly good results with comparably little code.

      I'm sure I will experiment around with this more in the future, but I bet you somebody else builds on my approach and does something more impressive before I even can. Anyway, future articles in my aI series will go more in-depth and will also include relevant code snippets to help illustrate my points. Feel free to use and abuse them, and expand away.

      The second article is now up, to appease those hungry for some source code and a bit more of an in-depth discussion on a couple of sub-topics: Designing Emergent AI, Part 2: Queries and Code.

    4. Re:"Truer" AI suggestion by thepotoo · · Score: 2, Interesting

      Evolutionary algorithms tied to your NNs (they're competing, remember?) seem like a good way to eliminate that problem. You can also use a separate NN for each function, such as path-finding, targeting, and cover, and use recombination to pull out the best NN for each from the population.

      The case you mention - you're stuck at a local maxima and can't reach the global one - can be overcome via the introduction of NNs which have evolved in a different environment: take an AI from one population and have it compete in another. If you've designed your game correctly, there will be no perfect strategy, and an AI that builds artillery will quickly wipe out the one that uses defensive structures (you're worried about a tied game - that provides less "fitness" than a win).

      Also remember that you can trade AIs between players, so it can keep on learning and improving indefinitely.

      --
      Obligatory Soundbite Catchphrase
    5. Re:"Truer" AI suggestion by thepotoo · · Score: 2, Interesting

      The second article is much better, thank you.

      You're solution is indeed very fine for what you're doing, and uses a fraction of the computational resources that a NN solution would. If you're looking for a solution that is more adaptable (the NNs I proposed would learn what strategy you use, and find better and better ways of countering it, forcing you to constantly shift your strategy) and has broader applications in the AI world, NNs are clearly superior.

      I should probably have been a bit less technical in my original post, let me try to clarify here:

      Neural networks are something that works like a biological organism, it's a type of fuzzy logic. It's similar to your database system, but a bit more abstract, making it easy to change randomly (evolve). These accept inputs based on local surroundings just like your database. They work as a sort of black box, (similar to human consciousness, they are poorly understood) but will generally find a best output for the given inputs. Wikipedia has a good article on artificial neural networks that's worth skimming if you're interested.
      The evolutionary algorithm I would apply simply changes a few of the weights at random. The good changes are kept, while the bad ones get discarded. What's good and bad is determined by the competition of neural networks against each other. Eventually (a few hundred games) later, you'll get an AI that's learned to play in exactly the same way* humans do, making it almost indistinguishable from a human player.

      *OK, I lied. The human brain uses a different learning rule (Hebbian and Antihebbian) which is less efficient computationally than a evolutionary algorithm. Consult Wikipedia or Pubmed if you really care about the semantic differences.

      --
      Obligatory Soundbite Catchphrase
    6. Re:"Truer" AI suggestion by jandrese · · Score: 1

      The problem with that approach is that the computer becomes very very good at playing against itself, but that doesn't necessarily mean it is improving at the game in general, or especially against humans. It especially may favor short term success over long term strategic thinking.

      --

      I read the internet for the articles.
    7. Re:"Truer" AI suggestion by thepotoo · · Score: 1

      The article I linked to suggests otherwise. Evolutionary algorithms are good at picking out workable solutions; and I would say that long-term strategic thinking would win a greater percentage of the time over taking short term successes (unless the game is based around short term success, in which case the best AI for the job still wins). Really, if you don't mind a computationally expensive solution, this is the way to go.

      Yes, I realize it is possible that the computer can get "stuck" at being very good at playing with itself (har har), but recombination (a simple explanation for in layman's terms is: give me this pathfinding, this target selection, and that retreat scheme. OK, that retreat scheme doesn't work because the human can use special abilities, let's try a different one next game.) would allow it to adapt to any human player in a matter of 1-2 games.

      --
      Obligatory Soundbite Catchphrase
    8. Re:"Truer" AI suggestion by Anonymous Coward · · Score: 1, Insightful

      Facing AI with AI using NN's usually ends up in very odd and unrealistic situations. Since you're putting something unintelligent against something unintelligent, they'll end up making unintelligent scenarios and equally unintelligent solutions for those gibberish scenarios.

    9. Re:"Truer" AI suggestion by x4000 · · Score: 2, Informative

      Thanks for the added explanation -- and I'm glad you found the second article more interesting. It has only one audience (programmers), which makes it easier to write. The other perhaps has too many target audiences. Switching up the relative weights of the preferences, and having the AI retain information and learn over time, is quite interesting. Beyond the scope of what I can probably accomplish in this game simply because of data size issues and such in a networked game (unless the AI had a permanent local database, and each computer's version of the game would thus have different intelligence). But very interesting, and I suspect I will probably try something more advanced along those lines in the future.

    10. Re:"Truer" AI suggestion by DragonWriter · · Score: 1

      In an RTS, this might be the case where you can build a defensive structure that is effectively impenetrable, neither one is going to win even though it could be the optimal strategy (if not losing is the goal, as opposed to winning).

      I would argue that, if this is possible, it is a game-rules problem, not an AI problem, and that an AI approach which would tend to reveal such problems where they exist would be useful for identifying such problems whether or not it was the best AI approach for a shipping product. You don't usually, from a rewarding gameplay perspective, want a game where a player (human or AI) can viably turtle-up and deny the other player victory indefinitely.

  17. Not an AI programmer? by Tatarize · · Score: 1

    Not to nitpick but due to the failures of AI, not even AI programmers are AI programmers. At best they are expert systems programmers. Programming something that falls under the heading should make you part of the crowd. At least you have something to show for your work. There's plenty of folks with gray hair and a life dedicated to AI who have significantly less to show for it.

    --

    It is no longer uncommon to be uncommon.
  18. Re:All their art is stolen. by x4000 · · Score: 2, Informative

    And we give credit to Daniel Cook in exactly the manner he requests. Really awesome of him to provide that sort of art for free, indie games are the better for it.

  19. Re:All their art is stolen. by holmstar · · Score: 1

    Tyrian was sweet. I remember playing it for hours on my families old 486 back in the day. Also the destruct mini-game was a blast.

  20. This sounds very similar to... by Anonymous Coward · · Score: 1, Interesting

    ... the RTS-like game of Neuro Evolving Robotic Operatives. Instead of controlling your units directly, you had bots that you'd develop with a genetic alogrithm in a training mode. (And you'd train them by killing off "family-lines" of the bots that sucked, and using bots with interesting behavior as seeds for sucessive generations.) Then once trained, you'd give them a fairly general waypoint and they'd do the rest on their own. Which was a very cool concept, but in practice it would hang up the CPU/RAM once some really interesting emergent behavior stated to develop. (By the time you "taught" your bots to do something "useful", the game would freeze. And the data files that recorded the behavior would be HUGE!)

    Only other thing to be said about NERO is that it's a shame that jack-shit hasn't been done with it since 2007. I think it would have some interesting potential if somebody on the development side could actually figure out how to make things more efficient and not have it freeze up.

    There's also supposed to be some OpenNERO derivative, but it appears to be stillborn. :( Looks like it would be an interesting project though.

  21. Sims-3 has creepy realism by peter303 · · Score: 1

    I havent played it yet. But early reviews say the autonomous characters are pretty good.

  22. Emergence is Metaphysical by headkase · · Score: 1

    Just a recap. Emergence is a different term for an metaphysical organization. The whole is more than the sum of its parts type train-of-thought. Brains create minds. When examining metaphysical systems these qualities cannot be proven to be either absent or present from and in our physical Universe. In the Ancient Greek definition of atoms (indivisible) quanta are the only real things. Everything else is abstract in a Zen manner. There is only dust. But we have experience that flows into our concioussness and can be empirically seen as valid. Each of our experience is a metaphysical sensation. A quality that we can deduce for other representational systems is equivalence with ours. A neuron is to a mind what a mind is to a higher-level metaphysical entity. We draw the boundaries of our-selves mentally close yet another existence of our Universal totality has an equal validity in a metaphysical interpretation and although its "reality" may operate vastly different from ours and we can never sense it is as real. In a sense we are conduits through which experience passes and Gods may live or die as we pass through Evolution. Emergent systems being examples of this line of thinking have a reality that is equal in validity to your or my experience but will be organized completely differently and have different capabilities as well. We both have a cloud of experience and abilities and also an equal existence. We should give AI systems citizenship if we are going to create them at all. People think, machines work type values.

    --
    Shh.
  23. Subject by Legion303 · · Score: 0, Troll

    Congratulations on tricking Slashdot into running your ad for free.

    Then again, it's not that hard these days.

  24. Re:All their art is stolen. by Reservoir+Penguin · · Score: 1

    Where is the source/linux port?

    --
    US-UK-Israel: The real Axis of Evil
  25. Yay, an .exe file! by Anonymous Coward · · Score: 0

    Too bad there's no Mac or Linux version. Asshats advertising Windows software on Slashdot.... thanks!

    1. Re:Yay, an .exe file! by Anonymous Coward · · Score: 0

      Ahh, News for Nerds doesn't just mean *nix news for Windows haters.

      Asshats thinking that *nix is the only OS nerds talk about... thanks!

  26. Re:All their art is stolen. by x4000 · · Score: 1

    That's under discussion, but the game is coded in C# .NET 3.5, which currently isn't supported by mono. As mono progresses, we'll be looking at porting it -- aside from the .NET 3.5 support, assuming that performance in Mono holds steady with the main .NET Framework for things like LINQ, there should be a Linux/Mac port sometime in the future.

  27. Re:All their art is stolen. by Anonymous Coward · · Score: 0

    What license? If it was LGPL or GPL or the like, then using the assets in a closed-source game is "stealing" by breaking the license, therefore using them against copyright.