如何制作显示"G"的程序.在C#.NET中使用遗传算法? [英] How to make a program that shows "G" with Genetic Algorithm in C#.NET?

查看:63
本文介绍了如何制作显示"G"的程序.在C#.NET中使用遗传算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好!

我想用遗传算法制作一个显示大写字母(G)的程序
在C#.net2008中...
我把阵列做得不好,把它当作目标阵列,用它检查每条染色体(目标阵列),然后再制造10条染色体,每个人的长度是36 ..

该程序将执行为:
011110
010000
010000
010110
011110

在这里,我们将注意到此数组中的G字母,当G线通过时将为"1",而当G线未通过时将为"0".

拜托,有人可以帮我吗?

提前谢谢.....


ya!..但是我不想像star..etc.我不会在"1"时改变
我为初始种群",世代"和适应性"创建了一个函数,现在我尝试寻找一个想法,选择最佳的染色体进行杂交,然后进行突变...请在此步骤(选择步骤)中帮助我[/edit]

Hello!

I want to make a program that shows Capital Letter ( G ) with Genetic Algorithm
in C#.net2008...
I make array as down and consider it as target Array to check every chromosomes with it( target Array) , and then make 10 chromosomes , length of everyone is 36..

the program will excute As :
011110
010000
010000
010110
011110

Here we will note G letter in this Array where it will be "1" when G line passes and "0" when G line doesn''t pass.

Please, can anyone can help me?

Thank you in advance.....


[edit]ya!..but i don''t want like star..etc. i don''t chang when ''1''
I make a function for Initialpopluation,Generation and Fitness, Now I try to find an idea to Select the Best Chromosomes to Crossover and Then make Mutation...please help me in this step ( Selection step)[/edit]

推荐答案

这是基本的文本打印.根据字符块中的行数和列数,在看到零的位置不执行任何操作,在看到1的位置执行任何操作(点,星形,正方形,像素等).
This is basic text printing. Where you see a zero do nothing, where you see a 1 display something (dot, star, square, pixel etc), based on the number of rows and columns in your character block.


这篇关于如何制作显示"G"的程序.在C#.NET中使用遗传算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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