genetic-algorithm

Neural Net Optimize w/ Genetic Algorithm

Is a genetic algorithm the most efficient way to optimize the number of hidden nodes and the amount of training done on an artificial neural network? I am coding neural networks using the NNToolbox in Matlab. I am open to any other suggestions of optimization techniques, but I'm most familiar with GA's. ...

Sparse parameter selection using Genetic Algorithm

Hello, I'm facing a parameter selection problem, which I would like to solve using Genetic Algorithm (GA). I'm supposed to select not more than 4 parameters out of 3000 possible ones. Using the binary chromosome representation seems like a natural choice. The evaluation function punishes too many "selected" attributes and if the number o...

Using Traveling Salesman Solver to Decide Hamiltonian Path

This is for a project where I'm asked to implement a heuristic for the traveling salesman optimization problem and also the Hamiltonian path or cycle decision problem. I don't need help with the implementation itself, but have a question on the direction I'm going in. I already have a TSP heuristic based on a genetic algorithm: it assum...

"Undefined symbols" linker error with simple template class

Been away from C++ for a few years and am getting a linker error from the following code: Gene.h #ifndef GENE_H_INCLUDED #define GENE_H_INCLUDED template <typename T> class Gene { public: T getValue(); void setValue(T value); void setRange(T min, T max); private: T value; T minValue; T maxValue; }; #e...

How should I Test a Genetic Algorithm

I have made a quite few genetic algorithms; they work (they find a reasonable solution quickly). But I have now discovered TDD. Is there a way to write a genetic algorithm (which relies heavily on random numbers) in a TDD way? To pose the question more generally, How do you test a non-deterministic method/function. Here is what I have ...

How to find the best parameters for a Genetic Algorithm?

Some Genetic Algorithm frameworks, such as http://www.aforgenet.com/ requires many parameters, such as mutation rate, population size, etc There is universal best numbers for such parameters? I believe that it depends on the problem (fitness function delay, mutation delay, recombination delay, evolution rate, etc). My first thought was ...

Best Data Structure for Genetic Algorithm in C++ ?

Hello, i need to implement a genetic algorithm customized for my problem (college project), and the first version had it coded as an matrix of short ( bits per chromosome x size of population). That was a bad design, since i am declaring a short but only using the "0" and "1" values... but it was just a prototype and it worked as intend...

Multiple Iterations of Tournament Selection in Genetic Algorithm

Hey guys, I'm a bit confused about how multiple iterations of the tournament selection works. I know you start selecting random pairs (or k members) and putting the winner into a mating pool. You continue do this till the mating pool is filled. However, I'm not sure what happens afterwards. Do we just start randomly mating those in t...

Efficient Implementation of Fitness-Proportionate "Roulette" Selection

I am currently writing a keyboard layout optimization algorithm in C (such as the one designed by Peter Klausler) and I want to implement a fitness-proportionate selection as described here (PDF Link): With roulette selection you select members of the population based on a roullete wheel model. Make a pie chart, where the ar...

Can you please provide some topic ideas related to AI to be used in a project?

I need topic ideas related to AI on which I will base my thesis. I am mostly interested in Genetic Algorithm and Neural Networks techniques. I already got the some ideas, but non of them seems to hit me! Any help will be really appreciated!! :) ...

What are some impressive algorithms or software in the world of AI?

I have always loved the idea of AI and evolutionary algorithms. Unfortunately as we all know the field hasnt developed nearly as fast as expected in the early days. What I am looking for are some examples that have the wow factor: Self directed learning systems that adapted in unexpected ways. Game agents that were particularly dyna...

When to use Genetic Algorithms and when to use Neural Networks?

Is there a rule of thumb or set of examples to determine when to use Genetic Algorithms versus when to use Neural Networks to solve a problem? I know there are cases in which you can have both methods mixed, but I am looking for a high level reasoning between the two methods. ...

What algorithm should I use for "genetic AI improvement"

First of all: This is not a question about how to make a program play Five in a Row. Been there, done that. Introductory explanation I have made a five-in-a-row-game as a framework to experiment with genetically improving AI (ouch, that sounds awfully pretentious). As with most turn-based games the best move is decided by assigning a ...

Nintendo DS and Neural Networks

Hello, i was wondering if DS`s hardware is capable of running a game that utilizes a feedforward neural network using genetic algorithms. I know that this has to do with the implementation of the homebrew game as well as the nn and the ga, but i am curious... (i know nothing about how the DS`s ARMs are used, etc, etc, etc) Thanks in ad...

What problems have you solved using genetic algorithms/genetic programming?

Genetic algorithms (GA) and genetic programming (GP) are interesting areas of research. I'd like to know about specific problems you - the SO reader - have solved using GA/GP and what libraries/frameworks you used if you didn't roll your own. Questions: What problems have you used GA/GP to solve? What libraries/frameworks did you us...

Сrossover operation in Genetic algorithm for TSP

Hello everybody. I'm trying to solve the Travelling Salesman Problem (TSP) with Genetic algorithm My Genome is permutation of vertex in graph (path for Salesman). How should I perform the crossover operation over my genomes? Where I can find implementations of my problem in C#? ...

GA written in Java

I am attempting to write a Genetic Algorithm based on techniques I had picked up from the book "AI Techniques for Game Programmers" that uses a binary encoding and fitness proportionate selection (also known as roulette wheel selection) on the genes of the population that are randomly generated within the program in a two-dimensional arr...

MATLAB- passing a function handle parameter into another function as a handle

Working on an assignment involving Genetic Algorithms (loads of headaches, loads of fun). I need to be able to test differing crossover methods and differing mutation methods, to compare their results (part of the paper I have to write for the course). As such, I want to just pass the function names into the Repopulate method, as functio...

how to solve linear equations using genetic algorithm

hello i want to solve a system of n linear equations containing n variables using genetic algorithm. i am having difficulty in defining the crossover operation as the solution may consist of floating point values. how do i proceed. seems possible but this is my first encounter with genetic algorithms so your help would be great. suppos...

how to perform bitwise operation on floating point numbers

i tried this: float a = 1.4123; a = a & (1 << 3); i get a compiler error saying that operand to & cannot be of type float. when i do: float a = 1.4123; a = (int)a & (1 << 3); i get the program running. only thing is that the bitwise operation is done on the integer representation of the number obtained after rounding off. float a...