<?xml version="1.0" encoding="gb2312"?>

<!-- RSS generated by oioj.net on 4/16/2004 ; 感谢LeXRus提供 RSS 2.0 文档; 此文件可自由使用，但请保留此行信息 --> 
<!-- Source download URL: http://blogger.org.cn/blog/rss2.asp       -->
<rss version="2.0">

<channel>
<title>前进脚印</title>
<link>http://blogger.org.cn/blog/blog.asp?name=netjian</link>
<description>开花的芝麻的博客</description>
<copyright>blogger.org.cn</copyright>
<generator>W3CHINA Blog</generator>
<webMaster>webmaster@blogger.org.cn</webMaster>
<item>
<title><![CDATA[A Travel On Hua-Mount]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=33278</link>
<author>netjian</author>
<pubDate>2008/3/31 22:39:23</pubDate>
<description><![CDATA[<P>The day before yesterday,My girlfriend and her close friend and me,have been to Hua-Mount.</P>
<P>&nbsp;&nbsp;Hua-Mount is the West-Yue of Five-Yue of China.It is famous for its danger.Its highest peak is the south top,of the hight 2160 metres.And&nbsp;it is almost covered with stone everywhere.</P>
<P>&nbsp; </P>]]></description>
</item><item>
<title><![CDATA[LaTeX常用功能]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=32608</link>
<author>netjian</author>
<pubDate>2008/3/19 15:56:22</pubDate>
<description><![CDATA[
<H2><A title="Permanent Link: LaTeX常用功能" href="http://latex.yo2.cn/articles/latex-learning-1.html" rel=bookmark>LaTeX常用功能</A></H2>
<DIV class=entry>
<P><FONT size=4>1. 段首缩进</FONT></P>
<P>中文习惯在段首缩进两格，在<A href="http://latex.yo2.cn/" target=_blank><FONT color=#0066cc>LaTeX</FONT></A>中，<FONT face="Courier New" color=#0000ff>\parindent</FONT> 表示段首缩进的长度，我们将它设置为当前字号的两个大写字母<FONT face=Georgia color=#a52a2a>M</FONT>的宽度，大约正好是两个汉字的宽度：</P>
<P><FONT face="Courier New"><FONT color=#0000ff>\setlength</FONT>{<FONT color=#0000ff>\parindent</FONT>}{<FONT color=#ffa500>2em</FONT>}</FONT></P>
<P>LaTeX 默认每节的第一段的段首不缩进，这不符合中文排版习惯。我们希望正文的每一段都要缩进，使用<FONT face="Courier New" color=#a52a2a>indentfirst</FONT>宏包就可办到：</P>
<P><FONT face="Courier New"><FONT color=#0000ff>\usepackage</FONT>{<FONT color=#ffa500>indentfirst</FONT>}</FONT></P>
<P><FONT size=4>2. 段距行距</FONT></P>
<P>LaTeX 用<FONT face="Courier New" color=#0000ff>\baselineskip</FONT>表示当前的行距，其默认值大约是当前字号的1.2倍，如果当前字号是<FONT face=Georgia color=#a52a2a>10pt</FONT>，那么<FONT face="Courier New" color=#0000ff>\baselineskip</FONT>是<FONT face=Georgia color=#a52a2a>12pt</FONT>。这对英文排版是合适的，对中文就显得太拥挤了，因为英文正文多为小写字母，字高与小写的<FONT face=Georgia color=#a52a2a>x</FONT>差不多（即<FONT face=Georgia color=#a52a2a>1ex</FONT>）。如果字号为<FONT face=Georgia color=#a52a2a>10pt</FONT>，那么<FONT face=Georgia color=#a52a2a>1ex</FONT> =<FONT face=Georgia color=#a52a2a>4.3pt</FONT>。我通常把行距设为字号的1.8倍：</P>
<P><FONT face="Courier New"><FONT color=#0000ff>\setlength</FONT>{<FONT color=#0000ff>\baselineskip</FONT>}{<FONT color=#ffa500>1.8em</FONT>}</FONT></P>
<P>这个值随时可以改，对更改点以后的文字有效。</P>
<P>LaTeX 用<FONT face="Courier New" color=#0000ff>\parskip</FONT>表示段距，我一般把它设为<FONT face=Georgia color=#a52a2a>1ex</FONT>：</P>
<P><FONT face="Courier New"><FONT color=#0000ff>\setlength</FONT>{<FONT color=#0000ff>\parskip</FONT>}{<FONT color=#ffa500>1ex</FONT>}</FONT></P>
<P>注意这些修改长度的命令最好都放在正文区（即<FONT face="Courier New" color=#0000ff>\begin{document}</FONT>之后）。</P>
<P><FONT size=4>3. 页眉页脚</FONT></P>
<P>我通常用<FONT face="Courier New" color=#a52a2a>fancyhdr</FONT>宏包来设置页眉和页脚。</P>
<P><FONT face="Courier New"><FONT color=#0000ff><FONT color=#000000 size=2>\documentclass[10pt, a4paper]{book}</FONT><BR>\usepackage</FONT>{<FONT color=#ffa500>fancyhdr</FONT>}</FONT></P>
<P>我们在 <A href="http://latex.yo2.cn/" target=_blank><FONT color=#0066cc>LaTeX</FONT></A> 中先把 page style 设为<FONT face="Courier New" color=#a52a2a>fancy</FONT>，再设置这个style中的页眉和页脚。但是它默认每章的第一页的page style是<FONT face="Courier New" color=#a52a2a>plain</FONT>，需要单独处理。</P>
<P><FONT face="Courier New"><FONT color=#0000ff><FONT color=#008000>% 设置 plain style 的属性<BR></FONT></FONT></FONT><FONT face="Courier New"><FONT color=#0000ff>\fancypagestyle</FONT>{<FONT color=#ffa500>plain</FONT>}{<FONT color=#008000>%</FONT><BR><FONT color=#0000ff>\fancyhf</FONT>{} <FONT color=#008000>% 清空当前设置</FONT></FONT></P>
<P><FONT face="Courier New"><FONT color=#008000>% 设置页眉 (head)</FONT></FONT><FONT face="Courier New"><BR><FONT color=#0000ff>\fancyhead</FONT>[RE]{<FONT color=#0000ff>\leftmark</FONT>} <FONT color=#008000>% 在偶数页的右侧显示章名<BR></FONT><FONT color=#0000ff>\fancyhead</FONT>[LO]{<FONT color=#0000ff>\rightmark</FONT>} <FONT color=#008000>% 在奇数页的左侧显示小节名<BR></FONT><FONT color=#0000ff>\fancyhead</FONT>[LE,RO]{~<FONT color=#ffa500>\thepage</FONT>~} <FONT color=#008000>% 在偶数页的左侧，奇数页的右侧显示页码</FONT></FONT></P>
<P><FONT face="Courier New"><FONT color=#008000>% 设置页脚：</FONT><FONT color=#000000><FONT color=#008000>在每页的右下脚以斜体显示书名<BR></FONT><FONT color=#0000ff>\fancyfoot</FONT>[RO,RE]{<FONT color=#ff0000>\it</FONT> Typesetting with <FONT color=#0000ff>\LaTeX</FONT>}</FONT></FONT></P>
<P><FONT face="Courier New"><FONT color=#000000><FONT color=#0000ff>\renewcommand</FONT>{<FONT color=#0000ff>\headrulewidth</FONT>}{<FONT color=#ffa500>0.7pt</FONT>} <FONT color=#008000>% 页眉与正文之间的水平线粗细</FONT><BR><FONT color=#0000ff>\renewcommand</FONT>{<FONT color=#0000ff>\footrulewidth</FONT>}{<FONT color=#ffa500>0pt</FONT>}<BR>}</FONT></FONT></P>
<P><FONT face="Courier New">\pagestyle{fancy} <FONT color=#008000>% 选用 fancy style<BR>% 其余同 plain style</FONT><BR>\fancyhf{}<BR>\fancyhead[RE]{\leftmark}<BR>\fancyhead[LO]{\rightmark}<BR>\fancyhead[LE,RO]{~\thepage~}<BR>\fancyfoot[RO,RE]{<FONT color=#ff0000>\it</FONT> Typesetting with <FONT color=#0000ff>\LaTeX</FONT>}<BR>\renewcommand{\headrulewidth}{0.7pt}<BR>\renewcommand{\footrulewidth}{0pt}<BR></FONT><FONT face="Courier New"><BR><FONT color=#008000>% 设置章名和节名的显示方式</FONT><BR><FONT color=#0000ff>\renewcommand</FONT>{<FONT color=#ff0000>\chaptermark</FONT>}[1]{<FONT color=#0000ff>\markboth</FONT>{~第~<FONT color=#ffa500>\thechapter</FONT>~章~~~#1~}{}}<BR><FONT color=#0000ff>\renewcommand</FONT>{<FONT color=#ff0000>\sectionmark</FONT>}[1]{<FONT color=#0000ff>\markright</FONT>{~<FONT color=#ffa500>\thesection</FONT><FONT color=#000000>~~</FONT>#1~}{}}</FONT></P>
<P><FONT size=4>4. 章节标题</FONT></P>
<P>我通常用<FONT face="Courier New" color=#a52a2a>titlesec</FONT>宏包来设置正文中出现的章节标题的格式：</P>
<P><FONT face="Courier New"><FONT color=#0000ff>\usepackage</FONT>{<FONT color=#ffa500>titlesec</FONT>}</FONT></P>
<P>设置章名为右对齐，字号为<FONT face="Courier New" color=#0000ff>\Huge</FONT>，字型为黑体，章号用粗体，并设置间距：</P>
<P><FONT face="Courier New">\titleformat{\chapter}{\flushright\Huge\hei}{{\bf \thechapter}}{0pt}{}<BR>\titlespacing{\chapter}{0pt}{-20pt}{25pt}</FONT></P>
<P>设置节名的字号为<FONT face="Courier New" color=#0000ff>\Large</FONT>，字型为黑体，节号用粗体，并设置间距：</P>
<P><FONT face="Courier New">\titleformat{\section}{\Large \hei }{{\bf \thesection\space}}{0pt}{}<BR>\titlespacing*{\section}{0pt}{1ex plus .3ex minus .2ex}{-.2ex plus .2ex}</FONT></P>
<P><FONT face="Courier New">其中<FONT color=#0000ff>\hei</FONT>的定义为：</FONT></P>
<P><FONT face="Courier New"><FONT color=#0000ff>\newcommand</FONT>{<FONT color=#0000ff>\hei</FONT>}{<FONT color=#0000ff>\CJKfamily</FONT>{hei}}</FONT></P>
<P><FONT size=4>5. 纸张大小</FONT></P>
<P>毕业论文要求用b5纸，单面打印，我用<FONT face="Courier New" color=#a52a2a>geometry</FONT>宏包来设置纸张和版心大小：</P>
<P><FONT face="Courier New">\documentclass[10pt, b5paper]{report}<BR>\usepackage[body={12.6cm, 20cm}, centering, dvipdfm]{geometry}<BR><FONT color=#008000>% 以上将版心宽度设为 12.6cm，高度 20cm，版心居中，且自动设置PDF文件的纸张大小。</FONT></FONT></P></DIV>]]></description>
</item><item>
<title><![CDATA[Latex简单笔记]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=32607</link>
<author>netjian</author>
<pubDate>2008/3/19 15:51:32</pubDate>
<description><![CDATA[<FONT size=2>每个文件必须要用一些这样的格式包含： <BR>documentstyle{ article } %也可以采用documentclass命令，文档风格，article, book, report, or letter。 <BR>usepackage{ CJK } %使用CJK宏包，使得可以处理汉字。 <BR>begin{ CJK }{ GBK }{ song } %字体可以选择song, kai, hei, you, li。 <BR>begin{ document } <BR>... <BR>... %这里是内容。 <BR>... <BR>end{ CJK } <BR>end{ document } %注意这里的end顺序有些特别，先end CJK后end document，其他的则是按照程序对应的包含形式。 <BR><BR>将编写好的文件按gb2312编码保存为后缀为tex的文件，然后在terminal里进到文件所在目录，执行 <BR>latex file.tex <BR>就会编译出file.dvi文件，同时还会出现aux,log等一些文件，然后可以用xdvi查看效果 <BR>xdvi file.dvi <BR>(这些命令执行时 可以不输入文件的后缀，比如 xdvi file) <BR>如果满意，可以将其输出为pdf文件： <BR>dvipdfm file <BR>则生成file.pdf文件。 <BR><BR>$ &amp; % # _ { }等特殊符号的输入是在这些符号前加上backslash，呵呵也就是 ，这点是反常滴~~，通常，latex的命令是以开始的。 <BR>“......”的输入，是用两个`代替“，两个 ‘ 代替” <BR><BR>具体的一些Multilingual Symbols就看一些参看书吧，用时就查，方便。真的记起来倒不是很方便。 <BR><BR>默认latex会忽略多余的空格，如果想多几个空格，可以使用 (space), 比如想增加三个空格就是 ,注意每个后面有个空格。更方便的确定增加间距可以使用 <BR>hspace{ xxmm } <BR>其中的距离单位mm可以换成cm, em, in, pc, pt. <BR><BR>文字可以用hfill命令排列在两边，如： <BR>the left hfill and right <BR><BR>竖直方向增加间距可以用 <BR>vspace{ xxmm } <BR>选项同hspace <BR><BR>格式环境： <BR>居中对齐： <BR>begin{ center } <BR>... <BR>end{ center } <BR>左对齐： <BR>begin{ flushleft } <BR>... <BR>end{ flushleft } <BR>右对齐： <BR>begin{ flushright } <BR>... <BR>end{ flushright } <BR><BR>项目符号： <BR>begin{ itemize } <BR>item .... <BR>item .... <BR>.... ... <BR>end{ itemize } <BR><BR>带序号列表： <BR>begin{ enumerate } <BR>item ... <BR>item ... <BR>... .... <BR>end{ enumerate } <BR>这可以产生这样的格式： <BR>1.Especially for authors <BR>(a)The author prepares and sub <BR>(b)... <BR>2. ............. <BR>(a)........ <BR>(b)......... <BR>i.... <BR>A........ <BR>B........ <BR>(c)........... <BR>3................ <BR><BR>描述列表： <BR>begin{ description } <BR>item[title1] ... <BR>item[title2] ... <BR>... <BR>end{ description } <BR><BR>另外还有引用环境，“Quote"和"Quotation”，不同之处是前者首行缩进，后者不是。 <BR>begin{ quote } <BR>... <BR>end{ quote } <BR>begin{ quotation } <BR>... <BR>end{ quotation } <BR><BR>诗体环境，"Verse" Environment <BR>begin{ verse } <BR>... <BR>end{ verse } <BR><BR>直接输入环境,”Verbatim" Environment <BR>在此环境中，输入的均当作字符原样输出，不作转换 <BR>begin{ verbatim } <BR>.... <BR>end{ verbatim } <BR><BR>仅需要某一段直输环境时可以用 <BR>verb|××××××| <BR>其中×××××为要直接输入的内容，输出时不作转换。 <BR><BR>改变字体 <BR>rm roman <BR>bf boldface <BR>it italic <BR>sc small caps <BR>sf sans serif <BR>sl slanted,斜体 <BR>tt typewriter <BR>em emphasized <BR>这些仅适用于英文。 <BR><BR>字体大小：由小到大 <BR>tiny scriptsize footnotesize small normalsize large Large huge Huge <BR>比如粗体加重：Some { largebf very important advice } is dots <BR><BR>公式编辑： <BR><BR>行输入公式环境， <BR>可以用$****$建立公式环境，****为要输入内容。可以采用的格式为： <BR>$ $ <BR>( ) <BR>begin{ math } end{ math } <BR><BR>显示公式环境：（单独居中显示） <BR>$$ $$ <BR>[ ] <BR>begin{ displaymath } end{ displaymath } <BR><BR>等式环境：（居中单独显示，并在右侧显示公式序号） <BR>begin{ equation } end{ equation } <BR><BR>简单的一些例子： <BR>x2 $x^2$ <BR>x2y3 $x^{ 2 }y_{ 3 }$ <BR>3/4 $3/4$ <BR>(2/9)*15.4 $(2/9)*15.4$ <BR>x=(y^3+z/5)/(y^2+ [x=frac{ y^{ 3 }+z/5 }{ y^{ 2 }+8 } ] <BR><BR>根号2 $sqrt{ 2 }$ <BR>3的n次方根 $sqrt[n]{ 3 }$ <BR>积分 int <BR>对数 log <BR>求和 sum</FONT>]]></description>
</item><item>
<title><![CDATA[ubuntu player]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=32388</link>
<author>netjian</author>
<pubDate>2008/3/12 17:47:31</pubDate>
<description><![CDATA[<a>在ubuntu7。04里面，Mplayer不能直接播放RMVB格式的视频了，所以要进行一下的操作，<br>安装所有的gstreamer0.10组件<br><br># sudo apt-get install gstreamer0.10-*<br><br>再安装一些能够播放DVD/RMVB的播放器，例如mplayer（我比较喜欢它）。播放rmvb需要安装libxine-extracodecs这个解码器，而且，默认的totem也无法播放，必须换成totem-xine才能正常播放，一起安装吧。<br><br># sudo apt-get install libxine-extracodecs mjpegtools ffmpeg lame faad sox mplayer libxine-main1 totem-xine<br><br>最后，安装 w32codecs，这个解码器支持几乎所有的Windows AVI 格式的影像。这个codecs没有源，无法用apt-get安装，自己下载deb包安装吧。<br><br># wget -c http://www.debian-multimedia.org/pool/main/w/w32codecs/w32codecs_20060611-0.0_i386.deb<br># sudo dpkg -i w32codecs_20060611-0.0_i386.deb<br><br>Over&amp;OK<br><br>这样本来就OK了，但是打开RM文件时会出现“Not audio/video stream or unsupported!”的提示，但是点击确定后还能正常播放，为了去掉这个讨厌的对话框，我们修改源文件(开源的优势，呵呵)。</a><p>用任一文本编辑器(如kedit，gedit)打开MPlayer源代码目录下的demux_real.c文件：<br> MPlayer-1.0pre3/libmpdemux/demux_real.c</p><p>在第1298行代码前加上//以注释掉这行代码。(注：对应MPlayer1.0pre3版本。其他版本可能行数不同，但基本信息一样)。保存后退出。代码具体内容如下：</p><p>//mp_msg(MSGT_DEMUX, MSGL_ERR, "Not audio/video stream or unsupported!\n");</p>]]></description>
</item><item>
<title><![CDATA[怎样在英文环境下使用中文输入法]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=32387</link>
<author>netjian</author>
<pubDate>2008/3/12 17:21:23</pubDate>
<description><![CDATA[
			<small> </small>

			
				<p>很多人喜欢在英文环境下工作，在 Ubuntu 的英文环境下怎样调用中文输入法呢？下面介绍两种主流输入法的调用方法，前提是已经安装好了，并在其他语言环境下能正常使用。</p>
<p>1、如果使用 SCIM 输入法，很简单，直接在终端里执行下面一句即可 (<a href="http://bemike.org/blog/2007/06/19/make-scim-better-handle-chinese.html">via</a>)：</p>
<p><code>sudo im-switch -z en_US -s scim</code></p>
<p>2、如果使用 fcitx 就要麻烦一点了，方法参考<a href="http://forum.ubuntu.org.cn/viewtopic.php?t=33401">这里</a>。</p>
<p>首先：<br>
<code>im-switch -s fcitx</code></p>
<p>然后：<br>
<code>sudo gedit /etc/gtk-2.0/gtk.immodules</code></p>
<p>找到：<br>
<code>"xim" "X Input Method" "gtk20" "/usr/share/locale" "ko:ja:th:zh" </code></p>
<p>修改为：<br>
<code>"xim" "X Input Method" "gtk20" "/usr/share/locale" "en:ko:ja:th:zh"</code></p>]]></description>
</item><item>
<title><![CDATA[UBUNTU]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=32386</link>
<author>netjian</author>
<pubDate>2008/3/12 17:09:26</pubDate>
<description><![CDATA[<p>1、添加 Eye Candy 软件库
</p><p><code>sudo gedit /etc/apt/sources.list</code></p><p>2、更新系统：</p>
<p><code>sudo apt-get update<br>
sudo apt-get dist-upgrade</code></p>]]></description>
</item><item>
<title><![CDATA[如何在latex中输出中文]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=32371</link>
<author>netjian</author>
<pubDate>2008/3/12 9:28:16</pubDate>
<description><![CDATA[
<DIV>最近在学习latex，尤其是看了"iamwym"大侠的<A class=contentlink href="http://www.ieee.org.cn/dispbbs.asp?boardID=64&amp;ID=59694" target=_blank><FONT color=#000050>留言</FONT></A>之后，更觉得有必要把这个和大家来分享一下。 
<P></P>
<P>前阵子想用latex写点东西，却发现输入中文无法通过编译，无奈，在网上google了很多方法，颇显繁琐。经过个人筛选与尝试，我觉得以下这种方法最为简单快捷，贴出来和大家分享。</P>
<P>安装：<BR>1.CTex<BR>2.CTeX-Fonts<BR>&nbsp;&nbsp;---我用的都是2.4版本</P>
<P>然后只需要在导言区添加\usepackage{CJK}，在使用中文字体时添加\begin{CJK*}{GBK}{字体}即可。见如下示例：</P>
<P><BR>\documentclass[a4paper,11pt]{article}<BR>\usepackage{CJK}<BR>\begin{document}<BR>\begin{CJK*}{GBK}{song}<BR>我是中国人，我用中国字<BR>\end{CJK*}<BR>\end{document}</P>
<P>祝大家latex得开心。</P>
<P></P></DIV>]]></description>
</item><item>
<title><![CDATA[本学期学习任务]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=32361</link>
<author>netjian</author>
<pubDate>2008/3/11 18:50:22</pubDate>
<description><![CDATA[<IMG style="BORDER-LEFT-COLOR: #000000; BORDER-BOTTOM-COLOR: #000000; BORDER-TOP-COLOR: #000000; BORDER-RIGHT-COLOR: #000000" alt=这个学期的学习计划 src="http://blogger.org.cn/blog/uploadfile/200831118531365.JPG" border=0>]]></description>
</item><item>
<title><![CDATA[学习工作终于回到了正规]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=32360</link>
<author>netjian</author>
<pubDate>2008/3/11 18:06:29</pubDate>
<description><![CDATA[<P>开学有一段时间了，虽然做了一个详细周全的学习计划，但是学习工作并没有完全按照这个计划执行，而且，也发现执行起来有一定的问题。时间安排过紧，没有太多的精力去处理另外一些必要的事情。</P>
<P>&nbsp; 这个学期其实很轻松的，只有一个毕业论文要做。但是，对于我自己的心结，始终都是该奋斗的。其实大部分时间都在猛啃数学和英语。对于科研，这都是最基础的内功心法了。</P>
<P>&nbsp; 论文托给老王，终于发了，希望能够当一点个人的筹码。看了abel和隽哥的简历，有点想落泪的感觉。落后别人太大一截了，得赶紧反省弥补自己。</P>
<P>&nbsp;&nbsp;下了个MIT的&lt;introduction to algorithms&gt;,全套，非常不错。准备刻盘收藏了。经典的东西，很值得细细品味。现在有空即泡在数学里，概率，数论，离散，都需要扎实的基础，不可以马虎而过。</P>
<P>&nbsp;&nbsp;毕了，给自己打气，加油！</P>]]></description>
</item><item>
<title><![CDATA[遗传算法]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=31806</link>
<author>netjian</author>
<pubDate>2008/2/14 23:00:17</pubDate>
<description><![CDATA[
<DIV class=titord><SPAN class=t1><A name=1></A>遗传算法定义</SPAN></DIV><B></B><BR><B>遗传算法（Genetic Algorithm</I>）</B>是模拟达尔文的遗传选择和自然淘汰的生物进化过程的计算模型，是一种通过模拟自然进化过程搜索最优解的方法，它是有美国Michigan大学J.Holland教授于1975年首先提出来的，并出版了颇有影响的专著《Adaptation in Natural and Artificial Systems》，GA这个名称才逐渐为人所知，J.Hilland教授所提出的GA通常为简单遗传算法（SGA）。<BR>遗传算法是从代表问题可能潜在的解集的一个种群（population）开始的，而一个种群则由经过基因（gene）编码的一定数目的个体(individual)组成。每个个体实际上是染色体(chromosome)带有特征的实体。染色体作为遗传物质的主要载体，即多个基因的集合，其内部表现（即基因型）是某种基因组合，它决定了个体的形状的外部表现，如黑头发的特征是由染色体中控制这一特征的某种基因组合决定的。因此，在一开始需要实现从表现型到基因型的映射即编码工作。由于仿照基因编码的工作很复杂，我们往往进行简化，如二进制编码，初代种群产生之后，按照适者生存和优胜劣汰的原理，逐代（generation）演化产生出越来越好的近似解，在每一代，根据问题域中个体的适应度（fitness）大小挑选（selection）个体，并借助于自然遗传学的遗传算子（genetic operators）进行组合交叉（crossover）和变异（mutation），产生出代表新的解集的种群。这个过程将导致种群像自然进化一样的后生代种群比前代更加适应于环境，末代种群中的最优个体经过解码（decoding），可以作为问题近似最优解。<BR>
<DIV class=titord><SPAN class=arr><A title=返回页首 href="http://baike.baidu.com/view/45853.htm#"></A></SPAN><SPAN class=t1><A name=2></A><STRONG>遗传算法特点</STRONG></SPAN></DIV>遗传算法是一类可用于复杂系统优化的具有鲁棒性的搜索算法，与传统的优化算法相比，主要有以下特点：<BR>1、 遗传算法以决策变量的编码作为运算对象。传统的优化算法往往直接决策变量的实际植本身，而遗传算法处理决策变量的某种编码形式，使得我们可以借鉴生物学中的染色体和基因的概念，可以模仿自然界生物的遗传和进化机理，也使得我们能够方便的应用遗传操作算子。<BR>2、 遗传算法直接以适应度作为搜索信息，无需导数等其它辅助信息。<BR>3、 遗传算法使用多个点的搜索信息，具有隐含并行性。<BR>4、 遗传算法使用概率搜索技术，而非确定性规则。<BR><BR><BR>
<DIV class=titord><SPAN class=arr><A title=返回页首 href="http://baike.baidu.com/view/45853.htm#"></A></SPAN><SPAN class=t1><A name=3></A><STRONG>遗传算法的应用</STRONG></SPAN></DIV>由于遗传算法的整体搜索策略和优化搜索方法在计算是不依赖于梯度信息或其它辅助知识，而只需要影响搜索方向的目标函数和相应的适应度函数，所以遗传算法提供了一种求解复杂系统问题的通用框架，它不依赖于问题的具体领域，对问题的种类有很强的鲁棒性，所以广泛应用于许多科学，下面我们将介绍遗传算法的一些主要应用领域：<BR>1、 函数优化。<BR>函数优化是遗传算法的经典应用领域，也是遗传算法进行性能评价的常用算例，许多人构造出了各种各样复杂形式的测试函数：连续函数和离散函数、凸函数和凹函数、低维函数和高维函数、单峰函数和多峰函数等。对于一些非线性、多模型、多目标的函数优化问题，用其它优化方法较难求解，而遗传算法可以方便的得到较好的结果。<BR>2、 组合优化<BR>随着问题规模的增大，组合优化问题的搜索空间也急剧增大，有时在目前的计算上用枚举法很难求出最优解。对这类复杂的问题，人们已经意识到应把主要精力放在寻求满意解上，而遗传算法是寻求这种满意解的最佳工具之一。实践证明，遗传算法对于组合优化中的NP问题非常有效。例如遗传算法已经在求解旅行商问题、 背包问题、装箱问题、图形划分问题等方面得到成功的应用。<BR>此外，GA也在生产调度问题、自动控制、机器人学、图象处理、人工生命、遗传编码和机器学习等方面获得了广泛的运用。<BR><BR>
<DIV class=titord><SPAN class=arr><A title=返回页首 href="http://baike.baidu.com/view/45853.htm#"></A></SPAN><SPAN class=t1><A name=4></A><STRONG>遗传算法的现状</STRONG></SPAN></DIV>进入90年代，遗传算法迎来了兴盛发展时期，无论是理论研究还是应用研究都成了十分热门的课题。尤其是遗传算法的应用研究显得格外活跃，不但它的应用领域扩大，而且利用遗传算法进行优化和规则学习的能力也显著提高，同时产业应用方面的研究也在摸索之中。此外一些新的理论和方法在应用研究中亦得到了迅速的发展，这些无疑均给遗传算法增添了新的活力。遗传算法的应用研究已从初期的组合优化求解扩展到了许多更新、更工程化的应用方面。<BR>随着应用领域的扩展，遗传算法的研究出现了几个引人注目的新动向：一是基于遗传算法的机器学习，这一新的研究课题把遗传算法从历来离散的搜索空间的优化搜索算法扩展到具有独特的规则生成功能的崭新的机器学习算法。这一新的学习机制对于解决人工智能中知识获取和知识优化精炼的瓶颈难题带来了希望。二是遗传算法正日益和神经网络、模糊推理以及混沌理论等其它智能计算方法相互渗透和结合，这对开拓21世纪中新的智能计算技术将具有重要的意义。三是并行处理的遗传算法的研究十分活跃。这一研究不仅对遗传算法本身的发展，而且对于新一代智能计算机体系结构的研究都是十分重要的。四是遗传算法和另一个称为人工生命的崭新研究领域正不断渗透。所谓人工生命即是用计算机模拟自然界丰富多彩的生命现象，其中生物的自适应、进化和免疫等现象是人工生命的重要研究对象，而遗传算法在这方面将会发挥一定的作用，五是遗传算法和进化规划（Evolution Programming,EP）以及进化策略（Evolution Strategy,ES）等进化计算理论日益结合。EP和ES几乎是和遗传算法同时独立发展起来的，同遗传算法一样，它们也是模拟自然界生物进化机制的只能计算方法，即同遗传算法具有相同之处，也有各自的特点。目前，这三者之间的比较研究和彼此结合的探讨正形成热点。<BR>1991年D.Whitey在他的论文中提出了基于领域交叉的交叉算子（Adjacency based crossover），这个算子是特别针对用序号表示基因的个体的交叉，并将其应用到了TSP问题中，通过实验对其进行了验证。<BR>D.H.Ackley等提出了随即迭代遗传爬山法（Stochastic Iterated Genetic Hill-climbing，SIGH）采用了一种复杂的概率选举机制，此机制中由m个“投票者”来共同决定新个体的值（m表示群体的大小）。实验结果表明，SIGH与单点交叉、均匀交叉的神经遗传算法相比，所测试的六个函数中有四个表现出更好的性能，而且总体来讲，SIGH比现存的许多算法在求解速度方面更有竞争力。<BR>H.Bersini和G.Seront将遗传算法与单一方法（simplex method）结合起来，形成了一种叫单一操作的多亲交叉算子（simplex crossover），该算子在根据两个母体以及一个额外的个体产生新个体，事实上他的交叉结果与对三个个体用选举交叉产生的结果一致。同时，文献还将三者交叉算子与点交叉、均匀交叉做了比较，结果表明，三这交叉算子比其余两个有更好的性能。<BR>国内也有不少的专家和学者对遗传算法的交叉算子进行改进。2002年，戴晓明等应用多种群遗传并行进化的思想，对不同种群基于不同的遗传策略，如变异概率，不同的变异算子等来搜索变量空间，并利用种群间迁移算子来进行遗传信息交流，以解决经典遗传算法的收敛到局部最优值问题<BR>2004年，赵宏立等针对简单遗传算法在较大规模组合优化问题上搜索效率不高的现象，提出了一种用基因块编码的并行遗传算法（Building-block Coded Parallel GA，BCPGA）。该方法以粗粒度并行遗传算法为基本框架，在染色体群体中识别出可能的基因块，然后用基因块作为新的基因单位对染色体重新编码，产生长度较短的染色体，在用重新编码的染色体群体作为下一轮以相同方式演化的初始群体。<BR>2005年，江雷等针对并行遗传算法求解TSP问题,探讨了使用弹性策略来维持群体的多样性,使得算法跨过局部收敛的障碍,向全局最优解方向进化。<BR><BR>
<DIV class=titord><SPAN class=arr><A title=返回页首 href="http://baike.baidu.com/view/45853.htm#"></A></SPAN><SPAN class=t1><A name=5></A><STRONG>遗传算法的一般算法</STRONG></SPAN></DIV>遗传算法是基于生物学的，理解或编程都不太难。下面是遗传算法的一般算法：<BR><BR><B>创建一个随机的初始状态</B><BR><BR>初始种群是从解中随机选择出来的，将这些解比喻为染色体或基因，该种群被称为第一代，这和符号人工智能系统的情况不一样，在那里问题的初始状态已经给定了。<BR><BR><B>评估适应度</B><BR><BR>对每一个解(染色体)指定一个适应度的值，根据问题求解的实际接近程度来指定(以便逼近求解问题的答案)。不要把这些“解”与问题的“答案”混为一谈，可以把它理解成为要得到答案，系统可能需要利用的那些特性。<BR><BR><B>繁殖(包括子代突变)</B><BR><BR>带有较高适应度值的那些染色体更可能产生后代(后代产生后也将发生突变)。后代是父母的产物，他们由来自父母的基因结合而成，这个过程被称为“杂交”。<BR><BR><B>下一代<BR></B><BR>如果新的一代包含一个解，能产生一个充分接近或等于期望答案的输出，那么问题就已经解决了。如果情况并非如此，新的一代将重复他们父母所进行的繁衍过程，一代一代演化下去，直到达到期望的解为止。<BR><BR><B>并行计算<BR></B><BR>非常容易将遗传算法用到并行计算和群集环境中。一种方法是直接把每个节点当成一个并行的种群看待。然后有机体根据不同的繁殖方法从一个节点迁移到另一个节点。另一种方法是“农场主/劳工”体系结构，指定一个节点为“农场主”节点，负责选择有机体和分派适应度的值，另外的节点作为“劳工”节点，负责重新组合、变异和适应度函数的评估。<BR><BR><BR>
<DIV class=titord><SPAN class=arr><A title=返回页首 href="http://baike.baidu.com/view/45853.htm#"></A></SPAN><SPAN class=t1><A name=6></A><STRONG>遗传算法实例</STRONG></SPAN></DIV><BR>---------来个例子，大家好理解------------<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 基于遗传算法的人工生命模拟 <BR>#include&lt;stdio.h&gt;<BR>#include&lt;stdlib.h&gt;<BR>#include&lt;graphics.h&gt;<BR>#include&lt;math.h&gt;<BR>#include&lt;time.h&gt;<BR>#include&lt;string.h&gt;<BR>#include "graph.c"<BR>/* 宏定义 */<BR>#define TL1&nbsp; &nbsp;&nbsp; &nbsp;20&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 植物性食物限制时间 */<BR>#define TL2&nbsp; &nbsp;&nbsp; &nbsp;5&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 动物性食物限制时间 */<BR>#define NEWFOODS 3&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 植物性食物每代生成数目&nbsp;&nbsp;*/<BR>#define MUTATION 0.05&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 变异概率&nbsp; &nbsp;&nbsp;&nbsp;*/<BR>#define G_LENGTH&nbsp;&nbsp;32&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 个体染色体长度&nbsp;&nbsp;*/<BR>#define MAX_POP&nbsp;&nbsp;100&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 个体总数的最大值&nbsp;&nbsp;*/<BR>#define MAX_FOOD 100&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 食物总数的最大值&nbsp;&nbsp;*/<BR>#define MAX_WX&nbsp; &nbsp; 60&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 虚拟环境的长度最大值 */<BR>#define MAX_WY&nbsp; &nbsp; 32&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 虚拟环境的宽度最大值 */<BR>#define SX1&nbsp; &nbsp;&nbsp; &nbsp;330&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 虚拟环境图左上角点x坐标&nbsp;&nbsp;*/<BR>#define SY1&nbsp; &nbsp;&nbsp; &nbsp;40&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 虚拟环境图左上角点y坐标&nbsp;&nbsp;*/<BR>#define GX&nbsp; &nbsp;&nbsp; &nbsp; 360&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 个体数进化图形窗口的左上角点X坐标&nbsp;&nbsp;*/<BR>#define GY&nbsp; &nbsp;&nbsp; &nbsp; 257&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 个体数进化图形窗口的左上角点Y坐标&nbsp;&nbsp;*/<BR>#define GXR&nbsp; &nbsp;&nbsp; &nbsp;250&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 个体数进化图形窗口的长度&nbsp; &nbsp; */<BR>#define GYR&nbsp; &nbsp;&nbsp; &nbsp;100&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 个体数进化图形窗口的宽度&nbsp; &nbsp; */<BR>#define GSTEP&nbsp; &nbsp;&nbsp;&nbsp;2&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 个体数进化图形窗口的X方向步长&nbsp; &nbsp; */<BR>#define R_LIFE&nbsp;&nbsp;0.05&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 初期产生生物数的环境比率 */<BR>#define R_FOOD&nbsp;&nbsp;0.02&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 初期产生食物数的环境比率 */<BR>#define SL_MIN&nbsp; &nbsp; 10&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 个体寿命最小值&nbsp; &nbsp;*/<BR>/* 全局变量 */<BR>unsigned&nbsp;&nbsp;char&nbsp;&nbsp;gene[MAX_POP][G_LENGTH];&nbsp; &nbsp;&nbsp;&nbsp;/* 遗传基因&nbsp; &nbsp;&nbsp; &nbsp;*/<BR>unsigned&nbsp;&nbsp;char&nbsp;&nbsp;iflg[MAX_POP];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 个体死活状态标志变量&nbsp;&nbsp;*/<BR>unsigned&nbsp;&nbsp;char&nbsp;&nbsp;fflg[MAX_FOOD];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 食物有无状态标志变量&nbsp;&nbsp;*/<BR>unsigned&nbsp;&nbsp;char&nbsp;&nbsp;world[MAX_WX][MAX_WY];&nbsp; &nbsp;&nbsp; &nbsp; /* 虚拟环境的数据&nbsp; &nbsp; */<BR>unsigned char&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 各中行为模式数据 */<BR>life1[5][5]={{0,0,1,0,0},{0,1,0,1,0},{1,0,0,0,1},{0,1,0,1,0},{0,0,1,0,0}};<BR>unsigned char<BR>life2[5][5]={{1,1,1,1,1},{1,0,0,0,1},{1,0,0,0,1},{1,0,0,0,1},{1,1,1,1,1}};<BR>unsigned char<BR>food1[5][5]={{0,0,0,1,0},{0,0,1,1,0},{0,1,0,1,0},{0,0,1,1,0},{0,0,0,1,0}};<BR>unsigned char<BR>food2[5][5]={{0,0,0,1,0},{0,0,1,1,0},{0,1,1,1,0},{0,0,1,1,0},{0,0,0,1,0}};<BR>int pop_size;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 个体总数&nbsp; &nbsp;*/<BR>int iatr[MAX_POP][4];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 个体属性&nbsp; &nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* iatr[][0]&nbsp;&nbsp;个体当前位置x坐标&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* iatr[][1]&nbsp;&nbsp;个体当前位置y坐标&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* iatr[][2]&nbsp;&nbsp;内部能量&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* iatr[][3]&nbsp;&nbsp;年龄属性&nbsp;&nbsp;*/<BR>int food_size;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 食物总数&nbsp;&nbsp;*/<BR>int fatr[MAX_FOOD][4];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 食物属性&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* fatr[][0]&nbsp;&nbsp;食物当前位置x坐标&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* fatr[][1]&nbsp;&nbsp;食物当前位置y坐标&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* fatr[][2]=0 : 植物性 =1:动物性 */<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* fatr[][3]&nbsp;&nbsp;新鲜程度&nbsp; &nbsp; */<BR>int wx,wy;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 虚拟环境的长宽度&nbsp;&nbsp;*/<BR><BR>void uni_crossover(gene,g1,g2,g3,ratio1,g_length)&nbsp; &nbsp; /* 均匀交叉 */<BR>unsigned char *gene;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 遗传基因 */<BR>int g1,g2,g3;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* g1 g2 父个体编号&nbsp;&nbsp;g3 子个体编号&nbsp;&nbsp;*/<BR>double ratio1;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/*&nbsp;&nbsp;父个体g1被选中的概率&nbsp;&nbsp;*/<BR>int g_length;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 个体遗传基因的位长&nbsp;&nbsp;*/<BR>{<BR>&nbsp; &nbsp;unsigned char *gene1;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/*&nbsp;&nbsp;父1遗传基因的指针 */<BR>&nbsp; &nbsp;unsigned char *gene2;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/*&nbsp;&nbsp;父2遗传基因的指针 */<BR>&nbsp; &nbsp;unsigned char *gene3;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/*&nbsp;&nbsp;子遗传基因的指针 */<BR>&nbsp; &nbsp;double rnd,r1;<BR>&nbsp; &nbsp;int i;<BR>&nbsp; &nbsp;gene1=gene+g_length*g1;<BR>&nbsp; &nbsp;gene2=gene+g_length*g2;<BR>&nbsp; &nbsp;gene3=gene+g_length*g3;<BR>&nbsp; &nbsp;r1=(int)(10000.0*ratio1);<BR>&nbsp; &nbsp;for(i=0;i&lt;g_length;i++)<BR>&nbsp; &nbsp;{&nbsp;&nbsp;rnd=random(10000);<BR>&nbsp; &nbsp;&nbsp; &nbsp;if(rnd&lt;=r1)&nbsp; &nbsp; *(gene3+i)=*(gene1+i);<BR>&nbsp; &nbsp;&nbsp; &nbsp;else&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;*(gene3+i)=*(gene2+i);<BR>&nbsp; &nbsp;}<BR>}<BR><BR>void g_disp_unit(x,y,n) <BR>/* 绘制虚拟环境的一个单元&nbsp;&nbsp;*/<BR>int x,y;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* x=0,1,2....,wx-1;&nbsp; &nbsp;y=0,1,2,....,wy-1&nbsp;&nbsp;*/<BR>int n;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* n=0: =1: 生物1&nbsp;&nbsp;=2:生物2&nbsp; &nbsp;=3:植物性食物&nbsp;&nbsp;=4:障碍物&nbsp;&nbsp;=5:动物性食物 */<BR>{<BR>&nbsp; &nbsp;int gx,gy,i,j;<BR>&nbsp; &nbsp;unsigned char col;<BR>&nbsp; &nbsp;gx=SX1+5*x;gy=SY1+5*y;<BR>&nbsp; &nbsp;for(i=0;i&lt;5;i++)<BR>&nbsp; &nbsp;&nbsp;&nbsp;for(j=0;j&lt;5;j++)<BR>&nbsp; &nbsp;&nbsp;&nbsp;{&nbsp;&nbsp;switch(n)<BR>&nbsp; &nbsp;{ case 0: col=0;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; break;<BR>&nbsp; &nbsp;&nbsp;&nbsp;case 1: col=life1[j]&nbsp;&nbsp;[ i]*2; break;<BR>&nbsp; &nbsp;&nbsp;&nbsp;case 2: col=life2[j]&nbsp;&nbsp;[ i]*4; break;<BR>&nbsp; &nbsp;&nbsp;&nbsp;case 3: col=food1[j]&nbsp;&nbsp;[ i]*6; break;<BR>&nbsp; &nbsp;&nbsp;&nbsp;case 4: col=7;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; break;<BR>&nbsp; &nbsp;&nbsp;&nbsp;case 5: col=food2[j]&nbsp;&nbsp;[ i]*11;<BR>&nbsp; &nbsp; }<BR>&nbsp;&nbsp;g_pset(gx+j,gy+i,col);<BR>&nbsp; &nbsp;&nbsp; &nbsp; }<BR>&nbsp; &nbsp;}<BR><BR>void g_draw_world()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 显示虚拟环境画面&nbsp;&nbsp;*/<BR>{<BR>int i,j;<BR>for(i=0;i&lt;wy;i++)<BR>&nbsp;&nbsp;for(j=0;j&lt;wx;j++)<BR>&nbsp;&nbsp;g_disp_unit(j,i,world[j] [ i]);<BR>}<BR><BR>void g_draw_frame(x1,y1,x2,y2,c1,c2,c3,c4,text)<BR>int x1,y1,x2,y2,c1,c2,c3,c4;<BR>char *text;<BR>{&nbsp;&nbsp;int n,x3;<BR>&nbsp; &nbsp;g_rectangle(x1,y1,x2,y2,c1,1);<BR>&nbsp; &nbsp;g_rectangle(x1,y1,x2,y2,c2,0);<BR>&nbsp; &nbsp;g_rectangle(x1,y1,x2,y1+16,c3,1);<BR>&nbsp; &nbsp;g_rectangle(x1,y1,x2,y1+16,c2,0);<BR>&nbsp; &nbsp;n=strlen(text);<BR>&nbsp; &nbsp;x3=x1+((x2-x1-n*8)/2);<BR>&nbsp; &nbsp;disp_hz16(text,x3,y1,c4);<BR>}<BR><BR>void g_init_frames()&nbsp; &nbsp;&nbsp; &nbsp;/*&nbsp;&nbsp;初始化画面&nbsp;&nbsp;*/<BR>{<BR>&nbsp;&nbsp;int i,j,cx,cy,x,y;<BR>&nbsp;&nbsp;char text[17];<BR>&nbsp;&nbsp;g_draw_frame(0,0,639,399,15,0,4,15,<BR>&nbsp; &nbsp;&nbsp; &nbsp;"基于遗传算法的人工生命模拟");<BR>&nbsp;&nbsp;g_draw_frame(0,16,320,170,7,0,8,15,"设定参数");<BR>&nbsp;&nbsp;y=48;<BR>&nbsp; &nbsp;setcolor(9);<BR>&nbsp;&nbsp;disp_hz16("植物食物限制时间",16,y,15);<BR>&nbsp;&nbsp;sprintf(text,"%d",TL1);<BR>&nbsp;&nbsp;g_text(200,y+8,4,text);<BR>&nbsp;&nbsp;y=y+24;<BR>&nbsp; &nbsp;setcolor(9);<BR>&nbsp;&nbsp;disp_hz16("动物食物限制时间",16,y,15);<BR>&nbsp;&nbsp;sprintf(text,"%d",TL2);<BR>&nbsp;&nbsp;g_text(200,y+8,4,text);<BR>&nbsp;&nbsp;y=y+24;<BR>&nbsp; &nbsp;setcolor(9);<BR>&nbsp;&nbsp;disp_hz16("植物食物每代生成个数",16,y,15);<BR>&nbsp;&nbsp;sprintf(text,"%d",NEWFOODS);<BR>&nbsp;&nbsp;g_text(200,y+8,4,text);<BR>&nbsp;&nbsp;y=y+24;<BR>&nbsp; &nbsp;setcolor(9);<BR>&nbsp;&nbsp;disp_hz16("变异概率",16,y,15);<BR>&nbsp;&nbsp;i=(int)(MUTATION*100.0);<BR>&nbsp;&nbsp;sprintf(text,"%d",i);<BR>&nbsp;&nbsp;g_text(152,y+8,4,text);<BR>&nbsp;&nbsp;g_draw_frame(0,170,320,399,7,0,8,15,"最佳基因型");<BR>&nbsp;&nbsp;x=16;y=194;<BR>&nbsp; &nbsp;setcolor(9);<BR>&nbsp;&nbsp;disp_hz16("SP:物种号........",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("SL:寿命..........",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("VF:视野..........",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("TM:基本移动模式..",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("CM:移动特点......",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("LM:移动能耗......",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("CA:行动特点......",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("CR:善变性........",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("SA:攻击速度......",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("DA:防御能力......",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("LA:攻击能耗......",x,y,15);y=y+16;<BR>&nbsp;&nbsp;disp_hz16("EF:食物吸取效率..",x,y,15);y=y+16;<BR>&nbsp;&nbsp;g_draw_frame(320,16,639,207,7,0,8,15,"虚拟世界");<BR>&nbsp;&nbsp;g_draw_frame(320,207,639,399,7,0,8,15,"世代个体数目变化");<BR>&nbsp;&nbsp;}<BR><BR>void g_init_graph() <BR>/*&nbsp;&nbsp;个体数进化图初始化&nbsp;&nbsp;*/<BR>{<BR>&nbsp; &nbsp;g_rectangle(GX,GY,GX+GXR,GY+GYR,0,1);<BR>&nbsp; &nbsp;g_rectangle(GX,GY,GX+GXR,GY+GYR,6,0);<BR>&nbsp; &nbsp;setcolor(1);<BR>&nbsp; &nbsp;disp_hz16( "生物 1",GX+5,GY-18,15);<BR>&nbsp; &nbsp;g_line(GX+90,GY-10,GX+110,GY-10,1);<BR>&nbsp; &nbsp;setcolor(4);<BR>&nbsp; &nbsp;disp_hz16( "生物 2",GX+120,GY-18,15);<BR>&nbsp; &nbsp;g_line(GX+205,GY-10,GX+225,GY-10,4);<BR>&nbsp; &nbsp;setcolor(0);<BR>&nbsp; &nbsp;disp_hz16("世代数",GX+168,GY+GYR+10,15);<BR>&nbsp; &nbsp;g_text(GX-25,GY,0,"100");<BR>&nbsp; &nbsp;g_text(GX-14,GY+GYR,0,"0");<BR>}<BR><BR>void g_plot_population(gen_num,n1,n2,n1old,n2old)<BR>int gen_num,n1,n2,n1old,n2old;<BR>{<BR>&nbsp;&nbsp;int x,y,gx,gy,x_old,y_old;<BR>&nbsp;&nbsp;char text[8];<BR>&nbsp;&nbsp;if(gen_num%10==0)<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;x=GX+(gen_num-1)*GSTEP;<BR>&nbsp; &nbsp;&nbsp;&nbsp;g_line(x,GY+1,x,GY+GYR-1,1);<BR>&nbsp; &nbsp;&nbsp;&nbsp;sprintf(text,"%d",gen_num);<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(gen_num&lt;100||gen_num%20==0)<BR>&nbsp; &nbsp;&nbsp; &nbsp;g_text(x-8,GY+GYR+5,15,text);<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;x_old=GX+(gen_num-1)*GSTEP;<BR>&nbsp;&nbsp;x=x_old+GSTEP;<BR>&nbsp;&nbsp;y_old=GY+GYR-n1old;<BR>&nbsp;&nbsp;y=GY+GYR-n1;<BR>&nbsp;&nbsp;g_line(x_old,y_old,x,y,1);<BR>&nbsp;&nbsp;y_old=GY+GYR-n2old;<BR>&nbsp;&nbsp;y=GY+GYR-n2;<BR>&nbsp;&nbsp;g_line(x_old,y_old,x,y,4);<BR>}<BR><BR>void g_disp_genotype()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 显示最佳个体的遗传基因型&nbsp;&nbsp;*/<BR>{<BR>&nbsp;&nbsp;int i,j,n0,n1,x,y;<BR>&nbsp;&nbsp;unsigned char g[G_LENGTH];<BR>&nbsp;&nbsp;unsigned char bits[12][2]=<BR>&nbsp;&nbsp;{ {0,0},{1,4},{5,6},{7,8},{9,11},{12,12},{13,15},<BR>&nbsp; &nbsp; {16,18},{19,21},{22,24},{25,27},{28,31}};<BR>&nbsp; &nbsp;/*&nbsp;&nbsp;画面消除&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;g_rectangle(200,187,319,398,7,1);<BR>&nbsp; &nbsp; if(pop_size!=0)<BR>&nbsp; &nbsp; {<BR>&nbsp; &nbsp;&nbsp;&nbsp;/* 获取各遗传因子 */<BR>&nbsp; &nbsp;&nbsp; &nbsp;for(i=0;i&lt;G_LENGTH;i++)<BR>&nbsp; &nbsp;&nbsp; &nbsp;{<BR>n0=0;n1=0;<BR>for(j=0;j&lt;pop_size;j++)<BR>&nbsp;&nbsp;if(gene[j] [ i]==0) n0++;<BR>&nbsp;&nbsp;else&nbsp;&nbsp;n1++;<BR>&nbsp;&nbsp;if(n0&gt;=n1) g [ i]=0; else g [ i]=1;<BR>&nbsp; &nbsp;&nbsp; &nbsp;}<BR>&nbsp; &nbsp;&nbsp; &nbsp;x=220;<BR>&nbsp; &nbsp;&nbsp; &nbsp;for(i=0;i&lt;12;i++)<BR>&nbsp; &nbsp;&nbsp; &nbsp;{<BR>y=202+i*16;<BR>for(j=bits [ i][0];j&lt;=bits [ i][1];j++)<BR>if(g[j]==0)<BR>&nbsp; &nbsp;g_text(x+(j-bits [ i][0])*16,y,4,"0");<BR>&nbsp; &nbsp;else<BR>&nbsp; &nbsp;g_text(x+(j-bits [ i][0])*16,y,4,"1");<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;&nbsp; &nbsp;}<BR>&nbsp;&nbsp;}<BR><BR>void g_disp_char(x,y,x1,y1,x2,y2,v) <BR>int x,y,x1,y1,x2,y2;<BR>unsigned char v;<BR>{<BR>&nbsp; &nbsp;char c[10];<BR>&nbsp; &nbsp;if(x&gt;=x1&amp;&amp; x&lt;=x2-8 &amp;&amp; y&gt;=y1 &amp;&amp; y&lt;=y2-10)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;switch(v)<BR>&nbsp; &nbsp; {<BR>case 0: strcpy(c,"0\0");break;<BR>case 1: strcpy(c,"+\0");break;<BR>case 2: strcpy(c,"-\0");break;<BR>case 3: strcpy(c,"x\0");<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;g_text(x,y,15,c);<BR>&nbsp; &nbsp;}<BR>}<BR>void remove_life(n)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 消除第n个个体&nbsp;&nbsp;*/<BR>int n;<BR>{<BR>&nbsp;&nbsp;iflg[n]=0;<BR>&nbsp;&nbsp;world[iatr[n][0]][iatr[n][1]]=0;<BR>&nbsp;&nbsp;g_disp_unit(iatr[n][0],iatr[n][1],0);<BR>&nbsp;&nbsp;if(food_size+1&lt;=MAX_FOOD)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;food_size++;<BR>&nbsp;&nbsp;fatr[food_size-1][0]=iatr[n][0];<BR>&nbsp;&nbsp;fatr[food_size-1][1]=iatr[n][1];<BR>&nbsp;&nbsp;fatr[food_size-1][2]=1;<BR>&nbsp;&nbsp;fatr[food_size-1][3]=0;<BR>&nbsp;&nbsp;fflg[food_size-1]=1;<BR>&nbsp;&nbsp;world[iatr[n][0]][iatr[n][1]]=5;<BR>&nbsp;&nbsp;g_disp_unit(iatr[n][0],iatr[n][1],5);<BR>&nbsp;&nbsp;}<BR>}<BR><BR>void&nbsp;&nbsp;remove_food(n)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 消除第n个食物 */<BR>int n;<BR>{<BR>&nbsp;&nbsp;fflg[n]=0;<BR>&nbsp;&nbsp;world[fatr[n][0]][fatr[n][1]]=0;<BR>&nbsp;&nbsp;g_disp_unit(fatr[n][0],fatr[n][1],0);<BR>&nbsp;&nbsp;}<BR><BR>void make_lives_and_foods()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 设置虚拟环境中生物与食物&nbsp;&nbsp;*/<BR>{<BR>&nbsp;&nbsp;int x,y,i,j;<BR>&nbsp;&nbsp;pop_size=0;<BR>&nbsp;&nbsp;food_size=0;<BR>&nbsp;&nbsp;for(y=0;y&lt;wy;y++)<BR>&nbsp; &nbsp; for(x=0;x&lt;wx;x++)<BR>&nbsp; &nbsp; {<BR>&nbsp; &nbsp;&nbsp; &nbsp;if(world[x][y]==1||world[x][y]==2)<BR>&nbsp; &nbsp;&nbsp; &nbsp;{<BR>&nbsp; &nbsp;&nbsp; &nbsp; if(pop_size+1&lt;=MAX_POP)<BR>&nbsp; &nbsp;&nbsp; &nbsp; {<BR>&nbsp;&nbsp;pop_size++;<BR>/* 生成遗传因子 */<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;gene[pop_size-1][0]=world[x][y]-1;<BR>&nbsp; &nbsp; for(i=1;i&lt;G_LENGTH;i++)<BR>&nbsp; &nbsp;&nbsp; &nbsp;gene[pop_size-1] [ i]=random(2);<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/*&nbsp;&nbsp;设定属性&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp;&nbsp;iatr[pop_size-1][0]=x;<BR>&nbsp; &nbsp;&nbsp;&nbsp;iatr[pop_size-1][1]=y;<BR>&nbsp; &nbsp;&nbsp;&nbsp;iatr[pop_size-1][2]=70+random(30);<BR>&nbsp; &nbsp;&nbsp;&nbsp;iatr[pop_size-1][3]=random(SL_MIN);<BR>&nbsp; &nbsp;&nbsp;&nbsp;}<BR>&nbsp; &nbsp;&nbsp; &nbsp; }<BR>&nbsp; &nbsp;&nbsp; &nbsp; if(world[x][y]==3||world[x][y]==5)<BR>&nbsp; &nbsp;&nbsp; &nbsp; {<BR>&nbsp;&nbsp;if(food_size+1&lt;=MAX_FOOD)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;food_size++;<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 设定属性&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;fatr[food_size-1][0]=x;<BR>&nbsp;&nbsp;fatr[food_size-1][1]=y;<BR>&nbsp;&nbsp;if(world[x][y]==3)<BR>&nbsp; &nbsp;&nbsp; &nbsp; fatr[food_size-1][2]=0;<BR>&nbsp;&nbsp;else<BR>&nbsp; &nbsp;&nbsp; &nbsp; fatr[food_size-1][2]=1;<BR>fatr[food_size-1][3]=random(TL1-1)+1;<BR>}<BR>&nbsp; &nbsp;&nbsp; &nbsp;}<BR>&nbsp; &nbsp; }<BR>}<BR><BR>void find_empty(x,y)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 寻找虚拟环境中的空处，返回坐标&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;int *x,*y;<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;int ok;<BR>&nbsp;&nbsp;ok=0;<BR>&nbsp;&nbsp;while(ok==0)<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp;*x=random(wx);*y=random(wy);<BR>&nbsp; &nbsp;if(world[*x][*y]==0) ok=1;<BR>&nbsp; &nbsp;}<BR>&nbsp;&nbsp;}<BR><BR>void make_world()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 随机设定人工环境&nbsp;&nbsp;*/<BR>{<BR>int i,j,k,num,x,y;<BR>int ok,overlap;<BR>char choice[3];<BR>double size;<BR>wx=0;<BR>while(wx&lt;10||wx&gt;MAX_WX)<BR>{<BR>&nbsp; &nbsp;&nbsp;&nbsp;setcolor(15);<BR>&nbsp; &nbsp;&nbsp;&nbsp;disp_hz16("虚拟环境长度(10-60)",10,210,20);<BR>&nbsp; &nbsp;&nbsp;&nbsp;gscanf(300,210,4,0,3,"%s",choice);<BR>&nbsp; &nbsp;&nbsp;&nbsp;wx=atoi(choice);<BR>&nbsp;&nbsp;}<BR>wy=0;<BR>while(wy&lt;10||wy&gt;MAX_WY)<BR>{<BR>&nbsp; &nbsp;&nbsp;&nbsp;setcolor(15);<BR>&nbsp; &nbsp;&nbsp;&nbsp;disp_hz16("虚拟环境宽度(10-32)",10,240,20);<BR>&nbsp; &nbsp;&nbsp;&nbsp;gscanf(300,240,4,0,3,"%s",choice);<BR>&nbsp; &nbsp;&nbsp;&nbsp;wy=atoi(choice);<BR>&nbsp;&nbsp;}<BR>for(i=0;i&lt;wy;i++)<BR>&nbsp;&nbsp;for(j=0;j&lt;wx;j++)<BR>&nbsp; &nbsp;if(i==0||i==wy-1||j==0||j==wx-1)<BR>&nbsp; &nbsp; world[j] [ i]=4;<BR>&nbsp; &nbsp; else&nbsp; &nbsp; world[j] [ i]=0;<BR>/* 设定障碍物&nbsp;&nbsp;*/<BR>size=(double)(wx*wy);<BR>num=(int)(size/40.0);<BR>if(num&gt;MAX_POP)&nbsp;&nbsp;num=MAX_POP;<BR>for(i=0;i&lt;num;i++)<BR>{<BR>&nbsp; &nbsp;find_empty(&amp;x,&amp;y);<BR>&nbsp; &nbsp;world[x][y]=4;<BR>&nbsp; &nbsp;}<BR>num=(int)(size/5.0);<BR>if(num&gt;MAX_FOOD) num=MAX_FOOD;<BR>for(i=0;i&lt;num;i++)<BR>{<BR>ok=0;<BR>while(ok==0)<BR>{<BR>&nbsp; &nbsp; x=random(wx);y=random(wy);<BR>&nbsp; &nbsp; if((world[x][y]!=4) &amp;&amp;<BR>&nbsp; &nbsp;&nbsp; &nbsp; (world[x][y-1]==4 || world[x][y+1]==4 ||<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;world[x-1][y]==4 || world[x+1][y]==4))<BR>{&nbsp;&nbsp;world[x][y]=4;<BR>&nbsp; &nbsp; ok=1;<BR>&nbsp; &nbsp; }<BR>&nbsp; &nbsp; }<BR>}<BR><BR>&nbsp;&nbsp;for(y=0;y&lt;wy;y++)<BR>&nbsp;&nbsp;for(x=0;x&lt;wx;x++)<BR>&nbsp; &nbsp; if(world[x][y]==0)<BR>&nbsp; &nbsp; {<BR>&nbsp; &nbsp; num=0;<BR>&nbsp; &nbsp; for(i=-1;i&lt;=1;i++)<BR>&nbsp; &nbsp;&nbsp;&nbsp;for(j=-1;j&lt;=1;j++)<BR>&nbsp; &nbsp;&nbsp; &nbsp; if(get_world(x+j,y+i)==4)<BR>&nbsp; &nbsp;&nbsp; &nbsp; num++;<BR>&nbsp; &nbsp;&nbsp; &nbsp; if(num&gt;=6) world[x][y]=4;<BR>&nbsp; &nbsp;&nbsp; &nbsp; }<BR>&nbsp;&nbsp;/*&nbsp;&nbsp;设定生物&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;num=(int)(size*R_LIFE);<BR>&nbsp;&nbsp;for(i=0;i&lt;num;i++)<BR>&nbsp;&nbsp;{&nbsp;&nbsp;find_empty(&amp;x,&amp;y);<BR>&nbsp; &nbsp;&nbsp;&nbsp;world[x][y]=random(2)+1;<BR>&nbsp; &nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;/* 设定食物&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;num=(int)(size*R_FOOD);<BR>&nbsp;&nbsp;for(i=0;i&lt;num;i++)<BR>&nbsp; &nbsp;&nbsp;&nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;find_empty(&amp;x,&amp;y);<BR>&nbsp; &nbsp;&nbsp;&nbsp;world[x][y]=3;<BR>}<BR>}<BR><BR>void load_world_file()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 读取虚拟环境数据文件设定&nbsp;&nbsp;*/<BR>{<BR>FILE *fopen(),*fpt;<BR>char st[100],c;<BR>int i,j;<BR>if((fpt=fopen("\\ga\\world","r"))==NULL) exit(-1);<BR>else<BR>{<BR>&nbsp; &nbsp;fscanf(fpt,"%d",&amp;wx);<BR>&nbsp; &nbsp;fscanf(fpt,"%d",&amp;wy);<BR>&nbsp; &nbsp;for(i=0;i&lt;wy;i++)<BR>&nbsp; &nbsp; for(j=0;j&lt;wx;j++)<BR>&nbsp; &nbsp; fscanf(fpt,"%d",&amp;world[j] [ i]);<BR>&nbsp; &nbsp; fclose(fpt);<BR>&nbsp; &nbsp; }<BR>}<BR><BR>int get_world(x,y)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /*坐标(x,y)处环境值&nbsp;&nbsp;*/<BR>int x,y;<BR>{<BR>&nbsp; &nbsp;if(x&gt;=0 &amp;&amp; x&lt;wx &amp;&amp; y&gt;=0 &amp;&amp; y&lt;wy)<BR>&nbsp; &nbsp;return(world[x][y]);<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;return(-1);<BR>}<BR><BR>int&nbsp;&nbsp;decode_gene(n,sb,bw)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 第n个个体基因型解码&nbsp;&nbsp;*/<BR>int&nbsp;&nbsp;n,sb,bw;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/*&nbsp;&nbsp;sb开始位&nbsp;&nbsp;bw位长 */<BR>{<BR>&nbsp;&nbsp;int i,sum;<BR>&nbsp;&nbsp;sum=0;<BR>&nbsp;&nbsp;for(i=sb;i&lt;sb+bw;i++)<BR>&nbsp;&nbsp;sum=sum*2+gene[n] [ i];<BR>&nbsp;&nbsp;return(sum);<BR>&nbsp;&nbsp;}<BR><BR>void&nbsp;&nbsp;move_pos(n,x1,y1,x2,y2)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 个体n从(x1,y1)移动到(x2,y2)&nbsp; &nbsp;*/<BR>int n,x1,y1,x2,y2;<BR>{<BR>&nbsp;&nbsp;int sp,loss;<BR>&nbsp;&nbsp;loss=decode_gene(n,12,1)+1;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 移动消耗 */<BR>&nbsp;&nbsp;iatr[n][2]=iatr[n][2]-loss;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /*&nbsp;&nbsp;内部能量更新 */<BR>&nbsp;&nbsp;if(iatr[n][2]&lt;=0)&nbsp;&nbsp;remove_life(n);<BR>&nbsp;&nbsp;else<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp; /* 个体属性更新 */<BR>&nbsp; &nbsp; iatr[n][0]=x2;iatr[n][1]=y2;&nbsp; &nbsp;&nbsp; &nbsp; /* x,y坐标更新 */<BR>&nbsp; &nbsp; /* 显示更新 */<BR>&nbsp; &nbsp; sp=gene[n][0]+1;<BR>&nbsp; &nbsp; g_disp_unit(x1,y1,0);&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/*&nbsp;&nbsp;当前位置(x,y)图形消除 */<BR>&nbsp; &nbsp; world[x1][y1]=0;<BR>&nbsp; &nbsp; g_disp_unit(x2,y2,sp);&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /*&nbsp;&nbsp;新位置图形表示 */<BR>&nbsp; &nbsp; world[x2][y2]=sp;<BR>&nbsp;&nbsp;}<BR>}<BR><BR>void&nbsp;&nbsp;move_randomly(n)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /*&nbsp;&nbsp;个体n按照移动模式随机移动 */<BR>int n;<BR>{<BR>&nbsp;&nbsp;<BR>/* 基本移动模式1&nbsp;&nbsp;*/<BR>int&nbsp;&nbsp;pat1[8][2]={{1,0},{1,1},{0,1},{-1,1},<BR>&nbsp; &nbsp; {-1,0},{-1,-1},{0,-1},{1,-1}};<BR>&nbsp;&nbsp;/* 基本移动模式2与3&nbsp;&nbsp;*/<BR>int pat2_3[2][4][2]={{{1,0},{0,1},{-1,0},{0,-1}},<BR>&nbsp; &nbsp; {{1,1},{-1,1},{-1,-1},{1,-1}}};<BR>int pat,x1,y1,x2,y2,rndnum;<BR>pat=decode_gene(n,7,2);<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* pat(0,1,2,3): 表示基本移动模式&nbsp;&nbsp;*/<BR>x1=iatr[n][0];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 当前x坐标 */<BR>y1=iatr[n][1];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 当前y坐标 */<BR>if(pat&lt;=1)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 基本移动模式1&nbsp;&nbsp;*/<BR>{<BR>&nbsp; &nbsp;rndnum=random(8);<BR>&nbsp; &nbsp;x2=x1+pat1[rndnum][0];&nbsp; &nbsp;&nbsp;&nbsp;/* 移动目的点x坐标 */<BR>&nbsp; &nbsp;y2=y1+pat1[rndnum][1];&nbsp; &nbsp;&nbsp;&nbsp;/* 移动目的点y坐标 */<BR>&nbsp; &nbsp;}<BR>else&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 基本移动模式2与3&nbsp;&nbsp;*/<BR>{<BR>&nbsp; &nbsp;rndnum=random(4);<BR>&nbsp; &nbsp;x2=x1+pat2_3[pat-2][rndnum][0];<BR>&nbsp; &nbsp;y2=y1+pat2_3[pat-2][rndnum][1];<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;if(x2&gt;=0 &amp;&amp; x2&lt;wx &amp;&amp; y2&gt;=0 &amp;&amp; y2&lt;wy)<BR>&nbsp; &nbsp; if(get_world(x2,y2)==0)<BR>&nbsp; &nbsp;&nbsp; &nbsp;move_pos(n,x1,y1,x2,y2);<BR>&nbsp; &nbsp;/* 非法目的点的场合不作移动 */<BR>}<BR><BR>void&nbsp;&nbsp;move_individual(n)&nbsp; &nbsp;&nbsp; &nbsp;/* 个体n移动 */<BR>int n;<BR>{<BR>int cx,cy,dx,dy,sp,vf,sumx,sumy;<BR>int i,j,a,sgn[3],num;<BR>double&nbsp;&nbsp;vect[8][2]={{1,0},{1,1},{0,1},{-1,1},<BR>&nbsp; &nbsp; {-1,0},{-1,-1},{0,-1},{1,-1}};<BR>double vx,vy,d1,d2;<BR>double _cos,cos_max;<BR>cx=iatr[n][0];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 当前x坐标 */<BR>cy=iatr[n][1];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 当前y坐标 */<BR>sp=decode_gene(n,0,1)+1;&nbsp; &nbsp;&nbsp; &nbsp;/* 生物种1和2 */<BR>for(i=0;i&lt;3;i++)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 移动特点CM */<BR>{<BR>sgn [ i]=decode_gene(n,9+i,1);<BR>if(sgn [ i]==0)&nbsp;&nbsp;sgn [ i]=-1;<BR>}<BR>sumx=0;sumy=0;num=0;<BR>vf=decode_gene(n,5,2)+1;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 视野&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;for(i=-vf;i&lt;=vf;i++)<BR>&nbsp; &nbsp;for(j=-vf;j&lt;=vf;j++)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;if(i!=0||j!=0)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;a=get_world(cx+j,cy+i);<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(a==1||a==2)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 生物 1和2&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp;&nbsp;{&nbsp; &nbsp;num++;<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(a==sp)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 同种生物 */<BR>&nbsp; &nbsp;&nbsp;&nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;sumx=sumx+sgn[0]*j;<BR>&nbsp; &nbsp;&nbsp;&nbsp;sumy=sumy+sgn[0]*i;<BR>&nbsp; &nbsp;&nbsp;&nbsp;}<BR>&nbsp; &nbsp;&nbsp;&nbsp;else&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 异种生物 */<BR>&nbsp; &nbsp;&nbsp;&nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;sumx=sumx+sgn[1]*j;<BR>&nbsp; &nbsp;&nbsp;&nbsp;sumy=sumy+sgn[1]*i;<BR>&nbsp; &nbsp;&nbsp;&nbsp;}<BR>&nbsp;&nbsp;} else<BR>&nbsp;&nbsp;if(a==3||a==5)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/*&nbsp;&nbsp;食物&nbsp;&nbsp;*/<BR>&nbsp; &nbsp; {<BR>&nbsp; &nbsp; num++;<BR>&nbsp; &nbsp; sumx=sumx+sgn[2]*j;<BR>&nbsp; &nbsp; sumy=sumy+sgn[2]*i;<BR>&nbsp; &nbsp; }<BR>&nbsp; &nbsp;}<BR>&nbsp;&nbsp;}<BR>if(num!=0)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 视野内有其他生物和食物时 */<BR>{<BR>vx=(double)sumx/(double)num;<BR>vy=(double)sumy/(double)num;<BR>if(vx!=0||vy!=0)<BR>{<BR>&nbsp; &nbsp;&nbsp; &nbsp;cos_max=-1.0;<BR>&nbsp; &nbsp;&nbsp; &nbsp;j=0;<BR>&nbsp; &nbsp;&nbsp; &nbsp;for(i=0;i&lt;8;i++)<BR>&nbsp; &nbsp;&nbsp; &nbsp;{<BR>d1=sqrt(vx*vx+vy*vy);<BR>d2=sqrt(vect [ i][0]*vect [ i][0]+vect [ i][1]*vect [ i][1]);<BR>_cos=(vx*vect [ i][0]+vy*vect [ i][1])/d1/d2;<BR>if(_cos&gt;cos_max)<BR>{<BR>&nbsp;&nbsp;cos_max=_cos;j=i;<BR>&nbsp;&nbsp;}<BR>&nbsp; &nbsp;&nbsp; &nbsp;}<BR>&nbsp;&nbsp;dx=cx+(int)vect[j][0];<BR>&nbsp;&nbsp;dy=cy+(int)vect[j][1];<BR>&nbsp;&nbsp;if(dx&gt;=0 &amp;&amp; dx&lt;wx &amp;&amp; dy&gt;=0 &amp;&amp; dy&lt;wy)<BR>&nbsp; &nbsp; if(world[dx][dy]==0)<BR>&nbsp; &nbsp;&nbsp; &nbsp;move_pos(n,cx,cy,dx,dy);<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;else&nbsp;&nbsp;move_randomly(n);<BR>}<BR>else&nbsp;&nbsp;move_randomly(n);<BR>/* 视野内有其他生物和食物时 */<BR>}<BR><BR>void&nbsp;&nbsp;act1_attack(n)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /*&nbsp;&nbsp;个体 n攻击行动范围内的其他生物个体 */<BR>int n;<BR>{<BR>&nbsp;&nbsp;int sft[8][2]={{1,0},{1,1},{0,1},{-1,1},<BR>&nbsp; &nbsp; {-1,0},{-1,-1},{0,-1},{1,-1}};<BR>&nbsp;&nbsp;int x1,y1,x2,y2,n2;<BR>&nbsp;&nbsp;int found,rndnum;<BR>&nbsp;&nbsp;double attack1,attack2,sa1,sa2,da1,da2,rnd1,rnd2,La1,La2;<BR>&nbsp;&nbsp;x1=iatr[n][0];y1=iatr[n][1];<BR>&nbsp;&nbsp;/* 获得攻击对象的坐标(x2,y2) */<BR>&nbsp;&nbsp;found=0;<BR>&nbsp;&nbsp;while(found==0)<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp;rndnum=random(8);<BR>&nbsp; &nbsp;x2=x1+sft[rndnum][0];<BR>&nbsp; &nbsp;y2=y1+sft[rndnum][1];<BR>&nbsp; &nbsp;if(get_world(x2,y2)==1||get_world(x2,y2)==2)<BR>&nbsp; &nbsp;found=1;<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;/* 检查攻击对象个体号n2&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;found=0;n2=0;<BR>&nbsp; &nbsp;while(found==0)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(iatr[n2][0]==x2 &amp;&amp; iatr[n2][1]==y2 &amp;&amp; iflg[n2]==1)<BR>&nbsp; &nbsp;&nbsp;&nbsp;found=1;&nbsp;&nbsp;else n2++;<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;/* 计算双方的 Attack量 */<BR>&nbsp; &nbsp;sa1=(double)decode_gene(n,19,3);<BR>&nbsp; &nbsp;da1=(double)decode_gene(n,22,3);<BR>&nbsp; &nbsp;sa2=(double)decode_gene(n2,19,3);<BR>&nbsp; &nbsp;da2=(double)decode_gene(n2,22,3);<BR>&nbsp; &nbsp;rnd1=(double)random(1001)/1000.0;<BR>&nbsp; &nbsp;rnd2=(double)random(1001)/1000.0;<BR>&nbsp; &nbsp;attack1=(double)iatr[n][2]+sa1*20.0/7.0*rnd1+da1*20.0/7.0*rnd2;<BR>&nbsp; &nbsp;rnd1=(double)random(1001)/1000.0;<BR>&nbsp; &nbsp;rnd2=(double)random(1001)/1000.0;<BR>&nbsp; &nbsp;attack2=(double)iatr[n2][2]+sa2*20.0/7.0*rnd1+da2*20.0/7.0*rnd2;<BR>&nbsp; &nbsp;/* 减少内部能量 */<BR>&nbsp; &nbsp;La1=decode_gene(n,25,3);<BR>&nbsp; &nbsp;La2=decode_gene(n2,25,3);<BR>&nbsp; &nbsp;rnd1=(double)random(1001)/1000.0;<BR>&nbsp; &nbsp;iatr[n][2]=iatr[n][2]-(int)((double)La1*rnd1);<BR>&nbsp; &nbsp;rnd2=(double)random(1001)/1000.0;<BR>&nbsp; &nbsp;iatr[n2][2]=iatr[n2][2]-(int)((double)La2*rnd2);<BR>&nbsp; &nbsp;if(attack1&gt;=attack2)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 胜者: n 败者:n2 */<BR>&nbsp; &nbsp;&nbsp;&nbsp;iatr[n2][2]=iatr[n2][2]-40;<BR>&nbsp; &nbsp;else&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 胜者: n2 败者:n */<BR>&nbsp; &nbsp;&nbsp;&nbsp;iatr[n][2]=iatr[n][2]-40;<BR>&nbsp; &nbsp;if(iatr[n][2]&lt;=0) remove_life(n);<BR>&nbsp; &nbsp;if(iatr[n2][2]&lt;=0) remove_life(n2);<BR>&nbsp; &nbsp;}<BR><BR>&nbsp;&nbsp;void&nbsp;&nbsp;act2_eat(n)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 个体n获取行动范围内的食物 */<BR>&nbsp;&nbsp;int n;<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp; int sft[8][2]={{1,0},{1,1},{0,1},{-1,1},<BR>&nbsp; &nbsp; {-1,0},{-1,-1},{0,-1},{1,-1}};<BR>&nbsp;&nbsp;int x1,y1,x2,y2,n2,ef;<BR>&nbsp;&nbsp;int found,rndnum;<BR>&nbsp;&nbsp;x1=iatr[n][0];y1=iatr[n][1];<BR>/*&nbsp;&nbsp;获取食物位置(x2,y2)&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;found=0;<BR>&nbsp;&nbsp;while(found==0)<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp;rndnum=random(8);<BR>&nbsp; &nbsp;x2=x1+sft[rndnum][0];<BR>&nbsp; &nbsp;y2=y1+sft[rndnum][1];<BR>&nbsp; &nbsp;if(get_world(x2,y2)==3||get_world(x2,y2)==5)<BR>&nbsp; &nbsp;found=1;<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;/* 增加内部能量 */<BR>&nbsp; &nbsp;ef=decode_gene(n,28,4);&nbsp;&nbsp;/* 食物吸取效率 */<BR>&nbsp; &nbsp;iatr[n][2]=iatr[n][2]+(int)(40.0*(50.0+(double)ef*50.0/15.0)/100.0);<BR>&nbsp; &nbsp;if(iatr[n][2]&gt;100)&nbsp;&nbsp;iatr[n][2]=100;<BR>&nbsp; &nbsp;/* 检查食物号n2&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;found=0;n2=0;<BR>&nbsp; &nbsp;while(found==0)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(fatr[n2][0]==x2 &amp;&amp; fatr[n2][1]==y2 &amp;&amp; fflg[n2]==1)<BR>&nbsp; &nbsp;&nbsp;&nbsp;found=1;&nbsp;&nbsp;else n2++;<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;remove_food(n2);<BR>&nbsp; &nbsp;}<BR><BR>void act3_makechild(n)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 个体n与行动范围内的其他生物个体交配产生子个体 */<BR>int n;<BR>{<BR>&nbsp;&nbsp;int i,j,k,x,y,x2,y2,found,n2,trial;<BR>&nbsp;&nbsp;int x3,y3;<BR>&nbsp;&nbsp;double rnd;<BR>&nbsp;&nbsp;if(pop_size+1&lt;=MAX_POP)<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp; x=iatr[n][0];y=iatr[n][1];<BR>&nbsp; &nbsp; found=0;<BR>&nbsp; &nbsp; while(found==0)<BR>&nbsp; &nbsp; {<BR>&nbsp; &nbsp; x2=x+random(3)-1;<BR>&nbsp; &nbsp; y2=y+random(3)-1;<BR>&nbsp; &nbsp; if(x2!=x||y2!=y)<BR>&nbsp; &nbsp;&nbsp; &nbsp;if(get_world(x2,y2)==gene[n][0]+1);<BR>&nbsp; &nbsp;&nbsp; &nbsp;found=1;<BR>&nbsp; &nbsp; }<BR>&nbsp; &nbsp;/* 检查交配对象个体号n2&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;found=0; n2=0;<BR>&nbsp; &nbsp;while(found==0)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp; if((iatr[n2][0]==x2 || iatr[n2][1]==y2) &amp;&amp; iflg[n2]==1)<BR>&nbsp; &nbsp;&nbsp;&nbsp;found=1;&nbsp; &nbsp;else n2++;<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(n2&gt;=pop_size-1) return;<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;/* 确定产生个体位置 */<BR>&nbsp; &nbsp;found=0;trial=0;<BR>&nbsp; &nbsp;while(found==0 &amp;&amp; trial&lt;50)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;i=random(3)-1;j=random(3)-1;<BR>&nbsp; &nbsp;k=random(2);<BR>&nbsp; &nbsp;if(k==0)&nbsp;&nbsp;{&nbsp;&nbsp;x3=x+i;y3=y+j;}<BR>&nbsp; &nbsp;else&nbsp; &nbsp;&nbsp; &nbsp;{ x3=x2+i;y3=y2+j;}<BR>&nbsp; &nbsp;if(get_world(x3,y3)==0) found=1;<BR>&nbsp; &nbsp;trial++;<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;if(found==1)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;/* 个体 n与个体 n2产生子个体 */<BR>&nbsp; &nbsp;pop_size++;<BR>&nbsp; &nbsp;/*&nbsp;&nbsp;均匀交叉 */<BR>&nbsp; &nbsp;uni_crossover(gene,n,n2,pop_size-1,0.5,G_LENGTH);<BR>&nbsp; &nbsp;/*&nbsp;&nbsp;变异&nbsp; &nbsp; */<BR>&nbsp; &nbsp;for(i=1;i&lt;G_LENGTH;i++)<BR>&nbsp; &nbsp;{<BR>rnd=random(10001)/10000.0;<BR>if(rnd&lt;=MUTATION)<BR>&nbsp;&nbsp;if(gene[pop_size-1] [ i]==1)<BR>&nbsp; &nbsp;&nbsp;&nbsp;gene[pop_size-1] [ i]=0;<BR>&nbsp;&nbsp;else&nbsp;&nbsp;gene[pop_size-1] [ i]=1;<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;/* 交配后父个体能量减少&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;iatr[n][2]=iatr[n][2]-45;<BR>&nbsp; &nbsp;if(iatr[n][2]&lt;=0)&nbsp;&nbsp;remove_life(n);<BR>&nbsp; &nbsp;iatr[n2][2]=iatr[n2][2]-45;<BR>&nbsp; &nbsp;if(iatr[n2][2]&lt;=0)&nbsp;&nbsp;remove_life(n2);<BR>&nbsp; &nbsp;/*&nbsp;&nbsp;子个体属性输入&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;iatr[pop_size-1][0]=x3;<BR>&nbsp; &nbsp;iatr[pop_size-1][1]=y3;<BR>&nbsp; &nbsp;iatr[pop_size-1][2]=100;<BR>&nbsp; &nbsp;iatr[pop_size-1][3]=0;<BR>&nbsp; &nbsp;iflg[pop_size-1]=1;<BR>&nbsp; &nbsp;/*&nbsp;&nbsp;子个体画面表示 */<BR>&nbsp; &nbsp;world[x3][y3]=gene[pop_size-1][0]+1;<BR>&nbsp; &nbsp;g_disp_unit(x3,y3,gene[pop_size-1][0]+1);<BR>&nbsp; &nbsp;}<BR>&nbsp;&nbsp;}<BR>}<BR><BR>void act_individual(n)&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 为行动范围内的其他生物和食物决定行动 */<BR>int n;<BR>{<BR>&nbsp; &nbsp;int i,j,k,pattern,action,cr,ca;<BR>&nbsp; &nbsp;int act[3];&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* act[0]:攻击 act[1]:获取食物 act[2]:交配 */<BR>&nbsp; &nbsp;int pat[6][3]={{1,2,3},{1,3,2},{2,1,3},<BR>&nbsp; &nbsp; {3,1,2},{2,3,1},{3,2,1}};<BR>&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/*&nbsp;&nbsp;pat:行动优先顺序 {攻击，获取食物，交配}&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;int sp;<BR>&nbsp; &nbsp;double rnd;<BR>&nbsp; &nbsp;sp=decode_gene(n,0,1)+1;<BR>&nbsp; &nbsp;for(i=0;i&lt;3;i++) act [ i]=0;<BR>&nbsp; &nbsp;for(i=-1;i&lt;=1;i++)<BR>&nbsp; &nbsp;&nbsp;&nbsp;for(j=-1;j&lt;=1;j++)<BR>&nbsp; &nbsp;&nbsp;&nbsp;{<BR>&nbsp; &nbsp;&nbsp; &nbsp; if(i!=0||j!=0)<BR>&nbsp; &nbsp;&nbsp; &nbsp; {<BR>&nbsp;&nbsp;k=get_world(iatr[n][0]+j,iatr[n][1]+i);<BR>&nbsp;&nbsp;if(k==1||k==2)&nbsp;&nbsp;act[0]=1;<BR>&nbsp;&nbsp;if(k==3||k==5)&nbsp;&nbsp;act[1]=1;<BR>&nbsp;&nbsp;if(k==sp)&nbsp; &nbsp;&nbsp; &nbsp; act[2]=1;<BR>&nbsp;&nbsp;}<BR>&nbsp; &nbsp;&nbsp; &nbsp; }<BR>&nbsp; &nbsp;&nbsp; &nbsp; cr=decode_gene(n,16,3);<BR>&nbsp; &nbsp;&nbsp; &nbsp; rnd=(double)random(10001)/10000.0;<BR>&nbsp; &nbsp;&nbsp; &nbsp; if(rnd&lt;=(double)cr/7.0)<BR>&nbsp; &nbsp;&nbsp; &nbsp; {<BR>&nbsp;&nbsp;action=random(3);<BR>&nbsp;&nbsp;while(act[action]==0)<BR>&nbsp;&nbsp;action=random(3);<BR>&nbsp;&nbsp;}<BR>&nbsp; &nbsp;&nbsp; &nbsp; else<BR>&nbsp; &nbsp;&nbsp; &nbsp; {<BR>&nbsp; &nbsp;&nbsp; &nbsp; ca=decode_gene(n,13,3);&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* ca行动特点 */<BR>&nbsp; &nbsp;&nbsp; &nbsp; if(ca&lt;3)&nbsp;&nbsp;pattern=0;else&nbsp;&nbsp;pattern=ca-2;<BR>&nbsp; &nbsp;&nbsp; &nbsp; /* 基本行动模式pattern 0-5 */<BR>&nbsp; &nbsp;&nbsp; &nbsp; i=0;<BR>&nbsp; &nbsp;&nbsp; &nbsp; action=pat[pattern] [ i]-1;<BR>&nbsp; &nbsp;&nbsp; &nbsp; while( act[action]==0)<BR>&nbsp; &nbsp;&nbsp; &nbsp; {<BR>&nbsp;&nbsp;i++;<BR>&nbsp;&nbsp;action=pat[pattern] [ i]-1;<BR>&nbsp;&nbsp;}<BR>}<BR>&nbsp; &nbsp;&nbsp;&nbsp;switch(action+1)<BR>&nbsp; &nbsp;&nbsp;&nbsp;{<BR>case 1:&nbsp;&nbsp;act1_attack(n);break;<BR>case 2:&nbsp;&nbsp;act2_eat(n);break;<BR>case 3:&nbsp;&nbsp;act3_makechild(n);<BR>&nbsp; &nbsp;&nbsp;&nbsp;}<BR>&nbsp; &nbsp;}<BR><BR>void init_flags()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 状态标志初始化 */<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;int i;<BR>&nbsp; &nbsp;&nbsp;&nbsp;for(i=0;i&lt;pop_size;i++)&nbsp;&nbsp;iflg [ i]=1;<BR>&nbsp; &nbsp;&nbsp;&nbsp;for(i=0;i&lt;food_size;i++)&nbsp;&nbsp;fflg [ i]=1;<BR>&nbsp; &nbsp;}<BR><BR>void&nbsp;&nbsp;act_lives()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/*&nbsp;&nbsp;改变状态(移动或行动)&nbsp;&nbsp;*/<BR>{<BR>&nbsp; &nbsp;int i,j,k,x,y,move,a;<BR>&nbsp; &nbsp;for(i=0;i&lt;pop_size;i++)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(iflg [ i]==1)<BR>&nbsp; &nbsp;&nbsp;&nbsp;{<BR>&nbsp; &nbsp;&nbsp; &nbsp; move=1;<BR>&nbsp; &nbsp;&nbsp; &nbsp; for(j=-1;j&lt;=1;j++)<BR>for(k=-1;k&lt;=1;k++)<BR>{<BR>&nbsp; &nbsp;if(j!=0||k!=0)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;&nbsp;&nbsp;a=get_world(iatr [ i][0]+k,iatr [ i][1]+j);<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(a==1||a==2||a==3||a==5)<BR>&nbsp; &nbsp;&nbsp;&nbsp;move=0;<BR>&nbsp; &nbsp;&nbsp;&nbsp;}<BR>}<BR>&nbsp; &nbsp;&nbsp; &nbsp; if(move==1)<BR>&nbsp;&nbsp;move_individual(i);<BR>&nbsp; &nbsp;&nbsp; &nbsp; else<BR>&nbsp;&nbsp;act_individual(i);<BR>&nbsp; &nbsp;&nbsp;&nbsp;}<BR>&nbsp; &nbsp;}<BR>}<BR><BR>void&nbsp;&nbsp;increase_age()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 个体年龄增1&nbsp;&nbsp;*/<BR>{<BR>&nbsp;&nbsp;int i,j,s;<BR>&nbsp;&nbsp;for(i=0;i&lt;pop_size;i++)<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp; if(iflg [ i]==1)<BR>&nbsp; &nbsp; {<BR>&nbsp; &nbsp;&nbsp; &nbsp;j=decode_gene(i,1,4);<BR>&nbsp; &nbsp;&nbsp; &nbsp;s=SL_MIN+j;<BR>&nbsp; &nbsp;&nbsp; &nbsp;iatr [ i][3]++;<BR>&nbsp; &nbsp;&nbsp; &nbsp;if(iatr [ i][3]&gt;s)<BR>&nbsp; &nbsp;&nbsp; &nbsp;remove_life(i);<BR>&nbsp; &nbsp;&nbsp; &nbsp;}<BR>&nbsp; &nbsp; }<BR>&nbsp;&nbsp;}<BR><BR>void&nbsp;&nbsp;increase_frsh()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;/* 食物新鲜度增1&nbsp;&nbsp;*/<BR>{<BR>&nbsp;&nbsp;int i;<BR>&nbsp;&nbsp;for(i=0;i&lt;food_size;i++)<BR>&nbsp; &nbsp; if(fflg [ i]==1)<BR>&nbsp; &nbsp; {<BR>&nbsp; &nbsp;&nbsp;&nbsp;fatr [ i][3]++;<BR>&nbsp; &nbsp;&nbsp;&nbsp;if((fatr [ i][2]==0 &amp;&amp; fatr [ i][3]&gt;TL1)||<BR>(fatr [ i][2]==1 &amp;&amp; fatr [ i][3]&gt;TL2))<BR>remove_food(i);<BR>}<BR>&nbsp;&nbsp;}<BR><BR>void gabage_col()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; /* 死去个体及消减食物清除*/<BR>{<BR>int i,j;<BR>int new_pop,new_food;<BR>&nbsp; &nbsp;/* 检查食物 */<BR>new_food=0;<BR>for(i=0;i&lt;food_size;i++)<BR>&nbsp; &nbsp;if(fflg [ i]==1)<BR>&nbsp; &nbsp;{<BR>&nbsp; &nbsp;new_food++;<BR>&nbsp; &nbsp;for(j=0;j&lt;4;j++)<BR>&nbsp; &nbsp;&nbsp; &nbsp;fatr[new_food-1][j]=fatr [ i][j];<BR>&nbsp; &nbsp;}<BR>&nbsp; &nbsp;food_size=new_food;<BR>&nbsp;&nbsp;/* 检查个体 */<BR>&nbsp; &nbsp;new_pop=0;<BR>&nbsp; &nbsp;for(i=0;i&lt;pop_size;i++)<BR>&nbsp; &nbsp;&nbsp;&nbsp;if(iflg [ i]==1)<BR>&nbsp; &nbsp;&nbsp;&nbsp;{<BR>&nbsp; &nbsp;&nbsp; &nbsp; new_pop++;<BR>&nbsp; &nbsp;&nbsp; &nbsp; /* 遗传基因复制&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp; for(j=0;j&lt;G_LENGTH;j++)<BR>&nbsp;&nbsp;gene[new_pop-1][j]=gene [ i][j];<BR>&nbsp; &nbsp;&nbsp; &nbsp; /* 属性复制&nbsp;&nbsp;*/<BR>&nbsp; &nbsp;&nbsp; &nbsp; for(j=0;j&lt;4;j++)<BR>&nbsp;&nbsp;iatr[new_pop-1][j]=iatr [ i][j];<BR>&nbsp; &nbsp;&nbsp; &nbsp;}<BR>&nbsp; &nbsp;&nbsp;&nbsp;pop_size=new_pop;<BR>&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;void&nbsp;&nbsp;make_foods()&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 产生一代中植物性食物&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;int i,x,y;<BR>&nbsp;&nbsp;for(i=0;i&lt;NEWFOODS;i++)<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp; if(food_size+1&lt;=MAX_FOOD)<BR>&nbsp; &nbsp; {<BR>&nbsp; &nbsp;&nbsp; &nbsp;food_size++;<BR>&nbsp; &nbsp;&nbsp; &nbsp;find_empty(&amp;x,&amp;y);<BR>&nbsp; &nbsp;&nbsp; &nbsp;fatr[food_size-1][0]=x;<BR>&nbsp; &nbsp;&nbsp; &nbsp;fatr[food_size-1][1]=y;<BR>&nbsp; &nbsp;&nbsp; &nbsp;fatr[food_size-1][2]=0;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;/* 植物性 */<BR>&nbsp; &nbsp;&nbsp; &nbsp;fatr[food_size-1][3]=0;<BR>&nbsp; &nbsp;&nbsp; &nbsp;fflg[food_size-1]=1;<BR>&nbsp; &nbsp;&nbsp; &nbsp;world[x][y]=3;<BR>&nbsp; &nbsp;&nbsp; &nbsp;g_disp_unit(x,y,3);<BR>&nbsp; &nbsp;&nbsp;&nbsp;}<BR>&nbsp; &nbsp;}<BR>&nbsp;&nbsp;}<BR><BR>&nbsp;&nbsp;void&nbsp;&nbsp;calc_population(n1,n2)&nbsp;&nbsp;/* 计算生物1和2 的个体数 */<BR>&nbsp;&nbsp;int *n1,*n2;<BR>&nbsp;&nbsp;{<BR>&nbsp; &nbsp; int i,p1,p2;<BR>&nbsp; &nbsp; p1=0;p2=0;<BR>&nbsp; &nbsp; if(pop_size&gt;0)<BR>&nbsp; &nbsp;&nbsp; &nbsp;for(i=0;i&lt;pop_size;i++)<BR>if(gene [ i][0]==0)&nbsp;&nbsp;p1++; else p2++;<BR>*n1=p1;<BR>*n2=p2;<BR>&nbsp;&nbsp;}<BR><BR>main()&nbsp; &nbsp; /* 主程序&nbsp;&nbsp;*/<BR>{<BR>int i,work;<BR>int n1,n2,n1old,n2old;<BR>char choice[2];<BR>randomize();<BR>/* 图形界面初始化 */<BR>g_init();<BR>settextstyle(0,0,4);<BR>gprintf(220,20,4,0,"ALIFE");<BR>setcolor(9);<BR>disp_hz24("基于遗传算法的人工生命模拟",150,60,25);<BR>setcolor(15);<BR>disp_hz16("人工环境及生物分布",10,160,20);<BR>disp_hz16("1:随机产生&nbsp;&nbsp;2: 读文件产生 ==&gt;",10,190,20);<BR>gscanf(300,190,15,1,4,"%s",choice);<BR>work=atoi(choice);<BR>if(work==2)&nbsp;&nbsp;load_world_file();else make_world();<BR>make_lives_and_foods();<BR>/*状态初始化 */<BR>init_flags();<BR>/*计算个体数 */<BR>calc_population(&amp;n1old,&amp;n2old);<BR>/*生成初始画面*/<BR>g_init_frames();<BR>/*虚拟世界画面*/<BR>g_draw_world();<BR>/* 显示初始图形 */<BR>g_init_graph();<BR>for(i=1;i&lt;121;i++)<BR>{<BR>&nbsp;&nbsp;/*状态初始化 */<BR>&nbsp;&nbsp;init_flags();<BR>&nbsp;&nbsp;/* 改变状态(移动或行动)&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;act_lives();<BR>&nbsp;&nbsp;/* 个体年龄增加&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;increase_age();<BR>&nbsp;&nbsp;/* 食物新鲜度增加 */<BR>&nbsp;&nbsp;increase_frsh();<BR>&nbsp;&nbsp;/*死去个体及消减食物清除*/<BR>&nbsp;&nbsp;gabage_col();<BR>&nbsp;&nbsp;/*产生新的食物 */<BR>&nbsp;&nbsp;make_foods();<BR>/* 求生物1和2 的个体数 */<BR>&nbsp;&nbsp;calc_population(&amp;n1,&amp;n2);<BR>&nbsp;&nbsp;/* 个体数变化的图形更新&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;g_plot_population(i,n1,n2,n1old,n2old);<BR>&nbsp;&nbsp;n1old=n1;n2old=n2;<BR>/* 显示最佳遗传基因&nbsp;&nbsp;*/<BR>&nbsp;&nbsp;g_disp_genotype();<BR>&nbsp; &nbsp;}<BR>&nbsp;&nbsp;setcolor(9);<BR>&nbsp;&nbsp;disp_hz16("回车键结束",10,430,20);<BR>&nbsp;&nbsp;getch();<BR>} <BR><BR><B>【特别注明：因为<I>被系统默认为斜体故文中所有<I>出现之处改为[i ]】</B><BR></I></I><BR>]]></description>
</item><item>
<title><![CDATA[机器人三定律]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=31192</link>
<author>netjian</author>
<pubDate>2008/1/10 16:00:39</pubDate>
<description><![CDATA[
<P>为机器人设定的行为准则:</P>
<P style="TEXT-INDENT: 2em">第一定律 </P>
<P style="TEXT-INDENT: 2em">机器人不得伤害人，或任人受到伤害而无所作为； </P>
<P style="TEXT-INDENT: 2em">第二定律 </P>
<P style="TEXT-INDENT: 2em">机器人应服从人的一切命令，但命令与第一定律相抵触时例外； </P>
<P style="TEXT-INDENT: 2em">第三定律 </P>
<P style="TEXT-INDENT: 2em">机器人必须保护自己的存在，但不得与第一、第二定律相抵触。 </P>
<P style="TEXT-INDENT: 2em">&nbsp;</P>
<P style="TEXT-INDENT: 2em">转载 <A href="http://www.gkong.com/blog/blog.asp?name=heyinke">http://www.gkong.com/blog/blog.asp?name=heyinke</A></P>]]></description>
</item><item>
<title><![CDATA[对学生的建议:如何做好研究 [ 转载 ]]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=31066</link>
<author>netjian</author>
<pubDate>2008/1/5 23:08:46</pubDate>
<description><![CDATA[<A><FONT size=5>　</FONT></A>
<P><FONT size=5>转自丁丁的BLOG<BR></FONT><A href="http://blogger.org.cn/blog/more.asp?name=chris&amp;id=30961"><FONT size=5>http://blogger.org.cn/blog/more.asp?name=chris&amp;id=30961</FONT></A><BR><FONT size=5>学习一下~</FONT></P>
<UL>
<LI>
<P><FONT size=5><FONT face=新宋体>1. 做计划!&nbsp; <BR>&nbsp;&nbsp;&nbsp; </FONT><FONT face=新宋体>我告诉我的学生, 写研究论文的第一步就是要明确你真的有一份研究论文要写. 写一份计划书, 其中应当包括在某一天需要完成的一系列的重要进展. (例如: 9月20日前找到10份资料, 10月15前完成初步的研究). 按照计划来执行. 你也需要时间来看看自己还缺什么材料, 什么材料在图书馆中可以查到, 选择相关的材料, 阅读并做笔记, 并整合之. 之后, 你需要弄清自己要在论文中提出的观点. </FONT></FONT></P></LI></UL>
<UL>
<LI>
<P><FONT face=新宋体 size=5>2. 开始使用Wikipedia, 不要停下.<BR>&nbsp;&nbsp;&nbsp;&nbsp;Wikipedia是一个很适合开始进行你的研究的地方, 你可以搜寻与你的主题相关的关键词, 浏览每页上的链接, 并且接着看它所建议的资源. 做笔记, 尤其是对任何它推荐的好的资源. 我们在这里的目标是: 获取对你要写的主题的一个相对较好的综览. 并且由于它的超链接的特性, Wikipedia比大多数纸质的资料更有用. 到你准备好动笔写之前, 你应该已经由此得到了许多比Wikipedia上所呈现的更好的资料. 所以, 不要直接在你的论文中引用Wikipedia. </FONT></P></LI></UL>
<UL>
<LI>
<P><FONT face=新宋体 size=5>3. 整理自己的参考书目.<BR>&nbsp;&nbsp;&nbsp; 一旦你找到了关于你的主题的一本好的学术书籍或是一份文献,&nbsp; 那很棒. 在它的最后将会出现几十甚至上百份资料供你去查阅. 通常, 你可以略读这份参考书目并且将标题看起来与你的研究相关的东西记下来. 学术文献的作者们并不会竭尽心机来给标题起一个很有创造力的名字,&nbsp; 所以通常你可以很容易的从标题与子标题中了解他们的研究方向. 接下来, 返回开头并且寻找你是否认识哪位作者的名字, 这将很有用.对第一本书完成这样一份工作之后, 你可以接着对后面的书继续做这样的工作.这样, 你将迅速获得远比你所需要的多得多的资源. (但是你确实需要这样做, 因为你的图书馆不一定拥有所有这些提及的书籍以及期刊, 馆际间的图书传递速度很慢以致于对于需要在学期末完成论文的学生来说并没有多大价值.) </FONT></P></LI></UL>
<UL>
<LI>
<P><FONT face=新宋体 size=5>4. 脑海里要有研究的问题. <BR>&nbsp;&nbsp;&nbsp;&nbsp; 学术的说, 当数据展现在你面前的时候, 你的主题应当从你的研究中浮现出来. 当你做研究的时候, 你需要一个”研究主题”, 也就是你想回答的问题. 当你遇到新的材料的时候, 问问自己这对回答你的问题有没有帮助. 你应当放弃那些看起来相关但实际上对回答你的问题没有帮助的资料. 找到一大堆资料看起来很有吸引力, 的确, 找到一些资料是必要的, 但是太多就会浪费你的做研究的时间. 找一两个好的资料做背景(你最初在Wikipedia上找到的在大多数情况下足够了), 然后坚持把精力放在向着回答自己的研究问题的方向上. </FONT></P></LI></UL>
<UL>
<LI>
<P><FONT face=新宋体 size=5>5. 一次只处理一个论点. <BR>&nbsp;&nbsp;&nbsp; 不要试图一次把你的主题搞定. 对整个主题有一个大概的感觉, 为你需要了解的东西建立一份大纲. 之后每次处理一个论点. 在完成初稿之后,&nbsp; 你将发现论点间的联系. </FONT></P></LI></UL>
<UL>
<LI>
<P><FONT face=新宋体 size=5>6. 使用信息组织系统. <BR>&nbsp;&nbsp;&nbsp; 开始你的研究时, 应当对计划如何收集和组织你的笔记与数据有个概念. 尽管我曾经利用过索引卡片来写过论文, 但我最喜欢的系统还是一个关于单一主题的笔记本. 在新一页的最上面, 我写上参考书目的名字, 然后抄写需要引用的, 并且做笔记.&nbsp; 在旁边, 我会加上它们的页码做标签,&nbsp; 并且记下我阅读时突然萌生的一些想法.&nbsp; 我喜欢有效率的使用电脑, 我尝试过做数据库, 使用Wiki软件, 做Outline以及其它软件, 但是我从没有发现哪个系统特别卓有成效.&nbsp; 我的时间都花在与软件本身打交道了,而不是做我的研究. 无论使用何种系统, 确保每一个引用, 事实以及思想都能找到它的来源. 这样你就可以在写作的时候方便的添加上参考文献了. </FONT></P></LI></UL>
<UL>
<LI>
<P><FONT face=新宋体 size=5>7. 了解你要用的资源.&nbsp; <BR>&nbsp;&nbsp;&nbsp; 花点时间去了解你的图书馆究竟提供哪些在线或者离线的资源. 大多数图书馆都为学生提供介绍, 或者是让学生可以与图书管理员交流.至少, 你应当在图书馆里面走一遍并且知道什么东西在什么地方放着. 对微缩胶卷的储藏室以及期刊室要特别留心, 你将在许多研究项目中使用到它们. 多数大学的图书馆订阅了许多学术的数据库, 其中许多是在线的. 你要了解那些是从家里就可以连接的. 例如, J-stor储存了数百种学术期刊的全文图片, 并且它们都很容易搜索. 你可以半夜突然有点思想, 然后登录, 把两三篇相关的论文打印出来留到早上看. </FONT></P></LI></UL>
<UL>
<LI>
<P><FONT face=新宋体 size=5>8. 寻求帮助. <BR>&nbsp;&nbsp;&nbsp; 不仅要利用这些材料, 你同样应当利用你能利用的人力资源. 很多教授失望地在办公室里花时间等待,希望某位学生能够闯进来提出一个值得他们花这么长时间等待的问题. 要做这样的学生! 在寻找, 评价资料的时候可以寻求帮助. 你也可以请人帮助你指出你已经收集的资料的用途. 另一个经常忽略掉的资源是友好的图书管理员. 在我眼中,他们是世界上最好的人: 在他们的管理范围内的资料, 他从头到尾都知道. 他们很关心这些资料的利用, 他们的任务就是使信息更好的利用. 多数的图书管理员很高兴帮助你去找和你的项目相关的资料. 一些图书管理员甚至能将那些很难找到的信息定位到具体的一卷书中. 当然, 不要忘记向学生们寻求帮助. 有些人可能正好和你的主题相关. </FONT></P></LI></UL>
<UL>
<LI>
<P><FONT face=新宋体 size=5>9. 带一个记录思想的笔记本. <BR>&nbsp;&nbsp;&nbsp; 当你真正开始你的项目时, 你的大脑也同时在搜寻你所读过的资料. 如果你像我一样的话, 你可能在最不方便的时候突然获得启发. 比如说在浴室里, 超市里, 或者是准备睡觉时. 随身携带一个小笔记本以及一支笔. 将你的灵感记下来, 然后尽快的把它转移到你的研究日志上(或是软件等). </FONT></P></LI></UL>
<UL>
<LI>
<P><FONT size=5><FONT face=新宋体>10. 使研究跟上时代.<BR>&nbsp;&nbsp; </FONT><FONT face=新宋体>&nbsp;要注意你的材料的发表日期 — 尽管使用旧的材料也可以, 但是你肯定还是希望你的参考资料都来自近十年. 如果关于你的主题的研究在近十年几乎枯竭, 那么可能是研究领域改变了, 但还可能是资助消失, 主要研究者去世, 或是其它偶然因素.一个小技巧是 去Google搜索主要的研究者, 看看能不能找到他们的主页. 在 主页上, 多数人会将最近的研究活动以及发表的文章列出来.&nbsp; 如果这样的话, 你可以尝试去馆际互借, 或是联系这位研究者本人然后询问能否发给你一份草稿或是复印件. 要有勇气, 你要解释你在研究什么, 你希望发现什么, 你的研究进展如何, 他们的文章能给你的主题什么启示等. 不要去要求一份参考资料或是你的主题具体是什么, 没有人愿意帮助你做本应属于你自己的工作. </FONT></FONT></P></LI></UL>
<P><FONT face=新宋体 size=5>&nbsp;&nbsp;&nbsp;&nbsp;这些技巧将帮助你在写作之前获得一份不错的参考书目以及充实的笔记和数据资料. 尽管评估资料也是做好研究的一个重要部分, 但我将独立的来写这一部分, 因为它涉及的东西在一点中很难说清. 图书管理员或是你的教授可以帮助你, 尤其是你的资料都限制在你的图书馆可以获得的资料时. 网络资源更难处理些. 但是记住, 没多少年以前, 我们都没有互联网但成功的做研究. 打字机而已. 这就像在雪中赤足爬到山顶一样. <BR></FONT></P>
<P><FONT face=新宋体 size=5>&nbsp;</FONT></P>
<P><A title="10 Steps Toward Better Research" href="http://feeds.feedburner.com/%7Er/LifeHack/%7E3/140317505/advice-for-students-10-steps-toward-better-research.html"><FONT face=新宋体 size=5>Advice for Students : 10 Steps Toward Better Research</FONT></A><FONT face=新宋体 size=5> from </FONT><A href="http://www.google.com/reader/view/feed/http%3A%2F%2Fwww.lifehack.org%2Ffeed%2F"><FONT face=新宋体 size=5>lifehack.org</FONT></A><FONT face=新宋体 size=5> by Dustin Wax</FONT></P>
<P><FONT face=新宋体 size=5>翻译 by 河流 @ LifePro</FONT></P>]]></description>
</item><item>
<title><![CDATA[The  Scheme In 2008]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=31062</link>
<author>netjian</author>
<pubDate>2008/1/5 22:18:19</pubDate>
<description><![CDATA[<A></A> 
<P>Scheme befor the&nbsp;LAMDA interview on May</P>
<P>&nbsp;&nbsp;1.1 - 1.18 </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.Making the last preparation for GRECN this year.</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.Though&nbsp;just have a&nbsp;attempt for the&nbsp;examination atmosphere only , I must try my best.</P>
<P>&nbsp; 1.22 - 2.22&nbsp;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.English&nbsp;&nbsp; : PG&nbsp;English Words（unit 1 - unit 15）</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.Politics&nbsp; : &lt;Machine Learning&gt;&nbsp;&nbsp;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : A paper about interesting maths</P>
<P>&nbsp; 2.23 - 5.~ </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.Specialty : &lt;Pattern Classification&gt;.(2.23 - 4.15)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &lt;OS&gt;,&lt;DS&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Prof. Zhou's papers in the nearest two years. (The last two weeks)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Publish the paper about interesting maths.(any time)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.Maths&nbsp;&nbsp;&nbsp;&nbsp; : &lt;Altitude Maths&gt;[1,2](2.23 - 4.15)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &lt;Conceptualism&gt;(4.16 - 5.1) </P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : &lt;Linear Algebra&gt;(5.1 - 5.15)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.English&nbsp;&nbsp; : &lt;New Tutorial&gt;(Jing-xin ZHANG)</P>
<P>&nbsp;</P>
<P>Scheme&nbsp;after the&nbsp;LAMDA interview </P>
<P>&nbsp;&nbsp;6.1 - 7.1</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.Maths&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: A little preparation</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.Specialty&nbsp;: Idem</P>
<P>&nbsp;&nbsp;7.1 - 8.31</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 1.Maths&nbsp;&nbsp;&nbsp;&nbsp; : &lt;Maths Review Book&gt;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.Politics&nbsp; : &lt;List 1&gt;(Ru-fen REN)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.English&nbsp;&nbsp; : &lt;Real Test&gt;(2008-2004)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.Specialty : Books from Abel&nbsp;</P>
<P>&nbsp; 9.1 - 10.1&nbsp;&nbsp;&nbsp;&nbsp;</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.Maths&nbsp;&nbsp;&nbsp;&nbsp; : &lt;Real Test&gt;(2008-2004)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2.Politics&nbsp; : &lt;List 2&gt;(Ru-fen REN)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3.English&nbsp;&nbsp; : &lt;Real Test&gt;(2003-1999)</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 4.Specialty :&nbsp;&lt;Real Test&gt;(2008-2001)</P>
<P>&nbsp;</P>]]></description>
</item><item>
<title><![CDATA[本科生科研潜质的体现]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=31061</link>
<author>netjian</author>
<pubDate>2008/1/5 22:07:03</pubDate>
<description><![CDATA[
<P>一个准研究生的科研潜质一般体现在以下三个方面：本科期间是否创作并发表过学术论文；本科期间是否进行过相关专业科研课题的研究；本科期间是否从事过相关专业具体的社会实践。这三点一般是研究生导师在选择研究生时非常注重的因素。</P>
<P>　　科研能力与学习能力一样，是研究生招生单位关注的考生应具备的能力，要想从科学的角度去塑造合格的准研究生，就必须提高这些基本能力。<BR></P>]]></description>
</item><item>
<title><![CDATA[回首2007]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=30959</link>
<author>netjian</author>
<pubDate>2008/1/2 19:46:30</pubDate>
<description><![CDATA[<A></A> 
<P>新年的钟声中，2007已经成为过去，新的2008已经到来。</P>
<P>&nbsp; 首先，来回顾2007年元旦所做的新年计划书。<BR>“<BR>&nbsp;&nbsp;新年的钟声送走了程序员生涯的2006，也算没有荒废。从网络中心到求索教育公司，再到游客士（中国）网络公司，体会到了一些社会工作的艰辛与快乐。B/S,C/S，三层架构，静态生成，.Net &amp; SQL SERVER，这些都已近成为历史。我更需要展望美好的明天，充满希望与挑战的明天。</P>
<P>&nbsp;&nbsp;2007将是我生命中至关重要的几个年头之一，工作也好，考研也罢，2007将非常关键。我已经确立了南京大学计算机软件与理论专业，就朝着这个方向努力吧。但是，4、6级尚未通过，数学功底不扎实，政治未开始背记，专业课也未开始着手，甚至连相关的书籍、信息等准备都还不够。这一年需要做的太多了。一定要放开感情问题，远离游戏，或许你害的完成未了结的心愿：软件设计师的职称。还有发表几篇像样的期刊论文，进一步了解和熟悉C++的核心。你要做的，真的太多太多了。</P>
<P>&nbsp; 2007年，如果你把握住了，你的人生将会有一个莫大的转折点，如果你失败了，你的人生或许就注定了平庸。不要以为还有很久，以天算，你还有362天时间，请好好把握。好自为之。</P>
<P>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 江&nbsp; 坚<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2007.1.3&nbsp; 11:12 am</P>
<P>”</P>
<P>&nbsp; 2007年，收获了一些东西，但是或许我失去的更多。</P>
<P>收获：正式成为中共党员，通过软件设计师职称，通过CET4,发表论文一篇。<BR>失去：放弃了2008年的研究生考试。</P>
<P>&nbsp;&nbsp; 应该来说，这一年我最大的收获，还是真正认识到了自己人生路线该怎么样走。说实话，一年前的现在，我考研纯粹是因为不知道做什么好而考研；而现在改成08年奋斗LAMDA是纯粹的想做学术。曾经以为自己最适合做企业商业，但后来发现自己过于正直和善良，违背了“无商不奸”这一游戏规则，总是赚不到钱，就放弃了。或许，纯洁的学术还是比较符合我的个性，也符合中国共产党员这样的身份。如果说06年我最大的思想觉悟是去了游客士之后对国外发展状况的了解，那么07年我最大的感悟就是认识了自己该怎样走人生路线。这一点要真心感谢我的一位大哥：肖新攀大侠。他给了我很多思想上的启发，让我学会了思考。不得不承认，与高尚的人结识真的是一种享受。</P>
<P>&nbsp;&nbsp; 这一年也失去了很多，主要就是令我放弃了研究生考试。这主要有几个原因，<BR>其一，我感到自己最喜欢的是AI，而作为LAMDA实验室却不招收未经过提前面试的研究生。<BR>其二，我觉得某些专业领域我自己的水平还不够。<BR>其三，我感觉自己今年复习得不够好。</P>
<P>&nbsp;&nbsp; 以上算是对2007年的一点小的总结。新的一年，让我们一起展望2008吧！</P>]]></description>
</item><item>
<title><![CDATA[[转帖]“杰青”周志华专访]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=30777</link>
<author>netjian</author>
<pubDate>2007/12/26 10:34:15</pubDate>
<description><![CDATA[<STRONG></STRONG>
<DIV width="100%">
<DIV style="FLOAT: right"><STRONG></STRONG></DIV>
<DIV>周志华生于1973</DIV>
<DIV>　　在南京大学我发现新大陆——迄今为止最年轻的杰青——31岁的周志华。他年纪比我小，成就比我高，我慕名打电话乃至到办公室堵截，约会再三，他总说自己没什么值得采访的，一连说了N个“NO”！<BR>我这么无情地谋杀他的时间，天可怜见，看在我都找到他以前导师的份上，周志华教授无奈地答应了。<BR>为什么这小子这么婉拒媒体？望着他镜片后单纯得像一个零样的眼睛，这位理科男生的想法其实非常单纯：低调行事，醉心研究，让科研成果说话，别的叨扰能免则免。<BR>这位1973年出生的年轻人，简直坐着火箭上云端：硕博全部提前毕业，毕业第二年破格晋升副教授，第三年聘为教授，第四年获博导资格，同年获“杰青”资助。一年一级，他能没有压力吗？<BR>“压力不是别人给的，是自己找的。”周志华沉静地回答。“级别、职称之类其实倒没什么压力，因为既然已经聘上了，多干点少干点别人也不会怎么样。真正的压力是觉得一直没做出什么好成果来，只能希望以后做的东西能比以前做的好些。”<BR>我们的采访约在办公室，巧的是他爱人同在人工智能教研室工作，所以我们的对话多了些温馨的色彩。 </DIV>
<P></P>
<P>　　人物引擎<BR>周志华，1973年11月生。分别于1996年6月、1998年6月和2000年12月于南京大学计算机科学与技术系获学士、硕士和博士学位。2001年1月起留校任教。2002年3月破格晋升副教授，2003年11月被聘任为教授，2004年4月获博士生导师资格。现任人工智能教研室主任、机器学习与数据挖掘(LAMDA)研究组负责人。南京航天航空大学兼职教授、澳大利亚Deakin大学名誉研究员。<BR>目前主要从事机器学习、数据挖掘、模式识别、信息检索、神经计算、进化计算等领域的研究工作。曾主持或参加过多项国家、省自然科学基金课题的研究工作。发表国际论文40余篇。</P>
<P>　　一般人常在电脑上干的事我都不会<BR>问：有人说IT产业吃的是青春饭，程序员做到35岁就应该退休了。所以他们说出计算机少年天才一点都不稀奇，是这样吗？<BR>答：我的工作和程序员搞电脑软件设计是两回事，一般人想像的计算机博士、教授可能是电脑高手、轻松入侵别人网络的黑客。其实这是一种误解。比如我主要研究的是机器学习和数据挖掘，简单地说，就是研究对数据进行分析的办法，比如对大量的气候信息数据进行分析后，就有可能对今后的灾害性天气提前预警，这里我们要研究的就是如何去分析这些数据。这些东西用途很广，像人脸识别、网络安全、基因数据分析甚至药物筛选都用得上。计算机只是我们用到的一种工具，因为计算机科学研究的其实是“计算”而不是计算机。<BR>其实很多一般人常在电脑上干的事我都不会，像QQ、flash我就不会，只偶尔在网上下下围棋。以前曾经有熟人知道我是计算机博士，搬了台电脑来让我帮忙修，我说不会别人还不信，后来只好送到外面公司去给他修了。</P>
<P>　　家里没装宽带<BR>问：昨晚我给你家里打了40多个电话，前后持续两小时，一直忙音，是没有搁好电话吗？<BR>答：不是，我在拨号上网查资料。<BR>问：一位计算机系的教授，家里没装宽带？太让人匪夷所思了！<BR>答：因为我住在校内改造后的筒子楼，离办公室只有五分钟的路，所以家里没装宽带。<BR>妻子答：主要是没顾得上到电信局申请。<BR>问：请问你是如何认识现在的太太的？<BR>答：我念博士时她念硕士，在同一个教研室，是我的师妹。我们共同语言比较多，她很理解、很支持我，经常陪我一起工作到深夜。她以前很喜欢逛街，结婚以后就少了，虽然校门外就是最繁华的鼓楼商业街，但去年我只陪她逛过一次。虽然她并不埋怨我，但我其实心里对她很歉疚。她刚博士毕业，留校做讲师。</P>
<P>　　住在筒子楼也挺好<BR>问：这个问题我想问问你太太。我在大学念的是中文，周遭都是文科男生，戴白色围巾，有色眼镜，以诗人的面目出现，在大学女生窗下弹吉它念情诗。那时候理科男是没有情趣的代名词。但时移世异，现在的理科男是财富的代名词，不再是那个爬五层楼就气喘的人，也不再是别人说的“机房西装鸡”。据2003年福布斯排行榜统计，在当年排名前100位的中国富豪里，88%都是理工科出身，其中男性又占到该比例中的95%。有人说一个真正的理科男：头上有血，身上有伤，脑袋里有程序。你老公这么有成就，你对他是怎么看的？<BR>妻子答：我不觉得他有什么了不起啊，可能我和他相处久了，只觉得他热爱事业，不喜欢招摇，只想专心做研究。他拿到杰出青年基金后学校给我们特批了一套三室一厅住房，价格比市场便宜，但因为还没装修好，所以我们现在还住在一室一厅的筒子楼里。他评上副教授时我们曾经有一次换两室一厅的机会，但他嫌换房搬家太麻烦、耽误时间，所以就没要。他是想少花时间，不过我觉得住在筒子楼也挺好，上班近，而且生活也方便。<BR>问：有时候会不会委屈，觉得老公太淡泊了？<BR>妻子答：他心思都在研究上，我们都对物质要求不高。</P>
<P>　　7岁第一次独自出远门<BR>问：说说你的童年吧。你这么聪明，肯定少年老成。1992年你以全省高考第11名的成绩离开贵阳六中，考上南京大学，是第一次离开家吗？<BR>答：不是。我大概是7岁的时候第一次出远门。那时候我父母在国防科研单位工作，驻扎在四川山沟里面，小时候我常住在贵阳外婆家。那年我一个人从外婆家到四川看父母，这边把我送上车，那边父母接站。一路上10多个小时，要命的是，到的时候是早上，站台上没看见父母，后来知道是因为发过去通知车次的电报没及时送到。我一个人在车站等着，等了好久也没见来，然后以为没人要我了，大哭。那时候的人真是很好，车站里一位不认识的阿姨拿面条来给我吃，还想办法和我父母联系。到了下午，我父母总算来把我接走了。<BR>问：如果换到现在，可能极少有父母舍得这样做，最多会让孩子坐飞机，脖子上挂一块牌牌，空姐全程陪同。<BR>答：我觉得让小孩从小建立独立、自觉的意识是非常重要的。其实如果放手让孩子去做事，他可能做得出乎你意料地好。</P>
<P>　　父母不能一厢情愿培养小孩<BR>问：你小时候有没有像现在的小孩一样上很多培训班、接受各种特殊技能的教育？<BR>答：没有，不过那时候也没这些东西。我从小就很安静。五六岁的时候，拿着一本书就能坐在那儿一整天不动。所以不太淘气，很好管，基本上不用家长太操心。长大了以后基本上还是这样。<BR>问：可能你学习的自觉性和研究的兴趣就在那时候激发了。<BR>答：可能是吧。我觉得大人其实不要一厢情愿地按自己的想法去培养小孩。每个小孩都会有自己的天性，大人最好是仔细观察，找出他最喜欢做的事情，然后在一旁引导他往好的方面发展。比如小孩喜欢看书，家里就可以多买些对他来说不很深、而且读了能长知识的书放着。如果小孩天性就不喜欢弹琴跳舞，你逼他去学，他肯定觉得痛苦，而且因为得不到乐趣，肯定做不长久，其他方面的天性可能会不知不觉地被抹杀了。<BR>问：我发现你好静不好动的个性一直持续到现在。<BR>答：念博士的时候我还是学校博士生足球队的主力后卫，在学校联赛上还进过球，而且是罚角球直接罚进去的。不过总的来说，我还是比较安静，喜欢一些安静的活动。<BR>问：可能只有你这么安静的人才忍受得了枯燥的科研生活。<BR>答：做学问的人倒未必一定是好静的。而且做学问其实是一件很有趣的事，并不枯燥。比如我们需要读很多文献，没别的事干扰的时候我每天都会读，你可能觉得这挺枯燥的，其实如果真的读懂了，你会觉得好像在和很多聪明人交流思想，很愉快的。特别是有时候一下子觉得“悟”到了点什么，或者是一些杂乱的认识突然贯穿起来了，那种感觉真的非常好，有多少钱也买不到的。而且当研究有了进展，得到同行认可时，很有成就感。</P>
<P>　　中小学生不要偏科<BR>问：你现在做博导了，回头看中小学教育，能给一句忠告吗？<BR>　　答：中小学一定不要偏科，要尽可能全面发展，这会对今后的工作生活有潜移默化的影响。我中学的时候还是比较全面的，文理科都很好，文科班的老师对我选了理科班一直觉得很遗憾，我现在仍然对文学和历史很感兴趣。小时候读的书也很杂，文学名著、历史地理、五花八门都有。这些东西看起来和我现在的研究领域相差很远，但其实能感觉到它们的一些影响，有句话叫“功夫在诗外”，有时候看上去不相干的事情里的一些想法或者见解，可能会意外地带来启发。说实在的，现在有很多学生写出来的中文让人看不懂，如果你的思想无法表达出来让别人理解，不仅自己会很痛苦，而且无论从事什么职业，对自己都是不利的。<BR>&nbsp;<BR>转自南京大学福建校友会</P></DIV>]]></description>
</item><item>
<title><![CDATA[学术造假……]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=30719</link>
<author>netjian</author>
<pubDate>2007/12/22 22:43:27</pubDate>
<description><![CDATA[
<P>今天一直在忏悔……</P>
<P>&nbsp;&nbsp;下午进行了六级考试，本来这次准备得还不错。中午11：00便吃过饭了，就呆在自习室背记作文模板。结果到11：30的时候，班上一个同学来找我，说下午的六级有答案买，提前半个小时到，没有任何问题。鉴于他们上午的答案是正确的，我当时就答应了，因为我对于这次六级也没有绝对的把握，而且因为是十几个人一起买一份，所以只要30块钱就可以了。结果接下来的时间我整个人就没心思考试了，一直在忙乎着答案。</P>
<P>&nbsp; 下午14：30，答案真的过来了。我抄了答案，15：00进了考场。作文题完全正确。但其他题目完全错误。而且那个时候，等我发现答案错误的时候，整个人已经失去了状态。接下来的题做得一塌糊涂。这次六级就伴随着假答案一起死去了……</P>
<P>&nbsp;&nbsp;现在脑子里面满是悔恨，为什么要受外界的诱惑呢？就是因为轻信外界，所以放弃了自己的信念，最终导致了惨痛的结局。这次六级又没有通过，那就意味着明年5月份面试的时候简历上写着的英语水平是四级，这是拿不出手的。害怕到时候连去南大面试的基本资格都不具备——纵使我阅读英文专业文献（正在读的有pattern classification ，Machine Learning ）不是那么困难，但恐怕到时候CET-6是LAMDA的基本资格。害怕……真的好后悔，为什么会犯这样的错误呢，导致了这样一个窘迫的局面。感觉自己像做了一场学术造假，而且这个学术还是错误的学术……真的好忏悔。</P>
<P>&nbsp; 以后绝对不再做这样的事情了——纵使那答案是真的，我也不做这样的假了，我发誓！希望这件事情能给我的人生道路带来一点启示。</P>
<P>&nbsp; 毕了</P>]]></description>
</item><item>
<title><![CDATA[期末考试]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=30666</link>
<author>netjian</author>
<pubDate>2007/12/20 22:28:33</pubDate>
<description><![CDATA[
<P>两天没有来写了，之所以两天没有来，是因为觉得这两天没有学到太多东西。今天和明天两天是大学四年最后的两科期末考试，所以这两天都在翻看期末学习的一些资料。<BR>&nbsp; 今天考试的是软件工程，明天将考试网络管理。今天的题相对简单，明天可能会复杂一些。值得一提的是，今天我见识到了我班一位同学很好的“机遇创造”意识。下午14：30考试，他为了让监考老师分神，专程拿了一叠报纸放在讲台上勾引老师看。另外，他为了防止老师在他的座位旁边走动，专程借了教管室的拖把沾了洗衣粉把自己座旁的地板拖得非常滑——以防止老师在他旁边走动……太有才了，大四的学生，真富有想象力。<BR>&nbsp; 发现写BLOG其实是一个很好的习惯，就像日记一样，其实它可以让你不断地总结自我。但是我选择blogger的主要原因，却是这里面真的潜伏了不少高人。有研究生，有博士，有教师，还有一些教授，跟他们谈话真的让人感到获益匪浅，句句都很有见地。像我这样的本科生，在这里一般都只有转帖的份了，呵呵，如果想发言可得三思，免得班门弄斧除了笑话。<BR>&nbsp; 也许以后的我无法相信，5度的气温，我刚刚在水房冲了个凉水澡，寒水刺骨，但是刺骨之后便是温暖和清爽带来的舒适。<BR>&nbsp; 论文思路已经全部整理完毕，剩下整稿了，但是不知道总体效果怎么样。虽然这次冠着是郑州市科技厅的头衔领的项目，可是感觉有点空虚，因为说实话，技术含量并不高。像我们这样的二流院校都是这样，做一些所谓的“攻关项目”，但终究攻的是什么样的关，恐怕只有我们自己知道。发了吧，发了就可以少点负担。<BR>&nbsp; <BR>&nbsp; 毕了~<BR>&nbsp;&nbsp;</P>]]></description>
</item><item>
<title><![CDATA[初来乍到]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=30577</link>
<author>netjian</author>
<pubDate>2007/12/17 22:09:30</pubDate>
<description><![CDATA[
<P>　今天是把博客搬到了BLOGGER，而且以后就长期在此安家了。一直都希望在某个固定的站点上写下自己的一些成长日记，但是却找不到一个既稳定值得信任又有档次的站点，今天看到BLOGGER，觉得它应该是个很不错的选择。我取名叫做“Progressing Diary”，以后就把我每天的成长记录写在这上面，每天都督促自己，每天也都享受自己的进步，而且将来也可以再阅读自己的人生脚印。衷心希望一些牛人来对我的生涯规划做出一些指点，谢谢大家。</P>
<P>&nbsp;&nbsp;上午7：30起的床，一天没有课程。早上再次思考了DES其中的某些细节，但是还有一个问题没能解决，即明文"a"通过密钥"net_jian"，加密成"AxNFNhRfjOo="。这中间的算法如何实现？要够实际的演算过程，不要胡扯的理论。这还是有一些问题。</P>
<P><BR>&nbsp; 上午唯一的一个成功或许就是申请了这个博客，转载了几篇文章和举行了一个短暂的欢迎仪式。</P>
<P><BR>&nbsp; 下午在学校参加了“软通动力”的一个项目介绍会，但终究却是介绍我去上华中科大的软件工程硕士，虽然报了名，但是没有太多兴趣。终究不想改变自己将来任教做学问的这个理想。</P>
<P><BR>&nbsp;&nbsp;晚上再次翻看了论文，以及论坛里推荐的Ebook《Introduction to Linear and Abstract Algebra》。20：00到22：00期间，和几个哥们一起看了《投名状》，枪版，感觉前半部分演的太繁琐，后半部分有点赶的意思，不过终究还算一部不错的电影。</P>
<P><BR>&nbsp; 22：30了，剩下的时间将给女朋友打一个电话，然后去楼道自习室去听一会听力。CET6马上就要考试了，这次一定得过，这是明年5月份参加LAMDA面试的起码要求。</P>
<P>毕了</P>]]></description>
</item><item>
<title><![CDATA[[数据挖掘]数据挖掘经典算法(转)]]></title>
<link>http://blogger.org.cn/blog/more.asp?name=netjian&amp;id=30560</link>
<author>netjian</author>
<pubDate>2007/12/17 10:17:03</pubDate>
<description><![CDATA[
<DIV>
<P></P>
<P>Classification<BR>==============</P>
<P>&nbsp;#1.&nbsp;C4.5</P>
<P>Quinlan,&nbsp;J.&nbsp;R.&nbsp;1993.&nbsp;C4.5:&nbsp;Programs&nbsp;for&nbsp;Machine&nbsp;Learning.<BR>Morgan&nbsp;Kaufmann&nbsp;Publishers&nbsp;Inc.</P>
<P><BR>&nbsp;#2.&nbsp;CART</P>
<P>L.&nbsp;Breiman,&nbsp;J.&nbsp;Friedman,&nbsp;R.&nbsp;Olshen,&nbsp;and&nbsp;C.&nbsp;Stone.&nbsp;Classification&nbsp;and<BR>Regression&nbsp;Trees.&nbsp;Wadsworth,&nbsp;Belmont,&nbsp;CA,&nbsp;1984.</P>
<P>&nbsp;#3.&nbsp;K&nbsp;Nearest&nbsp;Neighbours&nbsp;(kNN)</P>
<P>Hastie,&nbsp;T.&nbsp;and&nbsp;Tibshirani,&nbsp;R.&nbsp;1996.&nbsp;Discriminant&nbsp;Adaptive&nbsp;Nearest<BR>Neighbor&nbsp;Classification.&nbsp;IEEE&nbsp;Trans.&nbsp;Pattern<BR>Anal.&nbsp;Mach.&nbsp;Intell.&nbsp;(TPAMI).&nbsp;18,&nbsp;6&nbsp;(Jun.&nbsp;1996),&nbsp;607-616.&nbsp;<BR>DOI=&nbsp;<A class=contentlink href="http://dx.doi.org/10.1109/34.506411" target=_blank><FONT color=#4455aa>http://dx.doi.org/10.1109/34.506411</FONT></A></P>
<P>&nbsp;#4.&nbsp;Naive&nbsp;Bayes</P>
<P>Hand,&nbsp;D.J.,&nbsp;Yu,&nbsp;K.,&nbsp;2001.&nbsp;Idiot's&nbsp;Bayes:&nbsp;Not&nbsp;So&nbsp;Stupid&nbsp;After&nbsp;All?<BR>Internat.&nbsp;Statist.&nbsp;Rev.&nbsp;69,&nbsp;385-398.</P>
<P><BR>Statistical&nbsp;Learning<BR>====================</P>
<P>&nbsp;#5.&nbsp;SVM</P>
<P>Vapnik,&nbsp;V.&nbsp;N.&nbsp;1995.&nbsp;The&nbsp;Nature&nbsp;of&nbsp;Statistical&nbsp;Learning<BR>Theory.&nbsp;Springer-Verlag&nbsp;New&nbsp;York,&nbsp;Inc.</P>
<P>&nbsp;#6.&nbsp;EM</P>
<P>McLachlan,&nbsp;G.&nbsp;and&nbsp;Peel,&nbsp;D.&nbsp;(2000).&nbsp;Finite&nbsp;Mixture&nbsp;Models.&nbsp;<BR>J.&nbsp;Wiley,&nbsp;New&nbsp;York.</P>
<P><BR>Association&nbsp;Analysis<BR>====================</P>
<P>&nbsp;#7.&nbsp;Apriori</P>
<P>Rakesh&nbsp;Agrawal&nbsp;and&nbsp;Ramakrishnan&nbsp;Srikant.&nbsp;Fast&nbsp;Algorithms&nbsp;for&nbsp;Mining<BR>Association&nbsp;Rules.&nbsp;In&nbsp;Proc.&nbsp;of&nbsp;the&nbsp;20th&nbsp;Int'l&nbsp;Conference&nbsp;on&nbsp;Very&nbsp;Large<BR>Databases&nbsp;(VLDB&nbsp;'94),&nbsp;Santiago,&nbsp;Chile,&nbsp;September&nbsp;1994.&nbsp;<BR><A class=contentlink href="http://citeseer.comp.nus.edu.sg/agrawal94fast.html" target=_blank><FONT color=#4455aa>http://citeseer.comp.nus.edu.sg/agrawal94fast.html</FONT></A></P>
<P>&nbsp;#8.&nbsp;FP-Tree</P>
<P>Han,&nbsp;J.,&nbsp;Pei,&nbsp;J.,&nbsp;and&nbsp;Yin,&nbsp;Y.&nbsp;2000.&nbsp;Mining&nbsp;frequent&nbsp;patterns&nbsp;without<BR>candidate&nbsp;generation.&nbsp;In&nbsp;Proceedings&nbsp;of&nbsp;the&nbsp;2000&nbsp;ACM&nbsp;SIGMOD<BR>international&nbsp;Conference&nbsp;on&nbsp;Management&nbsp;of&nbsp;Data&nbsp;(Dallas,&nbsp;Texas,&nbsp;United<BR>States,&nbsp;May&nbsp;15&nbsp;-&nbsp;18,&nbsp;2000).&nbsp;SIGMOD&nbsp;'00.&nbsp;ACM&nbsp;Press,&nbsp;New&nbsp;York,&nbsp;NY,&nbsp;1-12.<BR>DOI=&nbsp;<A class=contentlink href="http://doi.acm.org/10.1145/342009.335372" target=_blank><FONT color=#4455aa>http://doi.acm.org/10.1145/342009.335372</FONT></A></P>
<P><BR>Link&nbsp;Mining<BR>===========</P>
<P>&nbsp;#9.&nbsp;PageRank</P>
<P>Brin,&nbsp;S.&nbsp;and&nbsp;Page,&nbsp;L.&nbsp;1998.&nbsp;The&nbsp;anatomy&nbsp;of&nbsp;a&nbsp;large-scale&nbsp;hypertextual<BR>Web&nbsp;search&nbsp;engine.&nbsp;In&nbsp;Proceedings&nbsp;of&nbsp;the&nbsp;Seventh&nbsp;international<BR>Conference&nbsp;on&nbsp;World&nbsp;Wide&nbsp;Web&nbsp;(WWW-7)&nbsp;(Brisbane,<BR>Australia).&nbsp;P.&nbsp;H.&nbsp;Enslow&nbsp;and&nbsp;A.&nbsp;Ellis,&nbsp;Eds.&nbsp;Elsevier&nbsp;Science<BR>Publishers&nbsp;B.&nbsp;V.,&nbsp;Amsterdam,&nbsp;The&nbsp;Netherlands,&nbsp;107-117.&nbsp;<BR>DOI=&nbsp;<A class=contentlink href="http://dx.doi.org/10.1016/S0169-7552" target=_blank><FONT color=#4455aa>http://dx.doi.org/10.1016/S0169-7552</FONT></A>(98)00110-X</P>
<P>&nbsp;#10.&nbsp;HITS</P>
<P>Kleinberg,&nbsp;J.&nbsp;M.&nbsp;1998.&nbsp;Authoritative&nbsp;sources&nbsp;in&nbsp;a&nbsp;hyperlinked<BR>environment.&nbsp;In&nbsp;Proceedings&nbsp;of&nbsp;the&nbsp;Ninth&nbsp;Annual&nbsp;ACM-SIAM&nbsp;Symposium&nbsp;on<BR>Discrete&nbsp;Algorithms&nbsp;(San&nbsp;Francisco,&nbsp;California,&nbsp;United&nbsp;States,&nbsp;January<BR>25&nbsp;-&nbsp;27,&nbsp;1998).&nbsp;Symposium&nbsp;on&nbsp;Discrete&nbsp;Algorithms.&nbsp;Society&nbsp;for<BR>Industrial&nbsp;and&nbsp;Applied&nbsp;Mathematics,&nbsp;Philadelphia,&nbsp;PA,&nbsp;668-677.</P>
<P><BR>Clustering<BR>==========</P>
<P>&nbsp;#11.&nbsp;K-Means</P>
<P>MacQueen,&nbsp;J.&nbsp;B.,&nbsp;Some&nbsp;methods&nbsp;for&nbsp;classification&nbsp;and&nbsp;analysis&nbsp;of<BR>multivariate&nbsp;observations,&nbsp;in&nbsp;Proc.&nbsp;5th&nbsp;Berkeley&nbsp;Symp.&nbsp;Mathematical<BR>Statistics&nbsp;and&nbsp;Probability,&nbsp;1967,&nbsp;pp.&nbsp;281-297.</P>
<P>&nbsp;#12.&nbsp;BIRCH</P>
<P>Zhang,&nbsp;T.,&nbsp;Ramakrishnan,&nbsp;R.,&nbsp;and&nbsp;Livny,&nbsp;M.&nbsp;1996.&nbsp;BIRCH:&nbsp;an&nbsp;efficient<BR>data&nbsp;clustering&nbsp;method&nbsp;for&nbsp;very&nbsp;large&nbsp;databases.&nbsp;In&nbsp;Proceedings&nbsp;of&nbsp;the<BR>1996&nbsp;ACM&nbsp;SIGMOD&nbsp;international&nbsp;Conference&nbsp;on&nbsp;Management&nbsp;of&nbsp;Data<BR>(Montreal,&nbsp;Quebec,&nbsp;Canada,&nbsp;June&nbsp;04&nbsp;-&nbsp;06,&nbsp;1996).&nbsp;J.&nbsp;Widom,&nbsp;Ed.&nbsp;<BR>SIGMOD&nbsp;'96.&nbsp;ACM&nbsp;Press,&nbsp;New&nbsp;York,&nbsp;NY,&nbsp;103-114.&nbsp;<BR>DOI=&nbsp;<A class=contentlink href="http://doi.acm.org/10.1145/233269.233324" target=_blank><FONT color=#4455aa>http://doi.acm.org/10.1145/233269.233324</FONT></A></P>
<P><BR>Bagging&nbsp;and&nbsp;Boosting<BR>====================</P>
<P>&nbsp;#13.&nbsp;AdaBoost</P>
<P>Freund,&nbsp;Y.&nbsp;and&nbsp;Schapire,&nbsp;R.&nbsp;E.&nbsp;1997.&nbsp;A&nbsp;decision-theoretic<BR>generalization&nbsp;of&nbsp;on-line&nbsp;learning&nbsp;and&nbsp;an&nbsp;application&nbsp;to<BR>boosting.&nbsp;J.&nbsp;Comput.&nbsp;Syst.&nbsp;Sci.&nbsp;55,&nbsp;1&nbsp;(Aug.&nbsp;1997),&nbsp;119-139.&nbsp;<BR>DOI=&nbsp;<A class=contentlink href="http://dx.doi.org/10.1006/jcss.1997.1504" target=_blank><FONT color=#4455aa>http://dx.doi.org/10.1006/jcss.1997.1504</FONT></A></P>
<P><BR>Sequential&nbsp;Patterns<BR>===================</P>
<P>&nbsp;#14.&nbsp;GSP</P>
<P>Srikant,&nbsp;R.&nbsp;and&nbsp;Agrawal,&nbsp;R.&nbsp;1996.&nbsp;Mining&nbsp;Sequential&nbsp;Patterns:<BR>Generalizations&nbsp;and&nbsp;Performance&nbsp;Improvements.&nbsp;In&nbsp;Proceedings&nbsp;of&nbsp;the<BR>5th&nbsp;international&nbsp;Conference&nbsp;on&nbsp;Extending&nbsp;Database&nbsp;Technology:<BR>Advances&nbsp;in&nbsp;Database&nbsp;Technology&nbsp;(March&nbsp;25&nbsp;-&nbsp;29,&nbsp;1996).&nbsp;P.&nbsp;M.&nbsp;Apers,<BR>M.&nbsp;Bouzeghoub,&nbsp;and&nbsp;G.&nbsp;Gardarin,&nbsp;Eds.&nbsp;Lecture&nbsp;Notes&nbsp;In&nbsp;Computer<BR>Science,&nbsp;vol.&nbsp;1057.&nbsp;Springer-Verlag,&nbsp;London,&nbsp;3-17.</P>
<P>&nbsp;#15.&nbsp;PrefixSpan</P>
<P>J.&nbsp;Pei,&nbsp;J.&nbsp;Han,&nbsp;B.&nbsp;Mortazavi-Asl,&nbsp;H.&nbsp;Pinto,&nbsp;Q.&nbsp;Chen,&nbsp;U.&nbsp;Dayal&nbsp;and<BR>M-C.&nbsp;Hsu.&nbsp;PrefixSpan:&nbsp;Mining&nbsp;Sequential&nbsp;Patterns&nbsp;Efficiently&nbsp;by<BR>Prefix-Projected&nbsp;Pattern&nbsp;Growth.&nbsp;In&nbsp;Proceedings&nbsp;of&nbsp;the&nbsp;17th<BR>international&nbsp;Conference&nbsp;on&nbsp;Data&nbsp;Engineering&nbsp;(April&nbsp;02&nbsp;-&nbsp;06,<BR>2001).&nbsp;ICDE&nbsp;'01.&nbsp;IEEE&nbsp;Computer&nbsp;Society,&nbsp;Washington,&nbsp;DC.</P>
<P><BR>Integrated&nbsp;Mining<BR>=================</P>
<P>&nbsp;#16.&nbsp;CBA</P>
<P>Liu,&nbsp;B.,&nbsp;Hsu,&nbsp;W.&nbsp;and&nbsp;Ma,&nbsp;Y.&nbsp;M.&nbsp;Integrating&nbsp;classification&nbsp;and<BR>association&nbsp;rule&nbsp;mining.&nbsp;KDD-98,&nbsp;1998,&nbsp;pp.&nbsp;80-86.&nbsp;<BR><A class=contentlink href="http://citeseer.comp.nus.edu.sg/liu98integrating.html" target=_blank><FONT color=#4455aa>http://citeseer.comp.nus.edu.sg/liu98integrating.html</FONT></A><BR>&nbsp;&nbsp;&nbsp;</P>
<P>Rough&nbsp;Sets<BR>==========</P>
<P>&nbsp;#17.&nbsp;Finding&nbsp;reduct</P>
<P>Zdzislaw&nbsp;Pawlak,&nbsp;Rough&nbsp;Sets:&nbsp;Theoretical&nbsp;Aspects&nbsp;of&nbsp;Reasoning&nbsp;about<BR>Data,&nbsp;Kluwer&nbsp;Academic&nbsp;Publishers,&nbsp;Norwell,&nbsp;MA,&nbsp;1992</P>
<P><BR>Graph&nbsp;Mining<BR>============</P>
<P>&nbsp;#18.&nbsp;gSpan</P>
<P>Yan,&nbsp;X.&nbsp;and&nbsp;Han,&nbsp;J.&nbsp;2002.&nbsp;gSpan:&nbsp;Graph-Based&nbsp;Substructure&nbsp;Pattern<BR>Mining.&nbsp;In&nbsp;Proceedings&nbsp;of&nbsp;the&nbsp;2002&nbsp;IEEE&nbsp;International&nbsp;Conference&nbsp;on<BR>Data&nbsp;Mining&nbsp;(ICDM&nbsp;'02)&nbsp;(December&nbsp;09&nbsp;-&nbsp;12,&nbsp;2002).&nbsp;IEEE&nbsp;Computer<BR>Society,&nbsp;Washington,&nbsp;DC.</P>
<P>&nbsp;</P>
<P>转自<A href="http://blogger.org.cn/blog/more.asp?name=DMman&amp;id=30496">http://blogger.org.cn/blog/more.asp?name=DMman&amp;id=30496</A></P></DIV>]]></description>
</item>
</channel>
</rss>