This is A.I.: A.I. For the Average Guy/Girl by Ean Mikale, J.D. - Chapter Eleven of Seventeen - A.I. & Programming Languages / by Ean Mikale

Chapter Eleven of Thirteen

Chapter 11: A.I. & Programming Languages

Python-vs-C_Watermarked.b9da21127ecc.jpg

According to sources like ZipRecruiter (Feb 2024), Glassdoor, and Coursera, the average annual salary for an entry-level AI specialist with less than 1 year of experience is between $53,925 and $117,447. As experience increases, so does salary potential. In high-paying areas like San Francisco or New York City, experienced AI specialists can command significantly higher salaries, reaching $150,000 or more. One of the great wonders of A.I. among noobs (“newbies”) is what makes it tick? To the lay-person, it is magic, and in many ways it a more modern version. If A.I. must be trained, what languages do we use to communicate with it? In this chapter, we will explore the various programming languages used by Data Scientists and A.I. Architects to deploy A.I. on machines, and the relevant details of each. We will address each language in order of speed, which is critical in A.I. applications.

Machine language is the lowest level of languages. Machine language cannot be understood by humans and can only be understood by machines. All programs and programming languages eventually generate or run programs in machine language. It is made up of instructions of data that are all binary numbers and is displayed in hexadecimal form. The next highest language is the Assembly language, which is a symbolic language that can be directly translated into machine language by a program called an assembler. The output of the assembler is an object module containing the bit strings that make up the machine language program, and information that tells a loader program where to place these bit strings in the computer memory. Machine language is the fastest language, with machine language coming in second. Assembly language is faster than our next programming language, however, while also the most efficient for custom processors.

C++ is not as fast of a language as Assembly, but C++ provides a much faster development time. Also, C++ compilers, which translate the C++ language into Machine language, are becoming quicker and more efficient at optimizations. C++ is primarily used for creating high-performance and real-time performance applications. The language provides great control and flexibility over system resources and computing memory. Thus, in situations where there is a need for the machine to operate with near zero-second latency, and the reliability of the system has implications relating to the loss of life or property, C++ provides a balanced alternative. C++ may be the most popular language for mission critical devices, where execution speed is tantamount. However, it is undeniable the growing popularity of the next language that we will discuss. However, nothing will beat the balance and speed of the C++ programming language, but in regards to development, there is something that is even quicker.

The next popular programming language that we will discuss is Python. Python has many advantages, including the fact that it is easier to learn and quicker to develop with less type required, easily accessible libraries, and a large scientific and open-source community. Even with this being said, important disadvantages must be acknowledged, such as the slower speed than prior languages, the large number of dependencies, which mean decreased memory and execution speed. Overall, there are an amazing amount of A.I.-based applications that are coded with Python. With this being said, it also means that many A.I. applications are not optimized, due to the fact that they are written in Python and not C++. Most applications that use A.I., such as Self-driving cars, drones, autonomous ground vehicles, robots, and internet of things connected devices each can be written in Python, as well as C++.

The next language is not necessarily an operating system per-se, but rather a framework and set of tools that provide the functionality of an operating system on single computer, or cluster of computers. ROS sits on top of both C++ and Python, quickening the development speed and deployment of A.I.-based applications. The Robotic Operation System is a set of software libraries and stools that help build robot applications. From drivers to state-of-the-art algorithms, and with powerful developer tools that seek to simplify the task of creating complex and robust robot behavior across a wide variety of robotic platforms.

The main languages for writing ROS code are C++ and Python, with C++ being preferred as a result of higher performance. A use-case for choosing ROS over purely C++ and/or Python, would be when using swarms, or when needing to control multiple machines for whatever reason. Due to the added layer of complexity, ROS is a more advanced language for developers. Let us look at a few project that are developed by using the various languages.

Nvidia utilizes a competition where 1/16th size race cars are mounted with embedded processors, used to race them around an obstacle course. This competition uses a combination of C++ and Python code. Some teams even use ROS as well for deployment. This competition prepares the participants for programming life-size self-driving cars, drones, satellites, aquatic vehicles, robots and more.

NASA's Robonaut program, which utilizes ROS 2, a more advanced version for real-time operating systems, to control a robotic arm in space. Additionally, other companies, such as Microsoft, Toyota, Samsung, and LG have invested in similar open-source robotics development. The robotic arm is controlled by MoveIt, which is the third most popular package in ROS, according to PickNik. The ROS platform is managed by the Open Source Robotics Foundation.

This particular project is called, Carla, which is an open-source autonomous driving environment that also comes with a Python API to interact with it. This unique server/client architecture means that we can run both the server and client locally on the same machines, but can also run the environment (server) on one machine and multiple clients on other machines. The simulation can immolate real-life sensors, such as LIDAR, cameras, accelerometers, and so on.

In conclusion, rather than be lengthy about the various aspects of each language, there are other books for such thing. Here, we want to skip you to the front of the knowledge-line in order to give you most relevant information quickly. While the lowest level language are the fastest, the higher level languages, such as Python or ROS provide unique benefits and trade-offs. It truly depends on the project, whether or not you decide to use one language or another. However, one thing is sure. If you want to create A.I. applications, work with Robotics, or Autonomous Machines, you will have to choose which pill to swallow, as each of the language has benefits and trade-offs. Ultimately, it is up to the developer or the project lead at the enterprise that will determine what features are required of the language that will develop their future A.I. Systems.

Exercises

  1. Can you name at least three programming languages used in Artificial Intelligence?

  2. Can you or your team decide which programming language you will use to build your Artificial Intelligence?

  3. What are the benefits of using your chosen language versus the others? Here are some of the other programming languages used for Artificial Intelligence.

  4. Which programming languages do you think were used to create any existing AI Applications? In order to create the fastest running AI application, which programming language would we use?

 

Ean Mikale, J.D., is an eight-time author with 11 years of experience in the AI industry. He serves as the Principal Engineer of Infinite 8 Industries, Inc., and is the IEEE Chair of the Hybrid Quantum-inspired Internet Protocol Industry Connections Group. He has initiated and directed his companies 7-year Nvidia Inception and Metropolis Partnerships. Mikale has created dozens of AI Assistants, many of which are currently in production. His clientele includes Fortune 500 Companies, Big Three Consulting Firms, and leading World Governments. He is a former graduate of IBM's Global Entrepreneur Program, AWS for Startups, Oracle for Startups, and Accelerate with Google. Finally, he is the creator of the World's First Hybrid Quantum Internet Layer, InfiNET. As an Industry Expert, he has also led coursework at Institutions, such as Columbia and MIT. Follow him on Linkedin, Instagram, and Facebook: @eanmikale