You’ll start with the simple rule—any row stays as it is. You stack up copies of this row until you’re above the paper bag:
Will your genetic algorithm be clever enough to switch on all of the cells to begin with? This challenge is a variant of the OneMax problem. You don’t need an evolutionary algorithm (EA) such as a GA to solve this. However, it does illustrate the characteristics of an EA, and the fitness function is easy to understand.
You can express your problem in formal terms. Find a bit pattern