Questions tagged [genetic-algorithms]

A genetic algorithm is a class of adaptive stochastic optimization algorithms involving search and optimization. Genetic algorithms were first used by Holland (1975).

Filter by
Sorted by
Tagged with
0 votes
1 answer
125 views

Use PGO (profile guided optimization) to determine optimal value of variables in code

Reading this interesting paper it seems that a lot of performance loss is due to scheduling overhead in tight loops. To recap: There's a variable called "Chunksize" which determines how big ...
glades's user avatar
  • 377
0 votes
2 answers
157 views

Design problem in C++

I am trying to engineer a library for the Genetic Algorithm optimization method. The main class for the GA is quite general. Here is what I have for it struct GAOptions{ size_t max_ga_steps; ...
Ashkan's user avatar
  • 103
4 votes
1 answer
340 views

Mentorship schedule matchmaking algorithm

A while ago, I tried to help a fella to develop a mentorship matchmaking program given the answers of a questionnaire to match mentors and mentees according to their respective skills and available ...
Natalie Perret's user avatar
1 vote
2 answers
300 views

Algorithm for rule-based sorting?

I am trying to plant a garden. Certain plants are good for some plants and bad for others, and I am trying to find the best order of plants: most adjacent friends and no adjacent foes, as defined in ...
Sam's user avatar
  • 119
3 votes
1 answer
288 views

Fitness Function altenatives in Genetic Algorithms for game AI

I have created a Gomoku(5 in a row) AI using Alpha-Beta Pruning. It makes move on a not-so-stupid level. First let me describe the grading function of the Alpha-Beta algorithm. When it receives a ...
Dashadower's user avatar
2 votes
2 answers
777 views

Test Driven Development for Stochastic algorithms?

this is similar, but no the same as this post, which was the closest question I could find on this. I don't even see that answer as satisfactory for the question asked in that thread let alone TDD. ...
Krupip's user avatar
  • 1,300
4 votes
1 answer
337 views

Spreading objects in bags and bags' compartments

We have 10 bags. Each bag has 5 compartments numbered from 1 to 5. We have 100 objects to fill all the compartments and bags. Compartment number x in a bag is identical to compartment of the same ...
Hans's user avatar
  • 177
2 votes
1 answer
445 views

Dynamic Scheduling Algorithm

Recently I got interested in scheduling problems or rather dynamic scheduling problem. The problem is that I want to develop some kind of layer in my application which will be polling circa about 50-...
Apple Pie's user avatar
3 votes
4 answers
3k views

Why do we use binary encoding when it seems so inefficient?

When encoding our chromosome's characteristics (for want of a better word), binary seems to be the favoured method. I understand that this gives the maximum possibilities for crossover and mutation, ...
Avrohom Yisroel's user avatar
3 votes
2 answers
224 views

How does the genetic algorithm know when to stop if the global minimum isn't known?

Say I'm writing a GA to solve the travelling salesman problem. I don't know in advance what the shortest path is, so how does my GA know when to stop? If I wait until the best fitness doesn't reduce ...
Avrohom Yisroel's user avatar
6 votes
1 answer
946 views

How do you encode the genes when you don't know the length?

I think I've got the hang of writing a GA when you know the number of genes in a chromosome. For example, if you're searching for a string, and you know the length, you can just generate your initial ...
Avrohom Yisroel's user avatar
0 votes
0 answers
989 views

Why do my GAs take so long to converge?

I know GA questions are often almost impossible to answer exactly, but I'm looking for some general advice (although specific advice would be great too!). I've just written my second GA, which tries ...
Avrohom Yisroel's user avatar
9 votes
2 answers
1k views

Why have a crossover value that isn't 0.5?

Most of the literature I've read about GAs suggests using a crossover value of around 0.7, so you take the first 70% of one chromosome's genes, and the last 30% of the other to produce one new ...
Avrohom Yisroel's user avatar
5 votes
2 answers
3k views

How do we produce the next generation?

Thanks to some great replies in a previous question, I think I now have a better understanding of GAs, but am still confused on a couple of points. I'll start with one here. I've been reading around ...
Avrohom Yisroel's user avatar
32 votes
5 answers
8k views

How do we know that the next generation will be better?

I was introduced to genetic algorithms recently by this MSDN article, in which he calls them combinatorial evolution, but it seems to be the same thing, and am struggling to understand how combining ...
Avrohom Yisroel's user avatar
6 votes
4 answers
2k views

Finding the best combination of sets that gives the maximum number of unique items

A couple of months ago I went to a Bruce Springsteen concert. I hadn't heard much of his songs before that, but really liked the concert and bought the live recording of it afterwards (which he sells ...
fimez's user avatar
  • 163
8 votes
1 answer
1k views

Perform crossover operation on AST in genetic programming

So in general when you perform a crossover in GA, you directly flip a random section in the "genome", with the corresponding section in the other parent, and mutate it based on the mutation rate. ...
Jordan LaPrise's user avatar
26 votes
4 answers
11k views

Calendar/Planning algorithm

I'm facing a problem I'm not sure how to approach. I have to generate a calendar for employees, each of them having specific work constraints (some personal, some common) What I'm working with : I ...
Gil Sand's user avatar
  • 2,173
2 votes
1 answer
936 views

Is the output of a neural net supposed to have had the activation function applied to it?

TL; DR: Is the output from a feed-forward neural a direct result of the activation function? I.e: If the activation function is the sigmoid function, will the output always be between 0 and 1? I'm ...
Carcigenicate's user avatar
4 votes
2 answers
779 views

Mutation operator for genetic algorithms for solving traveling salesman problem

I need help help for defining mutation operator for traveling salesman problem. I'm currently using this now (pseudocode): mutate ( strand ): for n in random_interval ( min_gene_index, ...
Jossi's user avatar
  • 153
1 vote
0 answers
625 views

PSO – how Dimensions are set up?

I am coding a Particle Swarm Optimization in C++. I have been for days trying to understand the theory of how dimensions work in each different problem. In the many examples I have seen, all of them ...
Pandalanche's user avatar
2 votes
1 answer
800 views

Genetic Algorithm's Tournament Selection limit to be selected

I started working again on a Genetic Algorithm and i'm trying a lot of operators and ways of selection. When I made the Tournament Selection , I noticed that it gets really easy to always get the top ...
RubenC's user avatar
  • 153
0 votes
1 answer
2k views

Shortest path to visit all nodes [duplicate]

I am given a set of tourist attractions(nodes identified by x, y) and i need to find the shortest path to visit them. The way i thought of it, is i will ignore if there are streets available and ...
SummerCode's user avatar
4 votes
1 answer
81 views

How to diversify an optimal solution set?

If given a list of players, their salaries, and their projections, one can easily find the top 'n' projected teams (where a team is a combination of players), such that every team is under the salary ...
Bam Bam's user avatar
  • 49
0 votes
0 answers
191 views

What Algorithm can be use for task allocation based on location?

What algorithm can be use for task scheduling based on location? For example there are 100 students and 5 lecturers available. Each lecturer must get same amount of student using location allocation ...
Navhin Nair's user avatar
-1 votes
1 answer
932 views

How to implement a genetic algorithm with distance, time, and cost [closed]

I want to make a solution to find the optimum route of school visit. For example, I want to visit 5 schools (A, B, C, D, E) in my city. Given the choice of five routes regarding what school I should ...
ari's user avatar
  • 13
3 votes
3 answers
1k views

Genetic Algorithm new generation exponentially increasing

I'm programming Genetic Algorithm in C++ and after searching all kind of ways of doing GA'a operators (selection, crossover, mutation) I came up with a doubt. Let's say I have an initial population ...
RubenC's user avatar
  • 153
1 vote
0 answers
2k views

Multidimensional multiple-choice knapsack problem: find a feasible solution

My assignment is to use local search heuristics to solve the Multidimensional multiple-choice knapsack problem, but to do so I first need to find a feasible solution to start with. Here is an example ...
Carlo Moretti's user avatar
8 votes
4 answers
2k views

Is a genetic algorithm needed when computation is infinitely fast?

From what I understand, genetic algorithms try out multiple variations and evaluate the fitness of each variation. Then they select the best variations, change them a bit and continue the process with ...
Eugene's user avatar
  • 1,943
0 votes
1 answer
1k views

How do I mutate a value in a genetic algorithm using Gaussian distribution?

I've been reading 'Introduction to Evolutionary Algorithms'. This method is stated, but not described, and I can't find anything more specific online. p44/45 of 2nd Ed for reference. adding to the ...
StringsOnFire's user avatar
0 votes
1 answer
2k views

deciphering columnar transposition cipher

I am looking for an idea on how to decipher a columnar transposition cipher without knowing the key or the length of the key. When I take the cipher text as input to my algorithm I will guess the ...
Zack Ef's user avatar
  • 103
0 votes
3 answers
128 views

New nodes joining distributed genetic algorithm

I'm sort of torn on what to do for implementation of my distributed genetic algorithm problem. I would like to be able to have nodes join and part at will and not take down the whole system. But this ...
csteifel's user avatar
  • 285
8 votes
4 answers
6k views

Is it necessary to map integers to bits in a genetic algorithm?

From what I've read, genetic algorithms are usually (always?) applied to chromosomes of bits. So if a problem involves maximizing a function that takes integer values, the integers are first encoded ...
itzy's user avatar
  • 183
3 votes
1 answer
464 views

Is this really necessary for solving this problem?

I came across the following article which presents the problem: A group of people walk into a restaurant and want to spend exactly $15.05 on appetizers. They also want them as fast as possible. ...
user1477388's user avatar
-2 votes
1 answer
1k views

using ant colony algorithm to create cross word game [closed]

I have difficulty to learn about ant colony algorithm (ACO), I have read about generating crossword game using (genetic algorithm) GA.I Know both of GA ant ACO usually used for optimization, but my ...
Benhard Jei's user avatar
1 vote
1 answer
223 views

What is the fitness landscape for minimal + viable solutions?

Let's say I'm trying to find a number from 1 .. 100. All numbers in this range are "valid", in that they could be interpreted as potential solutions. Let's say the ideal number is 50. And all numbers >...
Mark Canlas's user avatar
  • 4,014
0 votes
1 answer
5k views

MATLAB: Best fitness vs mean fitness, initial range

Based on the example of Rastrigin's function. At the plot function, if I chose 'best fitness', on the same graph 'mean fitness' will also be plotted. I understand well about 'best fitness' whereby it ...
Sa Ta's user avatar
  • 1
6 votes
1 answer
943 views

Genetic Algorithm - solving a matrix with hard and soft constraints

I'm writing a Genetic Program that I need some advice on for crossover operations. The GP is attempting to find the best solution for a matrix that has hard row constraints and softer column ...
CardinalFlyer's user avatar
8 votes
12 answers
3k views

How close have we gotten to automating code writing? [closed]

And I don't mean Autocomplete or automatic code snippets as inserted by modern day editors, or polymorphic code. But what is the state-of-the-art in programs that can go through given inputs and types ...
kumar's user avatar
  • 691
4 votes
4 answers
815 views

How is the "Infinite Monkey Theorem" different to use than Genetic Programming to solve problems?

This might be a little open ended, but I heard an explanation of this talk on how GP could be used to fix bugs, and I wonder: How does this differ from the infinite monkey theorem?
OscarRyz's user avatar
  • 1,675
8 votes
1 answer
992 views

What's the best way to learn nature-inspired algorithms? [closed]

I completed the Machine Learning course (Stanford) and got very interested, also after some research, I decided that I'd like to learn nature-inspired algorithms. I've found some resources like: ...
Rodrigo Ruiz's user avatar
7 votes
3 answers
3k views

Algorithm for an exact solution to the Travelling Purchaser Problem

do you know of any algorithms which give an exact solution for the Traveling Purchaser Problem. I can only find heuristic and probabilistic approaches. I do have implemented a genetic algorithm so ...
scravy's user avatar
  • 387
12 votes
8 answers
2k views

Does defining the stopping point of a genetic algorithm defeat the purpose of the algorithm?

Wikipedia defines the termination point of a GA to this: Commonly, the algorithm terminates when either a maximum number of generations has been produced, or a satisfactory fitness level has ...
slandau's user avatar
  • 606
13 votes
5 answers
3k views

Genetic programming [closed]

I recently was browsing Reddit and came across a post linking to a "JavaScript genetic algorithm" example. I've really been fascinated with the concepts of genetic algorithms and programming, however ...
Tom's user avatar
  • 131
3 votes
5 answers
1k views

Is a genetic algorithm a correct approach to this problem?

I am trying to calculate a set of items that produce the highest damage output in a video game. There are about 50 different items, of which you can choose 6. There are all sorts of conditions that ...
Shawn's user avatar
  • 535