Speeding Up Matching in Learning Classifier Systems Using CUDA Pier Luca Lanzi and Daniele Loiacono Dipartimento di Elettronica e Informazione Politecnico di Milano Milano, Italy {lanzi,loiacono}@elet.polimi.it Abstract. We investigate the use of NVIDIA’s Compute Unified De- vice Architecture (CUDA) to speed up matching in classifier systems. We compare CUDA-based matching and CPU-based matching on (i) real inputs using interval-based conditions and on (ii) binary inputs us- ing ternary conditions. Our results show that on small problems, due to the memory transfer overhead introduced by CUDA, matching is faster when performed using the CPU. As the problem size increases, CUDA-based matching can outperform CPU-based matching resulting in a 3-12× speedup when the interval-based representation is applied to match real-valued inputs and a 20-50× speedup for ternary-based representation. 1 Introduction Learning classifier systems [10,8,17] combine evolutionary computation with methods of temporal difference learning to solve classification and reinforce- ment learning problems. A classifier system maintains a population of condition- action-prediction rules, called classifiers, which identifies its current knowledge about the problem to be solved. At each time step, the system receives the current state of the problem and matches it against all the classifiers in the pop- ulation. The results is a match set containing the classifiers that can be applied to the problem in its current state. Based on the value of the actions in the match set, the classifier system selects an action to perform on the problem to progress toward its solution. As a consequence of the executed action, the system receives a numerical reward that is distributed to the classifiers accountable for it. While the classifier system is interacting with the problem, a genetic algo- rithm is applied to the population to discover better classifiers through selection, recombination and mutation. Matching is the main and most computationally demanding process of a clas- sifier system [14,3] that can occupy up to the 65%-85% of the overall com- putation time [14]. Accordingly, several methods have been proposed in the literature to speed up matching in learning classifier systems. Llor`a and Sas- try [14] compared the typical encoding of classifier conditions for binary inputs, an encoding based on the underlying binary arithmetic, and a version of the J. Bacardit et al. (Eds.): IWLCS 2008/2009, LNAI 6471, pp. 1–20, 2010. c Springer-Verlag Berlin Heidelberg 2010