genetic-algorithm

Balancing heuristics (for timetable problem)

I'm writing a genetic algorithm for generating timetables. At the moment I'm using these two heuristics: Number of holes between lectures in one day (related) (less holes -> bigger score) Each hour has some value, so for each timetable I sum values for hours when lectures are on. (lectures at more appropriate hours -> bigger score)...

How to develop game bot for unreal tournament?

The idea is to develop my own bot to test the game's behavioral rules, in my case I have set on using Unreal Tournament (1999 or 2004 version) as a proof of concept. Initially, I would like to test the CTF type of mode. What I set to achieve is to have a bot, preferably in Java, that is fully controllable, that is, there is no AI but mec...

how to implement non uniform probability distribution?

I am trying to implement non-uniform probability distribution in genetic algorithm. In the implementation of genetic program, I have an experiment which has 3 outcomes, where each outcome has different probabilities. Let say, probablity of one outcome is 0.85, other is 0.01 and last one is 0.14? P.S: i recently came to know that it is...

Interesting graph traversal optimization problem

Suppose you have a set of nodes connected into a tree structure with one root node and any node may have any number of child nodes. You can only traverse the tree starting at the root node or from your current position along direct connections. I.e., no random access to a specific node, but the structure of the graph is already known an...

applying crossover and mutation to a graph (genetic algorithm)

Hi! I'm playing arround with a Genetic Algorithm in which I want to evolve graphs. Do you know a way to apply crossover and mutation when the chromosomes are graphs? Or am I missing a coding for the graphs that let me apply "regular" crossover and mutation over bit strings? thanks a lot! Any help, even if it is not directly related to...

VB.NET - Genetic Algotithm - Knapsack Problem

I have been working on the Knapsack problem using genetic algorithms. But I have run into a few difficulties... First off the user generates a data set which is stored in a text document. From there I read the data in to the program. I do fine getting the program to calculate fitness values, select parents, produce children, then muta...

Need help sorting list of objects by key.

I am unable to get this code to sort a list of objects using either .sort() or sorted(). What am I missing here? P.S. My solution.distance() method could use some cosmetic surgery too if anyone has any suggestions. Thanks! import random import math POPULATION_SIZE = 100 data = [[1, 565.0, 575.0], [2, 25.0, 185.0], ...

Which Java library/libraries for Genetic Algorithms?

Hi there, I want to implement some simple genetic algorithms in Java. So far I found only JGAP. Did somebody has some experience with that? And do you know other Java libraries for GA? I do not want to write it my own as in http://stackoverflow.com/questions/1575061/ga-written-in-java and I have to use Java, so http://stackoverflow.co...

Help with 2 quetions about randomized algoritms

I an now learning the Las Vegas and Monte Carlo algorithms myself,and have two questions may be simple but I can not answer them,if someone can help me...Thanks in advance Consider a Monte Carlo algorithms A for a problem P whose expected runnig time is at most T(n) on any instance of size n that produces a corect solution with probabi...

Writing Simulated Annealing algorithm for 0-1 knapsack in C#

I'm in the process of learning about simulated annealing algorithms and have a few questions on how I would modify an example algorithm to solve a 0-1 knapsack problem. I found this great code on CP: http://www.codeproject.com/KB/recipes/simulatedAnnealingTSP.aspx I'm pretty sure I understand how it all works now (except the whole Bol...

How to write Image Mosaic Generator

Task is following: how to create selected picture mosaic from large number of images. My first shot would be using evolutionary algorithm. Where genotype represents mapping of original images to positions in mosaic grid, and individual is evaluated according to similarity to original picture. Actually in basic approach each tile can be t...

Neural Network size for Animation system

I decided to go with a Neural Network in order to create behaviors for an animation engine that I have. The neural network takes in 3 vector3s and 1 Euler angle for every body part that I have. The first vector3 is the position, the second is its velocity, and the third is its angular velocity. The Euler angle is what rotation the body p...

How to estimate complex algorithm facility requirements?

I'd like to understand how to efficiently estimate hardware requirements for certain complex algorithms using some well known heuristic approach. Ie. I'd like to estimate quickly how much computer power is necessary to crack my TEA O(2^32) or XTEA O(2^115.15) in some reasonable time or other way round : Having facility power of a 1000 x...

Swapping bits at a given point between two bytes

Let's say I have these two numbers: x = 0xB7 y = 0xD9 Their binary representations are: x = 1011 0111 y = 1101 1001 Now I want to crossover (GA) at a given point, say from position 4 onwards. The expected result should be: x = 1011 1001 y = 1101 0111 Bitwise, how can I achieve this? ...

designing fitness function in genetic algorithm

I need to solve simultaneous linear equations (5 equations with 7 unknowns i.e an under-determined problem) where the variables vary over a wide range of [0 - 1,00,000]. Can someone suggest what fitness function I should use? ...

How to replace inadmissible solutions?

Hi, I'm building a genetic algorithm to maximize a mathematical function. The initial population is randomly selected, lets say of 20 individuals. The best is kept for the next generation. 18 tournaments are made so that afterwards individuals can be randomly selected to form nine pairs. From the nine pairs, nine children are 'born'. H...

Code in genetic algorithm for non linear simultaneous equations

I need to solve three nonlinear simultaneous equations y1 = exp(-(r1 +r2)*t) y2 = (r1/((r3+r4)-(r1+r2)))*[exp(-[r1+r2]*t) - exp(-[r3+r4]*t)] y3 = (r1/((r5+r6)-(r1+r2)))*[exp(-[r1+r2]*t) - exp(-[r5+r6]*t)] where y1, y2, y3 and t is known and i aim to find r1, r2... r6. I need to do this using genetic algorithm. Can someone provide me ...

C# data processing logic help

Hi Guys, I have a DataTable like this, AccessDateTime | Direction 2010-09-15 12:12:49 | IN 2010-09-15 12:36:03 | OUT 2010-09-15 12:53:05 | IN 2010-09-15 14:04:19 | OUT 2010-09-15 14:17:35 | IN 2010-09-15 16:07:57 | OUT 2010-09-15 16:10:57 | OUT 2010-09-15 18:43:18 | OUT I need a fast logic to convert the data into this format...

Algorithm to optimize # threads used in a calculation

I'm performing an operation, lets call it CalculateSomeData. CalculateSomeData operates in successive "generations", numbered 1..x. The number of generations in the entire run is fixed by the input parameters to CalculateSomeData and is known a priori. A single generation takes anywhere from 30 minutes to 2 hours to complete. Some of...

Genetic Algorithms for computer security

I am in the process of choosing project for uni. And I am really interested on combining genetic algorithms and computer security. Therefore my question, Is it possible to use GA on any aspect for computer security? For example?. I was thinking something like a evolutionary firewall/anti-virus that will be able to self protect/inhibit t...