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
0
votes
2 answers

Adding Python 2.7 to an app packet after macOS 12.3 does no longer include Python

Last year I got a PortJump packet from Codeweavers for an open source Windows software, not knowing that it uses Python 2.7 supplied by macOS < 12.3 only (Python 2.7 was marked deprecated by 2020 and Apple even announced that it wouldn't be…
thomiel
  • 2,467
  • 22
  • 37
0
votes
2 answers

Two point crossover operation

I've been trying to write a code for two point crossover operation in a genetic algorithm. At first two random gene location is selected. After that, two chromosomes swap their genes which are located btw random numbers called genelocation1 and…
furkan
  • 21
  • 1
  • 5
0
votes
3 answers

How do I replace part of a tree with another tree at the specified index in OCaml?

I have the following tree structure: type 'a tree = | Function of string * 'a tree list (* function name and arguments *) | Terminal of 'a I use this tree structure to construct an abstract syntax tree: type atoms = | Int of int |…
Flux
  • 9,805
  • 5
  • 46
  • 92
0
votes
0 answers

How can I model mutation and crossover for real valued encoding with discrete search space in Genetic Algorithm?

I have P number of vectors of n dimensions each, where n is real valued. I want to find the best vector out of P using the fitness function Z(P). I am not being able to think of the modelling of the mutation and crossover methods, which would result…
0
votes
1 answer

Backtest not showing any results for a SMA crossover script in tradingview

Trying below script in Pine Script version 5. No errors in scripts. But, it doesn't show any results in backtest. Can anyone please help? code bold italic quote ****//@version=5 strategy(shorttitle='Long on MA Crossover',title='Long Strategy with…
0
votes
1 answer

Minimum value of a set of japanese candles around a crossover of moving averages and plot this one with Pinescript

Please, I need some advice about the strategy to follow, commands to use, etc. . . to get the minimum value of a set (for example 3) of japanese candles around a crossover of moving averages in order to set there my stop-loss and indicate somehow…
0
votes
1 answer

How to crossover moving average with a specific candle height? Pinescript

I have my strategy set however I would like to test entering trades when a candlestick crosses over the hma49 by a specific amount of ticks. Such as 4. Can I make this an input so I can adjust the amount of ticks above the hma49 ? This would be…
Paul Cas
  • 39
  • 7
0
votes
1 answer

I would like to set up a backtest strategy on Tradingview using Pinescript. I would like to use SMA and RSI as indicators. How to write the script?

I would like to set up a backtest strategy on Tradingview using Pinescript. I would like to use SMA and RSI as indicators. I want the start date to be January 1, 2007 and the end date to be March 31, 2009 of the testing period. Can someone write up…
oaker
  • 27
  • 1
  • 8
0
votes
1 answer

Pine Script code for timestamp on Trading View does not filter through the dates that I want it to view. How can I adjust this?

I am trying to run this script on Pinescript in Trading View. However, when I try to add in timestamp, it does not work. Can someone help with this? //@version=4 strategy("My Strategy", overlay=true) start = timestamp(2007, 1, 1, 0, 0) end =…
oaker
  • 27
  • 1
  • 8
0
votes
1 answer

Why isn't my mixed model loop working? (RStudio, Crossover design)

I can't figure out why my loop isn't working. I have a database (36rows x 51columns, its name is "Seleccio") consisting of 3 factors (first 3 columns: Animal (12 animals), Diet (3 diets) and Period (3 periods)) and 48 variables (many clinical…
Miquel
  • 3
  • 2
0
votes
1 answer

Generate a Crossover condition in Pinescript

I want to create a simple crossover condition where I want to have a buy sell signal on the cross over, I have tried it without resoultion, but I want it with resoultion so that I can set different timeframe for my VWMA. Here's my code, please edit…
Khushi
  • 5
  • 2
0
votes
1 answer

Crossover and crossunder functions don't respect the parameters I'm giving pine script

I'm trying to add a simple background color when on a stochastic, k crosses over d any time but when k is above 80, and equally k crosses under d any time but when k is below 20. Yet constantly I'm getting crossover and crossunder signals in these…
Daniel
  • 41
  • 2
  • 11
0
votes
2 answers

Crossover and mutation in Differential Evolution

I'm trying to solve Traveling Salesman problem using Differential Evolution. For example, if I have vectors: [1, 4, 0, 3, 2, 5], [1, 5, 2, 0, 3, 5], [4, 2, 0, 5, 1, 3] how can I make crossover and mutation? I saw something like a+Fx(b-c), but I…
0
votes
1 answer

What are some ways to crossover in a Genetic Algorithm?

Here is a very small example I'll give: Suppose I have my population of size 4. Now, let's say that I sort them based on their fitness and I decide to drop the last 2 (so now my population size is 2). Now I would need to go back to the original size…
0
votes
1 answer

Genetic Programming Prolog Implementation

My task is to write a rule in SWI Prolog, which takes two strings as input. It should then divide and merge them at a random point and generate two new lists. Example: ?- crossover([a,r,s,u,p],[b,t,c,z,k],NewList1,NewList2). NewList1 =…