Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. C++ and Artificial Intelligence

C++ and Artificial Intelligence

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++game-devlearning
6 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Miles UE
    wrote on last edited by
    #1

    I have recently been teaching myself C++, is it possible to go down the machine learning and artificial intelligence route effectively using this language? Or is C++ only good for game development in 2018 and onwards? If that's the case what is a good language to go down the machine learning and artificial intelligence route?

    M D M S 4 Replies Last reply
    0
    • M Miles UE

      I have recently been teaching myself C++, is it possible to go down the machine learning and artificial intelligence route effectively using this language? Or is C++ only good for game development in 2018 and onwards? If that's the case what is a good language to go down the machine learning and artificial intelligence route?

      M Offline
      M Offline
      Manish K Agarwal
      wrote on last edited by
      #2

      As far as I know most of the ML libraries are available in R, Python, Spark etc. not sure if C++ is the correct route for ML.

      _ 1 Reply Last reply
      0
      • M Manish K Agarwal

        As far as I know most of the ML libraries are available in R, Python, Spark etc. not sure if C++ is the correct route for ML.

        _ Offline
        _ Offline
        _Flaviu
        wrote on last edited by
        #3

        There is a few lib for ML: mlpack: a fast, flexible c++ machine learning library[^]

        1 Reply Last reply
        0
        • M Miles UE

          I have recently been teaching myself C++, is it possible to go down the machine learning and artificial intelligence route effectively using this language? Or is C++ only good for game development in 2018 and onwards? If that's the case what is a good language to go down the machine learning and artificial intelligence route?

          D Offline
          D Offline
          Daniel Pfeffer
          wrote on last edited by
          #4

          C++ has been used (and is being used) for everything from low-level system APIs to ML. About the only thing I have not seen C++ used for is writing the kernel of an O/S (probably because it requires too much runtime library support). Regarding Machine Learning libraries, what counts is not whether the library is written in C++, but whether it has an interface ("bindings") that is callable from C++. AFAIK, most low-level libraries (Android's NNAPI, Apple's Core ML, etc.) all have C++ bindings. Many higher-level libraries (e.g. TensorFlow) call the lower-level libraries, and not all of these higher-level libraries have C++ bindings. Perhaps that is the cause of your confusion.

          Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

          1 Reply Last reply
          0
          • M Miles UE

            I have recently been teaching myself C++, is it possible to go down the machine learning and artificial intelligence route effectively using this language? Or is C++ only good for game development in 2018 and onwards? If that's the case what is a good language to go down the machine learning and artificial intelligence route?

            M Offline
            M Offline
            Maximilien
            wrote on last edited by
            #5

            Miles UE wrote:

            Or is C++ only good for game development in 2018 and onwards

            LOL no. You can do whatever you want with C++. The effort depends on what you want to do. If there are C++ Machine Learning SDK, then you are ready to use them. If there are no ML SDK, then you will need to develop them yourself; it is what people have been doing with other language, it didn't just sprouted out of the ground.

            I'd rather be phishing!

            1 Reply Last reply
            0
            • M Miles UE

              I have recently been teaching myself C++, is it possible to go down the machine learning and artificial intelligence route effectively using this language? Or is C++ only good for game development in 2018 and onwards? If that's the case what is a good language to go down the machine learning and artificial intelligence route?

              S Offline
              S Offline
              Stefan_Lang
              wrote on last edited by
              #6

              There are a few rule-based programming languages that were developed with artificial intelligence in mind, specifically expert systems, starting with Lisp and Prolog. But, other than that, any general purpose language is suitable. C++ is a specifically good choice for applications that involve heavy computing, and that is certainly an ostentatious property of most ML algorithms. There's one particular problem you should watch out for however: memory management. Unlike many newer languages, C++ requires you to manage your memory yourself, and this is a constant source of problems, specifically in complex programs that require a lot of memory - and this definitely includes ML. You should therefore learn about the use of smart pointers and always use those, rather than raw pointers. The sooner you get used to using them, the better: it will save you a ton of headaches in the long run! As an introduction, check the descriptions and articles on C++ sites (e. g. Dynamic memory management - cppreference.com[^]) , or you could find some articles right here, e. g. C++11 Smart Pointers[^]

              GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups