I'm programming a genetic algorithm. Right now, I'm using arrays for everything: my individuals are composed of arrays of ints, my populations are arrays of individuals, I store information inside an array to keep track of it.
A huge limitation I'm encountering is running out of memory. I know GAs are memory intensive, but i wonder if my first step should be to make an easy change, by using something better than an array.
The answer to this question depends a lot on the nature of your data.
If you have sparse data (mostly 0's and very few 1's or vice versa), then creating an array of indices of 1's might do the trick for you. As David Wallace mentioned, a HashSet of indices would allow you to quickly check whether a particular index is 1 or 0.
If you do not have sparse data, then you might want a BitSet.
This discussion might also be useful to give you input.