web.cecs.pdx.eduweb.cecs.pdx.edu/~mperkows/class_479/2013 lecture…  · web viewa screen shot of...

20
Artistic Robots through Interactive Genetic Algorithm with ELO rating system Andy Goetz, Camille Huffman, Kevin Riedl, Mathias Sunardi and Marek Perkowski Department of Electrical Engineering, Portland State University Abstract The paper presents a new approach, based on ELO rating system known from chess, to create fitness function for Interactive Genetic Algorithm in which many humans evaluate robot motions via Internet page. In particular we discuss two artistic robot systems; BOTTSY and DERPY which allow users to evolve marker figures. The basic robots work by using a genetic algorithm, fuzzy logic, state machines, a small set of functions for creating picture components, and a user interface which allows the Internet users to rate individual sequences. 1. Introduction Interactive evolutionary computation (IEC) are a variation of evolutionary algorithms that evaluate the created by them phenotypes based on subjective rather objective criteria. IGA (Interactive Genetic Algorithm) belongs to IEC. For instance, if one designs a walking robot for a running competition, the cost function of the evolutionary algorithm can just promote the gaits that are fast and directed. This can be done based on measurements of distance walked by a robot in certain time interval – an objective measure [Levy]. If however we want to evolve a dancing robot that would be truly entertaining– no criteria exist that could create a cost function based on physical measurements only. One needs to involve humans, experts or general public, in the evaluation loop. The main application of these techniques includes domains where it is hard or impossible to design a computational fitness function, for example, evolving images, music, dances, gestures of humanoid robots, facial emotions, various artistic designs and forms to fit users’ aesthetic preferences. The aesthetic

Upload: nguyenkhanh

Post on 27-Aug-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

Artistic Robots through Interactive Genetic Algorithm with ELO rating system

Andy Goetz, Camille Huffman, Kevin Riedl, Mathias Sunardi and Marek PerkowskiDepartment of Electrical Engineering, Portland State University

AbstractThe paper presents a new approach, based on ELO rating system known from chess, to create fitness function for Interactive Genetic Algorithm in which many humans evaluate robot motions via Internet page. In particular we discuss two artistic robot systems; BOTTSY and DERPY which allow users to evolve marker figures. The basic robots work by using a genetic algorithm, fuzzy logic, state machines, a small set of functions for creating picture components, and a user interface which allows the Internet users to rate individual sequences.

1. Introduction

Interactive evolutionary computation (IEC) are a variation of evolutionary algorithms that evaluate the created by them phenotypes based on subjective rather objective criteria. IGA (Interactive Genetic Algorithm) belongs to IEC. For instance, if one designs a walking robot for a running competition, the cost function of the evolutionary algorithm can just promote the gaits that are fast and directed. This can be done based on measurements of distance walked by a robot in certain time interval – an objective measure [Levy]. If however we want to evolve a dancing robot that would be truly entertaining– no criteria exist that could create a cost function based on physical measurements only. One needs to involve humans, experts or general public, in the evaluation loop. The main application of these techniques includes domains where it is hard or impossible to design a computational fitness function, for example, evolving images, music, dances, gestures of

humanoid robots, facial emotions, various artistic designs and forms to fit users’ aesthetic preferences. The aesthetic selection is subjective but reflects some cultural values of a population of the evaluating humans. In short, we can define that IEC is any type of evolutionary computation that involves humans in a loop of fitness function evaluation. There are however many ways how the human values are numerically incorporated in the fitness function. So the research question is how to design the cost function that will evaluate objectively the human intentions. If for instance the human decisions based on the fitness function would contradict themselves, the design would be not good. For instance if a human will use a weighted function that would evaluate: “Object A better than B, B better than C, C better than A” this would lead to a contradiction and cannot be accepted. This however happens in several previous systems and our past experience. The loops like this should be avoided or cutted in optimal ways.

In past we used various IEC to evaluate walking robot gaits, humanoid body robot gestures, humanoid robot face lips to text synchronization and humanoid robot emotional facial gestures. The IEC methods can be quite general: for instance for feedback we can use a population of young people, a population of old people, of all people or a single individual, his/her personal opinions about visual appeal of a piece of art or attractiveness of a dance. We can evaluate the design with respect to one criterium or to a combination of criteria

such as motion, melody, rhythm, color, shape, tone or form of language forms.

In our previous work on using evolutionary techniques in robot theatre [4r4r] we found the following:1. Users have no consistent way of

evaluating items and it depends on how tired he or she is or in what order the variants of robot behaviors were shown to him.

2. User finds it boring to compare too many items (like robot dances) so the whole procedure of asking him questions or showing items should be maximally simplified by good interface design and convenient organization of the whole experiment.

3. For practical reasons, a good system must produce some useful results with a small population size and small number of evaluations.

4. Internet is an ideal source of collecting ideas from many users without much effort from the IEC software designers, once the webpage and the procedure have been already established.

5. Our goal is to create “internet robot theatre”, similar to YouTube, in which thousands of random people from all over the world will be able to create and evaluate motions of our robots located at PSU [ref]. The fitness functions for such task should be more advanced than what we used so far.

2. Previous work

There are several IEC already implemented:1. interactive evolution strategy (Herdy,

1997), 2. interactive genetic algorithm (Caldwell,

1991; Milani 2004),3. interactive genetic programming (Sims,

1991; Unemi, 2000), 4. human-based genetic algorithm

(Kosorukoff, 2001).

5. Human genetic programming. Kosokoff

3. Artistic Robots BOTTSY and DERPY

In this paper we present two examples of robots that draw figures. One can either evolve a single motion corresponding to a marker figure drawn on floor, or evolve a probabilistic state machine that can draw a variety of similar figures. The project belongs thus to both “motion generation” and “Evolutionary Art”. In this particular project we use standard IGA. A “Point Robot” can be treated as a vector that can rotate and drive forward. Rotation and linear motion values can be specified by duration times of motions or numerical values for angles or distances. Single motion is a chromosome (a vector of line segments) or a probabilistic state machine that generates such chromosomes. The propensity of a robot to draw lines, circles, and angles is determined by weighting factors defined in the robot’s genotype. The phenotype is robot motion pattern and the black-and-white images of robot art. A population of robots is created on the computer, and their output simulated using their chromosomal information. The relative “artistic value” of each robot is determined by a population of human judges, who determine the fitness of each robot, and its probability to reproduce and stay alive. After enough generations of fitness testing with fitness evaluated on computer model seen on screen, the best of the chromosomes are demonstrated on a physical robot, constructed as part of this project.

We use humans to drive the evolution of the chromosomes. In order to make this human input as seamless as possible, we developed a website to control the evolution. This website is located at dixicup.mooo.com. A screen shot of the website can be seen in Figure 1.

Figure 1. Website Screenshot

The website queries a database of genotype chromosomes, and randomly selects two of them at a time to convert to phenotypes (pictures) and display. The human judge would then click on one of the two images. The results of these comparisons were used to determine the fitness of each individual chromosome.

There exist several methods to evaluate objects in IEC [ref]. To the best of our knowledge, nobody yet used the ELO rating system as part of the fitness function.

The goal of the Derpy robot is to use fuzzy logic and probabilistic state machines to draw visually pleasing shapes. Derpy is the physical manifestation of Bottsy, the Web based artbot simulator. We keep DERPY simple and focus on functionality. It has a mounted marker so it can draw on butcher paper. Is also able to detect edges of paper and correct movement if edge is hit. Derpy operates withing a bounded drawing space - the Drawing Arena. Limit switches on the front of Derpy are activated whenever it runs into a boundary wall. The size of the arena was determined by the available drawing paper size. The drawing arena was built to come apart for increased portability. The goal is to demonstrate the robot in high schools.

4. Interactive Genetic Algorithm

The Interactive Genetic Algorithm is written in C. The basic functionality of the algorithm is standard: taking a seed value, a binary blob, and doing one or a combination of mutations to the seed. Depending on a random choice, the algorithm does one of three things: Transposition, Crossover, or Mutation. The output of the algorithm is a new seed that has been put through one of these three processes. Transposition will take a chunk of the chromosome (seed) and move it to another location within the chromosome. This causes the chromosome to be interpreted differently while not actually changing any of its data, simply the order the data is interpreted. The effect on the phenotype can do anything from simply swapping the placement of some pattern to completely redefining how the picture is created. Crossover takes two or more chromosomes (seeds) and swaps sections of its gene with another. This will cause a trait of one gene to be swapped with another and will most likely drastically change what the phenotype will actually be. In some cases this may be benign and do very little if anything to the overall phenotype. The amount of crossover that actually happens will most likely be randomized in the code itself, but may incorporate some limits or tolerances as to how much crossover may happen. Mutation changes the value on a certain chunk of the chromosome. In the case of binary data, this may simply flip the bit of the chosen area. In more extreme cases, this may take a good sized chunk of data (say 4 bytes) and flip those bits. There are other ways to do a mutation, especially if we are considering mutating more than one bit at a time, but these types of mutations should only be explored if time allows and if the need arises to insert more entropy into the system. The last thing to consider is how

many times a particular seed may actually incur one or more of these processes. This will probably be able to be throttled by the inputs of the program. Another option is to pick a random number of times the seed can be transposed or crossed or mutated, each one having a separate counter. The third and most likely option is a limit on the number of total processes that can actually occur and the algorithm will randomly decide what will occur and how many of these processes will occur. An example of doing this would be giving the algorithm a window of 3-10 processes.

5. Fitness FunctionIn order to determine the overall fitness of each chromosome, a function was needed to convert the results of potentially thousands of individual pairings into a single number. We elected to use a technique known as the Elo Rating system [ref]. The Elo rating system is used to determine the relative ranking of chess players. The chess world shows a remarkable resemblence to the artificial domain of our experiment: The resultant wins and losses of individual chess games correspond directly to the choices made by human judges analyzing robot art. In the Elo Rating system, each player, (or chromosome), has a rank ranging from 0 to 2400. When first starting out, one’s rank is assigned to 100. The Elo Rating system models each player’s skill as a normalized distribution. That is, it is assumed there is some absolute skill level of each player, while their actual performance game to game varies around that value. This assumption works relatively well in the world of robotic chromosomes: good robot art will tend to be rated more highly than bad robot art; however, everyone’s tastes are different.

Before every match under the ELO rating system, an expected outcome is calculated using the following equation:

EA = 1/(1 + 10RB-RA=400)

In this equation, EA is the expected outcome of the matchup, RA is the current Elo Ranking of the player the expected value is being calculated for, and RB is the Elo Rating of its opponent.For example, If player one had an Elo Ranking of 1000, and player two had a Elo Ranking of 500, player 1 has an expectancy to win of 0.947, while player two only has a expectancy to win of 0.053. Once the expected value has been calculated, the actual match can occur. After the match, thetwo players scores are adjusted according to the following formula:

Rn = Ro + 30 * (S – Se)

Where Rn is the new Elo rating, Ro is the old Elo Rating, S is the real score (0 for lose, 1 for win), and Se is the expected score determined by the previous equation. Using the numbers from the previous example, if we assume that player one loses to player two, we would have the following equations:

R1n = 1000 + 30 * (0 - 0:947) = 971:6

R2n = 500 + 30 * (1 - 0:053) = 528:4

2 Interaction of the Fitness Testing Module with Other Modules

The Fitness Testing module of the Evolutionary Art project needs to interact with the Chromosome Crossing and Phenotype Rendering modules. It is the responsibility of the Fitness Testing moduleto pass fitness information to the Chromosome Crossing module, as well as instructing said module to begin crossing each new generation. The Fitness Testing

module also needs to interact with the Phenotype Rendering module: In order to get comparison results from human judges, chromosomal genotype information needs tobe converted to phenotype information. In order to reduce memory requirements, genetic art is generated on demand. The Fitness Testing Module passes genotype information to the Rendering module, and receives the rendered art in return.3 Fitness Testing OverviewGenetic algorithms require a fitness function in order to evaluate the behavior of individual chromosomes. For this project, random pairings of robotic art are presented to a human observer, who determines which of the works of art is more aesthetically pleasing. This model was chosen, as it minimizes the interaction requirements of the human component of the feedback loop.The win/loss record of a robotic chromosome is not enough to determine its overall fitness. A mediocre chromosome that that defeats many poor chromosomes should not be ranked higher than a good chromosome that was forced to compete with its peers. This problem of determining a ranking of elements based only on comparisons between pairs of the elements is known as Pairwise Comparison Modeling [Glickman]. For example, a system known as the “Elo System” is used to rank chess players against each other. More work needs to be done to develop a mathematical model specific to the project’s needs.Because of the inherent subjectivity of art, it is hard to gauge the effectiveness of the fitness function quantitatively. Complicating this is the fact that the actual website is not run very scientifically. Since each new generation of chromosome must be manually started, the exact number of comparisons varies between generations. However, it is easy to see that higher ranked chromosomes tend to have more “interesting” phenotypes. Compare, for

example, figure 2 with figure 3. The first phenotype has a score of 194, while the second was demoted all the way to a score of 0. However, it can clearly be seen that more interesting chromosomes have higher scores.

Figure 2: Score of 194

Figure . Score of 0

Figure . Score of 100

Physical Robot DERPY

Derpy (Figure X) is a simple two-wheeled robot with an affixed sharpie. To affix the sharpie, we had a custom part 3D in the EPL Tinker Card Object. We used an Arduino Uno as a controller. Motor power is derived from the fuzzy logic controller. A photoresistor mounted with an LED next to the sharpie is used to determine light/dark states. We used the same FSM as in Bottsy [Bottsy Website] to decide to draw lines or turns. There are two FSMs; one for dark, one for light. The photoresistor sensor level is mapped onto relative “dark” and “light” variables. The output of the light and dark FSMs is mixed in proportion to the fuzzy

variables.

4 Results

Derpy is capable of producing a variety of image styles according to the programmed chromosome. Image generation is defined by the drawing arena, allowing a further expansion of image types Derpy is capable of producing. Chromosomes from bottsy

were not used in derpy. Bottsy uses vector based drawing and derpy uses time based drawing. Converting between the two is non-trivial.

Conclusion

The Elo Rating proved to be a suitable fitness function for our Robotic Art project. It successfully separates poor chromosomes from those that are more interesting to humans. Moving forward, it would be good to implement more detailed tracking of pairing results: Currently, the website only updates the Elo Rating of each chromosome. This would allow more rigorous comparisons between chromosomes from different generations.

The system produces interesting images and is an excellent starting point for future work.

Literature

1. Mark Glickman.“A Comprehensive Guide to Chess Ratings”, glicko.net

2. The source code for this project can be found at github.com/apgoetz/bottsy.

3. http://dixicup.mooo.com/bottsy/ bottsy.py

4. http://en.wikipedia.org/wiki/ Elo_rating_system

5. https://en.wikipedia.org/wiki/Iterated_function_system

6. http://ecademy.agnesscott.edu/~lriddle/ifs/ifs.htm

7. http://en.wikipedia.org/wiki/Generative_art

8. http://ratingtheory.com/ 9. http://books.google.com/books/

about/Merit_Rating_Theory_and_Practice.html?id=uyd6PgAACAAJ

10. http://books.google.com/books/ about/

A_Primer_of_Rating_Theory.html?id=qYSltgAACAAJ

11. http://www.ratingtheory.com/ references.htm

12. R. C. Jones, Evaluating Competitive Performance with Rankings and Ratings, Master of Science Thesis, University of Rhode Island, 1994

13. http://www.emeraldinsight.com/ case_studies.htm/case_studies.htm?articleid=1953706&show=html

14. http://books.google.com/books? hl=en&lr=&id=EgC6LBAH5r8C&oi=fnd&pg=PA251&dq=genetic+algorithm+evaluation+function+art&ots=Dglvw_K8Rg&sig=wmcuDJkBaTwLHKydA6uqn-Pz0ME#v=onepage&q=genetic%20algorithm%20evaluation%20function%20art&f=false

15. http://www.iba.t.u-tokyo.ac.jp/ papers/2000/tokuiGA2000.pdf

16. Anthony R. Burton and Tanya Vladimirova, Application of Genetic Techniques to Musical Composition, Computer Music Journal, vol. 23, 1999.

17. Brad Johanson and Riccardo Poli, GP-Music: An Interactive Genetic Programming System, In Proceedings of the Third Annual Conference: Genetic Programming 1998, 1998.

18. [3] Damon Horowitz, Generating Rhythms with Genetic Algorithms, In Proceedings of the 12th National Conference on Artificial Intelligence, AAAI Press, 1994.

19. [4] David E. Goldberg, Genetic Algorithms in Search, Optimization

& Machine Learning, Addison-Wesley, 1989.

20. [5] Erick Cantu-Paz, A Summary of Research on Parallel Genetic Algorithms, Technical Report, Department of General Engineering, University of Illinois, rep.95007, 1999.

21. [6] Hideyuki Takagi, Interactive Evolutionary Computation - Cooperation of computational intelligence and human KANSEI, In Proceeding of 5th International Conference on Soft Computing and Information/Intelligent Systems, 1998.

22. [7] John A. Biles, GenJam: A Genetic Algorithm for Generating Jazz Solos, In Proceedings of the 1994 International Computer Music Conference, ICMC, 1994.

23. [8] John A. Biles, Peter G. Anderson and Laura W. Loggi, Neural Network Fitness Functions for a Musical IGA, In the International ICSC Symposium on Intelligent Industrial Automation and Soft Computing, 1996.

24. [9] John R. Koza, Genetic Programming: On the Programming of Computer by Means of Natural Selection, MIT Press, 1992.

25. [10] Nao Tokui and Hitoshi Iba, Generation of musical rhythms with interactive evolutionary computation, In Proceedings of the 14th Annual Conference of JSAI (in Japanese), 2000.

26. [11] Nao Tokui and Hitoshi Iba, Empirical and Statistical Analysis of Genetic Programming with Linear

Genome, In Proceedings of The 1999 IEEE International Conference on Systems, Man, and Cybernetics, 1999.

27. [12] Paul Messick, Maximum MIDI : Music Application in C++, Prentice Hall, 1999.

28. [13] Unemi Tatsuo, A Design of Multi-Field User Interface for Simulated Breeding, In Proceedings of the Third Asian Fuzzy System Symposium, The Korea Fuzzy Logic and Intelligent Systems Society, 1998.

29. Evolutionary art 30. Human-based evolutionary

computation31. Human-based genetic algorithm 32. Human-computer interaction 33. Karl Sims 34. Electric Sheep 35. Banzhaf, W. (1997), Interactive

Evolution, Handbook of Evolutionary Computation, Oxford University Press, Entry C2.9.

36. Caldwell, C. and Johnston, V.S. (1991), Tracking a Criminal Suspect through "Face-Space" with a Genetic Algorithm, in Proceedings of the Fourth International Conference on Genetic Algorithm, Morgan Kaufmann Publisher, pp.416-421, July 1991.

37. Clune, J. and Lipson, H. (2011). Evolving three-dimensional objects with a generative encoding inspired by developmental biology. Proceedings of the European Conference on Artificial Life. 2011

38. Dawkins, R. (1986), The Blind Watchmaker, Longman, 1986; Penguin Books 1988.

39. Herdy, M. (1997), Evolutionary Optimisation based on Subjective Selection – evolving blends of coffee. Proceedings 5th European Congress on Intelligent Techniques and Soft Computing (EUFIT’97); pp 2010-644.

40. Kosorukoff, A. (2001), Human-based Genetic Algorithm. IEEE Transactions on Systems, Man, and Cybernetics, SMC-2001, 3464-3469.

41. Sims, K. (1991), Artificial Evolution for Computer Graphics. Computer Graphics 25(4), Siggraph '91 Proceedings, July 1991, pp.319-328.

42. Sims, K. (1991), Interactive Evolution of Dynamical Systems. First European Conference on Artificial Life, MIT Press

43. Takagi, H. (2001). Interactive Evolutionary Computation: Fusion of the Capacities of EC Optimization and Human Evaluation. Proceedings of the IEEE 89, 9, pp. 1275-1296 [1]

44. Milani, A. (2004). Online Genetic Algorithms. International Journal of Information Theories and Applications pp. 20-28 [2]

45. Unemi, T. (2000). SBART 2.4: an IEC tool for creating 2D images, Movies and Collage, Proceedings of 2000 Genetic and Evolutionary Computational Conference workshop program, Las Vegas, Nevada, July 8, 2000, p.153

46. EndlessForms.com , Collaborative interactive evolution allowing you to

evolve 3D objects and have them 3D printed.

47. Art by Evolution on the Web Interactive Art Generator.

48. An online interactive demonstrator to do Evolutionary Computation step by step. EFit-V Facial composite system using interactive genetic algorithms.

49. Galapagos by Karl Sims 50. E-volver 51. SBART, a program to evolve 2D

images52. GenJam (Genetic Jammer) 53. Evolutionary music 54. Darwin poetry 55. Takagi Lab at Kyushu University 56. [3] - Interactive one-max problem

allows to compare the performance of interactive and human-based genetic algorithms.

57. idiofact.de , Webpage that uses interactive evolutionary computation with a generative design algorithm to generate 2d images.

58. Picbreeder service , Collaborative interactive evolution allowing branching from other users' creations that produces pictures like faces and spaceships.

59. Peer to Peer IGA Using collaborative IGA sessions for floorplanning and document design.

60. interactive constrain evolutionary search (user intervention) or fitting user preferences using a convex function (Takagi, 2001).

61. An example of this approach is an interactive media installation by Karl Sims that allows to accept preference from many visitors by using floor

sensors to evolve attractive 3D animated forms. Some of these multi-user IEC implementations serve as collaboration tools, for example HBGA.

1 IntroductionSince the first computers were available, people have been using them to create paintings.In the past ten years someresearchers have tried to apply genetic algorithms, sometimes with neural networks as automatic raters, to the task of

composing and creating music. Only one approach based on GP has been presented. We describe previous work in this areain Section 2.In this paper we present the GP-Music System, an interactive system which allows users to evolve short musical sequencesusing interactive genetic programming, and its extensions aimed at making the system fully automated. The basic GPsystemworks by using GP with a small set of functions for

creating musical sequences, and a user interface which allowsthe user to rate individual sequences.A key feature of the GP-Music System is its focus on using Genetic Programming instead of Genetic Algorithms. SinceGAs use fixed length genotypes to represent a problem, in this case a musical sequence, they are forced to a fixed length,and cannot easily apply functions to add structure to a sequence. With Genetic Programming it is possible to add functionsso that simple musical structures, such as phrase repetition, are available within the individuals being evolved. GP also hasthe advantage of allowing variable length sequences to be generated.Another important aspect of the GP-Music System is that it is focused on creating short melodic sequences. It does notattempt to evolve polyphony or the actual wave forms of the instruments. Only a set of notes and pauses is created by thesystem. This narrow focus allows a reasonable musical sequence to be generated by a user during runs that last about 10minutes and require a relatively small number of evaluations. The interactive GP-Music System is described in Section 3.The basic system, with a user serving as the fitness function, has shown that it is possible to evolve musical sequences withgenetic programming and achieve reasonable sounding melodies as a result. One main problem with the system, however,is that the user must listen to and rate each musical sequence in every generation during a run. For long tunes this may be along and (at least initially) tedious process requiring hours to complete even with small populations and short runs. Also, itis arguable that for the evolution process to work properly in this difficult domain large populations over tens to hundreds ofgenerations might be needed, which is entirely impractical with a human having to rate each sequence.

To alleviate this problem, we extended GP-Music creating automatic fitness raters which could stand in for the user inrating sequences. The user would rate a small number of sequences in a short run on the GP-Music System, and theautomatic rater would use the resulting ratings to learn to rate sequences in a similar fashion. The automatic rater couldthen stand in for the user in longer runs of the system. To this end, an automatic rater, or auto-rater was constructed whichis based on a neural network trained using back propagation. Auto-raters are described in Section 4.Experimental results with the GP-Music system with and without auto-raters are described in Section 5. We draw someconclusions and indicate directions for future work in Section 6.2 Related WorkAI based attempts at music composition are Cope's EMI [2] and Todd's Connectionist Approach [9]. Cope created anexpert system which was attuned to his own style of composition and was able to use it to create perturbations of a theme foruse throughout a larger composition. Todd worked on a neural network which was trained on pieces in the hope that itwould extract some ideas of important features in music. Using a feedback system, the network is able to continue acomposition based on previous notes.Several attempts have also been made to apply Genetic Algorithms and Genetic Programming to music composition.Spector and Alpern [8] came up with a GP system which evolved responses to call phrases in jazz pieces. As a fitnessfunction they used a neural network trained on real responses from known jazz pieces, and tried to get the system togenerate good responses. Unfortunately it was not very successful since the neural network did not have an adequateamount of training on poor responses. Biles [1] designed the GenJam system which uses Genetic Algorithms. It evolvesmeasures, and phrases (which are a series of measures) simultaneously in a real time fashion. As the user listens to astream of phrases and measures, they type `b' for bad or `g' for good. The accumulation of `g's and `b's serves as the fitnessfor the measures. This is interactive GA, and the author reports that although some decent phrases eventually begin toemerge, the process is tedious. Another system using GAs is Neurogen [3]. It used a three stage approach where rhythm isfirst created, and then added in with melody, and finally combined with other phrases to create a harmony. Short GAstrings are evolved for each of these stages, and a neural net is trained on existing musical pieces, then used to rate the

strings for the GA process. The authors report that initial results are promising, but do not present any derived music.3 The GP-Music SystemThis section outlines the main features of the GP-Music System which allows users to interactively evolve music. Thesystem uses a modified version of the lil-gp GP system [10]. The rest of this section describes the features of GP-Music thatallow it to apply genetic programming to the task of music composition.3.1 Music SequencesRather than designing a new file format for storing the melodies created by GP-Music, an existing music file format waschosenthe XM, or extended module format. XM files store musical pieces rather than straight digital audio. In otherwords, note sequences are stored and then synthesized at play time, rather than storing a recording of the music. The XMformat stores digital samples of the instruments to be used in playing each of the notes, and can thus be played on anyworkstation with digital audio output capabilities.One of the features of Genetic Programming is that it can achieve good results without the need to apply a lot of domainknowledge in the specification of the problem. One of the objectives of the project was to explore this idea. So, we decidednot to constrain the search of GP Music to an arbitrary subset of music theory, but instead used the basic note featuresavailable in the XM format to determine the general structure of what was being evolved. Specifically, the XM file allows abasic pattern size of up to 255 note events (only one pattern is used in the GP-Music System). Each note event can containeither a note to be played, or a rest command. The notes themselves come from the standard scale and include: C, C Sharp,D, D Sharp, E, F, F Sharp, G, G Sharp, A, A Sharp and B. The notes fall over eight octaves, and the notation for this is toappend the octave number, from 0 to 7, after the note. Thus, a fourth octave D Sharp is noted as D#4. A single channel ofmelodic piano is used, with one pattern of 255 time slots. Each of the beats can be either a note or a rest (RST). The notesfall in the range of C-0, C#0, D-0, up to G#5, A-6, A#6, and B-6.

AbstractThe interactive evolutionary computation (IEC), i.e., an evolutionary computation whose fitnessfunction is provided by users, has been applied to aesthetic areas, such as art, design and music. We

cannot always define fitness functions explicitly in these areas. With IEC, however, the user's implicitpreference can be embedded into the optimization system.This paper describes a new approach to the music composition, more precisely the composition ofrhythms, by means of IEC. The main feature of our method is to combine genetic algorithms (GA)and genetic programming (GP). In our system, GA individuals represent short pieces of rhythmicpatterns, while GP individuals express how these patterns are arranged in terms of their functions.Both populations are evolved interactively through the user's evaluation. The integration of interactiveGA and GP makes it possible to search for musical structures effectively in the vast search space. Inthis paper, we describe how our proposed method generates attractive musical rhythms successfully.1. IntroductionWe have been developing an interactive system called “CONGA” (the abbreviation of “compositionin genetic approach” and also the name of an African percussion), which enables users to evolverhythmic patterns with an evolutionary computation technique [10].In general, evolutionary computation (EC) has been applied to a wide range of musical problems,such as musical cognition and sound synthesis. Among such problems, composition is one of themost typical and challenging tasks. Music composition can be taken as a combinatorial optimizationin the infinite combination of melodies, harmonies and rhythms. Thus it is natural to applycomputational search technique as typified by EC. Up to now, Genetic algorithms (GA) [4] andgenetic programming (GP) [9] have been successfully applied to the music composition tasks [1].For example, Biles used GA to generate jazz solo [7] and Johanson and Poli generated melodies bymeans of GP [2].When the EC is applied to the musical composition, there are three main topics to be considered [1],i.e., the search domain, the genetic representation, and the fitness evaluation.The first topic is the search domain. As mentioned earlier, the musical composition is a combinatorialoptimization problem, whose search space is basically unlimited, because there is an infinitecombination of melodies, harmonies, and rhythms. It is not reasonable to expect computers tocompose music like Mozart or Beethoven from scratch. Therefore, the composition must be guided

by some constraints.62.

63. As the user is the bottleneck in interactive systems, the system takes rating data from a users run and uses it to train a neural network based automatic rater, or “auto rater”, which can replace the user in bigger runs. Using this auto rater we were able to make runs of up to 50 generations with 500 individuals per generation. The best of run pieces generated by the auto raters were pleasant but were not, in general, as nice as those generated in user interactive runs.

With this user-interactive technique it was possible to create nice black-and-white pictures over runs of 20 individuals over 10 generations.