Questions tagged [genetic]

Related to the information representation or its coding whereby different features of a unit of measurement, which can be interpreted as any decision. We can see the most common its implementation in evolutionary algorithms, the most famous of which are genetic algorithms. In generally, "Genetic" points us to something changeable in time base on an evolutionary process, like living organism. Technically, it is interesting to optimization algorithms.

genetic
Filter by
Sorted by
Tagged with
20 votes
1 answer
17k views

Split large file according to value in single column (AWK)

I would like to split a large file (10^6 rows) according to the value in the 6th column (about 10*10^3 unique values). However, I can't get it working because of the number of records. It should be ...
Elmer's user avatar
  • 255
10 votes
2 answers
3k views

Genetic algorithm and Tetris

Im creating a Tetris player using genetic algorithms, and facing some issues. I've read a lot of related works, but they don't give me enough details on the GA. The problem is that my agent seems to ...
Fernando's user avatar
  • 7,835
8 votes
4 answers
224 views

Python- Removing items

I want to remove item from a list called mom. I have another list called cut mom= [[0,8,1], [0, 6, 2, 7], [0, 11, 12, 3, 9], [0, 5, 4, 10]] cut =[0, 9, 8, 2] How do I remove what in cut from mom, ...
user02's user avatar
  • 291
7 votes
4 answers
4k views

Which is the best method between Genetic Algorithm and Dynamic Programming to solve classic 0-1 knapsack? [closed]

Let's say I have problem like this: Knapsack capacity = 20 million Number of item = 500 Weight of each item is random number between 100 to 20 million Profit of each item is random number between 1 ...
hanx's user avatar
  • 83
7 votes
2 answers
3k views

Python CMA-ES Algorithm to solve user-defined function and constraints

I am struggling to create a simple example of a CMA-ES optimization algorithm in python. What is the most streamlined way to optimize the function x**2 + 2*y**2 -4*x*y - 0.5*y, subject to constraints -...
kilojoules's user avatar
  • 10.2k
7 votes
2 answers
487 views

C++ genetic programming: Invoking a linker/compiler, executing the compiled program and piping input / output

This is a generic question, and although I'm pretty sure some of it's parts have been answered I want opinions rather than a broad discussion. I intend to do a master thesis on evolutionary ...
Ælex's user avatar
  • 14.6k
5 votes
5 answers
16k views

Generating a random double between a range of values

Im currently having trouble generating random numbers between -32.768 and 32.768. It keeps giving me the same values but with a small change in the decimal field. ex : 27.xxx. Heres my code, any help ...
Olivier's user avatar
  • 2,041
5 votes
1 answer
687 views

Genetic Programming pyeasyGA and Zelle graphics on Python

I wanted to make a simple program to improve my knowledge on this type of programming. I found a really useful library, pyeasyGA, and with it I tried to make a simple program using graphics.py that ...
Roberto Aureli's user avatar
4 votes
5 answers
1k views

Genetic algorithm initial seed diversity using value encoding C#

I would like to know the following: How to effectively make initial generation of chromosomes with high diversity using value encoding ? One way is grid initialization, but it is too slow. Till now ...
Antun Tun's user avatar
  • 1,519
4 votes
2 answers
916 views

How to mix genetic algorithm with some heuristic

I'm working on university scheduling problem and using simple genetic algorithm for this. Actually it works great and optimizes the objective function value for 1 hour from 0% to 90% (approx). But ...
mr.nothing's user avatar
  • 5,308
4 votes
1 answer
2k views

Calculating logLik by hand from a logistic regression

I ran a mixed model logistic regression adjusting my model with genetic relationship matrix using an R package known as GMMAT (function: glmmkin()). My output from the model includes (taken from the ...
mkv8's user avatar
  • 43
4 votes
1 answer
2k views

Python DEAP - Custom fitness function

My question is about the possibility to implement a custom fitness function in DEAP/Python in my Genetic Programming implementation. After search and reading DEAP official documentation, i don't find ...
Cristiano Siebert's user avatar
4 votes
0 answers
96 views

Can someone help me vectorize this for-loop? [closed]

I'm trying to make my code more efficient. I'm not super familiar with vectorization. I can do simple ones but I'm having trouble wrapping my head around this one def mate(self, parent1, parent2): ...
Piggle's user avatar
  • 41
3 votes
4 answers
3k views

Is it possible to break md5 hash using genetic algorithms?

With a knowledge of how md5 works, would it be possible to use a population based algorithm such as genetic programming to break simple passwords? For examples, given a md5 hash for a string that is ...
Sukumar's user avatar
  • 3,552
3 votes
2 answers
5k views

Differences between roulette wheel selection and rank based selection

what are the differences between roulette wheel selection and rank based selection in genetic algorithm. i am confused which one is best for me now. that's why just want to know the differences.
Bikash Karmokar's user avatar
3 votes
1 answer
877 views

How to apply test functions to genetic algorithm

I have written following code for population evolution (Genetic Algorithm Implementation): Individual.java import java.util.Random; public class Individual { public static int SIZE = 500; ...
Aman's user avatar
  • 115
3 votes
1 answer
1k views

genetic algorithm for class schedule composition

I'm writing an application for automatic university schedule composition and using for this genetic algorithm. But now I faced some problems with realization. At the very begining I assumed that we ...
mr.nothing's user avatar
  • 5,308
3 votes
1 answer
979 views

Genetic Algorithm Classifier in Java: Rule-Based System

I've coded from scratch a genetic algorithm with all features (tournament selection, crossover, mutation, elitism etc.) which successfully evolves a solution to the "counting ones" problem - i.e. it ...
adstr123's user avatar
3 votes
1 answer
1k views

Jenetics custom gene/chromosome

I have started experimenting with the Jenetics library, however I am having some issues with trying to make a very easy "custom" set of gene/chromosomes. What I tried to do was to create a custom ...
Alexandr's user avatar
  • 708
3 votes
3 answers
1k views

algorithm to combine data for linear fit?

I'm not sure if this is the best place to ask this, but you guys have been helpful with plenty of my CS homework in the past so I figure I'll give it a shot. I'm looking for an algorithm to blindly ...
BoldlyBold's user avatar
3 votes
1 answer
808 views

GA algorithm approach for TSP

I built a GA algorithm to solve the TSP. It's in an exercise in Norvig's book (AIAMA). He suggested we read the Larrañaga's view on the problem for representations and such. I learned the some cross ...
Raphael Mitrious's user avatar
3 votes
0 answers
55 views

Combining genetic algorithm with local optimization

I am generally interested in combining genetic algorithms with some local optimization and use this approach to do railway scheduling optimization. I would appreciate if someone could lead me to ...
Feleki's user avatar
  • 31
2 votes
1 answer
80 views

How can I recursively input parameters into this function with an initial value?

so I have this function which takes in an array of arrays and outputs an array of arrays with different values (I am attempting genetic programming breeding function). So my problem is as follows: I ...
skidjoe's user avatar
  • 589
2 votes
2 answers
1k views

Genetic Algorithm : Find curve that fits points

I am working on a genetic algorithm. Here is how it works : Input : a list of 2D points Input : the degree of the curve Output : the equation of the curve that passes through points the best way (try ...
Anselme Clergeot's user avatar
2 votes
4 answers
9k views

How to plot XY graph in C#?

I am developing an application in C# which deals with specific genetic algorithm problem. The execution of the algorithm provides output parameters that are required to draw a chart.The graphic chart ...
phillip's user avatar
  • 25
2 votes
2 answers
140 views

Difference between theses two kind of Genotype

What is the difference between use a Genotype with N (an arbitrary > 0 number) Chromosomes with 1 (one) Gene and a Genotype with 1 (one) Chromosome with N (the same number) genes? In code: // 3 ...
Dyorgio's user avatar
  • 1,224
2 votes
1 answer
410 views

How do I proceed to load a ga_instance as ".pkl" format in PyGad?

I have been trying to load the PyGad trained instance in another file, in order to make some prediction. But I have been having some problems in the loading process. After the training phase, I saved ...
Vinicius Luiz Pacheco's user avatar
2 votes
1 answer
3k views

What are the advantages and disadvantages of using the crossover genetic operator?

For example, we have this problem: Maximise the function f(X) = X^2 , with 0 ≤ X ≤ 31 Using binary encoding we can represent individuals using 5 bits. After undergoing a selection method, we get to ...
Keval Vyas's user avatar
2 votes
2 answers
159 views

Prevent Genetic algorithm in zero-sum game from cooperating

I have a specific game, which is not literally zero-sum, because points are awarded by the game during a match, but close to it, in the sense that the number of total points have a clear upper limit, ...
Kaito Kid's user avatar
  • 1,043
2 votes
1 answer
840 views

Genetic Algorithm Framework in .NET (GAF) - Connection between population and number of entries in the fitness function

private static int generation = 0; private static int numInGeneration = 0; public static void Calculate() { const double crossoverProbability = 0.65; const double mutationProbability = 0.08; ...
Alen's user avatar
  • 49
2 votes
1 answer
249 views

Has genetic algorithm been considered when designing optimizing compilers?

I wanted to ask if it makes sense, and if it does, were there any attempts ? clarification of the question: When compiler makers work on the optimizer, they try to make the compiler spit the best ...
v.oddou's user avatar
  • 6,637
2 votes
1 answer
1k views

Can i have a variable length chromosome in JGAP?

Im using JGAP to generate testvectors for a schematic. I got maximum coverage of a single testvector by setting the genes of a chromosome to be bits . Now i need to get a 100% coverage with minimum ...
ollo's user avatar
  • 946
2 votes
0 answers
105 views

oscillating genetic algorithm

I'm trying to implement a genetic algorithm on my own which optimizes two vectors. There is a boundary condition, where a has always to be bigger than b. The entries of the vectors are in the range of ...
Andy's user avatar
  • 96
2 votes
1 answer
509 views

Genetic Algorithm to store Items in 3 trucks, based on weight and value

I am currently Coding a Genetic algorithm to solve a problem that could be considered similar to the knapsack problem but the differentiating factor is that I am storing items over multiple "trucks", ...
J.Ralph's user avatar
  • 37
2 votes
2 answers
132 views

counting sets of numbers in a long list

As I am new to python programming, I am having difficulty writing a python program. I am trying to count a set of seven objects(?) of three numbered digits and tabs within a long list. Then I need to ...
Jacob's user avatar
  • 29
2 votes
1 answer
679 views

R: How to change the default FDR value imbedded in the nbinomTest() function?

I have a table, here's the start: WE1_counts WE2_counts M1_counts M2_counts M3_counts YAL008W 465 291 911 926 946 YBR255W 1040 1357 1428 1304 1112 YGR131W 95 170 230 113 138 ...
zfz's user avatar
  • 153
2 votes
1 answer
158 views

Replacing Parts of a Python AST Tree

I'm brand new to using AST, but I've been handed a 'Genetic Programming From Scratch' assignment and from what I can tell AST seems to be the way to go in terms of manipulating the tree. What I need ...
Mike's user avatar
  • 1,844
2 votes
5 answers
545 views

Neural Network Basics

I'm a computer science student and for this years project, I need to create and apply a Genetic Algorithm to something. I think Neural Networks would be a good thing to apply it to, but I'm having ...
Stat Onetwothree's user avatar
1 vote
1 answer
352 views

Function, Vectors, and Loops in R

I recently began experimenting with R as a language to use for genetic programming. I have slowly but surely been learning more and more about how R works and its best coding practices. Yet, I have ...
Isaac Drachman's user avatar
1 vote
2 answers
251 views

Making tree of functions in C

I want to make a tree of functions in C, which would look like this: http://scr.hu/5rq/vdja0 So basically I want the result to be like this: http://scr.hu/5rq/f04uu where x is an variable which I ...
mmajewsk's user avatar
  • 109
1 vote
2 answers
412 views

Will genetic algorithm provides different output every time?

Since we expect feasible solution from Genetic Algorithm, So will genetic algorithm provides different output every time with same input set?
Seco Team's user avatar
1 vote
2 answers
80 views

How to design a fitness function for a Genetic Algorithm that moves a car to a point through a city?

I am trying to design a genetic algorithm with neural networks to move a car through a city generated in Unity to a randomised target destination. I have designed it and the code works but the agent ...
Oliver Fox's user avatar
1 vote
1 answer
6k views

How to code an output function for genetic algorithm in Matlab global optimization toolbox

I am having some problems with writing an output function for genetic algorithm in Matlab global optimization toolbox. I want to create a function that stores all state.Population (each individual) of ...
user1846407's user avatar
1 vote
2 answers
1k views

How to Achieve Continuous Interactive Dialog with a Subprocess in Python? [duplicate]

Maybe continuous interactive isn't the right phrase. I'm wondering if someone could help me understand the basics of calling a program as a subprocess from a Python program? I've been hacking away ...
Thetravellingfool's user avatar
1 vote
2 answers
942 views

Java Collections - Shuffle repeats items

Right, I'm doing a GA algorithm for a college project, but as I was doing the Crossover, I noticed my individual length was changed, when it should have been 100. I am creating an ArrayList of 100 ...
Chris O'Brien's user avatar
1 vote
2 answers
2k views

Solve crossword puzzle with genetic algorithm, fitness, mutation

I'm trying hard to do a lab for school. I'm trying to solve a crossword puzzle using genetic algorithms. Problem is that is not very good (it is still too random) I will try to give a brief ...
AdrianS's user avatar
  • 1,990
1 vote
1 answer
362 views

in PyGAD how Can I get non duplicate genes eventhough I give parameter allow_duplicate_genes=False

Hi I am trying to solve a Tsp problem by using PyGAD I made a result any how but result make duplicated number I put in initial_population: [[ 1 12 26 19 22 20 6 15 17 23 21 7 28 5 13 14 16 2 24 ...
haonol's user avatar
  • 15
1 vote
1 answer
160 views

Python: How to count duplicates and compare nested sublist with another nested sublist?

I have a function that generates a random data def create_Class(self): for x in mD.get_module_Code: self.module_ID.append(x) for j in rM.get_id: self....
azmilhanif's user avatar
1 vote
1 answer
39 views

How do I manipulate my dataframe to keep the columns with matching rownames?

I have a data frame with 77 rows and 460 columns. The first column represents the rsID for each row titled "RS_number". The columns are each labeled by a SNP rsID (e.g., rs4751). I need to ...
Noahp555's user avatar
1 vote
2 answers
2k views

How to solve TSP problem using pyGAD package?

Using PyGAD Package, how to generate the item of populations with element not duplicate between 1 and 12? It is always has duplicate value in random population. I have no ideal how to avoid that. Or, ...
lokcyi's user avatar
  • 33