2

Best programming language for developing an AI

Comments
  • 1
    @24th-Dragon

    I agree Python is the best programming language to develop AI in but is it the best language to deploy over? I never deploy an AI before so just asking.
  • 3
    Technically python is good, but c/++ is more efficient and faster.
  • 1
  • 0
    Python if you just want to plug things together (not a bad thing), otherwise any language that compiles to machine code with a good compiler backend like GCC or LLVM(like C or Rust) because it can usually auto vectorize to AVX/NEON instructions which you will use a lot in AI.
  • 2
    Choose a library, not a language. Then choose a language that can interface with the library. You don't want to be writing low level linear algebra code when developing an AI.

    Python with PyTorch/Tensorflow etc. are good options for DL based AI.

    For stuff like game AI, C++ is probably a better bet because of its efficiency and you have tons of low level data structures and algorithms libraries, because game AI relies on a lot of fast data structure manipulation which C++ is good at (or find a Python/whatever library for it, personally don't know any but they have to be there)

    @CurtisMJ for deep learning type workloads that's a definite nope unless you're doing some niche optimization. Autovectorized code will almost always be crappier than hand tuned library (Eigen/MKL/etc.) code because there's a lot more to high performance programming than vectorization (eg. cache optimizations). Python with one of those libraries would shred everything but the most exquisitely optimized C/C++/Rust/Go etc. code, and if you're going that deep you're usually reimplementing the library anyway.
  • 1
    @RememberMe Fair call on auto-vectorization being kinda crappy. Just figured I'd get a mention in for SIMD instructions because in my experience re-implementing the library is literally what some people wanting to learn this stuff want to do. High performance programming is indeed a rabbit hole but its a good rabbit hole to know your way around when youre interested in the deeper mechanics of AI, even if you're just going to let a library handle it. Even those libraries can make mistakes sometimes. Some people aren't interested. Thats fine, they can use Python.
  • 1
    @CurtisMJ true, but AI and HPC are kind of orthogonal skills (good to have both for sure but practical constraints like time). The AI researchers I know don't bother with low level details like computation, they do algorithms and deep network architecture and so on. Computation is handled by experts who make said libraries (generally, they just use an existing library). It's just because of the massively increased productivity this offers.

    But sure if you want to learn both, by all means go ahead. Implementing stuff from scratch is fun.
  • 1
    *desperately tries to delete high performance AI library that I've been working on for the last 6 months from Github*
    If I ever pluck up the courage to actually make that repo public I am so going to link this rant lol.
  • 1
    @CurtisMJ don't let me stop you, lol
    It's cool stuff and definitely worth learning about.
  • 0
    None can beat brainfuck
  • 0
    Any language at all, a nice randomizer, and millions of years of patience.

    If you're particularly patient, you might get a copy of yourself!
  • 1
  • 1
    @Demolishun Don't forget the CSS. 😂
Add Comment