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.

A genetic algorithm (GA) is a method for solving both constrained and unconstrained optimization problems based on a natural selection process that mimics biological evolution.

Source: http://www.mathworks.com/discovery/genetic-algorithm.html

162 questions
20
votes
1 answer

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 easy but it's taking hours already and I'm not…
Elmer
  • 255
  • 1
  • 2
  • 10
10
votes
2 answers

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 get stucked very fast...Im using a evaluation…
Fernando
  • 7,785
  • 6
  • 49
  • 81
8
votes
4 answers

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, except for zero? My desire result is…
user02
  • 281
  • 3
  • 10
7
votes
2 answers

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 computation and genetic programming, and I would like…
Ælex
  • 14,432
  • 20
  • 88
  • 129
7
votes
2 answers

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 -2
kilojoules
  • 9,768
  • 18
  • 77
  • 149
7
votes
4 answers

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

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 to 10 So which is the best method for my problem?…
hanx
  • 83
  • 1
  • 3
5
votes
1 answer

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 from a randomly generated sequence of "passes"…
Roberto Aureli
  • 1,428
  • 2
  • 12
  • 23
5
votes
5 answers

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 would be appreciated. #include…
Olivier
  • 1,981
  • 7
  • 24
  • 29
4
votes
1 answer

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 anything about it, so, if one of you could help…
4
votes
0 answers

Can someone help me vectorize this for-loop?

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): length = parent1.size parent1 *= 1e6 …
Piggle
  • 41
  • 2
4
votes
1 answer

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 user manual): theta: the dispersion parameter…
mkv8
  • 43
  • 3
4
votes
5 answers

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 I have been using Random class from .NET for…
Antun Tun
  • 1,507
  • 5
  • 20
  • 38
4
votes
2 answers

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 then the process getting slow down drammatically and…
mr.nothing
  • 5,141
  • 10
  • 53
  • 77
3
votes
2 answers

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.
3
votes
1 answer

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 over operators and mutations there and tried out a…
1
2 3
10 11