Algorithm Optimisation Championship. - page 3

 
Andrey Dik:

The *.ex library must be essentially a unified way of accessing the algorithm. The algorithm can be embedded in this standard library, or he can call his algorithm from this library with his own functions.

And which function to give to the participant? The participant will give it or pass something to him? Play on words, I'm not sure what you mean.

The participant should be given the function (ff) they are investigating. The one for which he will be looking for the maximum or minimum. His search algorithm will, of course, be in his library.

I mean, don't give the function itself (send the code), but somehow pass it to the contestant's code during the championship.

 

and the FF algorithm does not need to be given.

The script requests an array of optimizable parameters from the library via import

the script sends this array to the FF library, which returns the result

the script sends the result to the member library

the script calls the member library service function, if necessary, the algorithm will do something, or it's just an empty function inside it.

I'm writing from my mobile, sorry

 
Andrey Dik:

and the FF algorithm does not need to be given.

The script requests an array of optimizable parameters from the library via import

the script sends this array to the FF library, which returns the result

the script sends the result to the member library

the script calls the member library service function, if necessary, the algorithm will do something, or it's just an empty function inside it.

I'm writing from my mobile, sorry

It's not clear. We'll wait for an example in the code.
 

Although it is partially clear, it is specifically clear that it is through the jo)).

It turns out that when a member function is called, that function has to do one step of its work. It is necessary to turn everything upside down. I don't feel like thinking about it. So the task is already complicated, and we have to add even more artificial complications to it.

There are two possible ways of doing it:

1. A class with ffs, as I have described above.

2. A participant imports a library in his library with ff. The checker will replace it with his own.

There are no other options. Unless one can pass a pointer to the function, if it is possible (but so far nobody has suggested where to look in the help). The participant must have a full ability to call a ff function.

 

in general, like this, and of course there will be a time-keeping counter. outline:

#import "oa.ex5" // алгоритм оптимизации участника
void   ServiceFunc1 (); 
int    GetReplaysCount (); // запрос количества запусков ФФ (у участника может быть свой размер колонии или нечто подобное если это не ГА 
void   GetOptParam (double &param []); 
void   ServiceFunc2 (); 
bool   StopAlgo ();        // этой функцией участник по желанию может остановить оптимизацию
int    GetEpochCount ();   // если участник желает использовать своё фиксированное значение "эпох"
void   SendFFvolue (double &volue); 
double GetMaxFF (); 
#import

#import "ff.ex5" // тестовая фитнес функция чемпионата, не известна участникам 
double GetFFvolue (double &param []); // передаём в ФФ оптимизируемые параметры, получаем результат ФФ 
#import

void OnStart () 
{ 
  bool   stopAlgo = false; 
  int    epoch = GetEpochCount (); 
  int    maxEpochPossible = 1000; 
  double param []; 
  double volue; 
  int    epochCNT = 0; 
  int    ffCNT = 0; 
  
  double FFvolue = -DBL_MAX; 
  
  ServiceFunc1 (); 
  while(!stopAlgo) 
  {
    for(int i = 0; i < GetReplaysCount (); i++) 
    {
      GetOptParam (param); 
      volue = GetFFvolue (param); 
      ffCNT++; 
      SendFFvolue (volue);
    }
    ServiceFunc2 (); 
    
    epochCNT++; 
    
    if(epochCNT >= epoch) 
      stopAlgo = true; 
    
    if(epochCNT >= maxEpochPossible) 
      stopAlgo = true;
  }
  
  Print ("Epoch: " + (string)epochCNT + " ; FF starts: " + (string)ffCNT + " ; MaxFF: " + (string)GetMaxFF ());
} 
 
Dmitry Fedoseev:

A participant must have the full ability to call a ff function.

No, it shouldn't. And it shouldn't because if it shouldn't, you may use the internal optimization in the EA in the built-in tester, and if it should, then there will be very little practical use for traders.

My article shows an example where the FF is called from the algorithm. This narrows the field of application. If you take the algorithm from the article (which is not prohibited by the rules), you will have to apply your wits to get rid of such an internal call of the FF.

 
Andrey Dik:

in general, like this, and of course there will be a time-keeping counter. outline:

Nope, not good)) such an approach. A participant should be able to cycle, i.e. his single action implies several calls to the ffs.
 
Andrey Dik:
No, it shouldn't. And it shouldn't because if it isn't, then we will be able to use in our EAs the internal optimization in the built-in tester, and if it should, then there will be very little practical use for traders.
Look at the universal method laid out above. And if a one-time call through an intermediary, it will require a very serious adaptation of the search function, that's exactly what no one will do, because you will have to pull out the brain and put it in place through the EA.
 
Dmitry Fedoseev:
No, it doesn't work)) such an approach. A participant should be able to spin cycles, i.e. their single action implies several calls to ffs.
Sorry, cycles will be controlled externally. All's fair. :)
 
Andrey Dik:
Sorry, cycles will be controlled externally. It's all fair and square. :)
No. The ff function should count the calls.