什么是重新present二进制基因组遗传算法一个明智的方式? [英] What's a sensible way to represent a binary genome for a genetic algorithm?

查看:217
本文介绍了什么是重新present二进制基因组遗传算法一个明智的方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

previous问题掩饰我的经验不足,并基于一个假设。现在我变得更聪明。 (把1和0的字符串?呸!我嘲笑的建议!)

My previous question belied my inexperience and was based on an assumption. Now I am much wiser. (Put 1s and 0s in a string? Pah! I laugh at the suggestion!)

我的问题是那么,我应该如何连接code我的基因组

在论文中,他们是这样的:

On paper, they look like this:

01010011010110010

17比特连接code(在某些情况下单独使用,并且在一些情况下,作为基团)的参量进行测试。

17 bits that encode (in some cases singly and in some cases as groups) the parameters to be tested.

的要求是:


  1. 必须是可扩展性。有可能是17的时刻,但是这可能增长/萎缩,因为添加的选项,删除或发生范围修改。

  2. 每一位需要单独翻动,重新present点突变。

  3. 理想的情况下,它应该很容易采取两个基因组的最后一个X%,切换他们交给(重presenting交叉)。

  4. 必有重$ P $的psenting明文基因组中的简单方法。这里强调的是方便,而不是人类译。 (想想URL缩短服务。)

任何人有什么好点子? (如果它是有用的,我使用C#)。

Anyone got any great ideas? (If it's useful, I'm using C#.)

推荐答案

像安德烈说,BitArray可能是你最好的答案,它满足您的所有需求。

Like Andrey said, BitArray is probably your best answer, it meets all your requirements.

1)你可以设置的位数与构造

1) you can set the number of bits with the constructor

2),它允许你设置(开或关),或和,异或,而不是位

2) it allows you Set (on or off),Or,And,Xor, Not on bits

3)可以循环在你的最后x%做交叉

3) you can loop over your last x% to do crossover

4)有一个toString应该让你输出。

4) there is a ToString that should allow you to output it.

这篇关于什么是重新present二进制基因组遗传算法一个明智的方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆