genetic-programming

Max Fitness stuck at local maxima in genetic algorithm implementation

限于喜欢 提交于 2019-12-12 03:39:46
问题 Having trouble with this code below. It is implementation of population evolution. In my case the max fitness is struck at a local maxima everytime and is unable to reach max possible value. Kindly suggest necessary edits and reason for the same. Individual.java package genetic.algorithm.project; import java.util.Random; public class Individual { public static int SIZE = 300; private int[] genes = new int[SIZE]; private double fitnessValue = 0.0; // Getters and Setters public void setGene(int

R Error Genetic Programming Implementation

旧街凉风 提交于 2019-12-11 13:35:32
问题 So I am brand new to R. I started learning it yesterday, because there's some data that is being very resistant to automatically importing into Mathematica and Python. I'm building a few machine learning techniques to do analysis on the data that I can now import with R. This is a genetic programming implementation that when finished should do symbolic regression on some data. (I have yet to create the mutation or crossover operators, build a legit function list, etc). I get two errors when I

What effect do crossover probabilities have in Genetic Algorithms/Genetic Programming?

本小妞迷上赌 提交于 2019-12-11 08:23:42
问题 Can any one give an example of crossover probability? I would like to know what is the benefits of determining crossover probability, and also what effect it has in genetic algorithms or genetic programming. 回答1: Crossover probability doesn't have a benefit by definition. It is merely a parameter that allows you to adjust the behavior of a genetic algorithm. Lowering the crossover probability will let more individuals continue in the next generation unchanged. This may or may not have a

How to remove overlap in numeric ranges (AWK)

无人久伴 提交于 2019-12-06 07:04:33
I'm trying to remove the overlap within a file. There's a bunch of records that starts with an 'A' and which have a 'start-value' and an 'end-value'. There's also a bunch of records that start with a 'B', also has range and that shows a possible overlap with records starting with 'A'. The idea is to remove the overlapping range from A so only non-overlapping ranges exist. Some of the records in B have an identical 'start-value' while others have an identical 'end-value' with A. So, if A has a range of 0 - 100 and B has a range of 0 - 32. Then my expected output is: A 33 - 100 and B 0 - 32.

Is there any Genetic Programming code written R [closed]

旧时模样 提交于 2019-12-05 01:55:30
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 3 years ago . I'm interesting in evolutionary algorithms. I have tested genetic algorithms with R but has someone tried with genetic programming? Do you know, if there are code somewhere written in R. 回答1: I'm not aware of anything on CRAN for genetic programming in particular, although there is some work being done on the

Evolutionary Algorithms: Optimal Repopulation Breakdowns

只谈情不闲聊 提交于 2019-12-04 11:56:24
问题 It's really all in the title, but here's a breakdown for anyone who is interested in Evolutionary Algorithms: In an EA, the basic premise is that you randomly generate a certain number of organisms (which are really just sets of parameters), run them against a problem, and then let the top performers survive. You then repopulate with a combination of crossbreeds of the survivors, mutations of the survivors, and also a certain number of new random organisms. Do that several thousand times, and

How to create a container that holds different types of function pointers in C++?

你离开我真会死。 提交于 2019-12-02 07:07:48
问题 I'm doing a linear genetic programming project, where programs are bred and evolved by means of natural evolution mechanisms. Their "DNA" is basically a container (I've used arrays and vectors successfully) which contain function pointers to a set of functions available. Now, for simple problems, such as mathematical problems, I could use one type-defined function pointer which could point to functions that all return a double and all take as parameters two doubles. Unfortunately this is not

How to create a container that holds different types of function pointers in C++?

南楼画角 提交于 2019-12-02 04:53:22
I'm doing a linear genetic programming project, where programs are bred and evolved by means of natural evolution mechanisms. Their "DNA" is basically a container (I've used arrays and vectors successfully) which contain function pointers to a set of functions available. Now, for simple problems, such as mathematical problems, I could use one type-defined function pointer which could point to functions that all return a double and all take as parameters two doubles. Unfortunately this is not very practical. I need to be able to have a container which can have different sorts of function

AI How to model genetic programming for Battleships

吃可爱长大的小学妹 提交于 2019-11-30 10:21:28
I have a question regarding Genetic Programming. I am going to work on a genetic algorithm for a game called Battleships . My question is: How would I decide upon a "decision" model for the AI to evolve? And how does that work? I have read multiple papers and multiple answers that just speak about using different models, but could not find something specific, which, unfortunately, I apparently need to wrap my head around the problem. I want it to evolve over multiple iterations and "learn" what works best, but not sure how to save these "decisions" (I know to a file, but "encoded" how?) in a

Code generation by genetic algorithms

拜拜、爱过 提交于 2019-11-30 10:20:15
问题 Evolutionary programming seems to be a great way to solve many optimization problems. The idea is very easy and the implementation does not make problems. I was wondering if there is any way to evolutionarily create a program in ruby/python script (or any other language)? The idea is simple: Create a population of programs Perform genetic operations (roulette-wheel selection or any other selection), create new programs with inheritance from best programs, etc. Loop point 2 until program that