Historically, some programming languages have been specifically designed for artificial intelligence (AI) applications. Nowadays, many general-purpose programming languages also have libraries that can be used to develop AI applications.
Elixir is a high-level functional programming language based on the Erlang VM. Its machine-learning ecosystem includes Nx for computing on CPUs and GPUs, Bumblebee and Axon for serving and training models, Broadway for distributed processing pipelines, Membrane for image and video processing, Livebook for prototyping and publishing notebooks, and Nerves for embedding on devices.
R is widely used in new-style artificial intelligence, involving statistical computations, numerical analysis, the use of Bayesian inference, neural networks and in general machine learning. In domains like finance, biology, sociology or medicine it is considered one of the main standard languages. It offers several paradigms of programming like vectorial computation, functional programming and object-oriented programming.
Lisp was the first language developed for artificial intelligence. It includes features intended to support programs that could perform general problem solving, such as lists, associations, schemas (frames), dynamic memory allocation, data types, recursion, associative retrieval, functions as arguments, generators (streams), and cooperative multitasking.
MATLAB is a proprietary numerical computing language developed by MathWorks. MATLAB has many toolboxes specifically for the development of AI including the Statistics and Machine Learning Toolbox and Deep Learning Toolbox. These toolboxes provide APIs for the high-level and low-level implementation and use of many types of machine learning models that can integrate with the rest of the MATLAB ecosystem. These libraries also have support for code generation for embedded hardware.
JavaScript is widely used for web applications and can notably be executed with web browsers. Libraries for AI include TensorFlow.js, Synaptic and Brain.js.[6]
C# can be used to develop high level machine learning models using Microsoft’s .NET suite. ML.NET was developed to aid integration with existing .NET projects, simplifying the process for existing software using the .NET platform.
Haskell is a purely functional programming language. Lazy evaluation and the list and LogicT monads make it easy to express non-deterministic algorithms, which is often the case. Infinite data structures are useful for search trees. The language's features enable a compositional way to express algorithms. Working with graphs is however a bit harder at first because of functional purity.
Wolfram Language includes a wide range of integrated machine learning abilities, from highly automated functions like Predict and Classify to functions based on specific methods and diagnostics. The functions work on many types of data, including numerical, categorical, time series, textual, and image.[7]
Mojo can run some Python programs, and supports programmability of AI hardware. It aims to combine the usability of Python with the performance of low-level programming languages like C++ or Rust.[8]
Specialized languages
Prolog[9][10] is a declarative language where programs are expressed in terms of relations, and execution occurs by running queries over these relations. Prolog is particularly useful for symbolic reasoning, database and language parsing applications.
Planner is a hybrid between procedural and logical languages. It gives a procedural interpretation to logical sentences where implications are interpreted with pattern-directed inference.
Stanford Research Institute Problem Solver (STRIPS) is a language to express automated planning problem instances. It expresses an initial state, the goal states, and a set of actions. For each action preconditions (what must be established before the action is performed) and postconditions (what is established after the action is performed) are specified.