Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?
Java Programming Entertainment Games IT Technology

Java Program Uses Neural Networks To Monitor Games 100

tr0p writes "Java developers have used the open source Neuroph neural network framework to monitor video game players while they play and then provide helpful situational awareness, such as audio queues when a power-up is ready or on-the-fly macros for combo attacks. The developers have published an article describing many of the technical details of their implementation. 'There are two different types of neural networks used by DotA AutoScript. The first type is a simple binary image classifier. It uses Neuroph's "Multi-Layer Perceptron" class to model a neural network with an input neurons layer, one hidden neurons layer, and an output neurons layer. Exposing an image to the input layer neurons causes the output layer neurons to produce the probability of a match for each of the images it has been trained to identify; one trained image per output neuron.'"
This discussion has been archived. No new comments can be posted.

Java Program Uses Neural Networks To Monitor Games

Comments Filter:
  • Can it.... (Score:3, Funny)

    by Barny ( 103770 ) <> on Thursday May 14, 2009 @02:23AM (#27948127) Journal

    Ohhh, can it tell me when to move and shoot as well? Hey then interface it with the keyboard and mouse inputs and all my games can play themselves (like masturbation for computers).

    Then I can do other things while having fun playing games.

    • Ohhh, can it tell me when to move and shoot as well?

      Maybe not now. Currently its only for DotA. But it might easily be extended to other games as you say. If so, won't cheating be easy in multiplayer games? How can that be prevented?

      • Re: (Score:2, Insightful)

        by maxume ( 22995 )

        Don't play against jackasses. Makes public servers a bit harder to deal with, but it is an easy solution otherwise.

    • by Jurily ( 900488 )

      Ohhh, can it tell me when to move and shoot as well?

      It's emulating the human brain in a VM.

      My equivalent implementation: while(true) {sleep(HALF_AN_HOUR); printf("You need to respawn.");}

    • by wisty ( 1335733 )

      It can also lock you in out of the airlocks, but only by accident.

      Sorry, I'm just a bit upset that it's 2009, and our biggest problem with computers is still that they just aren't smart enough.

    • Re: (Score:2, Interesting)

      by Gastrobot ( 998966 )
      I wrote a program in Java that used an artificial neural network to play Warning Forever []. I took an evolutionary approach to training the networks because it was an unsupervised task. The program started with a pool of random networks, determined fitness by whatever criteria I used on a given run, and bred the networks together to make a new generation.

      My program had no capacity to play the game with a different interface than a human. It actually read the values of the pixels on the monitor, processe
      • 1) Playing on lives didn't work because eventually a network would destroy the boss' offensive capabilities and hide in a corner. The game would never progress.

        Why on earth would that poor guy want to get to a new level for more hurt? He's a lover, not a fighter! Why can't we all just get along?

      • by iiiears ( 987462 )
        Could this be adapted to recognize Desktop Interfaces,Text, Menus, Tabs, Etc? A blind user might find it useful and portable.
      • by KDR_11k ( 778916 )

        WF is score based, track that.

      • I also wrote similar program to play old NES games and it turned out that the best network used some unknown strategy to beat the game: Up-Up-Down-Down-Left-Right-Left-Right B, A, Start
      • Couldn't you make it base its fitness value on how many bosses it destroys or something?
    • Ohhh, can it tell me when to move and shoot as well?

      I know this is a joke, but you've clearly never played DotA :) It has the most advanced gameplay of literally any game I've ever played in all my years of gaming. Saving me a couple of keystrokes is all this program does. I've been using it for a couple weeks now. While it is helpful, it's hardly playing for me.

      • by Barny ( 103770 )

        Nope, infact, I don't even know what it stands for, the site linked doesn't tell me either, I assume from the links all over the site its some WoW x-pac?

  • Huh. (Score:5, Informative)

    by Count Fenring ( 669457 ) on Thursday May 14, 2009 @02:32AM (#27948155) Homepage Journal

    Probably no one cares, but that's the wrong "queues" there. They mean "cues."

  • by Anonymous Coward

    Why on earth are people still wasting their time on Neural Networks? Sure, they have a catchy name, but everything else about them sucks. Today we have much more robust methods available, e.g. Relevance Vector Machines, etc.

    • Re: (Score:3, Funny)

      by Anonymous Coward
      I prefer ties from the 1960s.
    • Easy to implement. First thing that seems plausible that gets taught in a machine learning course. And sometimes, like, say... HERE.... it works pretty well!

    • by Cheapy ( 809643 )

      It's open source, it's gonna take a while to catch up :p

  • I thought that went out with the 60s.

  • Hilarious Overkill (Score:5, Insightful)

    by phantomcircuit ( 938963 ) on Thursday May 14, 2009 @03:03AM (#27948251) Homepage

    So they designed and wrote a neural network for the sole purpose of identifying a limited set of icons? Seriously?

    They could have done this using conventional methods that would be significantly faster. Me thinks someone was just doing this for entertainment.

    • They we're doing it for a gradiate thesis. At least Neuroph was built for a thesis. What conventional method for image recognition do you think would be faster?
      • They we're doing it for a gradiate thesis. At least Neuroph was built for a thesis. What conventional method for image recognition do you think would be faster?

        I don't know what the GP had in mind, but for my take: How about _no_ image recognition in the first place?

        If you need to see when a game icon is activated, how about just looking at the byte that stores the state for that icon?

        • by happylight ( 600739 ) on Thursday May 14, 2009 @04:23AM (#27948585)
          It's an external program that doesn't have access to the game's internal data structures. Basically it's a bot without hooks to the game and makes decisions solely by looking at the screen.
          • by Moraelin ( 679338 ) on Thursday May 14, 2009 @04:48AM (#27948683) Journal

            As someone who's been writing external trainers for games for years (though admittedly it was some years ago), I can assure you first hand that accessing a game's internal data structures is indeed very possible.

            And even if I couldn't find that boolean, I'd at least try to hook the point where it tries to draw that icon.

            The idea of using image recognition on the screen is so horribly inefficient a method... I suppose it could be used if absolutely nothing else works, but really that's about it.

            • I tried this once and never came very far - can you give me a few 'pointers' on where to find resources and websites that explain these techniques?

            • Re: (Score:2, Interesting)

              Except to do something like that you have to analyze the program code of every game you make a trainer for. I've never done that sort of thing, but it seems scary.

              An approach like the one they've outlined can probably be moved from game to game with only parameter tweaks.

              That is the true beauty of machine learning :)

            • I can assure you first hand that accessing a game's internal data structures is indeed very possible.

              It could actually be simpler to do it his way. Icons never move, and he already knows where they are going to be on the screen, so no need to figure out what the data under the hood looks like. While it's certainly more processor intensive, and probably less elegant, Warcraft 3 is a pretty old game, so I don't think it's a big deal for most computers to handle the extra load. Or he could just be doing it cause it's more fun this way :)

            • by vikstar ( 615372 )

              Accessing a game's internal data structures could often be against the EULA, whereas reading your graphics card's frame buffer isn't.

      • by deander2 ( 26173 ) *

        i would have tried non-negative matrix factorization personally.

      • Template matching might have been faster. If you know exactly what image you're looking for, you can find it in time linear with the number of screen pixels. I didn't bother reading the article, but it seems unlikely that their algorithm started with the icons it was looking for. I am not an expert on neural nets specifically (though I am a machine learning researcher so I have a passing familiarity with them) but I don't know how you would give it that knowledge. It's possible that the NN figured out the
        • Ok, I skimmed the article.

          They don't need to find the image - they start out knowing where it is, so stuff like template matching is irrelevant.

          And since the NN started out knowing where the icons were, figuring out which ones matched which signals is not as impressive. It's just a ho-hum NN application, now.

    • Re: (Score:3, Informative)

      Me thinks someone was just doing this for entertainment.

      Almost certainly, especially since a complete success would just mean they can play video games slightly more efficiently.

      This toolkit worked for them, but does using a neural networking toolkit mean that what you produce is a neural network? It looks like the output neurons are doing image matching, and the hidden layer is identifying interesting candidates from a stream. In their environment, interesting candidates are any box that ticks from dim to bright (so they can spot the re-charged state when it

      • Re: (Score:1, Informative)

        by jowilkin ( 1453165 )
        It IS a neural network. A neural network is a mathematically well defined thing. That doesn't mean it was a good idea to use a neural network in this case (it wasn't IMO). I certainly wouldn't sign off on this as a thesis, what is the research aspect supposed to be? Using neural networks for image recognition was done and recognized to be a bad idea a really long time ago.
    • Indeed.

      I mean, I built an identical thing to what they've built (image recognition engine for fixed icons) once using the Perl regular expression engine [] (mostly just to prove it could be done). It was pretty awesome.

      But I have no illusions that it is the sort of thing that I should be promoting on Slashdot. ...oh wait...

      • Re: (Score:1, Informative)

        by Anonymous Coward

        That's a completely differente approach.
        Neural network can detect similar images - the perl solution can detect only binary equivalent images.
        They have choosen this solution as a proof of concept, not for speed.

        • Not necesarily, there's ways to implement the equivalent of alpha channel support in the regex.

          I agree though, that you can't do a percentage match like the neural net does.

    • Re: (Score:3, Insightful)

      by cerberusss ( 660701 )

      So they designed and wrote a neural network for the sole purpose of identifying a limited set of icons? Seriously?

      They used a library. And it's just an algorithm.

    • Re: (Score:3, Interesting)

      by grimJester ( 890090 )
      My reaction as well. My first thought was the neural network was used to learn/predict user actions based on what's on the screen and give sound cues tied to the predicted action. For example, when some critter spawns in front of you, the player usually casts Fireball -> network learns that and shouts "Fireball!" every time a monster spawns.
  • by physburn ( 1095481 ) on Thursday May 14, 2009 @03:05AM (#27948255) Homepage Journal
    As a programmer, Neuroph looks like pretty good implement of Neural Networks, it handers most of the network types, Got built in graphic view of the output. Look nice, but which like as not, won't help, because you can rarely debug a neural network by looking at it.

    I've use neural network and genetic programming a few time, in work. Its completely different to normal programming. Instead of understand a problem completely, and write a structured solution to the task. You get a network and try and train it until its output matches what you think the output should be, no programming involved.

  • Basshunter (Score:3, Funny)

    by Tokerat ( 150341 ) on Thursday May 14, 2009 @03:11AM (#27948283) Journal

    I just got that obnoxious song out of my head, and now they want to put the whole game in there? No thanks!

  • by zepo1a ( 958353 )
    SecuROM has detected JAVA on your computer! Please uninstall JAVA before launching the game.
  • I've seen this on Gilligan's Island already, where the professor hooked electrodes up to the Beatles wannabees while they played.

  • What is DotA?

    No, seriously; the article is of no use, and the link in the article to what appears to be the homepage of this DotA game that this code hacks on top of is also completely useless in telling me what kind of game this actually is; everything involved in this is a cryptic thicket of terms for this highly involved game I have never heard of.

e-credibility: the non-guaranteeable likelihood that the electronic data you're seeing is genuine rather than somebody's made-up crap. - Karl Lehenbauer