Software Corner Genetic Algorithm File Fitter (GAFFitter) Douglas A. Augusto, daaugusto@gmail.com Genetic Algorithm File Fitter, GAFFitter for short, is a tool based on a genetic algorithm (GA) that tries to t a collection of items into as few volumes of speci c size as possible. For example, the items might be les and the volumes might be CDs or DVDs. GAFFitter was created with the intent to minimize the number of CDs or DVDs used to store a set of les whose total size is greater than the medium capacity. It was further extended to work directly with any set of items, whether it is composed of les/directories or not. GAFFitter is characterized by ve main features, namely: The global search based on a genetic algorithm. The lter-oriented design, that is, a versatile interface suitable for integration with other tools and front-ends. The possibility to use lenames as the input and to directly read a list of items and their sizes. The great exibility provided by the input arguments, which controls the behaviour of GAFFitter, including many genetic algorithm parameters. The fact that it is a free software, which makes it possible for the users to study, change and redistribute GAFFitter. The current development version of GAFFitter is based on the Falkenauer s Hybrid Grouping Genetic Algorithm (HGGA) [1], which is probably one of the best GA approaches for bin packing problems. In the HGGA, the genes represent each one a group of items, i.e., each gene is treated as a bin and their items act as an unit, a building block; therefore, the crossover operator does not mixes items on an individual basis, but, rather, it combines groups of bins. Besides, HGGA uses a local optimizer inspired on the Dominance Criterion of Martello and Toth [1], which basically tries iteratively to replace a few items of a certain bin by fewer items that t better in. This procedure not only optimizes the bin, but also eases the reallocation of the replaced items, since smaller items are easier to t. GAFFitter is written in C++ and is currently available as a command-line program for POSIX-compliant systems (GNU/Linux, BSD derivatives and so on). The simplest way to run GAFFitter is as follows: gaffitter -t 700m * This command will arrange the les and subdirectories of the current directory into sets of at most 700 megabytes (a typical CD), in such a way that the number of sets is minimized. In other words, GAFFitter will try to t the given les and directories into as few as possible volumes of 700MB. A comprehensive description of GAFFitter s options and parameters, several usage examples, and instructions on how to get its source code can be found on GAFFitter s website at http://gaf tter.sf.net Bibliography [1] E. Falkenauer. A Hybrid Grouping Genetic Algorithm for Bin Packing, 1996. The development version can be fetched from the GAFFitter s Subversion repository (see the website). Be aware, however, that the development versions are usually unstable, non-optimized and prone to bugs. SIGEVOlution Spring 2008, Volume 3, Issue 1
/lp/association-for-computing-machinery/genetic-algorithm-file-fitter-gaffitter-sg2PhT0Kg2