Questions tagged [crossover]

In genetic algorithms, crossover is a genetic operator used to vary the programming of a chromosome or chromosomes from one generation to the next.

Crossover is analogous to reproduction and biological crossover, upon which genetic algorithms are based.

Crossover is a process of taking more than one parent solutions and producing a child solution from them.

Many crossover techniques exist for organisms which use different data structures to store themselves: one-point crossover, two-point crossover, uniform crossover...

See Crossover (genetic algorithm) on Wikipedia.

113 questions
1
vote
1 answer

Genetic Algorithm: Crossover for 0-1 Knapsack

I'm following the genetic algorithm approach to solving the Knapsack problem as seen here. I understand that they used a direct value encoding scheme rather than a binary representation. The crossover function is as follows: def cxSet(ind1,…
meraxes
  • 541
  • 10
  • 23
1
vote
1 answer

Sorting By Genetic Algorithm, Duplicate Data In Cross Over

My question is how to perform a cross over and avoid duplication? Consider p1 = {1, 2, 5, 6, 3, 4} and p2 = {2, 6, 5, 4, 1, 3} One of crossovers is res = {1, 2, 5 , 6, 1 ,3} As you see there is a duplication... Can we avoid it? Here is My…
1
vote
2 answers

Crossover probability in genetic algorithms

What's the point of crossover probability in genetic algorithm? The general procedure of a genetic algorithm is: (source) First an initial population is generated. Then a selection method is used (in this case the tournament selection) to choose a…
user5539357
  • 1,024
  • 1
  • 9
  • 19
1
vote
3 answers

Genetic algorithms: How to do crossover on ordered collections of unique elements?

This question builds on another one. How could we efficiently implement a crossover operation on chromosomes formed by ordered collections of unique elements? Two such parent chromosomes would be {'a','b','c','d'} and {'e','f','a','b'}; and two…
srctaha
  • 1,394
  • 1
  • 14
  • 16
1
vote
1 answer

select same parents in multiple Tournament selection

I'm wondering if I can select two same parents in two iteration of selection in a genetic algorithm (in a same population with tournament selection). Can I?
Farhaneh Moradi
  • 109
  • 1
  • 1
  • 10
1
vote
1 answer

One-point cross over in genetic algorithm

I am using one point cross over to cross two individual. Assume that I have two individual such as I1='10010011' I2='11001101' tmp_P is vector store two individual I1 and I2. I want to implement one point cross over in C++. Is it right? This is…
John
  • 2,838
  • 7
  • 36
  • 65
1
vote
1 answer

Blend Alpha Crossover Operator in Genetic Algorithm

I use blend alpha crossover operator for a genetic algorithm (GA), but I encountered a problem as follows: The chromosomes have the form: (parent1, parent2, parent3) The values allowed for parent1, parent2, parent3 are in the range [0,1]. If you…
1
vote
2 answers

Allow incompatible changes in genetic algorithm crossover

I'm trying to write a genetic algorithm for pieces of ride track, and thinking about how to implement mutation/crossover. The goal is to evolve a) a complete loop and b) an exciting ride (I have criteria for this). I have about sixty pieces to…
1
vote
1 answer

Genetic Algorithm - Java Crossover

With my GA's crossover method, I keep getting an ArrayOutOfBounds Exception while concatenating the mother's second half to the father's first half. The ArrayList's are all the same size. Why does my mother keep trying to access the 10th element in…
0
votes
2 answers

Two point crossover in Java

I have implemented a one point crossover as follows; public void onePointCrossover(Individual indi) { if (SGA.rand.nextDouble() < pc) { int xoverpoint = SGA.rand.nextInt(length); int tmp; for (int i=xoverpoint;…
Student
  • 443
  • 1
  • 7
  • 11
0
votes
0 answers

Error in crossGEEKron function of crossCarry package in R

I am trying to do analysis for repeated measure crossover study with 2 periods, 2 treatment at 3 time. However, on running crossCarryKron function, I am getting this error: ****Error in r_media[ii, ] <- media_temp/(n_suj) : replacement has length…
0
votes
0 answers

Store the crossover in a variable(Pinescript question)

v20 = 0.0 ma20 = ta.sma(close,20) if crossover(close,ma) v20 := 100 When ma20 crossover occurs, we want to store 100 in a variable. The ma20 crossover event occurs frequently. What should I do to save when the 3rd event from the most recent…
space2000
  • 1
  • 1
0
votes
1 answer

Can I use deltas(A>B) in the CreateAnomalyDetectionEngine as an indicator to detect whether the A line crosses over the B line?

Is there any function in DolphinDB that is similar to the Crossover in Backtrader? For example, the initial state is "A < B". When "A > B", the A line crosses over the B line, which is expected to be output as an anomaly. an example of the scenario
zhihengqu
  • 371
  • 5
0
votes
0 answers

Why can't create a launcher icon for program in Run Command window? I mean it doesn't work when I click the button

Why can't create a launcher icon for program in Run Command window? I mean it doesn't work when I click the "save command as a launcher" button. macOS system: macOS 12.6 M1 chip Crossover 22.01 Program: Radiant DICOM Viewer 2021 enter image…
0
votes
1 answer

Repainting when using 'close' for crossover/under

Hi I have a script that uses the following code: if (longCondition or ta.crossover(secondlongentryprice, sstoploss)) and inDateRange and is_entry_session For the secondlongentryprice I was using close as the candle value but it was repainting…