Search Unity

Machine learning development in Unity?

Discussion in 'Getting Started' started by yarongh, Apr 20, 2017.

  1. yarongh

    yarongh

    Joined:
    Aug 10, 2016
    Posts:
    8
    Hi,

    I'm fairly new to Unity and i wanted to ask - what is the best way to go about developing machine learning features? (as part of an interactive mobile app, not a game)

    Should i focus on C#? Are there any libraries that could help me?

    What about C++? Is it possible to write those features in C++ and then somehow put them in Unity?

    Thanks!
     
  2. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    You certainly could write your ML code in C++ and build it as a Unity plug-in, but this is almost certainly the way of pain. Just do it in C#, which is in many ways a better language anyway.

    The only library you might want (depending on what sort of ML you're doing) is some sort of basic linear algebra library, perhaps like this one.

    If you need any help, let me know — I've been interested in ML for years and love any opportunity to apply it.
     
  3. surajsirohi1008

    surajsirohi1008

    Joined:
    Jun 21, 2016
    Posts:
    267
    Do I need high end PC to use ML plugins in unity? I only have a MacBook pro
     
  4. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    No. I've done plenty of ML stuff on my 2012 MacBook Pro.
     
  5. surajsirohi1008

    surajsirohi1008

    Joined:
    Jun 21, 2016
    Posts:
    267
    I read some instructions it stated I need something called CUDA by Nvidia, I assumed I'll be needing a bunch of gtx 1080s
     
  6. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Instructions for what?

    You must have been looking at some particular ML library or package. That could indeed have specific hardware requirements. That doesn't mean that ML in general does. Check out this tech paper I wrote a few years back, comparing several ML algorithms to human performance in a sort of puzzle environment. All that was done in REALbasic on a Mac.
     
  7. surajsirohi1008

    surajsirohi1008

    Joined:
    Jun 21, 2016
    Posts:
    267
    I tried to read your work but it's too high level stuff for me, what would you suggest where should I begin learning how to use AI in unity (Not Navmesh agents). Should I start with tensor flow?
     
  8. grizzly

    grizzly

    Joined:
    Dec 5, 2012
    Posts:
    357
  9. surajsirohi1008

    surajsirohi1008

    Joined:
    Jun 21, 2016
    Posts:
    267
  10. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yeah, Unity's ML Agents are interesting, though if you can't follow my paper I'm not sure you'll have much luck with their toolkit either.

    Check out the books AI Game Programming Wisdom (volumes 1 and 2), as well as Artificial Intelligence for Games. I also really like Artificial Intelligence: A Modern Approach (though that one is not game-specific).
     
  11. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    ML isn't user friendly right now. It's basically a case of it being serious WIP across the board, from all walks.
     
    Xepherys likes this.
  12. surajsirohi1008

    surajsirohi1008

    Joined:
    Jun 21, 2016
    Posts:
    267
    The books you mentioned, are those beginner friendly?
     
  13. surajsirohi1008

    surajsirohi1008

    Joined:
    Jun 21, 2016
    Posts:
    267
    I guess I'll start reading some books.
     
  14. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes, all those are quite approachable I think.
     
  15. surajsirohi1008

    surajsirohi1008

    Joined:
    Jun 21, 2016
    Posts:
    267
    Thanks, I'll check them out