Example of an internet chess program, Lichess, showing artificial intelligence programming- if the white bishop at b3 moves to a2, capturing the black knight, then the black pawn at b1 is programmed to capture the bishop back. Black has just moved a pawn to c2.
Computer programming is the process of designing and building an executablecomputer program for accomplishing a specific computing task. Programming involves tasks such as: analysis, generating algorithms, profiling algorithms' accuracy and resource consumption, and the implementation of algorithms in a chosen programming language (commonly referred to as coding). The source code of a program is written in one or more languages that are intelligible to programmers, rather than machine code, which is directly executed by the central processing unit. The purpose of programming is to find a sequence of instructions that will automate the performance of a task (which can be as complex as an operating system) on a computer, often for solving a given problem. The process of programming thus often requires expertise in several different subjects, including knowledge of the application domain, specialized algorithms, and formal logic.