import java.io.*; import java.lang.*; public class Chromosome { private int Length; private int GeneMinValue; private int GeneMaxValue; public Gene[] Genes; private int Fitness; private Position Start; public Chromosome(int _Length, int _GeneMinValue, int _GeneMaxValue, Position _Start) { Length = _Length; GeneMinValue = _GeneMinValue; GeneMaxValue = _GeneMaxValue; Start = _Start; Genes = new Gene[Length]; for (int i=0; i= 0) && (I <= Rows-1)) && ((J >= 0) && (J <= Columns-1)) && (visited[I][J] == false) ) { visited[I][J] = true; Fitness++; } else { break; } } } public int Fitness() { return Fitness; } public void Display() { System.out.println("Solution:"); for (int i=0; i