//1. Create an initial population of candidate solutions
//randomly initialize pop
for (i=0;i<pop_size;i++){
for (j=0;j<dna_size;j++){
pop[i][j] = (rand()/1213)+95; //generate random number between 0 and 32,767
//we need to scale down to an interval of 95-122 —> 27 numbers so divide by 1213 and shift up 95

pull-down resistor on every pin in the
port (B0– 7) to keep the pins at a low
value when the button is not depressed,
and to keep the pins without buttons
from accidentally straying to high
values. Finally, we hook up four other
pins as serial outputs, which CCS C
lets us do easily in software. Any four
extra pins should work, but avoid pin
A4 because it is an open drain output.
Refer to the included schematic for
any additional details.

The Code

The first thing to note is the header
file which contains the necessary
specifications for the four serial ports,
as well as standard fuses, clock speed,