taking the help of the hall) - page 3

 

The problem is solvable. All the necessary tools are in CodeBase.

You just need to write an interpreter to convert the values of genes (continuous space) into a discrete space required for the problem.

The problem is reduced to minimization of ff=MathAbs(f-H)

where f=a+b+c+....

 
vitali_yv:

Calculation on mql5 may take a lifetime of the TC)


Actually, I'm just saying that you can and should do without if, and a little bit about the fact that mql4 is still faster than vb6 and much faster.

Length of expression 6, number of variants of one variable - 30, the mql4 expression is solved in 493 seconds (8 min). Accordingly, the expression of length 7 will take 4 hours to solve. 8 is 120 hours)).

If the conditions are constant (the same numbers) and the length of the expression is limited, you can work hard, create an array with ready solutions, then retrieve the value on the fly by indexes.

 
Integer:



The length of the expression is 6, the number of variants of one variable is 30, in mql4 it is solved in 493 seconds (8 min). Accordingly, the expression length 7 will be solved in 4 hours. 8 is 120 hours).


And the sums are 17 )
 
vitali_yv:
And the summands are 17 )


Then tspp won't help either.

In mt5 6 variables, 30 numbers solved in 90 sec (on a different computer though).

 
Integer:


Then the tspp is no help either.

In mt5 there are 6 variables, 30 numbers solved in 90 seconds (but on a different computer).

What are you guys doing? Where did you get such scary numbers? I have nets with thousands of scales trained in a few minutes, and here....
 
joo:
What are you guys doing? Where are those scary numbers coming from? I have nets with thousands of scales trained in a few minutes, and here....


Try it:

int start()
  {
//----
   int c[]={10, 12, 14, 17, 21, 25, 30, 36, 43, 52, 62, 74, 89, 107, 128, 154, 185, 222, 266, 319, 383, 460, 552, 662, 795, 954, 1145, 1374, 1648, 1978};
   int Find=-1;
   

         int start=TimeLocal();
            for(int i1=0;i1<ArraySize(c);i1++){
            for(int i2=0;i2<ArraySize(c);i2++){
            for(int i3=0;i3<ArraySize(c);i3++){
               Comment(i1," ",i2," ",i3);
            for(int i4=0;i4<ArraySize(c);i4++){
            for(int i5=0;i5<ArraySize(c);i5++){
            for(int i6=0;i6<ArraySize(c);i6++){
               int s=c[i1]+c[i2]+c[i3]+c[i3]+c[i4]+c[i5]+c[i6];   
            } 
            }
            }
            }
            }
            }
      

   
   Alert("! "+(TimeLocal()-start));
//----
   return(0);
  }
 
Integer:


Try it:

Nah, I don't play like that. :(

I won't even try it. Why should I? When there are more civilised methods of finding a solution instead of stupid brute force.

 
joo:

Nah, I don't play like that. :(

I won't even try them. What for? When there are more civilized methods of finding a solution instead of stupid brute force.

Alas, for many tasks there are still no civilised methods of solving them.

 
Integer:

Alas, there are still many problems that lack civilised methods of solution.

They exist. Only often we don't know about them.

OK. Check if I have understood the conditions of the problem correctly:

Solve find x if a*x+b*x+c*x.....=H, a, b, c can take values (10, 12, 14, 17, 21, 25, 30, 36, 43, 52, 62, 74, 89, 107, 128, 154, 185, 222, 266, 319, 383, 460, 552, 662, 795, 954, 1145, 1374, 1648, 1978).


The question remains unclear - how many a, b, c.... are there in the problem?


I'm just like a kid, I'm falling for "Weak?". :)

Seems to me that the problem is of no practical importance, I may be wrong. If I get complete conditions of the problem - I will give a "civilized" solution. And I will use that toolkit, which I spoke about.

 

That is not the task at hand.

A genetic algorithm will not help. Approaching (minimising) a function does not mean moving in the right direction, you can stand next to it, but the input is on the other side. It can't be 'just a little bit right' here.