Artificial Intelligence Takes Many Forms

Richard C. Leinecker, December 2013

When considering computer-assisted musical composition, the topic of artificial intelligence (AI) invariably arises. It is almost impossible to consider a process in which computers create music without concluding that it involves AI. Any discussion of AI in the context of musical composition carries the controversy of whether a computer can in any way be creative. This controversy is pervasive, and by no means has a clear answer.

Early in the twentieth century, Joseph Schillinger (Schillinger, 1941, p. v) created and wrote extensively on a system of musical composition which involved computation over intuition. His premise was that music composers use preset patterns and methods to compose music, and by codifying their approaches one can utilize them to create music. Regardless of which side of the argument you find yourself on, there is no doubt that advances in AI have produced surprising results in virtual art and creativity.

There is no one single AI approach that solves all problems. Waltz (1997, p. 49) posits that AI development draws from a palette of options. That is the point of this article. In order to illustrate this, a simple Tic-Tac-Toe game was created. It offers several methods of AI in order for the computer to make a decision, or to offer a hint. They include random selection, a neural network, a binary search method similar to chess engine searches, reliance on a database of “best moves”, and an expert system that incorporates preset rules. You are invited to try this app, which is written in Silverlight and hosted within this web page. The Visual Studio project can also be downloaded if you would like to experiment with it.

Most of the methods included in the app win or tie (cat’s game) except for the random approach. This will be addressed shortly, but first the winning approaches will be discussed.

The expert system uses a set of rules which were assembled by an expert Tic-Tac-Toe player. By following these rules, the game can always be either won or tied. Here is an example of these expert rules: if there are two of your marks (X or O) in a row with an open space that will lead to a win, your best move is to take the open space for the win. Another example is this: if you cannot win this turn, and your opponent has two of their marks in a row with an open space that will lead to a win, then you should mark the open space in order to block the opponent's win. If we compare this to a set of rules, it is something similar to those of Schillinger, or Hindemith (Hindemith, 1939, p. 53). Please note that Hindemith followed his rule set and is regarded as an eminent composer. In addition, one can also point to the 12 tone composers who rigidly follow a set of rules.

The next system in the Tic-Tac-Toe game is a binary search tree. Its technical name is a minimax algorithm. Essentially is operates as follows. First, a list of legal moves is assembled. Each of the legal moves is made. Then the position is scored, the higher the score, the better for the player who is making the move. The search algorithm goes as deep in a recursive manner as is necessary in order to find the best move. In the case of Tic-Tac-Toe, the algorithm goes as deep as it can since the number of moves is small and they can all be scored. In the case of a chess engine, an infinite search depth would take a long time, and heuristics allow chess search engines to prune to manageable levels. Gilbert (1985, p. 2) shows that a minimax algorithm can be optimized to reduce the number of recursive searches, thus reducing and improving the execution time. Anyone who has ever played a good chess game will know that this type of AI can provide an excellent virtual intelligence, and seem like a real person.

Another AI which was applied to the Tic-Tac-Toe game was a database of board situations and the proper move for that situation. There is no real intelligence to this. It is simply a lookup of previously calculated positions and the correct move. While this works for Tic-Tac-Toe, it is not practical for chess or anything else that has a large number of possibilities.

The random choice simply selects a random move and makes it. This is obviously not a winning proposition, although there is a remote chance that the random moves could provide a winning strategy.

Finally, the neural network approach must be tackled. There has been a lot of popular writing about the use of neural networks. They have been shown to solve problems that have not been solvable with normal formulaic programming. What they are especially good at is solving non-linear problems. But Heaton (2008, p. 43) shows that neural networks are not always good choices when selecting programming approaches when standard programming practices suffice. He also goes on to show that they produce results that cannot be explained. The neural network featured in this Tic-Tac-Toe game provides different results than the other methods, but still plays fairly well.

As computer-assisted musical composition is explored, we will select the best approach to solving the problem at hand. Sometimes it will be following a rule set. Sometimes it will be using neural networks. It is important, though, to make sure that no one single approach to AI becomes predominant.


Gilbert, E. N. (1985). An optimal minimax algorithm. Annals Of Operations Research, 4, 1-4.

Heaton, J. (2008). Introduction to neural networks for C# (Second ed.). United States of America: Heaton Research.

Hindemith, P. (1939). The craft of musical composition. London: Schott.

Schillinger, J. (1941). The Schillinger system of musical composition. Harwich Port, MA: Clock & Rose Press.

Waltz, D. L. (1997). Artificial intelligence. AI Magazine, 18(3), 49. Retrieved from



Leinecker, R. C. (2013). Artificial intelligence takes many forms. Retrieved from

Leinecker, Richard C. "Artificial Intelligence Takes Many Forms." Artificial Intelligence Takes Many Forms. Rick Leinecker, Dec. 2013. Web. 11 Dec. 2013.