# Collaborative Approach in Machine Creativity

#### Introduction

The nature of human creativity has been studied even less than the nature of intelligence. Nevertheless, machine creativity, as a direction in artificial intelligence, exists. Here the problems of computer writing music, literary and pictorial works are posed, and the creation of realistic images is already widely used in the cinema and game industry. The created systems make it possible to produce specific images that are easily perceived by man, which is especially useful for intuitive knowledge, the verification of which in a formal form requires considerable mental effort [ 1 ].

Under the cut you will find a brief overview of the subject area, my proposed approach to writing music with a computer and a bit of math.

#### How it was

The development of electronic computing technology in the early stages led to its "invasion" of music. Already in the 50s, using the very first computers, scientists made attempts to synthesize music: compose a melody or arrange it with artificial timbres. So algorithmic music appeared, the principle of which was suggested back in 1206 by Guido Marzano, and later used by V.A. Mozart to automate the writing of minuets - writing music according to random numbers. C. Shannon, R. Zaripov, J. Xenakis and others were engaged in machine creativity.

In the fall of 2005, at the University of California (Berkeley, USA), a student orchestra performed Mozart's Forty-second symphony. Of course, the listeners knew that Mozart wrote a forty-one symphony, but this fact did not prevent them from listening to lovely music, which, however, according to a number of critics, lacked something elusive, usually inherent in the tunes of the great composer. And not surprisingly: the 42nd symphony was composed by the computer program EMI (“Experiments in Musical Intelligence” - Experiments in Musical Intelligence). The program was created by composer and programmer David Cope at the same time. Over the past few years, EMI has generated "new works" by Bach, Beethoven, Brahms, Chopin and Scott Joplin [ 2 ].

At the moment, two main areas in algorithmic music can be distinguished:

- the creation by computer of new works capable of, in a sense, competing with works of art created by man;
- modeling of well-known styles of musical works for studying the laws and principles of building these works, their forms, structures, as well as for experiments on their perception in psychophysiological studies.

Music generation algorithms use two polar approaches based on the use of deterministic or stochastic procedures. Deterministic procedures generate musical events (for example, notes), performing fixed compositional tasks that are not related to random selection. Stochastic procedures generate musical events according to probability tables that establish the probability of occurrence of these events [ 3 ].

#### Why do we need some kind of collaboration?

Music generation algorithms within each approach have their advantages and disadvantages. For example, a melody generation algorithm based on Markov chains uses statistical information and reflects pitch, but it cannot generate a melody that is adequate in terms of rhythm.

A collaborative approach based on the use of several algorithms by means of their composition is proposed. The idea of constructing an algorithmic composition is not new. It first appeared in the framework of solving the pattern recognition problem and consisted of combining several algorithms into a composition under the assumption that the errors of these algorithms are mutually compensated.

#### Who is who

The formulation of the problem of algorithmic composition was formalized by Yu.I. Zhuravlev as follows. It is required to construct an algorithm

*a: X → Y*, where

*X*is the space of objects;

*Y*- many answers. Along with the sets

*X*and

*Y,*an auxiliary set

*R*, called the estimate space, is introduced . We consider algorithms having the form of a superposition a (x) = C (b (x)), where the function

*b: X → R*is called the algorithmic operator, and the function

*C: R → Y*is the decision rule. Algorithmic composition composed of algorithmic operators

*b*correcting operations

_{t}: X → R,*F: R*and the decision rule

^{T}→ R*C: R → Y*is the algorithm a: X → Y of the form [ 4 ]:

#### And what about the generation?

As you can see, this approach is applicable to the recognition of input data, but music generation algorithms do not recognize anything, but synthesize new things. Therefore, we will try to reduce the task of generating musical events (notes) to the task of classification or recognition.

Each of the existing algorithms is aimed at creating a chain of notes of a certain duration and pitch. But it’s enough to change the internal logic of the algorithm so that the generated notes come from outside (for example, from random note generators), and the algorithm gives an estimate, if it could synthesize the note received at the input in the current state. Thus, the generation problem is reduced to the recognition problem.

#### Collaborative approach

To the input of algorithms

*b*and

_{1}(x)*b*we will submit pairs of values from the set

_{2}(x)*X = {(note*obtained randomly.

_{1}, duration_{1}) ... (note_{12}, duration_{1}), (note_{1}, duration_{N}) ... (note_{1}, duration_{N})}The estimation space

*R = {0, 1}*, where

*1*is a sign of suitable input data,

*0*is a sign of inappropriate data. Any algorithm

*b*forms a pair of estimates

_{i}(x)*(R*, where

^{H}, R^{D})*R*is the note score,

^{H}*R*is the duration estimate.

^{D}As a corrective operation, we consider a simple vote [ 4 ], i.e.

For evaluations inputted space

*R*and algorithms

*b*and

_{1}(x)*b*correction operation

_{2}(x)*F*is the following:

We define the decision rule follows

Rule ratings needs space

*R*into a plurality of answers

*Y*. Many answers

*Y = {M*divides the input into two classes:

_{1}, M_{2}}*M*- suitable for the melody of the pair (note, duration) and

_{1}*M*- inappropriate pair.

_{2}Thus, the following algorithmic composition is obtained:

#### Area of expertise

We define the area of competence of the algorithm

*b*as high-altitude, and the algorithm

_{1}(x)*b*as rhythmic. The

_{2}(x)*b*algorithm cannot evaluate a pair

_{1}(x)*(note, duration)*from the rhythmic side, as well as the

*b*algorithm from an audio pitch. We accept the following assumption: any algorithm

_{2}(x)*b*that is incompetent in a certain area always evaluates data from this area as suitable. In other words, the estimate of

_{i}(x)*R*for the algorithm

_{1}*b*is equal to

_{1}(x)*(R*, the estimate of

^{H}, 1)*R*for the algorithm

_{2}*b*is

_{2}(x)*(1, R*.

^{Д})#### Instead of a conclusion

In the general case, the proposed collaboration approach can be extended to a wider variety of algorithms. Moreover, algorithms can generate not only

*0*or

*1*estimates , but also use the entire interval

*[0; 1]*, as the probability of occurrence of an input pair. In addition, each algorithm can be weighted, which will highlight the most significant estimates. For example, when modeling the style of a certain composer, estimates obtained from a neural network trained on a certain set of works by this composer are more priority.

#### List of references

- Rodzin, S.I. Artificial Intelligence. - Taganrog: Publishing House of TTI SFU, 2009. - 200 p.
- Sharov, K. S. Machine-composers and sensory perception of musical creativity / K. S. Sharov // Materials of the International Scientific Conference (November 6-7, 2009) - M .: Modern notebooks. - 2009 .-- 240 s.
- asmir.info/lib/compmus.htm
- Zhuravlev, Yu. I. On the algebraic approach to solving recognition or classification problems / Yu.I. Zhuravlev // Problems of Cybernetics. - 1978. - T. 33. - S. 5–68.