Algorithm Optimisation Championship. - page 40

 
Andrey Dik:
Thank you.
Let him participate instead of me, because I don't seem to be able to cope.
 
Реter Konow:
Let him participate instead of me, because I don't seem to be able to do it.
I don't think he has a better chance than you. I mean it. Besides, the more participants there are, the more perspectives we will get.
 
Andrey Dik:
I don't think he has a better chance than you do. I mean it. Besides, the more participants there are, the more perspectives we will get.
As you said yourself earlier, I have worse scalerosis than you. And I don't have enough imagination to grasp the essence of the problem. I can't get it together in my head... I'm afraid I overestimated my powers.
 
Andrey Dik:

Determined - in either directionfrom the parent. And the longer there is no improvement in the parent, the faster the offspring must scatter to the sides.

If improvement occurs - on the contrary, the offspring appear close to the parent, i.e. direction -towards the parent.

There are always two directions -from parent andtowards parent. Depending on dynamics of change of FF values one or another direction should be chosen.

But for the author of the video species always "hang out" not far from the parent, and the unexplored areas remain unexamined.

The algorithm is likely to converge very quickly on continuous functions and fail on complex discrete ones with sharp peaks. And even surfaces, judging by video algorithm is difficult.

If anyone knows English to a decent degree to have a casual small talk, please contact the author, invite him to the champ.

By the way, can anyone tell me why I used the words "from" and "to" instead of using a specific direction in space?

And what exactly does the fact that the search space gets more complicated faster than increasing the number of parameters have to do with it?

If someone answers these questions correctly, then the need to operate in multidimensional space will become clear, and which particular section of mathematics (honestly, in this section I'm swimming, I'm practically ignorant) would come in handy very strongly in the study of functions of many variables. I should say at once - in my personal algorithm these chips do not apply.

 

Made myself a picture maker:

Pretty quick to find the maximum, but then just mutations just in case.

For some of the functions, problems were revealed. Or rather they were, but it became clear what they were related to. Crossing only good ones with good ones, so degenerating to the best individual that was at the beginning of evolution. The movement towards the maximum is there too, but not enough. Not on this animation, it will be below.

 

Here. Finds very quickly, but with an offset, then slips a little closer to the centre, but not all the way through.

 
Dmitry Fedoseev:

Here. Very quickly it finds it, but with an offset, then it slides a little closer to the centre, but not all the way down.

Nice! Why is everything yellow? - You can't see the landscape.

Here, please colour each pixel according to the height of the landscape.

//——————————————————————————————————————————————————————————————————————————————
// The translation of numerical value from range in color value of range of RGB
string GetCLRfromDouble (double in,       // input value
                         double min,      // minimum of input value
                         double max,      // maximum of input value
                         int    startCLR, // minimum of a color scale 0... 100
                         int    endCLR)   // maximum of a color scale 0... 100
{ 
  int sCLR = 0; 
  int eCLR = 0; 
  
  if(startCLR > endCLR) 
  {
    sCLR = endCLR; 
    eCLR = startCLR;
  }
  else 
  {
    sCLR = startCLR; 
    eCLR = endCLR;
  }
  
  if(sCLR < 0) 
    sCLR = 0; 
  
  if(eCLR > 100) 
    eCLR = 0; 
  
  if(in < min) 
    in = min; 
  if(in > max) 
    in = max; 
  
  string clr = ""; 
  double tempCLR = Scale (in, min, max, sCLR, eCLR, false); 
  
  //255,0,0 -> 255,255,0
  if(0.0 <= tempCLR && tempCLR <= 20.0) 
  {
    clr = (string)255 + ","; 
    clr += string ((int)Scale (tempCLR, 0.0, 20.0, 0.0, 255, false)) + ","; 
    clr += string (0); 
    return (clr);
  }
  
  //255,255,0 -> 0,255,0
  if(20.0 < tempCLR && tempCLR <= 40.0) 
  {
    clr = string ((int)Scale (tempCLR, 20.0, 40.0, 0.0, 255, true)) + ","; 
    clr += string (255) + ","; 
    clr += string (0); 
    return (clr);
  }
  
  //0,255,0 -> 0,255,255
  if(40.0 < tempCLR && tempCLR <= 60.0) 
  {
    clr = string (0) + ","; 
    clr += string (255) + ","; 
    clr += string ((int)Scale (tempCLR, 40.0, 60.0, 0.0, 255, false)); 
    return (clr);
  }
  
  //0,255,255 -> 0,0,255
  if(60.0 < tempCLR && tempCLR <= 80.0) 
  {
    clr = string (0) + ","; 
    clr += string ((int)Scale (tempCLR, 60.0, 80.0, 0.0, 255, true)) + ","; 
    clr += string (255); 
    return (clr);
  }
  
  //0,0,255 -> 255,0,255
  if(80.0 < tempCLR && tempCLR <= 100.0) 
  {
    clr = string ((int)Scale (tempCLR, 80.0, 100.0, 0.0, 255, false)) + ","; 
    clr += string (0) + ","; 
    clr += string (255); 
    return (clr);
  }
  
  return ("0,0,0");
}
//——————————————————————————————————————————————————————————————————————————————

//——————————————————————————————————————————————————————————————————————————————
double Scale (double In, double InMIN, double InMAX, double OutMIN, double OutMAX, bool Revers = false) 
{ 
  if(OutMIN == OutMAX) 
    return (OutMIN); 
  if(InMIN == InMAX) 
    return ((OutMIN + OutMAX) / 2.0); 
  else 
  {
    if(Revers) 
    {
      if(In < InMIN) 
        return (OutMAX); 
      if(In > InMAX) 
        return (OutMIN); 
      return (((InMAX - In) * (OutMAX - OutMIN) / (InMAX - InMIN)) + OutMIN);
    }
    else 
    {
      if(In < InMIN) 
        return (OutMIN); 
      if(In > InMAX) 
        return (OutMAX); 
      return (((In - InMIN) * (OutMAX - OutMIN) / (InMAX - InMIN)) + OutMIN);
    }
  }
}
//——————————————————————————————————————————————————————————————————————————————
 
Andrey Dik:
Oh, great! Why is everything yellow? - You can't see the landscape.
I was lazy. Cents at the most.
 
Dmitry Fedoseev:
I was too lazy. Maxed out on cents.

Is it an inverted parabola?

z=-(x^2+y^2)

 
Andrey Dik:

Is it an inverted parabola?

z=-(x^2+y^2)

In the first case. What's in the second case I can't remember)