Automatic Categorization of Human-Coded and Evolved CoreWar Warriors Nenad Tomaˇ sev, Doni Pracner, Miloˇ s Radovanovi´ c, and Mirjana Ivanovi´ c University of Novi Sad Faculty of Science, Department of Mathematics and Informatics Trg D. Obradovi´ ca 4, 21000 Novi Sad, Serbia tomasev@nspoint.net, doni@neobee.net, {radacha,mira}@im.ns.ac.yu Abstract. CoreWar is a computer simulation devised in the 1980s where pro- grams loaded into a virtual memory array compete for control over the virtual machine. These programs are written in a special-purpose assembly language called Redcode and referred to as warriors. A great variety of environments and battle strategies have emerged over the years, leading to formation of different warrior types. This paper deals with the problem of automatic warrior categoriza- tion, presenting results of classification based on several approaches to warrior representation, and offering insight into ambiguities concerning the identification of strategic classes. Over 600 human-coded warriors were annotated, forming a training set for classification. Several major classifiers were used, SVMs proving to be the most reliable, reaching accuracy of 84%. Classification of an evolved warrior set using the trained classifiers was also conducted. The obtained results proved helpful in outlining the issues with both automatic and manual Redcode program categorization. 1 Introduction CoreWar was introduced by A. K. Dewdney in 1984 in an article published in Scientific American [1]. It was based on a game called Darwin developed in Bell Labs in 1960, devised by Victor Vyssotsky, Robert Morris Sr. and Dennis Richie. In CoreWar, sev- eral programs, referred to as warriors, attempt to survive in a looping memory array, avoiding attacks and at the same time trying to eliminate the opposition. The warrior that takes complete control of the process queue wins the battle. A match between two warriors consists of a number of such battles, each time varying the initial positioning in the memory array which is referred to as the core. Several automatic warrior generators have been created so far, utilizing evolution- ary algorithms to create functioning warriors out of sets of randomly generated code sequences. Performance evaluation in warrior generation is usually done via testing against some predetermined benchmark warrior set of considerable size. In evolvers, when a lot of new warriors are being constructed in each generation, determining fit- ness becomes a very time demanding process. Automatic warrior categorization could be very useful in CoreWar evolutionary soft- ware in order to design control mechanisms for mutation rate adjustment. High mu- tation rates allow the creation of a greater variety of forms, while the low mutation J.N. Kok et al. (Eds.): PKDD 2007, LNAI 4702, pp. 589–596, 2007. c Springer-Verlag Berlin Heidelberg 2007