[galib] Custom Representation

Alitis alitis at gmail.com
Tue Sep 16 10:55:53 EDT 2008


Hello everyone,
     I am working on a wireless sensor clustering system that employs
a genetic algorithm. In order to represent sensor and cluster-head
assignments, I am using a double-dimensional array of ints. The first
row corresponds to each sensor in the field, and is drawn from an
allele set. The second row corresponds to the sensor designated as the
cluster head of the sensor in the same column of the first row, and is
drawn from the same allele set. I need to modify the initialize,
mutate, and crossover functions for galib's standard double
dimensional array representation. Specifically, I need to be sure that
the first row contains one and only one of each allele, though the
order doesn't matter. Furthermore, the mutate and crossover operators
can only operate on the second row of the double-dimensional array
(which may contain any quantity of any value drawn from the allele
set, as per the current system). This corresponds to trying different
cluster heads for a given sensor. I am somewhat new to galib, and
hesitate to modify the existing, probably rather optimized code
blindly. Could anyone suggest a good technique for implementing the
above modifications?

Thanks,
-Rick



More information about the galib mailing list