Get["c:\geneticoperators.m"];
Get["c:\genetic-new.m"];

pocetJedincu = 55;
$RecursionLimit = 1024;
pravdepodobnostMutace = 0.02;
pravdepodobnostKrizeni = 0.96;
pouzitGrayCode = True;
pouzitRuletu = True;
debugMode = False;

VektorPromennych = {{x, 0, 5, 16}, {y, 0, 5, 16}};

Fitness[{x_, y_}] := 
        Sin[(x - 2.5)^2] + Cos[(y - 2.5)]^2;

ClearAll[Populace];
Populace = Inicializace[pocetJedincu];

OptimalizacniSmycka[20000];

Plot3D[
      Sin[(x - 2.5)^2] + Cos[(y - 2.5)]^2, {x, 0, 5}, {y, 0, 
        5}]

FindMinimum[
      Sin[(x - 2.5)^2] + Cos[(y - 2.5)]^2, {x, 0, 5}, {y, 0, 
        5}]