Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Java Program Uses Neural Networks To Monitor Games

Posted by Soulskill on Thu May 14, 2009 01:13 AM
from the automating-the-automation dept.
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.'"
+ -
story

Related Stories

[+] Technology: Image Recognition Neural Networks, Open Sourced 98 comments
sevarac writes "The latest release of Java Neural Network Framework Neuroph v2.3 comes with ready-to-use image recognition support. It provides GUI tool for training multi layer perceptrons for image recognition, and an easy-to-use API to deploy these neural networks in end-user applications. This image recognition approach has been successfully used by DotA AutoScript tool, and now it is released as open source. With this Java library basic image recognition can be performed in just few lines of code. The developers have published a howto article and an online demo which can be used to train image recognition neural networks online."
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • Can it.... (Score:3, Funny)

    by Barny (103770) <bakadamage-slashdot@yahoo.com> on Thursday May 14 2009, @01: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?

      It's emulating the human brain in a VM.

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

    • 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)

      I wrote a program in Java that used an artificial neural network to play Warning Forever [wikipedia.org]. 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
      • Re: (Score:2, Insightful)

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

  • Huh. (Score:5, Informative)

    by Count Fenring (669457) on Thursday May 14 2009, @01: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.

  • Hilarious Overkill (Score:5, Insightful)

    by phantomcircuit (938963) on Thursday May 14 2009, @02: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.

    • 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

    • 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 [cpan.org] (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:3, Insightful)

      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)

      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.
      • 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, @03: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, @03: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 would have tried non-negative matrix factorization personally.

      • by mcvos (645701) on Thursday May 14 2009, @04:24AM (#27948843)

        IN JAVA. Speed was obviously not in the design criteria.

        The '90s are over. Java is now one of the fastest languages around.

        • After the half hour it takes to load. ;)

        • Languages aren't fast -- compilers are efficient. How "fast" a language is perceived to be is purely a function of whether an efficient compiler exists for the particular platform.
          • The '90s are over. Java is now one of the fastest languages around.

            Around where?

            Everywhere, that's the cool thing about java, you know.

            • by daid303 (843777) on Thursday May 14 2009, @05:37AM (#27949147)
              Except on everything not x86. The speed you currently see on desktop/server java is only accomplished by very good JustInTime compilers. Which are tweaked for x86. So everything else runs java like crap.

              http://en.wikipedia.org/wiki/ARM_architecture [wikipedia.org] And that includes a few bilion ARM prosessors used in mobile phones. Sure they can run java, but it's nowhere near as fast as C.

              Java is nice, but the 'runs everywhere' feature is the least interesting one of them all. I can run an emulated a full blown x86 on a 8bit microcontroller, but that does not make it useful.
              • Except on everything not x86. The speed you currently see on desktop/server java is only accomplished by very good JustInTime compilers. Which are tweaked for x86. So everything else runs java like crap.

                Have you not heard of Jazelle [arm.com]? It supprots just in time and ahead of time compilers for ARM and is mentioned in the wikipedia link you gave.

                It provides direct execution of Java bytecode and was announced in 2000 [eetimes.com].

          • by mcvos (645701) on Thursday May 14 2009, @06:45AM (#27949461)

            Is your application CPU-limited?

            No, it's developer-limited. For most applications, development time is a bigger issue than execution speed. Only for very heavily used low-level routines (OS stuff, graphics libraries, VMs, etc) is it really worthwhile spending extra effort on extreme optimisation.

            If so, is it *the* fastest language?

            I don't have any recent benchmarks, but I remember that back in the days of the Java 5 JVM, Java is about 10% slower than equivalent C++, which is pretty good. But since then, JVMs have gotten quite a bit faster. It would surprise me if Java was not on at least equal terms with C++ now, alhough highly optimised low-level C is still going to be faster. But that's also extremely tedious to code.

            Those are the questions one should be asking when picking a programming language.

            No, the main question you need to ask when picking a language is if your code is going to be maintainable, and how expensive you can afford your maintainance to be. That's still the main timesink in development.

            If your application is limited by the CPU, only the fastest language, C, will do for some routines. You may even consider using assembly or machine-optimized code such as Atlas [sourceforge.net]

            You accidentally hit the nail right on the head there: C is not necessarily the fastest language, highly optimised custom assembly is. And any language is only as fast as it can be if the programmer knows what he's doing. Some language do more for you to make optimal code easy to write than others.

            Java development, in my experience, is more laborious than Python or Ruby. Unless you have big teams of developers who must work close together, I wouldn't recommend Java for anything.

            Oh, I agree, Java stopped being an easy development language quite some time ago, and moved to the side of the fast execution languages. This is also why I switched from Java to Ruby. However, I just might switch to Scala because recent JVMs are so incredibly cool. The power of Java these days is more in the awesomeness of the JVM than in the language itself.

            Even so, there is an enormous amount of support for Java. It is by far the biggest language for enterprisey server stuff. I think there are as many webframeworks for Java as there are for all other programming languages put together. This is one of the big stengths of Java, but at the same time, this architectural overload is also one of the major hurdles for starting in Java.

            However, my point was that Java is pretty fast, which it is. If speed is an issue, Java can be an excellent choice (unlike Ruby, for example). If speed is the only thing that matters, then highly optimised C or assembly is really the only option.

            • The "problem", as you pointed out, is that Java has a lot of options while Ruby has Rails and Python has Django and that's about it. You could build a similar tool set with Java/stack with Java to increase productivity. There are Java MVC frameworks, CRUD application generators, persistence strategies, code generators, and so on. A good Java IDE [netbeans.org] helps peice them together.

              It could/should be better though but with the right set of tools/frameworks/libraries you can be very productive in Java.

          • If your application is limited by the CPU, only the fastest language, C, will do for some routines. You may even consider using assembly or machine-optimized code such as Atlas

            If your application is limited by the CPU, you'll need to parallelize it to take advantage of multicore CPUs. C is probably the worst possible choice there, with the possible exception of assembly.

            Furthermore, while low-level languages allow for all kinds of tricks in the hands of a master, the chances are that you are close to an av

      • I didn't it was slashdot's five minute hate already. Jeez its early. Anyone have an stray pictures of Gosling that I can yell at? Being somewhat serious, why does the slashdot groupthink give C# a free pass whereas java gets all the hate? I haven't looked, but I assumed both are similar in performance. Is it because one of them is integrated right into gnome? Or is it because Java is the most popular language for enterprise development?
          • Maybe because MS hasn't changed the .NET API every 5 minutes with stupid trivial changes, then deprecated the old versions? Java had a horrible case of too many cooks.

            Deprecated APIs have not been removed, and haven't changed nearly that often. So what are you really complaining about?

          • If anything, MS keeps things far too long. Ars wrote up an excellent article on it. Here's a snip:

            For example, there's a function called OpenFile. OpenFile was a Win16 function. It opens files, obviously enough. In Win32 it was deprecated--kept in, to allow 16-bit apps to be ported to Win32 more easily, but deprecated all the same. In Win32 it has always been deprecated. The documentation for OpenFile says, "Note: Only use this function with 16-bit versions of Windows. For newer applications, use the Crea

            • I dunno about you but I prefer my soup to be a "proprietary solution" made by a "single vendor" and advertised as, say, "pumpkin soup". I would really hate to try and eat soup made by a group of volunteers, some of whom think they're making pumpkin and leek soup, but most of whom are busy arguing over whether they're making greek salad, hot-and-sour soup, or nachos.
  • by physburn (1095481) on Thursday May 14 2009, @02: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, @02: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!

  • SecuROM has detected JAVA on your computer! Please uninstall JAVA before launching the game.
  • 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.

      • Thanks! I've never played any incarnation of Warcraft, so almost nothing about this article made a damn bit of sense to me.