Discussion of article "Genetic Algorithms - It's Easy!" - page 12

 
Urain:

....

In general, it should be understood that the GA finds not an exact, but a robust solution. I.e. a solution which is quite successful compared to the field of possible solutions.

Test functions are "defeated". They must be defeated.

And so - you say everything correctly.

 
joo:

Test functions are "defeated". They must be defeated.

But you are saying all the right things.

Yes, yes, I did not elaborate, and that's why they are test functions, the algorithm must take them, otherwise such an algorithm cannot be considered successful.

It's hard to imagine what the algorithm will find in the unknown field if it doesn't even pass the test.

 

Thank you all, it's working.

I had to be so stupid to mix up minus and multiply.

 
ivandurak:

Thank you all, it' s working.

You mean your algorithm? Congratulations!
 

I wonder how to screw UGA correctly, if we need to optimise different variables with the same value of the fitness function to minimise the approximation error? Classical problem. A five-pass two-layer neural network with 4 neurons, for example, requires a search of 22 coefficients together with bias in the range [-1...1] with an accuracy of 0.0001 and simultaneously in the same target function selection of parameters of input indicators 5 pieces*2parameters= 10 variables in the range 5...50. Or separately, but with a step of 0.01.

Of course, you can encode the values of indicators in the range of weights. But it's a bit different.

And one more question. Is it possible to pass to UGA the conditions of genes skipping ? That is, for example, the genes responsible for the indicator should correspond to the condition G23< G24 G25<G26 and so on.

 
miklelv:

I wonder how to screw UGA correctly, if we need to optimise different variables with the same value of the fitness function to minimise the approximation error? Classical problem. A five-pass two-layer neural network with 4 neurons, for example, requires a search of 22 coefficients together with bias in the range [-1...1] with an accuracy of 0.0001 and simultaneously in the same target function selection of parameters of input indicators 5 pieces*2parameters= 10 variables in the range 5...50. Or separately, but with a step of 0.01.

Of course, you can encode the values of indicators in the range of weights. But it's a bit different.

And one more question. Is it possible to pass to UGA the conditions of genes skipping ? That is, for example, the genes responsible for the indicator should correspond to the condition G23< G24 G25<G26 and so on.

That's it, that's it,

there is a range in which most of the parameters work, the rest are simply adjusted by shifting and scaling.

You understand that the code in the article is not a commercial development polished for every sneeze of the consumer.

There is a desire to make set ranges for each parameter, nobody is holding your hands, but do not forget that with the number of parameters counted in thousands, to set ranges by hand will become very problematic.


have a range of genes [-1;1] --> (int)NormaliseDouble( ((gene+1)/2)*45+5 ,0) --> [5;50]

although I agree that there will be many different genes giving the same result, here you can make an accuracy setter for combining genes, for example from 0 to 1000th gene accuracy to 3 digits, from 1000 to 1010 accuracy to 0 digits.

 
miklelv:

And one more question. Is it possible to pass the conditions of gene skipping to UGA ? That is, for example, the genes responsible for the indicator must meet the condition G23< G24 G25<G26 and so on.

We can do it this way: Parameter1=G23 Parameter2=G23+G24.
 
her.human:
You can do it like this: Parameter1=G23 Parameter2=G23+G24.

When converting the range, it is better to make a conversion with a logical check, which will include the break.

Otherwise there will be no connection between one part of the broken range and another, here it is necessary to understand that genes are borrowed from different chromosomes only accordingly, the second gene can be borrowed only for production of the second gene of the new chromosome.

If one parameter is represented by two genes, there will be no connection between them.

 
Urain:

It is better to make a transformation with a logical check, which will include the break.

Otherwise there will be no connection between one part of the broken range and another, it should be understood that genes are borrowed from different chromosomes only accordingly, the second gene can be borrowed only for the production of the second gene of the new chromosome.

If one parameter is represented by two genes, there will be no connection between them.

Maybe it's better.

I suggested a simple variant. The GA can handle it without any problems.

In general, genes are not always borrowed, new genes can be generated.

 
Thank you for your comments. It is certainly easier to code. I am trying to replicate Prediction Wizard from Neuroshell on mql. There for 2-3 seconds on a history of 200-2000 bars in one cycle of 20 indices with 2-4 parameters each in the range of 5...50 is formed for 2-3 seconds on a history of 200-2000 bars from the selected from this 20 best indicators (for example, 5 pcs). And all this is written in VBbasic. It must be a cool algorithm. UGA will do just fine.