📄 『 高性能计算 』 - 神经网络遗传算法---绝对好东西.htm
字号:
border=0></A></TD>
<TD align=right bgColor=#90c8ff><A
onclick=javascript:WebBrowser.ExecWB(4,1)
href="http://www.lasg.ac.cn/cgi-bin/forum/topic.cgi?forum=4&topic=1463#"><IMG
height=14 alt=保存该页为文件
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/saveas.gif" width=14
border=0></A>
<OBJECT id=WebBrowser height=0 width=0
classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2></OBJECT><A
href="http://www.lasg.ac.cn/cgi-bin/forum/report.cgi?forum=4&topic=1463"><IMG
height=15 alt=本贴有问题,发送短消息报告给版主
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/report.gif" width=16
border=0></A> <A
href="http://www.lasg.ac.cn/cgi-bin/forum/fav.cgi?action=add&forum=4&topic=1463"><IMG
height=15 alt=加入个人收藏&关注本贴
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/fav.gif" width=13
border=0></A> <A
href="http://www.lasg.ac.cn/cgi-bin/forum/printpage.cgi?forum=4&topic=1463"><IMG
height=16 alt=显示可打印的版本
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/printpage.gif" width=16
border=0></A> <A
href="javascript:openScript('pag.cgi?forum=4&topic=1463',500,400)"><IMG
height=16 alt=把本贴打包邮递
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/pag.gif" width=16
border=0></A> <A
href="http://www.lasg.ac.cn/cgi-bin/forum/topic.cgi?forum=4&topic=1463#"><SPAN
style="CURSOR: hand"
onclick="window.external.AddFavorite('http://www.lasg.ac.cn/cgi-bin/forum/topic.cgi?forum=4&topic=1463', ' 动力论坛 - 神经网络遗传算法---绝对好东西')"><IMG
height=15 alt=把本贴加入IE收藏夹
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/fav_add1.gif" width=15
border=0></SPAN></A> <A
href="http://www.lasg.ac.cn/cgi-bin/forum/lbfriend.cgi?forum=4&topic=1463"><IMG
height=16 alt=发送本页面给朋友
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/emailtofriend.gif" width=16
border=0></A> </TD></TR></TBODY></TABLE></TD>
<TD width=1 bgColor=#000000 height=24></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="97%" align=center bgColor=#000000
border=0>
<TBODY>
<TR>
<TD height=1></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width="97%" align=center border=0>
<TBODY>
<TR>
<TD width=1 bgColor=#000000 height=24></TD>
<TD bgColor=#f2f8ff>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#f2f8ff>
<TBODY>
<TR>
<TD vAlign=top width=178 bgColor=#f2f8ff rowSpan=2><IMG height=4
src="" width=0><BR>
<TABLE cellSpacing=0 cellPadding=0 border=0>
<TBODY>
<TR>
<TD width=30> <IMG height=15 alt=该用户目前不在线
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/offline1.gif"
width=15></TD>
<TD>
<TABLE
style="FILTER: glow(color=#996699,direction=135)"> <FONT
color=#ffffff><B>海阔天空</B></FONT>
<TBODY></TBODY></TABLE></TD>
<TD> <IMG height=14 alt=哦,帅哥哟
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/mal.gif" width=20>
<IMG alt=此人为版主
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/teammo.gif"
width=16></TD></TR></TBODY></TABLE> <FONT color=#555555>头衔:
论坛版主<BR></FONT> <FONT color=#333333></FONT> <BR> <IMG
height=90 src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/4_1472.gif"
width=74> <BR> <IMG height=16
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/pips4.gif" width=100>
<BR> <FONT color=#555555>威望: 0</FONT> <BR> <FONT
color=#333333>级别: <A
href="http://www.lasg.ac.cn/cgi-bin/forum/lookinfo.cgi?action=style"
target=_blank>精灵王</A></FONT> <BR> <FONT color=#555555>来自: 安徽合肥
</FONT><BR> <FONT color=#333333>鉴定: 已设置保密</FONT>
<BR> <FONT color=#555555>魅力: <IMG height=8 alt=4020
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/bar4.gif" width=21></FONT>
<BR> <FONT color=#333333>经验: <IMG height=8 alt=100
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/bar5.gif" width=1></FONT>
<BR> <FONT color=#555555>金钱: 5730 雷傲元</FONT> <BR> <FONT
color=#333333>总发贴数: <B>385</B> 篇</FONT> <BR> <FONT
color=#555555>注册日期: 2004/02/02</FONT><BR><IMG height=4 src=""
width=0><BR></TD>
<TD width=1 bgColor=#f2f8ff height="100%" rowSpan=2>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width=1
bgColor=#90c8ff>
<TBODY>
<TR>
<TD width=1></TD></TR></TBODY></TABLE></TD>
<TD vAlign=top width=* bgColor=#f2f8ff height="100%"><IMG height=4
src="" width=0><BR> <A title=给海阔天空发送一个短消息
href="javascript:openScript('messanger.cgi?action=new&touser=海阔天空',420,320)"><IMG
height=16 src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/message.gif"
width=16 border=0>消息</A> <A title=查看海阔天空的个人资料
href="http://www.lasg.ac.cn/cgi-bin/forum/profile.cgi?action=show&member=海阔天空"><IMG
height=16 src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/profile.gif"
width=16 border=0>查看</A> <A title=搜索海阔天空在本分论坛的全部贴子
href="http://www.lasg.ac.cn/cgi-bin/forum/search.cgi?action=startsearch&TYPE_OF_SEARCH=username_search&NAME_SEARCH=topictitle_search&FORUMS_TO_SEARCH=4&SEARCH_STRING=海阔天空"
target=_blank><IMG height=16
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/find.gif" width=16
border=0>搜索</A> <A title=加海阔天空为我的好友
href="javascript:openScript('friendlist.cgi?action=adduser&adduser=海阔天空',420,320)"><IMG
height=16 src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/friend.gif"
width=16 border=0>好友</A> <A title=电子邮件地址
href="mailto:ahzhming@163.com"><IMG height=16
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/email.gif" width=16
border=0>邮件</A> <A title=复制这个贴子
href="http://www.lasg.ac.cn/cgi-bin/forum/post.cgi?action=copy1&forum=4&topic=1463&postno=1"><IMG
height=16 src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/copy.gif" width=16
border=0>复制</A> <A title=引用回复这个贴子
href="http://www.lasg.ac.cn/cgi-bin/forum/post.cgi?action=replyquote&forum=4&topic=1463&postno=1"><IMG
height=16 src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/reply.gif"
width=16 border=0>引用</A> <A
href="http://www.lasg.ac.cn/cgi-bin/forum/post.cgi?action=reply&forum=4&topic=1463"><IMG
height=16 alt=回复贴子
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/replynow.gif" width=16
border=0>回复</A> <BR>
<HR width="100%" color=#000000 SIZE=1>
<TABLE style="TABLE-LAYOUT: fixed" cellSpacing=0 cellPadding=0
width="100%">
<TBODY>
<TR>
<TD vAlign=top width=32><IMG height=13
src="『 高性能计算 』 - 神经网络遗传算法---绝对好东西.files/00.gif"
width=13> </TD>
<TD
style="LEFT: 0px; WIDTH: 100%; LINE-HEIGHT: 130%; LETTER-SPACING: 0pt; WORD-WRAP: break-word"><FONT
color=#555555><FONT color=#555555>神经网络遗传算法
<BR><BR>/*-----------------------------------------------------------------------*\
<BR>|
| <BR>|
Robotics 95 -- Final Course
Project
| <BR>|
| <BR>|
By : Ziv
Pollack & Omri Weisman
| <BR>|
|
<BR>| NNUGA -
Neural Network Using Genetic Algorithms
| <BR>|
|
<BR>\*-----------------------------------------------------------------------*/
<BR>/* <BR>* File name : nnuga.c <BR>* <BR>* This program is
an implementation of a Neural Network (NN) which learns u
<BR>sing <BR>* Genetic Algorithms (GA). It runs from a Tk
shell. <BR>* <BR>* It reads points from a file and creates an
output file which describes <BR>* points that correspond to
lines that seperate the plain into several <BR>* regions,
regions where the NN's output will be true, and a regions
<BR>* where the NN's output will be false. <BR>* <BR>*/
<BR>#include <stdio.h> <BR>#include <math.h>
<BR>#include <sys/time.h> <BR>/* NN related */
<BR>#define NUM 2 /* Number of
input nodes */ <BR>#define LIMIT 150 /* Maximum
number of inputs the system can handle */ <BR>#define SESSIONS
500 /* Number of training sessions that we'll put the
syst <BR>em through */ <BR>/* GA related */ <BR>#define POPS
10 /* Number of populations */
<BR>#define SIZE 25 /* Size of
vector in the genetic algorithms */ <BR>#define MAXPOP
60 /* Size of population */ <BR>#define
BESTPOP 4 /* Number of individuals taken from
the best */ <BR>#define SELPOP 8 /*
SELPOP-BESTPOP = Number of people selected randomly <BR>on
each gen. */ <BR>#define NEWPOP 18 /*
NEWPOP-SELPOP = Number of new people, created rando <BR>mly on
each gen. */ <BR>#define MUT1 25 /*
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -