The main difference between LZWGA and Simple GA is that a chromosome is in a compressed format. The LZWGA chromosome has to be decompressed before its fitness can be evaluated. The pseudo code of LZWGA is shown in Figure 1. The algorithm begins by creating the first generation of compressed chromosomes. Before evaluating the fitness of a chromosome, the compressed chromosome is decompressed using LZW Decompression algorithm. The fitness evaluation is performed on the uncompressed chromosome. After that, the new population is created to replace the old population. The algorithm repeats the process of decompression, fitness evaluation, and creating a new population until the termination criterion is met. The algorithm terminates when a solution is found or a maximum generation is reached.
LZWGA pseudo code