If you can read Python, you may want to take a look at Pyevolve. I am mainly involved in it on the GA side, but it has support for GP as well. May be you can get some hint there.
Q1 is your choice, but single child would probably be more common. Every time you do the lottery selection of parents, you're applying selection pressure, which is what you want.
Q2: Negative tournament selection is exactly the right approach. Yes, losing low-fitness members of the population causes rapid convergence initially, but once your population gets into the hard-to-search part of the solution space, it won't be as cut-and-dried which ones lose the tournament / lottery. What you do have to beware of is stagnation of the gene pool; I suggest monitoring the entropy of the genome to track its heterogeneity. "elitism is inherent" -- Well, yeah, that's the point! ;-)
Q3: comp.ai.genetic is probably your best bet. Sometimes the topic is picked up in game development fora, like on Gamasutra.
P.S. Genetic programming in C?!? How are you assuring the viability of the offspring? Doing genetic programming in a non-homoiconic language is a real challenge.
As Ray, says, it's mostly up to you but typically in a steady-state setup you would only create a single offspring.
Again you have options. I wouldn't replace the parents. If they've been picked as parents based on their fitness you could be eliminating some of the fittest members of the population. Easiest is just to randomly pick an individual to be replaced. Alternatively, you could replace the least fit individual, but that can lead to premature convergence. Another option is to use the same selection strategy that you use to choose parents but use the inverse fitness so that it favours less fit individuals.
You could try comp.ai.genetic on USENET (and Google Groups).
他们主要讨论增强拓扑神经进化(NEAT)算法,这是一种用于进化神经网络的遗传算法。但像精英主义和交叉策略这样的主题非常普遍,并且可以适用于 GA 和 GP 算法。
否则,正如 Dan 和 Ray 所说,许多决策都是在对特定软件和领域进行实验后做出的。尝试将你的算法应用于不同的问题,并注意它的行为方式——过了一段时间,你可能会对什么有效、什么无效产生直觉。
It sounds like some of your questions are not necessarily specific to genetic programming; if that's true, you might have some luck asking the folks over at the NEAT Users Group.
They primarily discuss the Neuroevolution of Augmenting Topologies (or NEAT) algorithm, which is a genetic algorithm used to evolve neural networks. But topics like elitism and crossover strategies are pretty general, and can apply to both GA and GP algorithms.
Otherwise, as Dan and Ray have said, a lot of these decisions are made after experimentation with one's particular software and domain. Try applying your algorithm to different problems and pay attention to how it behaves -- after a while, you'll probably develop an intuition for what works and what doesn't.
I would create an unlimited number of offspring, but only on the basis of success, and let older members of the population die. Lack of fitness can also lead to early death. This just seems to follow a natural order.
Q1. In GP, as opposed to GA, when you perform crossover you select two parents but
do you create one child or two, or is that a free choice you have?
Yes its your choice; but generally, its not advisable to create many individuals with the same parents, because the difference among the individual's trends created by the same parents would be very limited and that could cost processing speed and memory which could have been spent on other individuals showing different trends and behaviors that requires analysis (but creating more individuals cannot be a problem if the evolution process is close to reaching its endpoint).
Q2. In steady state GP...
It is advisable to replace individuals based on the ranking provided by the fitness function you have adopted.
发布评论
评论(8)
首先,放松。
GP 中没有“正确”的方法。 GP 与其说是科学,不如说是艺术。尝试多种方案并选择最有效的方案。
Q1:1 个、2 个或多个。你选择。
Q2:替换1、2全部。或者尝试一些精英主义。
问题 3:您可能找不到讨论这些问题的论坛,因为没有正确/最佳答案。对不起。
附言。在我的研究中,交叉从来没有真正表现良好......
Firstly, relax.
There are no "correct" methods in GP. GP is more art than science. Try lots of schemes and pick the ones that work best.
Q1: 1, 2, or many. You choose.
Q2: Replace, 1, 2, all. Or try some elitism.
Q3: You probably won't find forums discussing these questions b/c there are no right/best answers. Sorry.
PS. In my research, crossover never really performed well...
如果您可以阅读 Python,您可能需要看看 Pyevolve。我主要参与GA方面的工作,但它也有对GP的支持。也许你可以在那里得到一些提示。
If you can read Python, you may want to take a look at Pyevolve. I am mainly involved in it on the GA side, but it has support for GP as well. May be you can get some hint there.
Q1 是您的选择,但独生子女可能更常见。每次你对父母进行抽签选择时,你都会施加选择压力,这正是你想要的。
Q2:否定锦标赛选择正是正确的做法。是的,失去群体中的低适应度成员最初会导致快速收敛,但是一旦你的群体进入解决方案空间中难以搜索的部分,哪些群体输掉了比赛就不会那么一目了然了/彩票。你要做必须提防的是基因库的停滞;我建议监测基因组的熵来追踪其异质性。 “精英主义是与生俱来的”——嗯,是的,这就是重点! ;-)
Q3:comp.ai.Genetic 可能是您最好的选择。有时,这个话题会在游戏开发论坛上出现,比如《Gamasutra》。
PS 遗传编程用 C 语言?!?如何保证后代的生存能力?用非同象语言进行遗传编程是一个真正的挑战。
Q1 is your choice, but single child would probably be more common. Every time you do the lottery selection of parents, you're applying selection pressure, which is what you want.
Q2: Negative tournament selection is exactly the right approach. Yes, losing low-fitness members of the population causes rapid convergence initially, but once your population gets into the hard-to-search part of the solution space, it won't be as cut-and-dried which ones lose the tournament / lottery. What you do have to beware of is stagnation of the gene pool; I suggest monitoring the entropy of the genome to track its heterogeneity. "elitism is inherent" -- Well, yeah, that's the point! ;-)
Q3: comp.ai.genetic is probably your best bet. Sometimes the topic is picked up in game development fora, like on Gamasutra.
P.S. Genetic programming in C?!? How are you assuring the viability of the offspring? Doing genetic programming in a non-homoiconic language is a real challenge.
请访问 MetaOptimize.com 来满足您的堆叠需求。
Check out MetaOptimize.com for your stacky needs.
正如 Ray 所说,这主要取决于您,但通常在稳定状态设置中您只会创建一个后代。
正如
你再次有选择。我不会取代父母。如果他们根据自己的健康状况被选为父母,那么您可能会淘汰掉人口中一些最健康的成员。最简单的方法就是随机选择一个人来替换。或者,您可以替换最不适合的个体,但这可能会导致过早收敛。另一种选择是使用与选择父母相同的选择策略,但使用逆适应度,以便它有利于不太适合的个体。
您可以在 USENET(以及 Google 网上论坛)。
As Ray, says, it's mostly up to you but typically in a steady-state setup you would only create a single offspring.
Again you have options. I wouldn't replace the parents. If they've been picked as parents based on their fitness you could be eliminating some of the fittest members of the population. Easiest is just to randomly pick an individual to be replaced. Alternatively, you could replace the least fit individual, but that can lead to premature convergence. Another option is to use the same selection strategy that you use to choose parents but use the inverse fitness so that it favours less fit individuals.
You could try comp.ai.genetic on USENET (and Google Groups).
听起来你的一些问题不一定是针对基因编程的;如果这是真的,您可能会幸运地询问 NEAT 用户组。
他们主要讨论增强拓扑神经进化(NEAT)算法,这是一种用于进化神经网络的遗传算法。但像精英主义和交叉策略这样的主题非常普遍,并且可以适用于 GA 和 GP 算法。
否则,正如 Dan 和 Ray 所说,许多决策都是在对特定软件和领域进行实验后做出的。尝试将你的算法应用于不同的问题,并注意它的行为方式——过了一段时间,你可能会对什么有效、什么无效产生直觉。
It sounds like some of your questions are not necessarily specific to genetic programming; if that's true, you might have some luck asking the folks over at the NEAT Users Group.
They primarily discuss the Neuroevolution of Augmenting Topologies (or NEAT) algorithm, which is a genetic algorithm used to evolve neural networks. But topics like elitism and crossover strategies are pretty general, and can apply to both GA and GP algorithms.
Otherwise, as Dan and Ray have said, a lot of these decisions are made after experimentation with one's particular software and domain. Try applying your algorithm to different problems and pay attention to how it behaves -- after a while, you'll probably develop an intuition for what works and what doesn't.
我会创造无限数量的后代,但前提是成功,并让年长的人口死去。缺乏健康也会导致早逝。这似乎遵循自然顺序。
I would create an unlimited number of offspring, but only on the basis of success, and let older members of the population die. Lack of fitness can also lead to early death. This just seems to follow a natural order.
是的,这是你的选择;但一般来说,不建议创建许多具有相同父母的个体,因为由同一父母创建的个体趋势之间的差异非常有限,这可能会消耗处理速度和内存,而这些本来可以花费在显示不同趋势的其他个体上以及需要分析的行为(但如果进化过程接近达到终点,创造更多的个体就不是问题)。
建议根据您采用的适应度函数提供的排名来替换个体。
Yes its your choice; but generally, its not advisable to create many individuals with the same parents, because the difference among the individual's trends created by the same parents would be very limited and that could cost processing speed and memory which could have been spent on other individuals showing different trends and behaviors that requires analysis (but creating more individuals cannot be a problem if the evolution process is close to reaching its endpoint).
It is advisable to replace individuals based on the ranking provided by the fitness function you have adopted.