//Brain code. Finds a maximum using genetic optimization. int bounds=500; int bg=150; int diam=5; int timeindex=1; int paramnum=2; int genepool=300; float mutate=.2; float[][] z = new float[genepool][paramnum]; float[] delt = new float[paramnum]; float[] util = new float[genepool]; float[] c1 = new float[paramnum]; float[] c2 = new float[paramnum]; float utilc1=1; float utilc2=1; float sexprob=1; //z is an array which will house all parameters of the system, which we vary to find a maximum. //delt tells us how much we're varying each parameter at a given time. //currently, z just houses the x and y coordinates of a point on the screen, but z can really be any parameter that we can control. void setup(){ for (int i=0;iutil[i]){ for(int k=0;kutil[j]){ for(int k=0;kutil[j]){ for(int k=0;kutil[i]){ for(int k=0;k