Algorithm Optimisation Championship. - page 79

 
Andrey Dik:
That's great! Unconventional approaches are, if not the key to success, then at least a good foundation for it. So, will you be competing against your colleagues in the championship?
I was interested in solving the proposed problem.
I finished kindergarten long ago :)
 
Andrey Dik:

"I don't believe it!" (с)

Well, you can, of course, paste Dahl's or Ozhegov's dictionary into the algorithm and compare it with known words, but then if the text in the problem won't have any meaningful words (for example - a random set of letters), then the algorithm will definitely fail.

I would not make unsubstantiated statements.

For this particular string, my algorithm needs 904 accesses to the FF.

For the same string length (49 characters) but with any other text (even with complete nonsense and random set of letters) the amount of FF calls will be slightly different.

In other words, the letters themselves determine the exact number of accesses.

The variation is around ( +/- 40) calls depending on the particular set of letters.

When you change the length of the string, the number of hits increases, but the proportion remains the same. That is, for each character, an average of 15 to 20 calls to the FF.

Hence it can be estimated that for a string of 100 characters, about 2000 calls are needed. And so on...

The accuracy of the string will always be 100 per cent.

This is how my algorithm works.

 
Event:
I was interested in solving the proposed problem.
Fighting - I finished kindergarten long ago :)
you can check

//+------------------------------------------------------------------+
//|                                                  OptimFFtext.mq5 |
//|                        Copyright 2016, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2016, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict

// тестовая фитнес функция чемпионата, не известна участникам
#import "FFtext.ex5"
int    GetParamCount();
void   GetParamProperties(double &min,double &max,double &step);
double FF(double &array[]);
int    GetCountRunsFF();
void   PrintCodeToFile(double &param[]);
#import

const int TextLen= 49;
const double EPS = 1 e-6;
double param[];
//+------------------------------------------------------------------+
//|                                                                  |
//+------------------------------------------------------------------+
void OnStart()
  {
   int Nparam=GetParamCount();
   ArrayResize(param,Nparam);
   ArrayInitialize(param,0.0);
   double temp[];
   ArrayResize(temp,Nparam);
   for(int n=0; n<Nparam;++n)
     {
      ArrayCopy(temp,param);
      double ffParam=FF(param);
      for(int k=1; k<TextLen;++k)
        {
         temp[n]=(double)k;
         double ffTemp=FF(temp);
         if(ffTemp<ffParam-EPS)
           {
            break;
           }
         if(ffTemp>ffParam+EPS)
           {
            ArrayCopy(param,temp);
            break;
           }
        }
     }
   Print("Количество вызовов FF = "+IntegerToString(GetCountRunsFF()));
   PrintCodeToFile(param);
  }
 
Event:
You can check.

I checked - your algorithm is a few calls ahead of mine at 49 characters, but when you increase the number of characters, mine is clearly ahead of yours by a couple of hundred.

Try putting this in: "rarely, an academic paper combines, these, two, types." You get 1113 calls, I get 891.

I think if you keep increasing the number of characters in the line, the difference will only increase.

I'll check it tomorrow.

 
Реter Konow:

I checked - your algorithm is a few calls ahead of mine at 49 characters, but when you increase the number of characters, mine is clearly ahead of yours by a couple of hundred.

Try putting this in: "rarely, an academic paper combines, these, two, types." You get 1113 calls, I get 891.

I think if you further increase the number of characters in the string, the difference will only increase.

I'll check it tomorrow.

I didn't claim mine was better than yours )) (Congratulations!
 
Реter Konow:
Event:

You both use the knowledge of the FF of the optimisation problem. That is, you are solving the problem "head-on".

But the goal of the championship is to optimize an unknown FF. What will your algorithms do if it turns out that the problem has step 0, or the range turns out to be on the whole number line? Or if the dependence of FF value on parameters is non-linear?

Knowing the average time per FF call you can accurately calculate how long it will take to solve the problem in such a case and it may well take longer than the time of existence of the universe.

Your algorithms are not universal and tuned to a particular task; they are good in their own way, but unsuitable even for optimizing simple Expert Advisors, not to mention the TS on neural networks and artificial intelligence.

Think about universality, think about what you would do if you don't know the contents of the task with text, otherwise the July 11 task will be too hard nut to crack for your algorithms.

ZZYEvent, indeed, I checked, if the text consists of the first letters of a key like "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", then the number of FF calls is ridiculously low, and it's totally understandable why.

ZZZY.rettag,Event, you're good anyway - you've shown some ingenuity.

 
Andrey Dik:

You are both using knowledge of the FF of the optimisation problem. That is, you are solving the problem "head-on".

But the goal of the problem is to optimise an unknown FF. What will your algorithms do if it turns out that the problem has step 0, or the range turns out to be on the whole number line? Or if the dependence of FF value on parameters is non-linear?

Knowing the average time per FF call you can accurately calculate how long it will take to solve the problem in such a case and it may well take longer than the time of existence of the universe.

Your algorithms are not universal and tuned to a particular task; they are good in their own way, but unsuitable even for optimizing simple Expert Advisors, not to mention the TS on neural networks and artificial intelligence.

Think about universality, think about what you would do if you don't know the contents of the task with text, otherwise the July 11 task will be too hard nut to crack for your algorithms.

ZSEvent, indeed, I checked, if the text consists of the first letters of a key like "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", the number of FF calls is ridiculously small, and it's perfectly understandable why.

Don't agitate me and take me for granted. I am not involved in your games.
I'm even afraid to call my version an algorithm. Just a few lines :)

PS And don't patronize me so condescendingly. I even shed a tear ;)
 
Andrey Dik:

You are both using knowledge of the FF of the optimisation problem. That is, you are solving the problem "head-on".


So I did, I solved the problem head-on, but left some potential for algorithm development. I think I have the basis for solving similar text problems and can be further improved.

By July 11, I will have the final version of a similar textual problem of greater complexity ready.

 
Event:
Don't try to agitate me and take me for a ride. I don't take part in your games.
I'm afraid to even call it an algorithm. Just a few lines :)

PS And don't patronize me so condescendingly. I even shed a tear ;)

Come on, how can I? Neither.

I am not condescending, I am fair (in this particular case, at least), besides, I am rude and a boor. If you don't want to do it, don't participate, I'm not dragging anyone by the ears!

;)

ZS. I can juggle any 3 objects within a couple of kilos, and I can stand on my head, but if I come and show my skills in a circus, I'll hear from the performers about the same as I told you.

 
Реter Konow:

It is true, I solved the problem head-on, but I left some potential for developing the algorithm. I think I have the basis for solving such text problems and can improve them further.

By 11 July, I will have the final version of the solution to similar text problems of greater complexity ready.

Then get ready for championship problem, you have already done "warm-up" with "excellent".