You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(9) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(5) |
Feb
(55) |
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
(2) |
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
|
From: <sky...@us...> - 2008-02-16 20:26:25
|
Revision: 26
http://sga.svn.sourceforge.net/sga/?rev=26&view=rev
Author: skywalker85
Date: 2008-02-16 12:26:23 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
think I have fixed image prob on win tut
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-16 20:17:42 UTC (rev 25)
+++ trunk/web/support_runonwin.html 2008-02-16 20:26:23 UTC (rev 26)
@@ -33,12 +33,12 @@
<br>
<h3>How To Use the sga Program</h3>
<ol><li>Open a new CMD window click on START > RUN > cmd > ENTER
- <p><img src="images\runbox.jpg" alt="run box" width="204" height="116" /></p>
+ <p><img src="images/runbox.jpg" alt="run box" width="204" height="116" /></p>
</li>
<br>
<li> Make the cmd window as large as possible. If you hold down the ALT key and then press ENTER the cmd window will go to full screen mode.</li>
-<li>You will get the following cmd Window:-<p><img src="images\cmdwindow.jpg" alt="cmd window" width="393" height="213" /></p>
+<li>You will get the following cmd Window:-<p><img src="images/cmdwindow.jpg" alt="cmd window" width="393" height="213" /></p>
</li>
<br>
<li>Navigate to the C:\sga folder by using the following command: -
@@ -47,7 +47,7 @@
</blockquote>
</li>
<li> Now the fun can really start! For your first ???experiment??? if you like, type in the following sga -f3 | more and press ENTER
- <p><img src="images\sgaoutput.jpg" alt="cmd window" width="393" height="213"/></p>
+ <p><img src="images/sgaoutput.jpg" alt="cmd window" width="393" height="213"/></p>
<p>This will display the window above, showing the first page of results. To see more results, then press SPACEBAR. Ok, now to explain what each line shows. </p>
<p>a) The first part shows the parameter settings that were used.</p>
<p>b) The second part is the settings for each generation separated by dashed lines.</p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-16 20:17:45
|
Revision: 25
http://sga.svn.sourceforge.net/sga/?rev=25&view=rev
Author: skywalker85
Date: 2008-02-16 12:17:42 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
updated win tutorial
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-16 16:15:03 UTC (rev 24)
+++ trunk/web/support_runonwin.html 2008-02-16 20:17:42 UTC (rev 25)
@@ -21,10 +21,10 @@
</ul>
</div>
<div id="content"><div class="article">
- <h2><a href="support.html">Support</a> » Running SGA on Windows </h2>
+ <h2><a href="support.html">Support</a> » Running sga on Windows </h2>
<h3> </h3>
<h3>Assumptions</h3>
- <p>OK, firstly we have made some assumptions, these being: - </p>
+ <p>OK, firstly we have made some assumptions, these being:</p>
<ul><li>You are running Windows XP and above</li>
<li>That you have downloaded the sga C code and have converted it into an .exe file.</li>
<li>You will need to save the cygwin1.dll into the same directory for sga to run. Cygwin1.dll can be downloaded from <a href="http://www.cse.dmu.ac.uk/~tw/genetic-algorithms/cygwin1.dll">here</a></li>
@@ -33,12 +33,12 @@
<br>
<h3>How To Use the sga Program</h3>
<ol><li>Open a new CMD window click on START > RUN > cmd > ENTER
- <p><img src="images/runbox.jpg" alt="run box" width="204" height="116" /></p>
+ <p><img src="images\runbox.jpg" alt="run box" width="204" height="116" /></p>
</li>
<br>
<li> Make the cmd window as large as possible. If you hold down the ALT key and then press ENTER the cmd window will go to full screen mode.</li>
-<li>You will get the following cmd Window:-<p><img src="images/cmdwindow.jpg" alt="cmd window" width="393" height="213" /></p>
+<li>You will get the following cmd Window:-<p><img src="images\cmdwindow.jpg" alt="cmd window" width="393" height="213" /></p>
</li>
<br>
<li>Navigate to the C:\sga folder by using the following command: -
@@ -47,15 +47,14 @@
</blockquote>
</li>
<li> Now the fun can really start! For your first ???experiment??? if you like, type in the following sga -f3 | more and press ENTER
- <p><img src="images/sgaoutput.jpg" alt="cmd window" width="393" height="213"/></p>
+ <p><img src="images\sgaoutput.jpg" alt="cmd window" width="393" height="213"/></p>
<p>This will display the window above, showing the first page of results. To see more results, then press SPACEBAR. Ok, now to explain what each line shows. </p>
<p>a) The first part shows the parameter settings that were used.</p>
<p>b) The second part is the settings for each generation separated by dashed lines.</p>
<p>c) Underneath the dashed lines are the first 10 generations of each population, unless the ???s command has been used to change the number displayed. </p>
- <p>d) Just above the dashed line for the next generation is a string of digits and/or dashes that represent the percentage of ones in each column: a - means no one???s or all ones (i.e. convergence), a 0 means less than 10% ones, a 1 means 10% or more but less than 20%, and so on.</p>
+ <p>d) Just above the dashed line for the next generation is a string of digits and/or dashes that represent the percentage of ones in each column: a - means no one???s or all ones (i.e. convergence), a 0 means less than 10% ones, a 1 means 10% or more but less than 20%, and so on..</p>
</li>
- <li> To exit the program, type q, or wait until the program finishes at generation 1000.</li>
- <li>. To rerun the program use the up-arrow key to recall the last command. You can use the left and right arrows to move through the command and edit it if you wish.</li>
+ <li>To rerun the program use the up-arrow key to recall the last command. You can use the left and right arrows to move through the command and edit it if you wish.</li>
</ol>
<br>
<h3>Fitness Functions</h3>
@@ -69,8 +68,8 @@
<li> 5 integer (fitness equals integer equivalent of bitstring). </li>
</ul>
<br>
- <h3>Keyboard Commands</h3>
- <p>There are several keyboard commands (with default values) that can be used when running the sga program, these include: - </p>
+ <h3>Command Options</h3>
+ <p>There are several command options (with default values) which can be used to pass parameters to the program on start upthat can be used when running the: </p>
<p>-p 300 popsize (must be even, not 0 and not greater than 1000) </p>
<p>-c 16 chromsize (length of bitstring, not 0 and not greater than 80) </p>
<p>-x 70 crossover probability (0 = no crossover) </p>
@@ -84,9 +83,9 @@
<br>
<h3>Examples</h3>
<p>sga uses defaults as above </p>
- <p>sga 500 sets the population size to 500 </p>
- <p>sga c25 x2 m800 chromsize = 25, crossover = 25, 1 in 800 bits mutated </p>
- <p>sga s33 d2 display 33 individuals from every population </p>
+ <p>sga -p 500 sets the population size to 500 </p>
+ <p>sga -c 25 x2 m800 chromsize = 25, crossover = 25, 1 in 800 bits mutated </p>
+ <p>sga -s 33 d2 display 33 individuals from every population </p>
</div>
</div>
</div>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ty...@us...> - 2008-02-16 16:15:09
|
Revision: 24
http://sga.svn.sourceforge.net/sga/?rev=24&view=rev
Author: tyront
Date: 2008-02-16 08:15:03 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
changed SGAResult to sgaresult as requested
Modified Paths:
--------------
branches/xml-output/code/sga.c
Modified: branches/xml-output/code/sga.c
===================================================================
--- branches/xml-output/code/sga.c 2008-02-16 16:08:00 UTC (rev 23)
+++ branches/xml-output/code/sga.c 2008-02-16 16:15:03 UTC (rev 24)
@@ -55,7 +55,7 @@
void setHeader(){
switch(outputtype){
case 2:sprintf(header, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
- sprintf(header, "%s <SGAResult>\n",
+ sprintf(header, "%s <sgaresult>\n",
header);
sprintf(header, "%s <popsize>%d</popsize>\n",
header,popsize);
@@ -162,7 +162,7 @@
footer,fconv_gen);
sprintf(footer, "%s <popconv>%d</popconv>\n",
footer,pconv_gen);
- sprintf(footer, "%s </SGAResult>\n",
+ sprintf(footer, "%s </sgaresult>\n",
footer);break;
case 1:
default: sprintf(footer, "fitness converged at generation %d\n", fconv_gen);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ty...@us...> - 2008-02-16 16:08:06
|
Revision: 23
http://sga.svn.sourceforge.net/sga/?rev=23&view=rev
Author: tyront
Date: 2008-02-16 08:08:00 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
put files in truck when branching now reverted to r18 versions
Modified Paths:
--------------
trunk/code/README
trunk/code/sga.c
Modified: trunk/code/README
===================================================================
--- trunk/code/README 2008-02-16 16:05:29 UTC (rev 22)
+++ trunk/code/README 2008-02-16 16:08:00 UTC (rev 23)
@@ -32,10 +32,9 @@
-g 1000 number of generations (0 = run indefinitely)
-s 10 number of individuals to show in one generation (not > popsize)
-d 1 frequency of display (not 0, 8 = display every 8th generation)
- -t 1 type of output(1/default = printed statments, 2 = XML)
-h displays help and exits
-v displays the version and exits
-
+
Examples:
sga defaults as above
sga -p500 popsize = 500
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-02-16 16:05:29 UTC (rev 22)
+++ trunk/code/sga.c 2008-02-16 16:08:00 UTC (rev 23)
@@ -54,24 +54,6 @@
void setHeader(){
switch(outputtype){
- case 2:sprintf(header, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
- sprintf(header, "%s <SGAResult>\n",
- header);
- sprintf(header, "%s <popsize>%d</popsize>\n",
- header,popsize);
- sprintf(header, "%s <chromsize>%d</chromsize>\n",
- header,chromsize);
- sprintf(header, "%s <crossrate>%d</crossrate>\n",
- header,crossrate);
- sprintf(header, "%s <muterate>%d</muterate>\n",
- header,muterate);
- sprintf(header, "%s <fitfunc>%d</fitfunc>\n",
- header,fitfunc);
- sprintf(header, "%s <boostfit>%d</boostfit>\n",
- header,boostfit);
- sprintf(header, "%s <generations>\n",
- header);break;
- case 1:
default:sprintf(header, "--------------------------------------------------\n");
sprintf(header, "%spopulation size =%5d chromosome size =%5d\n",
header, popsize, chromsize);
@@ -88,20 +70,6 @@
switch(outputtype)
{
-
- case 2 :sprintf(genoutput, " <generation num=\"%d\">\n",
- gen);
- sprintf(genoutput, "%s <best>%d</best>\n",
- genoutput,best);
- sprintf(genoutput, "%s <worst>%d</worst>\n",
- genoutput,worst);
- sprintf(genoutput, "%s <mean>%d</mean>\n",
- genoutput,mean);
- sprintf(genoutput, "%s <stdDev>%d</stdDev>\n",
- genoutput,std_dev);
- sprintf(genoutput, "%s <sequences>\n",
- genoutput); break;
- case 1 :
default: sprintf(genoutput,"generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
gen, best, worst, mean, std_dev);break;
}
@@ -112,9 +80,6 @@
{
switch(outputtype)
{
- case 2:sprintf(genoutput, "%s <sequence>",
- genoutput);
- case 1:
default:break;//do nothing
}
}
@@ -123,8 +88,6 @@
{
switch(outputtype)
{
- case 2:
- case 1:
default:sprintf(genoutput,"%s%c",genoutput,c);break;
}
}
@@ -133,9 +96,6 @@
{
switch(outputtype)
{
- case 2:sprintf(genoutput, "%s</sequence>",
- genoutput);
- case 1:
default:sprintf(genoutput,"%s\n",genoutput);break;
}
}
@@ -144,11 +104,6 @@
{
switch(outputtype)
{
- case 2:sprintf(genoutput, "%s </sequences>\n",
- genoutput);
- sprintf(genoutput, "%s </generation>\n",
- genoutput);break;
- case 1:
default: sprintf(genoutput,"%s--------------------------------------------------\n",genoutput);break;
}
}
@@ -157,14 +112,6 @@
switch(outputtype)
{
- case 2:sprintf(footer, " </generations>\n");
- sprintf(footer, "%s <fitconv>%d</fitconv>\n",
- footer,fconv_gen);
- sprintf(footer, "%s <popconv>%d</popconv>\n",
- footer,pconv_gen);
- sprintf(footer, "%s </SGAResult>\n",
- footer);break;
- case 1:
default: sprintf(footer, "fitness converged at generation %d\n", fconv_gen);
sprintf(footer, "%spopulation converged at generation %d\n", footer, pconv_gen);
sprintf(footer, "%s--------------------------------------------------\n", footer); break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-16 16:05:33
|
Revision: 22
http://sga.svn.sourceforge.net/sga/?rev=22&view=rev
Author: skywalker85
Date: 2008-02-16 08:05:29 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
uploaded win tutorial images
Added Paths:
-----------
trunk/web/images/cmdwindow.JPG
trunk/web/images/runbox.JPG
trunk/web/images/sgaoutput.JPG
Added: trunk/web/images/cmdwindow.JPG
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/cmdwindow.JPG
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/images/runbox.JPG
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/runbox.JPG
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/images/sgaoutput.JPG
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/sgaoutput.JPG
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-16 16:00:55
|
Revision: 21
http://sga.svn.sourceforge.net/sga/?rev=21&view=rev
Author: skywalker85
Date: 2008-02-16 08:00:52 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
wun support tutorial added
Added Paths:
-----------
trunk/web/support_runonwin.html
Added: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html (rev 0)
+++ trunk/web/support_runonwin.html 2008-02-16 16:00:52 UTC (rev 21)
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SGA Support - The Simple genetic Algorithm</title>
+ <meta name="Description" content="" />
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body><div id="main"><div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+</div>
+<div id="menu">
+ <ul><li><a href="./index.html">News</a></li>
+<li><a href="./about.html">About</a></li>
+<li><a href="./roadmap.html">Roadmap</a></li>
+<li class="selected"><a href="./support.html">Support</a></li>
+<li><a href="./docs.html">Documentation</a></li>
+<li><a href="./download.html">Download</a></li>
+<li><a href="./bugs.html">Bugs</a></li>
+<li><a href="./license.html">License</a></li>
+</ul>
+</div>
+<div id="content"><div class="article">
+ <h2><a href="support.html">Support</a> » Running SGA on Windows </h2>
+ <h3> </h3>
+ <h3>Assumptions</h3>
+ <p>OK, firstly we have made some assumptions, these being: - </p>
+ <ul><li>You are running Windows XP and above</li>
+<li>That you have downloaded the sga C code and have converted it into an .exe file.</li>
+<li>You will need to save the cygwin1.dll into the same directory for sga to run. Cygwin1.dll can be downloaded from <a href="http://www.cse.dmu.ac.uk/~tw/genetic-algorithms/cygwin1.dll">here</a></li>
+<li>You are running sga from a folder called sga on your C:\ and have saved sga.exe and cygwin1.dll into this folder.</li>
+</ul>
+<br>
+ <h3>How To Use the sga Program</h3>
+ <ol><li>Open a new CMD window click on START > RUN > cmd > ENTER
+ <p><img src="images/runbox.jpg" alt="run box" width="204" height="116" /></p>
+</li>
+<br>
+<li> Make the cmd window as large as possible. If you hold down the ALT key and then press ENTER the cmd window will go to full screen mode.</li>
+
+<li>You will get the following cmd Window:-<p><img src="images/cmdwindow.jpg" alt="cmd window" width="393" height="213" /></p>
+ </li>
+ <br>
+ <li>Navigate to the C:\sga folder by using the following command: -
+ <blockquote>
+ <p> C:\sga</p>
+ </blockquote>
+ </li>
+ <li> Now the fun can really start! For your first ???experiment??? if you like, type in the following sga -f3 | more and press ENTER
+ <p><img src="images/sgaoutput.jpg" alt="cmd window" width="393" height="213"/></p>
+ <p>This will display the window above, showing the first page of results. To see more results, then press SPACEBAR. Ok, now to explain what each line shows. </p>
+ <p>a) The first part shows the parameter settings that were used.</p>
+ <p>b) The second part is the settings for each generation separated by dashed lines.</p>
+ <p>c) Underneath the dashed lines are the first 10 generations of each population, unless the ???s command has been used to change the number displayed. </p>
+ <p>d) Just above the dashed line for the next generation is a string of digits and/or dashes that represent the percentage of ones in each column: a - means no one???s or all ones (i.e. convergence), a 0 means less than 10% ones, a 1 means 10% or more but less than 20%, and so on.</p>
+ </li>
+ <li> To exit the program, type q, or wait until the program finishes at generation 1000.</li>
+ <li>. To rerun the program use the up-arrow key to recall the last command. You can use the left and right arrows to move through the command and edit it if you wish.</li>
+ </ol>
+ <br>
+ <h3>Fitness Functions</h3>
+ <p> There are a choice of 5 fitness functions that can be used when running the sga program. </p>
+ <p>These are: - </p>
+ <ul>
+ <li> 1 constant (all fitnesses the same), </li>
+ <li> 2 random (fitness() returns a random value), </li>
+ <li> 3 onemax (maximise the number of one???s), </li>
+ <li> 4 diffmax (maximise the difference between number of ones and zeros), </li>
+ <li> 5 integer (fitness equals integer equivalent of bitstring). </li>
+ </ul>
+ <br>
+ <h3>Keyboard Commands</h3>
+ <p>There are several keyboard commands (with default values) that can be used when running the sga program, these include: - </p>
+ <p>-p 300 popsize (must be even, not 0 and not greater than 1000) </p>
+ <p>-c 16 chromsize (length of bitstring, not 0 and not greater than 80) </p>
+ <p>-x 70 crossover probability (0 = no crossover) </p>
+ <p>-m 1000 mutation rate (0 = no mutation, 500 = 1 in 500 bits mutated) </p>
+ <p>-f 1 fitness function (1 = constant, 2 = random, ... , 5 = integer) </p>
+ <p>-b 1 fitness boost (e.g. 2 = double the fitness of each individual) </p>
+ <p>-r 1 random seed (not 0) </p>
+ <p>-g 1000 number of generations (0 = run indefinitely) </p>
+ <p>-s 10 number of individuals to show in one generation (not > popsize) </p>
+ <p>-d 1 frequency of display (not 0, 8 = display every 8th generation) </p>
+ <br>
+ <h3>Examples</h3>
+ <p>sga uses defaults as above </p>
+ <p>sga 500 sets the population size to 500 </p>
+ <p>sga c25 x2 m800 chromsize = 25, crossover = 25, 1 in 800 bits mutated </p>
+ <p>sga s33 d2 display 33 individuals from every population </p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
+
Property changes on: trunk/web/support_runonwin.html
___________________________________________________________________
Name: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ty...@us...> - 2008-02-16 13:10:51
|
Revision: 19
http://sga.svn.sourceforge.net/sga/?rev=19&view=rev
Author: tyront
Date: 2008-02-16 05:10:48 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
Created a branch for xml output.
Modified Paths:
--------------
branches/xml-output/code/README
branches/xml-output/code/sga.c
trunk/code/README
trunk/code/sga.c
Added Paths:
-----------
branches/xml-output/
Copied: branches/xml-output (from rev 18, trunk)
Modified: branches/xml-output/code/README
===================================================================
--- trunk/code/README 2008-02-15 23:43:57 UTC (rev 18)
+++ branches/xml-output/code/README 2008-02-16 13:10:48 UTC (rev 19)
@@ -32,9 +32,10 @@
-g 1000 number of generations (0 = run indefinitely)
-s 10 number of individuals to show in one generation (not > popsize)
-d 1 frequency of display (not 0, 8 = display every 8th generation)
+ -t 1 type of output(1/default = printed statments, 2 = XML)
-h displays help and exits
-v displays the version and exits
-
+
Examples:
sga defaults as above
sga -p500 popsize = 500
Modified: branches/xml-output/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-02-15 23:43:57 UTC (rev 18)
+++ branches/xml-output/code/sga.c 2008-02-16 13:10:48 UTC (rev 19)
@@ -54,6 +54,24 @@
void setHeader(){
switch(outputtype){
+ case 2:sprintf(header, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
+ sprintf(header, "%s <SGAResult>\n",
+ header);
+ sprintf(header, "%s <popsize>%d</popsize>\n",
+ header,popsize);
+ sprintf(header, "%s <chromsize>%d</chromsize>\n",
+ header,chromsize);
+ sprintf(header, "%s <crossrate>%d</crossrate>\n",
+ header,crossrate);
+ sprintf(header, "%s <muterate>%d</muterate>\n",
+ header,muterate);
+ sprintf(header, "%s <fitfunc>%d</fitfunc>\n",
+ header,fitfunc);
+ sprintf(header, "%s <boostfit>%d</boostfit>\n",
+ header,boostfit);
+ sprintf(header, "%s <generations>\n",
+ header);break;
+ case 1:
default:sprintf(header, "--------------------------------------------------\n");
sprintf(header, "%spopulation size =%5d chromosome size =%5d\n",
header, popsize, chromsize);
@@ -70,6 +88,20 @@
switch(outputtype)
{
+
+ case 2 :sprintf(genoutput, " <generation num=\"%d\">\n",
+ gen);
+ sprintf(genoutput, "%s <best>%d</best>\n",
+ genoutput,best);
+ sprintf(genoutput, "%s <worst>%d</worst>\n",
+ genoutput,worst);
+ sprintf(genoutput, "%s <mean>%d</mean>\n",
+ genoutput,mean);
+ sprintf(genoutput, "%s <stdDev>%d</stdDev>\n",
+ genoutput,std_dev);
+ sprintf(genoutput, "%s <sequences>\n",
+ genoutput); break;
+ case 1 :
default: sprintf(genoutput,"generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
gen, best, worst, mean, std_dev);break;
}
@@ -80,6 +112,9 @@
{
switch(outputtype)
{
+ case 2:sprintf(genoutput, "%s <sequence>",
+ genoutput);
+ case 1:
default:break;//do nothing
}
}
@@ -88,6 +123,8 @@
{
switch(outputtype)
{
+ case 2:
+ case 1:
default:sprintf(genoutput,"%s%c",genoutput,c);break;
}
}
@@ -96,6 +133,9 @@
{
switch(outputtype)
{
+ case 2:sprintf(genoutput, "%s</sequence>",
+ genoutput);
+ case 1:
default:sprintf(genoutput,"%s\n",genoutput);break;
}
}
@@ -104,6 +144,11 @@
{
switch(outputtype)
{
+ case 2:sprintf(genoutput, "%s </sequences>\n",
+ genoutput);
+ sprintf(genoutput, "%s </generation>\n",
+ genoutput);break;
+ case 1:
default: sprintf(genoutput,"%s--------------------------------------------------\n",genoutput);break;
}
}
@@ -112,6 +157,14 @@
switch(outputtype)
{
+ case 2:sprintf(footer, " </generations>\n");
+ sprintf(footer, "%s <fitconv>%d</fitconv>\n",
+ footer,fconv_gen);
+ sprintf(footer, "%s <popconv>%d</popconv>\n",
+ footer,pconv_gen);
+ sprintf(footer, "%s </SGAResult>\n",
+ footer);break;
+ case 1:
default: sprintf(footer, "fitness converged at generation %d\n", fconv_gen);
sprintf(footer, "%spopulation converged at generation %d\n", footer, pconv_gen);
sprintf(footer, "%s--------------------------------------------------\n", footer); break;
Modified: trunk/code/README
===================================================================
--- trunk/code/README 2008-02-15 23:43:57 UTC (rev 18)
+++ trunk/code/README 2008-02-16 13:10:48 UTC (rev 19)
@@ -32,9 +32,10 @@
-g 1000 number of generations (0 = run indefinitely)
-s 10 number of individuals to show in one generation (not > popsize)
-d 1 frequency of display (not 0, 8 = display every 8th generation)
+ -t 1 type of output(1/default = printed statments, 2 = XML)
-h displays help and exits
-v displays the version and exits
-
+
Examples:
sga defaults as above
sga -p500 popsize = 500
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-02-15 23:43:57 UTC (rev 18)
+++ trunk/code/sga.c 2008-02-16 13:10:48 UTC (rev 19)
@@ -54,6 +54,24 @@
void setHeader(){
switch(outputtype){
+ case 2:sprintf(header, "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n");
+ sprintf(header, "%s <SGAResult>\n",
+ header);
+ sprintf(header, "%s <popsize>%d</popsize>\n",
+ header,popsize);
+ sprintf(header, "%s <chromsize>%d</chromsize>\n",
+ header,chromsize);
+ sprintf(header, "%s <crossrate>%d</crossrate>\n",
+ header,crossrate);
+ sprintf(header, "%s <muterate>%d</muterate>\n",
+ header,muterate);
+ sprintf(header, "%s <fitfunc>%d</fitfunc>\n",
+ header,fitfunc);
+ sprintf(header, "%s <boostfit>%d</boostfit>\n",
+ header,boostfit);
+ sprintf(header, "%s <generations>\n",
+ header);break;
+ case 1:
default:sprintf(header, "--------------------------------------------------\n");
sprintf(header, "%spopulation size =%5d chromosome size =%5d\n",
header, popsize, chromsize);
@@ -70,6 +88,20 @@
switch(outputtype)
{
+
+ case 2 :sprintf(genoutput, " <generation num=\"%d\">\n",
+ gen);
+ sprintf(genoutput, "%s <best>%d</best>\n",
+ genoutput,best);
+ sprintf(genoutput, "%s <worst>%d</worst>\n",
+ genoutput,worst);
+ sprintf(genoutput, "%s <mean>%d</mean>\n",
+ genoutput,mean);
+ sprintf(genoutput, "%s <stdDev>%d</stdDev>\n",
+ genoutput,std_dev);
+ sprintf(genoutput, "%s <sequences>\n",
+ genoutput); break;
+ case 1 :
default: sprintf(genoutput,"generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
gen, best, worst, mean, std_dev);break;
}
@@ -80,6 +112,9 @@
{
switch(outputtype)
{
+ case 2:sprintf(genoutput, "%s <sequence>",
+ genoutput);
+ case 1:
default:break;//do nothing
}
}
@@ -88,6 +123,8 @@
{
switch(outputtype)
{
+ case 2:
+ case 1:
default:sprintf(genoutput,"%s%c",genoutput,c);break;
}
}
@@ -96,6 +133,9 @@
{
switch(outputtype)
{
+ case 2:sprintf(genoutput, "%s</sequence>",
+ genoutput);
+ case 1:
default:sprintf(genoutput,"%s\n",genoutput);break;
}
}
@@ -104,6 +144,11 @@
{
switch(outputtype)
{
+ case 2:sprintf(genoutput, "%s </sequences>\n",
+ genoutput);
+ sprintf(genoutput, "%s </generation>\n",
+ genoutput);break;
+ case 1:
default: sprintf(genoutput,"%s--------------------------------------------------\n",genoutput);break;
}
}
@@ -112,6 +157,14 @@
switch(outputtype)
{
+ case 2:sprintf(footer, " </generations>\n");
+ sprintf(footer, "%s <fitconv>%d</fitconv>\n",
+ footer,fconv_gen);
+ sprintf(footer, "%s <popconv>%d</popconv>\n",
+ footer,pconv_gen);
+ sprintf(footer, "%s </SGAResult>\n",
+ footer);break;
+ case 1:
default: sprintf(footer, "fitness converged at generation %d\n", fconv_gen);
sprintf(footer, "%spopulation converged at generation %d\n", footer, pconv_gen);
sprintf(footer, "%s--------------------------------------------------\n", footer); break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2008-02-15 23:43:58
|
Revision: 18
http://sga.svn.sourceforge.net/sga/?rev=18&view=rev
Author: tim-watson
Date: 2008-02-15 15:43:57 -0800 (Fri, 15 Feb 2008)
Log Message:
-----------
Removed all unnecessary files and tidied code.
Modified Paths:
--------------
branches/tim/code/Makefile
branches/tim/code/README
branches/tim/code/sga.c
Removed Paths:
-------------
branches/tim/code/HELP
branches/tim/code/VERSION
branches/tim/code/data.c
branches/tim/code/data.h
branches/tim/code/input.c
branches/tim/code/input.h
branches/tim/code/output.c
branches/tim/code/output.h
Deleted: branches/tim/code/HELP
===================================================================
--- branches/tim/code/HELP 2008-02-15 22:27:36 UTC (rev 17)
+++ branches/tim/code/HELP 2008-02-15 23:43:57 UTC (rev 18)
@@ -1,17 +0,0 @@
-sga - The simple genetic algorithm.
-
-Command line options (each option takes a non-negative integer as an argument,
-the default value for each option is shown):
- -p 300 popsize (must be even, not 0 and not greater than 1000)
- -c 16 chromosome size (length of bitstring, not 0 and not greater than 80)
- -x 70 crossover probability (0 = no crossover)
- -m 1000 mutation rate (0 = no mutation, 500 = 1 in 500 bits mutated)
- -f 1 fitness function (1 = constant, 2 = random, ... , 5 = integer)
- -b 1 fitness boost (e.g. 2 = double the fitness of each individual)
- -r 1 random seed (not 0)
- -g 1000 number of generations (0 = run indefinitely)
- -s 10 number of individuals to show in one generation (not > popsize)
- -d 1 frequency of display (not 0, 8 = display every 8th generation)
- -h displays help and exits
- -v displays the version and exits
-
Modified: branches/tim/code/Makefile
===================================================================
--- branches/tim/code/Makefile 2008-02-15 22:27:36 UTC (rev 17)
+++ branches/tim/code/Makefile 2008-02-15 23:43:57 UTC (rev 18)
@@ -2,21 +2,18 @@
# make nogsl makes sga without using gsl
# make clean removes all .o files and sga
-sga: sga.o displayfile.o
- gcc sga.o displayfile.o -lgsl -lgslcblas -lm -o sga
+sga: sga.o
+ gcc sga.o -lgsl -lgslcblas -lm -o sga
sga.o: sga.c
gcc -c sga.c -o sga.o
-nogsl: sga.nogsl.o displayfile.o
- gcc sga.o displayfile.o -lm -o sga
+nogsl: sga.nogsl.o
+ gcc sga.o -lm -o sga
sga.nogsl.o: sga.c
gcc -c -DNOGSL sga.c -o sga.o
-displayfile.o: displayfile.c
- gcc -c displayfile.c -o displayfile.o
-
.PHONY: clean
clean:
rm -f *.o sga
Modified: branches/tim/code/README
===================================================================
--- branches/tim/code/README 2008-02-15 22:27:36 UTC (rev 17)
+++ branches/tim/code/README 2008-02-15 23:43:57 UTC (rev 18)
@@ -1,49 +1,9 @@
-sga - A Simple Genetic Algorithm
-
-WHAT IS SGA?
-
-sga is a program that demonstrates a standard genetic algorithm with some
-simple fitness functions. Its features include:
-
- o Fixed-length binary strings.
- o Static population size (all generations equal size).
- o Standard proportionate reproduction.
- o Optional one-point crossover and/or mutation (bit-flipping).
- o Choice of fitness function:
- 1 constant (all fitnesses the same),
- 2 random (fitness() returns a random value),
- 3 onemax (maximise the number of ones),
- 4 diffmax (maximise the difference between number of ones and zeros),
- 5 integer (fitness equals integer equivalent of bitstring).
- o Statistics: best, worst, mean, standard deviation per generation.
- o A one-line summary of the number of ones in each locus is shown below
- each displayed generation. A '-' means all ones or no ones, and a digit
- represents the percentage of ones: 0=less than 10%, 1=10%+, 2=20%+ etc.
-
-Command line options (each option takes a non-negative integer as an argument,
-the default value for each option is shown):
- -p 300 popsize (must be even, not 0 and not greater than 1000)
- -c 16 chromsize (length of bitstring, not 0 and not greater than 80)
- -x 70 crossover probability (0 = no crossover)
- -m 1000 mutation rate (0 = no mutation, 500 = 1 in 500 bits mutated)
- -f 1 fitness function (1 = constant, 2 = random, ... , 5 = integer)
- -b 1 fitness boost (e.g. 2 = double the fitness of each individual)
- -r 1 random seed (not 0)
- -g 1000 number of generations (0 = run indefinitely)
- -s 10 number of individuals to show in one generation (not > popsize)
- -d 1 frequency of display (not 0, 8 = display every 8th generation)
- -h displays help and exits
- -v displays the version and exits
-
-Examples:
- sga defaults as above
- sga -p500 popsize = 500
- sga -c31 -x0 -m500 chromsize = 31, no crossover, 1 in 500 bits mutated
- sga -s33 -d2 display 33 individuals from every other generation
-
INSTALLING, COMPILING, LINKING AND RUNNING SGA
Install the source code and makefile in a directory, ensure that you have
already installed both the gcc compiler and gsl development libraries,
-and type 'make'. The program should now run if you type './sga'
+and type 'make'*. The program should now run if you type './sga'. See the
+sga.c file for brief usage help.
+* If you don't want to use the recommended gsl libraries then you can
+ type 'make nogsl' to use the standard C srand() and rand() functions.
Deleted: branches/tim/code/VERSION
===================================================================
--- branches/tim/code/VERSION 2008-02-15 22:27:36 UTC (rev 17)
+++ branches/tim/code/VERSION 2008-02-15 23:43:57 UTC (rev 18)
@@ -1,2 +0,0 @@
-sga - the simple gentic algorithm version 0.3.
-Licenced under the GNU Public Licence 3.0.
Deleted: branches/tim/code/data.c
===================================================================
Deleted: branches/tim/code/data.h
===================================================================
Deleted: branches/tim/code/input.c
===================================================================
Deleted: branches/tim/code/input.h
===================================================================
Deleted: branches/tim/code/output.c
===================================================================
--- branches/tim/code/output.c 2008-02-15 22:27:36 UTC (rev 17)
+++ branches/tim/code/output.c 2008-02-15 23:43:57 UTC (rev 18)
@@ -1,18 +0,0 @@
-#include <stdio.h>
-
-int displayfile(char *filename, char *refname)
-{
- FILE * file = fopen(filename,"r");
- if (file == NULL){
- printf("Help file for %s not found.\nPlease contact sga team.\n", refname);
- return 1; /* Add a proper gnu error function to this rather then a break.*/
- /* But this works for now.*/
- }
- printf("WHA!");
- char line[81];
- while(fgets(line, 81, file) != NULL){
- printf("%s",line);
- }
-}
-
-
Deleted: branches/tim/code/output.h
===================================================================
--- branches/tim/code/output.h 2008-02-15 22:27:36 UTC (rev 17)
+++ branches/tim/code/output.h 2008-02-15 23:43:57 UTC (rev 18)
@@ -1,2 +0,0 @@
-int displayfile(char *filename, char *refname);
-
Modified: branches/tim/code/sga.c
===================================================================
--- branches/tim/code/sga.c 2008-02-15 22:27:36 UTC (rev 17)
+++ branches/tim/code/sga.c 2008-02-15 23:43:57 UTC (rev 18)
@@ -1,6 +1,43 @@
/*
sga - a simple genetic algorithm.
+A demonstration of a standard genetic algorithm with some simple fitness
+functions.
+
+ o Fixed-length binary strings.
+ o Static population size (all generations equal size).
+ o Standard proportionate reproduction.
+ o Optional one-point crossover and/or mutation (bit-flipping).
+ o Choice of fitness function:
+ 1 constant (all fitnesses the same),
+ 2 random (fitness() returns a random value),
+ 3 onemax (maximise the number of ones),
+ 4 diffmax (maximise the difference between number of ones and zeros),
+ 5 integer (fitness equals integer equivalent of bitstring).
+ o Statistics: best, worst, mean, standard deviation per generation.
+ o A one-line summary of the number of ones in each locus is shown below
+ each displayed generation. A '-' means all ones or no ones, and a digit
+ represents the percentage of ones: 0=less than 10%, 1=10%+, 2=20%+ etc.
+
+Command line options (each option takes a non-negative integer as an argument,
+the default value for each option is shown):
+ -p 300 popsize (must be even, not 0 and not greater than 1000)
+ -c 16 chromsize (length of bitstring, not 0 and not greater than 80)
+ -x 70 crossover probability (0 = no crossover)
+ -m 1000 mutation rate (0 = no mutation, 500 = 1 in 500 bits mutated)
+ -f 1 fitness function (1 = constant, 2 = random, ... , 5 = integer)
+ -b 1 fitness boost (e.g. 2 = double the fitness of each individual)
+ -r 1 random seed (not 0)
+ -g 1000 number of generations (0 = run indefinitely)
+ -s 10 number of individuals to show in one generation (not > popsize)
+ -d 1 frequency of display (not 0, 8 = display every 8th generation)
+
+Examples:
+ sga defaults as above
+ sga -p500 popsize = 500
+ sga -c31 -x0 -m500 chromsize = 31, no crossover, 1 in 500 bits mutated
+ sga -s33 -d2 display 33 individuals from every other generation
+
This file is part of sga.
sga is free software: you can redistribute it and/or modify
@@ -21,7 +58,6 @@
#include <stdio.h>
#include <math.h> /* needed for sqrt() to calc std. dev. */
-#include "displayfile.h" /* display the help and version files */
#ifdef NOGSL /* if the GNU library is not available */
#include <stdlib.h> /* include rand() and srand() */
@@ -51,8 +87,7 @@
double mean, /* mean fitness for generation */
std_dev; /* standard deviation of fitnesses */
-main(int argc, char *argv[])
-{
+int main(int argc, char *argv[]) {
int i, j, k, gen, choice, count[80],
fconv=0, fconv_gen=0, pconv=0, pconv_count, pconv_gen=0;
@@ -109,21 +144,14 @@
else if (--argc > 0)
displfreq = atoi(*++argv);
break;
- case 'h': displayfile("HELP","Help");
- exit(0);
- case 'v': displayfile("VERSION","Version");
- exit(0);
default: break;
}
/* display the significant parameter settings */
printf("--------------------------------------------------\n");
- printf("population size =%5d chromosome size =%5d\n",
- popsize, chromsize);
- printf("crossover rate =%5d mutation rate =%5d\n",
- crossrate, muterate);
- printf("fitness function =%5d fitness boost =%5d\n",
- fitfunc, boostfit);
+ printf("popsize =%5d\tchromsize =%5d\n", popsize, chromsize);
+ printf("crossrate =%5d\tmuterate =%5d\n", crossrate, muterate);
+ printf("fitfunc =%5d\tboostfit =%5d\n", fitfunc, boostfit);
printf("--------------------------------------------------\n");
/* initialise the PRNG */
@@ -187,7 +215,7 @@
fconv = 1;
fconv_gen = gen;
}
- printf("generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
+ printf("gen=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
gen, best, worst, mean, std_dev);
for (i=0; i<chromsize; i++) /* init column counts */
count[i] = 0;
@@ -301,7 +329,7 @@
fconv = 1;
fconv_gen = gen;
}
- printf("generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
+ printf("gen=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
gen, best, worst, mean, std_dev);
for (i=0; i<chromsize; i++) /* init column counts */
count[i] = 0;
@@ -333,7 +361,10 @@
printf("fitness converged at generation %d\n", fconv_gen);
printf("population converged at generation %d\n", pconv_gen);
printf("--------------------------------------------------\n");
+
#ifndef NOGSL
gsl_rng_free(prng);
-#endif /* NOGSL */
+#endif /* !NOGSL */
+
+ return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2008-02-15 22:27:39
|
Revision: 17
http://sga.svn.sourceforge.net/sga/?rev=17&view=rev
Author: tim-watson
Date: 2008-02-15 14:27:36 -0800 (Fri, 15 Feb 2008)
Log Message:
-----------
Created a branch of revision 14 of sga/trunk to try out an alternate development of the code.
Revision Links:
--------------
http://sga.svn.sourceforge.net/sga/?rev=14&view=rev
Modified Paths:
--------------
trunk/code/sga.c
Added Paths:
-----------
branches/tim/
Copied: branches/tim (from rev 14, trunk)
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-02-13 17:04:45 UTC (rev 16)
+++ trunk/code/sga.c 2008-02-15 22:27:36 UTC (rev 17)
@@ -406,7 +406,8 @@
setFooter(fconv_gen,pconv_gen);
printf("%s",footer);
+
#ifndef NOGSL
gsl_rng_free(prng);
-#endif /* NOGSL */
+#endif /* !NOGSL */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ty...@us...> - 2008-02-13 17:04:51
|
Revision: 16
http://sga.svn.sourceforge.net/sga/?rev=16&view=rev
Author: tyront
Date: 2008-02-13 09:04:45 -0800 (Wed, 13 Feb 2008)
Log Message:
-----------
replaced most of the prints with functions and added -t to select a output type
Modified Paths:
--------------
trunk/code/sga.c
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-01-26 23:38:34 UTC (rev 15)
+++ trunk/code/sga.c 2008-02-13 17:04:45 UTC (rev 16)
@@ -17,8 +17,6 @@
along with sga. If not, see <http://www.gnu.org/licenses/>.
*/
-
-
#include <stdio.h>
#include <math.h> /* needed for sqrt() to calc std. dev. */
#include "displayfile.h" /* display the help and version files */
@@ -31,26 +29,95 @@
#define RNG(N) (gsl_rng_uniform_int(prng,(N))) /* and set RNG() to it */
#endif /* endif NOGSL */
-
-
-char curr[1000][80], /* current generation */
- next[1000][80]; /* next generation */
-int fit[1000], /* fitness values */
- popsize = 300,
- chromsize = 16,
- crossrate = 70,
- muterate = 1000,
- fitfunc = 1,
- boostfit = 1,
- rseed = 1,
- gens = 1000,
- sizedispl = 10,
- displfreq = 1,
+char header[512], /* header of output*/
+ genoutput[1024], /* generation output */
+ footer[512], /* footer of output*/
+ curr[1000][80], /* current generation */
+ next[1000][80]; /* next generation */
+int fit[1000], /* fitness values */
+ popsize = 300,
+ chromsize = 16,
+ crossrate = 70,
+ muterate = 1000,
+ fitfunc = 1,
+ boostfit = 1,
+ rseed = 1,
+ gens = 1000,
+ sizedispl = 10,
+ displfreq = 1,
+ outputtype = 0,
best, /* best of generation */
worst; /* worst of generation */
double mean, /* mean fitness for generation */
std_dev; /* standard deviation of fitnesses */
+
+void setHeader(){
+ switch(outputtype){
+ default:sprintf(header, "--------------------------------------------------\n");
+ sprintf(header, "%spopulation size =%5d chromosome size =%5d\n",
+ header, popsize, chromsize);
+ sprintf(header, "%scrossover rate =%5d mutation rate =%5d\n",
+ header, crossrate, muterate);
+ sprintf(header, "%sfitness function =%5d fitness boost =%5d\n",
+ header, fitfunc, boostfit);
+ sprintf(header ,"%s--------------------------------------------------\n",header);break;
+ }
+}
+
+void setGenInfo(int gen)
+{
+
+ switch(outputtype)
+ {
+ default: sprintf(genoutput,"generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
+ gen, best, worst, mean, std_dev);break;
+ }
+
+}
+
+void setSequenceOpen()
+{
+ switch(outputtype)
+ {
+ default:break;//do nothing
+ }
+}
+
+void setSequenceChar(char c)
+{
+ switch(outputtype)
+ {
+ default:sprintf(genoutput,"%s%c",genoutput,c);break;
+ }
+}
+
+void setSequenceClose()
+{
+ switch(outputtype)
+ {
+ default:sprintf(genoutput,"%s\n",genoutput);break;
+ }
+}
+
+void setGenEnd()
+{
+ switch(outputtype)
+ {
+ default: sprintf(genoutput,"%s--------------------------------------------------\n",genoutput);break;
+ }
+}
+
+void setFooter(int fconv_gen,int pconv_gen){
+
+ switch(outputtype)
+ {
+ default: sprintf(footer, "fitness converged at generation %d\n", fconv_gen);
+ sprintf(footer, "%spopulation converged at generation %d\n", footer, pconv_gen);
+ sprintf(footer, "%s--------------------------------------------------\n", footer); break;
+ }
+}
+
main(int argc, char *argv[])
{
int i, j, k, gen, choice, count[80],
@@ -109,6 +176,11 @@
else if (--argc > 0)
displfreq = atoi(*++argv);
break;
+ case 't': if (*++argv[0])
+ outputtype = atoi(argv[0]);
+ else if (--argc > 0)
+ outputtype = atoi(*++argv);
+ break;
case 'h': displayfile("HELP","Help");
exit(0);
case 'v': displayfile("VERSION","Version");
@@ -117,14 +189,9 @@
}
/* display the significant parameter settings */
- printf("--------------------------------------------------\n");
- printf("population size =%5d chromosome size =%5d\n",
- popsize, chromsize);
- printf("crossover rate =%5d mutation rate =%5d\n",
- crossrate, muterate);
- printf("fitness function =%5d fitness boost =%5d\n",
- fitfunc, boostfit);
- printf("--------------------------------------------------\n");
+
+ setHeader();
+ printf("%s",header);
/* initialise the PRNG */
#ifdef NOGSL
@@ -187,21 +254,22 @@
fconv = 1;
fconv_gen = gen;
}
- printf("generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
- gen, best, worst, mean, std_dev);
+ setGenInfo(gen);
for (i=0; i<chromsize; i++) /* init column counts */
count[i] = 0;
- for (i=0; i<sizedispl; i++) {
+ for (i=0; i<sizedispl; i++) {
+ setSequenceOpen();
for (j=0; j<chromsize; j++) { /* show individuals */
- putchar(curr[i][j]);
+ setSequenceChar(curr[i][j]);
count[j] += curr[i][j] - '0'; /* sum columns in pop */
}
- printf("\n");
+ setSequenceClose();
}
for (; i<popsize; i++)
for (j=0; j<chromsize; j++)
count[j] += curr[i][j] - '0';
pconv_count = 0;
+ setSequenceOpen();
for (i=0; i<chromsize; i++) {
if ((count[i]!=0) && (count[i]!=popsize))
count[i] = count[i]*10/popsize + '0';
@@ -209,13 +277,15 @@
count[i] = '-';
pconv_count++;
}
- putchar(count[i]);
+ setSequenceChar(count[i]);
}
+ setSequenceClose();
if ((!pconv) && (pconv_count==chromsize)) { /* if pop converged */
pconv = 1;
pconv_gen = gen;
}
- printf("\n--------------------------------------------------\n");
+ setGenEnd();
+ printf("%s",genoutput);
}
/* produce next generation and make it the current generation */
@@ -301,21 +371,22 @@
fconv = 1;
fconv_gen = gen;
}
- printf("generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
- gen, best, worst, mean, std_dev);
+ setGenInfo(gen);
for (i=0; i<chromsize; i++) /* init column counts */
count[i] = 0;
- for (i=0; i<sizedispl; i++) {
+ for (i=0; i<sizedispl; i++) {
+ setSequenceOpen();
for (j=0; j<chromsize; j++) { /* show individuals */
- putchar(curr[i][j]);
+ setSequenceChar(curr[i][j]);
count[j] += curr[i][j] - '0'; /* sum columns in pop */
}
- printf("\n");
+ setSequenceClose();
}
for (; i<popsize; i++)
for (j=0; j<chromsize; j++)
count[j] += curr[i][j] - '0';
pconv_count = 0;
+ setSequenceOpen();
for (i=0; i<chromsize; i++) {
if ((count[i]!=0) && (count[i]!=popsize))
count[i] = count[i]*10/popsize + '0';
@@ -323,16 +394,18 @@
count[i] = '-';
pconv_count++;
}
- putchar(count[i]);
+ setSequenceChar(count[i]);
}
+ setSequenceClose();
if ((!pconv) && (pconv_count==chromsize)) { /* if pop converged */
pconv = 1;
pconv_gen = gen;
}
- printf("\n--------------------------------------------------\n");
- printf("fitness converged at generation %d\n", fconv_gen);
- printf("population converged at generation %d\n", pconv_gen);
- printf("--------------------------------------------------\n");
+ setGenEnd();
+ printf("%s",genoutput);
+
+ setFooter(fconv_gen,pconv_gen);
+ printf("%s",footer);
#ifndef NOGSL
gsl_rng_free(prng);
#endif /* NOGSL */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2008-01-26 23:38:42
|
Revision: 15
http://sga.svn.sourceforge.net/sga/?rev=15&view=rev
Author: tim-watson
Date: 2008-01-26 15:38:34 -0800 (Sat, 26 Jan 2008)
Log Message:
-----------
Corrected file renames and deletions.
Added Paths:
-----------
trunk/code/displayfile.c
trunk/code/displayfile.h
Removed Paths:
-------------
trunk/code/data.c
trunk/code/data.h
trunk/code/input.c
trunk/code/input.h
trunk/code/output.c
trunk/code/output.h
Deleted: trunk/code/data.c
===================================================================
Deleted: trunk/code/data.h
===================================================================
Copied: trunk/code/displayfile.c (from rev 14, trunk/code/output.c)
===================================================================
--- trunk/code/displayfile.c (rev 0)
+++ trunk/code/displayfile.c 2008-01-26 23:38:34 UTC (rev 15)
@@ -0,0 +1,17 @@
+#include <stdio.h>
+
+int displayfile(char *filename, char *refname)
+{
+ FILE * file = fopen(filename,"r");
+ if (file == NULL) {
+ printf("%s file not found.\n", refname);
+ return 1; /* add a proper GNU error to this rather than a break */
+ /* but this works for now. */
+ }
+ char line[81];
+ while (fgets(line,81,file) != NULL) {
+ printf("%s",line);
+ }
+}
+
+
Copied: trunk/code/displayfile.h (from rev 14, trunk/code/output.h)
===================================================================
--- trunk/code/displayfile.h (rev 0)
+++ trunk/code/displayfile.h 2008-01-26 23:38:34 UTC (rev 15)
@@ -0,0 +1,2 @@
+int displayfile(char *filename, char *refname);
+
Deleted: trunk/code/input.c
===================================================================
Deleted: trunk/code/input.h
===================================================================
Deleted: trunk/code/output.c
===================================================================
--- trunk/code/output.c 2008-01-26 23:31:36 UTC (rev 14)
+++ trunk/code/output.c 2008-01-26 23:38:34 UTC (rev 15)
@@ -1,18 +0,0 @@
-#include <stdio.h>
-
-int displayfile(char *filename, char *refname)
-{
- FILE * file = fopen(filename,"r");
- if (file == NULL){
- printf("Help file for %s not found.\nPlease contact sga team.\n", refname);
- return 1; /* Add a proper gnu error function to this rather then a break.*/
- /* But this works for now.*/
- }
- printf("WHA!");
- char line[81];
- while(fgets(line, 81, file) != NULL){
- printf("%s",line);
- }
-}
-
-
Deleted: trunk/code/output.h
===================================================================
--- trunk/code/output.h 2008-01-26 23:31:36 UTC (rev 14)
+++ trunk/code/output.h 2008-01-26 23:38:34 UTC (rev 15)
@@ -1,2 +0,0 @@
-int displayfile(char *filename, char *refname);
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2008-01-26 23:31:42
|
Revision: 14
http://sga.svn.sourceforge.net/sga/?rev=14&view=rev
Author: tim-watson
Date: 2008-01-26 15:31:36 -0800 (Sat, 26 Jan 2008)
Log Message:
-----------
Added compiler directives so that sga will compile without the
GNU scientific library, modified the Makefile accordingly and
renamed output.* displayfile.*. Removed some empty files and
tidied up the HELP, VERSION and displayfile.c files (this should
really have been several commits).
Modified Paths:
--------------
trunk/code/Makefile
trunk/code/VERSION
trunk/code/sga.c
Modified: trunk/code/Makefile
===================================================================
--- trunk/code/Makefile 2008-01-20 17:20:59 UTC (rev 13)
+++ trunk/code/Makefile 2008-01-26 23:31:36 UTC (rev 14)
@@ -1,2 +1,22 @@
-sga: sga.c
- gcc -o sga sga.c output.c -lgsl -lgslcblas -lm
+# make makes sga
+# make nogsl makes sga without using gsl
+# make clean removes all .o files and sga
+
+sga: sga.o displayfile.o
+ gcc sga.o displayfile.o -lgsl -lgslcblas -lm -o sga
+
+sga.o: sga.c
+ gcc -c sga.c -o sga.o
+
+nogsl: sga.nogsl.o displayfile.o
+ gcc sga.o displayfile.o -lm -o sga
+
+sga.nogsl.o: sga.c
+ gcc -c -DNOGSL sga.c -o sga.o
+
+displayfile.o: displayfile.c
+ gcc -c displayfile.c -o displayfile.o
+
+.PHONY: clean
+clean:
+ rm -f *.o sga
Modified: trunk/code/VERSION
===================================================================
--- trunk/code/VERSION 2008-01-20 17:20:59 UTC (rev 13)
+++ trunk/code/VERSION 2008-01-26 23:31:36 UTC (rev 14)
@@ -1,3 +1,2 @@
-sga - The simple gentic algorithm Version 0.3.
-Copyright 2007 Tim Watson.
-Licenced Under the GNU Public Licence 3.0
+sga - the simple gentic algorithm version 0.3.
+Licenced under the GNU Public Licence 3.0.
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-01-20 17:20:59 UTC (rev 13)
+++ trunk/code/sga.c 2008-01-26 23:31:36 UTC (rev 14)
@@ -1,6 +1,5 @@
/*
sga - a simple genetic algorithm.
-Copyright 2003, 2007 Tim Watson
This file is part of sga.
@@ -21,15 +20,22 @@
#include <stdio.h>
-#include <math.h> /* needed for sqrt() to calc std. dev. */
-#include <gsl/gsl_rng.h> /* a good pseudo-random number generator */
-#include "output.h"
+#include <math.h> /* needed for sqrt() to calc std. dev. */
+#include "displayfile.h" /* display the help and version files */
+#ifdef NOGSL /* if the GNU library is not available */
+#include <stdlib.h> /* include rand() and srand() */
+#define RNG(N) (rand()%(N)) /* and set RNG() to rand() */
+#else /* else */
+#include <gsl/gsl_rng.h> /* include a good random number generator */
+#define RNG(N) (gsl_rng_uniform_int(prng,(N))) /* and set RNG() to it */
+#endif /* endif NOGSL */
-char curr[1000][80], /* current generation */
- next[1000][80]; /* next generation */
-int fit[1000], /* fitness values */
+
+char curr[1000][80], /* current generation */
+ next[1000][80]; /* next generation */
+int fit[1000], /* fitness values */
popsize = 300,
chromsize = 16,
crossrate = 70,
@@ -40,10 +46,10 @@
gens = 1000,
sizedispl = 10,
displfreq = 1,
- best, /* best of generation */
- worst; /* worst of generation */
-double mean, /* mean fitness for generation */
- std_dev; /* standard deviation of fitnesses */
+ best, /* best of generation */
+ worst; /* worst of generation */
+double mean, /* mean fitness for generation */
+ std_dev; /* standard deviation of fitnesses */
main(int argc, char *argv[])
{
@@ -53,8 +59,6 @@
/* accept the command line options */
while (--argc>0 && (*++argv)[0]=='-')
switch (*++argv[0]) {
- case 'h': displayfile("HELP", "-h");
- exit(0);
case 'p': if (*++argv[0])
popsize = atoi(argv[0]);
else if (--argc > 0)
@@ -105,9 +109,10 @@
else if (--argc > 0)
displfreq = atoi(*++argv);
break;
- case 'v': displayfile("VERSION", "-v");
+ case 'h': displayfile("HELP","Help");
exit(0);
-
+ case 'v': displayfile("VERSION","Version");
+ exit(0);
default: break;
}
@@ -121,12 +126,18 @@
fitfunc, boostfit);
printf("--------------------------------------------------\n");
- /* initialise the population and the PRNG */
+ /* initialise the PRNG */
+#ifdef NOGSL
+ srand(rseed);
+#else
gsl_rng * prng = gsl_rng_alloc(gsl_rng_ranlxs2);
gsl_rng_set(prng, rseed);
+#endif /* NOGSL */
+
+ /* initialise the population */
for (i=0; i<popsize; i++)
for (j=0; j<chromsize; j++)
- curr[i][j] = '0' + (gsl_rng_uniform_int(prng, 2));
+ curr[i][j] = '0' + (RNG(2)); /* RNG(N+1) returns rand int from [0..N] */
/* main loop of genetic algorithm */
for (gen=1; gen!=gens; gen++) {
@@ -134,24 +145,24 @@
/* calculate fitness of current population */
for (i=0; i<popsize; i++) {
switch (fitfunc) {
- case 2: fit[i] = gsl_rng_uniform_int(prng,chromsize+1) + 1; /* random */
+ case 2: fit[i] = RNG(chromsize+1) + 1; /* random */
break;
- case 3: fit[i] = 1; /* onemax */
+ case 3: fit[i] = 1; /* onemax */
for (j=0; j<chromsize; j++)
fit[i] += curr[i][j] - '0';
break;
- case 4: fit[i] = 1; /* diffmax */
+ case 4: fit[i] = 1; /* diffmax */
for (j=0; j<chromsize; j++)
fit[i] += curr[i][j] - '0';
if (fit[i] < ((chromsize+1)/2)+1)
fit[i] = chromsize + 2 - fit[i];
break;
- case 5: fit[i] = curr[i][0] - '0'; /* integer */
+ case 5: fit[i] = curr[i][0] - '0'; /* integer */
for (j=1; j<chromsize; j++)
fit[i] = (fit[i]<<1) + curr[i][j] - '0';
fit[i]++;
break;
- default: fit[i] = 1; /* constant */
+ default: fit[i] = 1; /* constant */
break;
}
fit[i] *= boostfit;
@@ -212,7 +223,7 @@
fit[i] += fit[i-1];
for (i=0; i<popsize; i++) { /* reproduce */
- choice = gsl_rng_uniform_int(prng,fit[popsize-1]) + 1;
+ choice = RNG(fit[popsize-1]) + 1;
j=0;
while (choice > fit[j])
j++;
@@ -221,8 +232,8 @@
}
for (i=0; i<popsize; i+=2) /* crossover */
- if (crossrate > gsl_rng_uniform_int(prng,100)) {
- choice = gsl_rng_uniform_int(prng,chromsize) + 1;
+ if (crossrate > RNG(100)) {
+ choice = RNG(chromsize) + 1;
for (j=0; j<choice; j++) {
curr[i][j] = next[i][j];
curr[i+1][j] = next[i+1][j];
@@ -240,7 +251,7 @@
if (muterate) /* mutate */
for (i=0; i<popsize; i++)
for (j=0; j<chromsize; j++)
- if (gsl_rng_uniform_int(prng,muterate) == 0)
+ if (RNG(muterate) == 0)
curr[i][j] ^= 1; /* XOR the lsb to swap '0' and '1' */
/* end of main loop of genetic algorithm */
@@ -249,24 +260,24 @@
/* calculate fitness of last generation */
for (i=0; i<popsize; i++) {
switch (fitfunc) {
- case 2: fit[i] = gsl_rng_uniform_int(prng,chromsize+1) + 1; /* random */
+ case 2: fit[i] = RNG(chromsize+1) + 1; /* random */
break;
- case 3: fit[i] = 1; /* onemax */
+ case 3: fit[i] = 1; /* onemax */
for (j=0; j<chromsize; j++)
fit[i] += curr[i][j] - '0';
break;
- case 4: fit[i] = 1; /* diffmax */
+ case 4: fit[i] = 1; /* diffmax */
for (j=0; j<chromsize; j++)
fit[i] += curr[i][j] - '0';
if (fit[i] < ((chromsize+1)/2)+1)
fit[i] = chromsize + 2 - fit[i];
break;
- case 5: fit[i] = curr[i][0] - '0'; /* integer */
+ case 5: fit[i] = curr[i][0] - '0'; /* integer */
for (j=1; j<chromsize; j++)
fit[i] = (fit[i]<<1) + curr[i][j] - '0';
fit[i]++;
break;
- default: fit[i] = 1; /* constant */
+ default: fit[i] = 1; /* constant */
break;
}
fit[i] *= boostfit;
@@ -322,5 +333,7 @@
printf("fitness converged at generation %d\n", fconv_gen);
printf("population converged at generation %d\n", pconv_gen);
printf("--------------------------------------------------\n");
+#ifndef NOGSL
gsl_rng_free(prng);
+#endif /* NOGSL */
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-01-20 17:21:13
|
Revision: 13
http://sga.svn.sourceforge.net/sga/?rev=13&view=rev
Author: syinet
Date: 2008-01-20 09:20:59 -0800 (Sun, 20 Jan 2008)
Log Message:
-----------
added irc tutorial to support page of website.
Modified Paths:
--------------
trunk/web/support.html
Added Paths:
-----------
trunk/web/images/irc_01.gif
trunk/web/images/irc_02.gif
trunk/web/images/irc_03.gif
trunk/web/images/irc_04.gif
trunk/web/support_irc.html
Added: trunk/web/images/irc_01.gif
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/irc_01.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/images/irc_02.gif
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/irc_02.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/images/irc_03.gif
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/irc_03.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/images/irc_04.gif
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/irc_04.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/web/support.html
===================================================================
--- trunk/web/support.html 2008-01-13 22:31:09 UTC (rev 12)
+++ trunk/web/support.html 2008-01-20 17:20:59 UTC (rev 13)
@@ -43,7 +43,7 @@
<p> </p>
<h3>Other Tutorials</h3>
<ul>
- <li><a href="#">Accessing our IRC channel using LeafChat on Windows </a></li>
+ <li><a href="support_irc.html">Accessing our IRC channel using LeafChat on Windows </a></li>
<li><a href="#">How to accessing the svn server and download a working copy. </a></li>
</ul>
<p> </p>
Added: trunk/web/support_irc.html
===================================================================
--- trunk/web/support_irc.html (rev 0)
+++ trunk/web/support_irc.html 2008-01-20 17:20:59 UTC (rev 13)
@@ -0,0 +1,60 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SGA Support - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li class="selected"><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2><a href="support.html">Support</a> » SGA IRC Chat Setup Guide (For Windows) </h2>
+ <h3></h3>
+ <p>This is a quick guide to get the SGA IRC Chat setup on your <strong>Windows</strong> machine using <em>LeafChat</em>. You may still find this guide useful if using other OSes as<em> leafChat</em> is an IRC client for Windows, Mac OS X, and Linux. Other IRC clients tend to expire after 30 days and require you to spend money, one reason for choosing this program. This process should take you about 5 minutes to complete. </p>
+ <ol>
+ <li><a href="http://www.leafdigital.com/software/leafchat/download.html" target="_blank">Download</a> Leaf Chat and install it. (make sure you select the latest version for your OS)</li>
+ <li>Start the program by selecting <em>Start > All programs > Leaf Chat 2 > Leaf Chat 2</em></li>
+ <li>You will be presented with a welcome screen (see below). (If this screen does not automatically appear select options on the menu bar at the top of the program window and click 'Re-run settings Wizard'.) When you see the screen below click <strong>next</strong>.
+ <p><img src="images/irc_01.gif" alt="Setup Guide" width="520" height="400" /></p>
+ </li>
+ <li>The second screen will ask you for a nickname and a username, you may be asked to change your nickname if somebody else has it when signing onto the IRC server. Enter your details and click<strong> next.</strong></li>
+ <li>You are now asked to enter a <strong>Quit Message </strong>which will be sent on exiting the IRC channel. Also your real name should be entered to allow users to identify you using a WHOIS command. Enter your details and click<strong> next.</strong></li>
+ <li>You will now be asked to set an interface style, I prefer the tabbed layout. Make you selection and click <strong>next</strong>. </li>
+ <li>You will now be asked to select a theme, make your preference and click <strong>next. </strong></li>
+ <li>You should now see a confirmation that the setup is complete, click <strong>finish.</strong></li>
+ <li>Click the <strong>'Connect' </strong>button (the first button at the top of the program window). </li>
+ <li>At the <strong>'Address'</strong> Input bar enter <em>'irc.elasticmind.net'</em> without the quotes and click the<strong> 'Connect' </strong>button on the right hand side (see below).
+ <p><img src="images/irc_02.gif" alt="Setup Guide" width="550" height="323" /></p>
+ </li>
+ <li>You should now be connected to the IRC server as show below.
+ <p><img src="images/irc_03.gif" alt="Setup Guide" width="550" height="323" /></p>
+ </li>
+ <li>To join the SGA channel simply click the<strong> 'Join' </strong>button (along the top of the program window) and where it says 'Enter the name of the channel...' type <em>'#sga</em>' as shown below then click <strong>Join</strong> on the right hand side.
+ <p><img src="images/irc_04.gif" alt="Setup Guide" width="550" height="323" /></p>
+ </li>
+ <li>You should now be connected to the SGA IRC channel! type your message into the bar along the bottom of the program window and hit return to send it.</li>
+ <li>That's it you're done!</li>
+ </ol>
+ <p> </p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-01-13 22:31:15
|
Revision: 12
http://sga.svn.sourceforge.net/sga/?rev=12&view=rev
Author: syinet
Date: 2008-01-13 14:31:09 -0800 (Sun, 13 Jan 2008)
Log Message:
-----------
This update is the initial website pages.
Added Paths:
-----------
trunk/web/about.html
trunk/web/bugs.html
trunk/web/docs.html
trunk/web/download.html
trunk/web/images/
trunk/web/images/Thumbs.db
trunk/web/images/header_bg.png
trunk/web/index.html
trunk/web/license.html
trunk/web/roadmap.html
trunk/web/styles/
trunk/web/styles/screen.css
trunk/web/support.html
Added: trunk/web/about.html
===================================================================
--- trunk/web/about.html (rev 0)
+++ trunk/web/about.html 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>About SGA - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li class="selected"><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>About SGA </h2>
+ <p> SGA is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. SGA is written in C in is released under the <strong>GNU General Public License (GPL) </strong></p>
+ <p> </p>
+ <p class="highlight">more info needed, visuals also to help conceptualise GAs</p>
+ <p> </p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
Added: trunk/web/bugs.html
===================================================================
--- trunk/web/bugs.html (rev 0)
+++ trunk/web/bugs.html 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SGA Bugs - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li class="selected"><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>Bugs</h2>
+ <p>For bug tracking please visit our <a href="http://sourceforge.net/tracker/?group_id=208083&atid=1004272" target="_blank">sourceforge page</a>.</p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
Added: trunk/web/docs.html
===================================================================
--- trunk/web/docs.html (rev 0)
+++ trunk/web/docs.html 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SGA Documentation - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li><a href="./support.html">Support</a></li>
+ <li class="selected"><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>Documentation</h2>
+ <p>links to documentation here </p>
+ <p> </p>
+ <p class="highlight">We need to put this together, A coverall document broken down into sections to accompany the code would be a start.</p>
+ <p> </p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
Added: trunk/web/download.html
===================================================================
--- trunk/web/download.html (rev 0)
+++ trunk/web/download.html 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,34 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>Download SGA - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li class="selected"><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>Download</h2>
+ <p>We currently do not have any packages available to download. Although for information on downloading the latest version of the SGA code please visit our <a href="http://sourceforge.net/projects/sga/" target="_blank">sourceforge page</a>.</p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
Added: trunk/web/images/Thumbs.db
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/Thumbs.db
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/images/header_bg.png
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/header_bg.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/index.html
===================================================================
--- trunk/web/index.html (rev 0)
+++ trunk/web/index.html 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,38 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SGA - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li class="selected"><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>Welcome to SGA </h2>
+ <p> SGA is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. SGA is written in C in is released under the <strong>GNU General Public License (GPL)</strong></p>
+ <p><a href="about.html"> More Info / Screenshots </a> </p>
+ <p> </p>
+ <p class="highlight">What images? extra content? news items?</p>
+ <p> </p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
Added: trunk/web/license.html
===================================================================
--- trunk/web/license.html (rev 0)
+++ trunk/web/license.html 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,711 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SGA Release License - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li class="selected"><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>License</h2>
+ <p>SGA is released under the GNU GENERAL PUBLIC LICENSE Version 3, a copy of which is below. </p>
+ <p>
+ <textarea name="textarea" cols="75" rows="20"> GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
+</textarea>
+ </p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
Added: trunk/web/roadmap.html
===================================================================
--- trunk/web/roadmap.html (rev 0)
+++ trunk/web/roadmap.html 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,53 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SGA Roadmap - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li class="selected"><a href="./roadmap.html">Roadmap</a></li>
+ <li><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>Roadmap</h2>
+ <p> As the project is still in it's early stages of development there is lots of things to do! A brief outline of what is planned and currently being worked is below.</p>
+ <p> </p>
+ <h3>Core Code </h3>
+ <ul>
+ <li> Divide existing code into seperate moduals. Tentitively broken up into input, output, processing and storage.</li>
+ <li> Add validation on user input. </li>
+ <li> Improve output of the software to stdout, files and data formats.</li>
+ <li>Provide documentation for how the storage of information works within the system. </li>
+ <li> Provide a simple GUI which teachs prospective GUI writers how to interface with SGA. </li>
+ <li>Ability to configure in greater depth then is really simple.</li>
+ </ul>
+ <p> </p>
+ <h3> <strong></strong>Documentation</h3>
+ <ul>
+ <li> A Quick start guide (to get users running the software quickly even on windows.) </li>
+ <li> Code Explanations of each function and how the program works! </li>
+ <li> Info on what genetic algorithms are all about.</li>
+ <li>Various Tutorials</li>
+ </ul>
+ <p><a href="about.html"></a> </p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
Added: trunk/web/styles/screen.css
===================================================================
--- trunk/web/styles/screen.css (rev 0)
+++ trunk/web/styles/screen.css 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,195 @@
+* {
+ margin : 0;
+ padding : 0;
+}
+
+a {
+ color : #437fda;
+ text-decoration : none;
+}
+a:visited {
+ color : #437fda;
+ text-decoration : underline;
+}
+a:hover {
+ color : #ba8f43;
+}
+
+h2 {
+ color : #343434;
+ font : italic 200% sans-serif;
+}
+h3 {
+ color : #343434;
+ font : italic 160% sans-serif;
+}
+h4 {
+ color : #343434;
+ font : bold italic 110% sans-serif;
+ padding : 1em 1em 0 1em;
+}
+
+html {
+ color : #565656;
+ font : 70%/170% sans-serif;
+ text-align : justify;
+}
+
+img {
+ margin : 1em 1em 0 1em;
+}
+img.left {
+ float : left;
+ margin : 1em 1em 0 0;
+}
+img.right {
+ float : right;
+ margin : 1em 0 0 1em;
+}
+
+blockquote {
+ font-style : italic;
+ margin : 1em 1em 0 1em;
+ padding : 0 0 1em 0;
+}
+blockquote span {
+ font-size : 200%;
+ line-height : 1%;
+ margin : 0 0.15em;
+ position : relative;
+ top : 0.25em;
+}
+
+form button {
+ background : #ffffff;
+ border : 1px solid #cfcfcf;
+ padding : 0.25em;
+ margin : 0 0 0 0.75em;
+}
+form input {
+ border : none;
+ width : 100%;
+}
+form textarea {
+ border : none;
+ width : 100%;
+ height : 10em;
+}
+form p.button {
+ text-align : right;
+}
+form p.input,
+form p.text {
+ background : #ffffff;
+ border : 1px solid #cfcfcf;
+ padding : 0.25em;
+ margin : 0.25em 1em 0 1em;
+}
+
+p {
+ padding : 1em 1em 0 1em;
+}
+
+ul,
+ol {
+ padding : 1em 1em 0 3em;
+}
+
+#main {
+ margin : auto;
+ max-width : 65em;
+ min-width : 40em;
+ width : auto !important;
+ width : 65em;
+}
+
+#header {
+ background : #2b548c url('../images/header_bg.png') repeat-x bottom left;
+ padding : 6em 4em 1em 4em;
+}
+#header h1 {
+ color : #ffffff;
+ font : italic 200% sans-serif;
+}
+
+#menu {
+ background : #437fda;
+ border-bottom : 1px solid #2b548c;
+ font : 100% sans-serif;
+}
+#menu ul {
+ padding : 0.75em 4em;
+}
+#menu li {
+ display : inline;
+}
+#menu li a {
+ color : #ffffff;
+ padding : 0.75em 1.5em;
+ text-decoration: none;
+}
+#menu li a:hover {
+ background : #2b548c;
+}
+#menu li.selected a {
+ background : #ffffff;
+ border : 1px solid #2b548c;
+ border-bottom : 1px solid #ffffff;
+ color : #437fda;
+}
+#menu li.selected a:hover {
+ background : #ffffff;
+ color : #ba8f43;
+}
+
+#content {
+ border-bottom : 1px solid #cfcfcf;
+ height : auto !important;
+ height : 1%;
+ overflow : hidden;
+ padding : 2em 0 0 0;
+}
+#content div {
+ padding : 0 4em 2em 4em;
+}
+
+#panel {
+ background : #efefef;
+ border : 1px solid #dfdfdf;
+ border-bottom : 1px solid #cfcfcf;
+ border-top : none;
+ height : auto !important;
+ height : 1%;
+ overflow : hidden;
+ padding : 0 5em 2em 5em;
+}
+#panel div {
+ padding : 2em 0 0 0;
+}
+div.left {
+ left : -1em;
+ float : left;
+ position : relative;
+ width : 50%;
+}
+div.right {
+ left : 1em;
+ float : left;
+ position : relative;
+ width : 50%;
+}
+
+#footer {
+ font-size : 85%;
+ margin : auto;
+ padding : 1em 0 3em 0;
+ text-align : center;
+ width : 65%;
+}
+.highlight {
+ color: #006600;
+ background-color: #66FF00;
+ padding: 2px;
+ border: 1px solid #006600;
+ float: left;
+}
Added: trunk/web/support.html
===================================================================
--- trunk/web/support.html (rev 0)
+++ trunk/web/support.html 2008-01-13 22:31:09 UTC (rev 12)
@@ -0,0 +1,56 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+<head>
+<title>SGA Support - The Simple genetic Algorithm</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li class="selected"><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>Support</h2>
+ <p>Here you can access the various documents we have created to help you with using and understnding the SGA program. </p>
+ <p> </p>
+ <h3>FAQs</h3>
+ <p>If you cannot get an answer to your question please consider posting to our mailing list.</p>
+ <p><a href="#">Click here for FAQs</a> </p>
+ <p> </p>
+ <p class="highlight"> for a start one question could be, what mailing list should i use?</p>
+ <p> </p>
+ <p> </p>
+ <h3>SGA Tutorials</h3>
+ <ul>
+ <li><a href="#">How to get SGA up and running on Linux </a></li>
+ <li><a href="#">How to get SGA up and running on a Windows machine </a></li>
+ </ul>
+ <p> </p>
+ <h3>Other Tutorials</h3>
+ <ul>
+ <li><a href="#">Accessing our IRC channel using LeafChat on Windows </a></li>
+ <li><a href="#">How to accessing the svn server and download a working copy. </a></li>
+ </ul>
+ <p> </p>
+ <p class="highlight">suggestions for other tutorials and guides would be good</p>
+ <p> </p>
+ </div>
+ </div>
+</div>
+</body>
+</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fr...@us...> - 2008-01-08 16:26:09
|
Revision: 11
http://sga.svn.sourceforge.net/sga/?rev=11&view=rev
Author: fragmad
Date: 2008-01-08 08:26:06 -0800 (Tue, 08 Jan 2008)
Log Message:
-----------
This revision of sga adds the displayfile function. The aim of this
function which rests within output.h (implemented in output.c) is to
allow the large blocks of text which make the help and version messages
to be easily changed. Either for copy reasons or for translation.
Info on Changes
output.h
Contains the definition of displayfile.
output.c
Includes stdio, opens a specified file. Displays a human readable
error message if it fails to open the file. Displays the file
otherwise.
sga.c
Makes changes to the switch block that parses command-line arguments
to reflect additions to output.h and output.c.
Makefile
Adds output.c to the list of files that need to be included to
compile sga.
VERSION
ASCII text file which contains the version information from the last
revision of sga.
HELP
ASCII text file which contains the help information from the last
revision of sga.
Comments:
There is room for improvement crash handling. The standard gnu library
includes a wonderful set of error handling tools. This might be
considered for use. Currently there is a redundent include of stdio.
The makefile could be cleaned up a little as well. :)
Will
Modified Paths:
--------------
trunk/code/Makefile
trunk/code/output.c
trunk/code/output.h
trunk/code/sga.c
Added Paths:
-----------
trunk/code/HELP
trunk/code/VERSION
Added: trunk/code/HELP
===================================================================
--- trunk/code/HELP (rev 0)
+++ trunk/code/HELP 2008-01-08 16:26:06 UTC (rev 11)
@@ -0,0 +1,17 @@
+sga - The simple genetic algorithm.
+
+Command line options (each option takes a non-negative integer as an argument,
+the default value for each option is shown):
+ -p 300 popsize (must be even, not 0 and not greater than 1000)
+ -c 16 chromosome size (length of bitstring, not 0 and not greater than 80)
+ -x 70 crossover probability (0 = no crossover)
+ -m 1000 mutation rate (0 = no mutation, 500 = 1 in 500 bits mutated)
+ -f 1 fitness function (1 = constant, 2 = random, ... , 5 = integer)
+ -b 1 fitness boost (e.g. 2 = double the fitness of each individual)
+ -r 1 random seed (not 0)
+ -g 1000 number of generations (0 = run indefinitely)
+ -s 10 number of individuals to show in one generation (not > popsize)
+ -d 1 frequency of display (not 0, 8 = display every 8th generation)
+ -h displays help and exits
+ -v displays the version and exits
+
Modified: trunk/code/Makefile
===================================================================
--- trunk/code/Makefile 2007-12-21 13:21:25 UTC (rev 10)
+++ trunk/code/Makefile 2008-01-08 16:26:06 UTC (rev 11)
@@ -1,2 +1,2 @@
sga: sga.c
- gcc -o sga sga.c -lgsl -lgslcblas -lm
+ gcc -o sga sga.c output.c -lgsl -lgslcblas -lm
Added: trunk/code/VERSION
===================================================================
--- trunk/code/VERSION (rev 0)
+++ trunk/code/VERSION 2008-01-08 16:26:06 UTC (rev 11)
@@ -0,0 +1,3 @@
+sga - The simple gentic algorithm Version 0.3.
+Copyright 2007 Tim Watson.
+Licenced Under the GNU Public Licence 3.0
Modified: trunk/code/output.c
===================================================================
--- trunk/code/output.c 2007-12-21 13:21:25 UTC (rev 10)
+++ trunk/code/output.c 2008-01-08 16:26:06 UTC (rev 11)
@@ -0,0 +1,18 @@
+#include <stdio.h>
+
+int displayfile(char *filename, char *refname)
+{
+ FILE * file = fopen(filename,"r");
+ if (file == NULL){
+ printf("Help file for %s not found.\nPlease contact sga team.\n", refname);
+ return 1; /* Add a proper gnu error function to this rather then a break.*/
+ /* But this works for now.*/
+ }
+ printf("WHA!");
+ char line[81];
+ while(fgets(line, 81, file) != NULL){
+ printf("%s",line);
+ }
+}
+
+
Modified: trunk/code/output.h
===================================================================
--- trunk/code/output.h 2007-12-21 13:21:25 UTC (rev 10)
+++ trunk/code/output.h 2008-01-08 16:26:06 UTC (rev 11)
@@ -0,0 +1,2 @@
+int displayfile(char *filename, char *refname);
+
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2007-12-21 13:21:25 UTC (rev 10)
+++ trunk/code/sga.c 2008-01-08 16:26:06 UTC (rev 11)
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <math.h> /* needed for sqrt() to calc std. dev. */
#include <gsl/gsl_rng.h> /* a good pseudo-random number generator */
+#include "output.h"
@@ -44,8 +45,6 @@
double mean, /* mean fitness for generation */
std_dev; /* standard deviation of fitnesses */
-
-
main(int argc, char *argv[])
{
int i, j, k, gen, choice, count[80],
@@ -54,16 +53,7 @@
/* accept the command line options */
while (--argc>0 && (*++argv)[0]=='-')
switch (*++argv[0]) {
- case 'h': printf("sga - The simple genetic algorithm.\n\nSwitch Options\n"
- "\t\"-h\" - Displays this help page.\n\t\"-p\" - Sets the"
- " inital population size.\n\t\"-c\" - Sets the chromosome"
- " size.\n\t\"-x\" - Sets the crossover rate.\n\t\"-m\" -"
- " Sets the mutation rate.\n\t\"-f\" - Selects the fitness"
- " function used.\n\t\"-b\" - Boost fitness value.\n\t\"-r"
- "\" - Random number seed.\n\t\"-g\" - Sets the maximum"
- " number of generations.\n\t\"-s\" - Sets the display"
- " size.\n\t\"-d\" - Sets the display frequency.\n\t\"-v"
- "\" - Displays version information.\n");
+ case 'h': displayfile("HELP", "-h");
exit(0);
case 'p': if (*++argv[0])
popsize = atoi(argv[0]);
@@ -115,9 +105,7 @@
else if (--argc > 0)
displfreq = atoi(*++argv);
break;
- case 'v': printf("sga - The simple gentic algorithm Version 0.3.\n"
- "Copyright 2007 Tim Watson.\n"
- "Licenced Under the GNU Public Licence 3.0\n");
+ case 'v': displayfile("VERSION", "-v");
exit(0);
default: break;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2007-12-21 13:21:34
|
Revision: 10
http://sga.svn.sourceforge.net/sga/?rev=10&view=rev
Author: tim-watson
Date: 2007-12-21 05:21:25 -0800 (Fri, 21 Dec 2007)
Log Message:
-----------
Added Colin Wilkinson to CREDITS.
Modified Paths:
--------------
trunk/CREDITS
Modified: trunk/CREDITS
===================================================================
--- trunk/CREDITS 2007-12-21 11:52:16 UTC (rev 9)
+++ trunk/CREDITS 2007-12-21 13:21:25 UTC (rev 10)
@@ -4,4 +4,5 @@
William Ellwood
Matthew Lester
Tim Watson
+Colin Wilkinson
David Whiteley
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2007-12-21 11:52:17
|
Revision: 9
http://sga.svn.sourceforge.net/sga/?rev=9&view=rev
Author: tim-watson
Date: 2007-12-21 03:52:16 -0800 (Fri, 21 Dec 2007)
Log Message:
-----------
Added -h and -v descriptions to trunk/code/README.
Modified Paths:
--------------
trunk/code/README
Modified: trunk/code/README
===================================================================
--- trunk/code/README 2007-12-21 11:46:37 UTC (rev 8)
+++ trunk/code/README 2007-12-21 11:52:16 UTC (rev 9)
@@ -32,6 +32,8 @@
-g 1000 number of generations (0 = run indefinitely)
-s 10 number of individuals to show in one generation (not > popsize)
-d 1 frequency of display (not 0, 8 = display every 8th generation)
+ -h displays help and exits
+ -v displays the version and exits
Examples:
sga defaults as above
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2007-12-21 11:46:52
|
Revision: 8
http://sga.svn.sourceforge.net/sga/?rev=8&view=rev
Author: tim-watson
Date: 2007-12-21 03:46:37 -0800 (Fri, 21 Dec 2007)
Log Message:
-----------
Split long lines in -h and -v options.
Modified Paths:
--------------
trunk/code/sga.c
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2007-12-20 16:00:24 UTC (rev 7)
+++ trunk/code/sga.c 2007-12-21 11:46:37 UTC (rev 8)
@@ -54,7 +54,17 @@
/* accept the command line options */
while (--argc>0 && (*++argv)[0]=='-')
switch (*++argv[0]) {
- case 'h': printf("SGA - The Simple Genetic Algorithm.\n\nSwitch Options\n\t\"-h\" - Displays this help page.\n\t\"-p\" - Sets the inital population size.\n\t\"-c\" - Sets the chromosome size.\n\t\"-x\" - Sets the crossover rate.\n\t\"-m\" - Sets the mutation rate.\n\t\"-f\" - Selects the fitness function used.\n\t\"-b\" - Boost fitness value.\n\t\"-r\" - Random number seed.\n\t\"-g\" - Sets the maximum number of generations.\n\t\"-s\" - Sets the display size.\n\t\"-d\" - Sets the display frequency.\n\t\"-v\" - Displays version information.\n");exit(0);
+ case 'h': printf("sga - The simple genetic algorithm.\n\nSwitch Options\n"
+ "\t\"-h\" - Displays this help page.\n\t\"-p\" - Sets the"
+ " inital population size.\n\t\"-c\" - Sets the chromosome"
+ " size.\n\t\"-x\" - Sets the crossover rate.\n\t\"-m\" -"
+ " Sets the mutation rate.\n\t\"-f\" - Selects the fitness"
+ " function used.\n\t\"-b\" - Boost fitness value.\n\t\"-r"
+ "\" - Random number seed.\n\t\"-g\" - Sets the maximum"
+ " number of generations.\n\t\"-s\" - Sets the display"
+ " size.\n\t\"-d\" - Sets the display frequency.\n\t\"-v"
+ "\" - Displays version information.\n");
+ exit(0);
case 'p': if (*++argv[0])
popsize = atoi(argv[0]);
else if (--argc > 0)
@@ -105,7 +115,10 @@
else if (--argc > 0)
displfreq = atoi(*++argv);
break;
- case 'v': printf("SGA - The Simple Gentic Algorithm Version 0.3.\nCopyright 2007 Tim Watson.\n Licenced Under the GNU Public Licence 3.0\n");exit(0);
+ case 'v': printf("sga - The simple gentic algorithm Version 0.3.\n"
+ "Copyright 2007 Tim Watson.\n"
+ "Licenced Under the GNU Public Licence 3.0\n");
+ exit(0);
default: break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fr...@us...> - 2007-12-20 16:00:30
|
Revision: 7
http://sga.svn.sourceforge.net/sga/?rev=7&view=rev
Author: fragmad
Date: 2007-12-20 08:00:24 -0800 (Thu, 20 Dec 2007)
Log Message:
-----------
Added working files (currently empty) for data, input and output
functions. Proceeding to work on data module to allow work on output
module to start in ernest.
Will
Added Paths:
-----------
trunk/code/data.c
trunk/code/data.h
trunk/code/input.c
trunk/code/input.h
trunk/code/output.c
trunk/code/output.h
Added: trunk/code/data.c
===================================================================
Added: trunk/code/data.h
===================================================================
Added: trunk/code/input.c
===================================================================
Added: trunk/code/input.h
===================================================================
Added: trunk/code/output.c
===================================================================
Added: trunk/code/output.h
===================================================================
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2007-12-20 15:47:41
|
Revision: 6
http://sga.svn.sourceforge.net/sga/?rev=6&view=rev
Author: tim-watson
Date: 2007-12-20 07:47:39 -0800 (Thu, 20 Dec 2007)
Log Message:
-----------
Moved COPYING and CREDITS back to trunk.
Added Paths:
-----------
trunk/COPYING
trunk/CREDITS
Removed Paths:
-------------
trunk/code/COPYING
trunk/code/CREDITS
Copied: trunk/COPYING (from rev 5, trunk/code/COPYING)
===================================================================
--- trunk/COPYING (rev 0)
+++ trunk/COPYING 2007-12-20 15:47:39 UTC (rev 6)
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Copied: trunk/CREDITS (from rev 5, trunk/code/CREDITS)
===================================================================
--- trunk/CREDITS (rev 0)
+++ trunk/CREDITS 2007-12-20 15:47:39 UTC (rev 6)
@@ -0,0 +1,7 @@
+This is an alphabetical list of people who have contributed to sga:
+
+Lewis Bond
+William Ellwood
+Matthew Lester
+Tim Watson
+David Whiteley
Deleted: trunk/code/COPYING
===================================================================
--- trunk/code/COPYING 2007-12-20 10:01:25 UTC (rev 5)
+++ trunk/code/COPYING 2007-12-20 15:47:39 UTC (rev 6)
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not...
[truncated message content] |
|
From: <tim...@us...> - 2007-12-20 10:01:42
|
Revision: 5
http://sga.svn.sourceforge.net/sga/?rev=5&view=rev
Author: tim-watson
Date: 2007-12-20 02:01:25 -0800 (Thu, 20 Dec 2007)
Log Message:
-----------
Created new directory structure: web, docs and code.
Added Paths:
-----------
trunk/code/
trunk/code/CODINGSTYLE
trunk/code/COPYING
trunk/code/CREDITS
trunk/code/Makefile
trunk/code/README
trunk/code/sga.c
trunk/docs/
trunk/web/
Removed Paths:
-------------
trunk/CODINGSTYLE
trunk/COPYING
trunk/CREDITS
trunk/Makefile
trunk/README
trunk/sga.c
Deleted: trunk/CODINGSTYLE
===================================================================
--- trunk/CODINGSTYLE 2007-12-18 18:06:54 UTC (rev 4)
+++ trunk/CODINGSTYLE 2007-12-20 10:01:25 UTC (rev 5)
@@ -1,316 +0,0 @@
-This document is adapted from the linux kernel coding style.
-
-This is a short document describing the preferred coding style for the
-sga. Coding style is very personal, and I won't _force_ my
-views on anybody, but this is what goes for anything that I have to be
-able to maintain, and I'd prefer it for most other things too. Please
-at least consider the points made here.
-
-First off, I'd suggest printing out a copy of the GNU coding standards,
-and NOT read it. Burn them, it's a great symbolic gesture.
-
-Anyway, here goes:
-
-
- Chapter 1: Indentation
-
-In spite of Linus' deeply held belief on the virtues of eight-space tabs,
-every level of indentation should add two spaces. Don't use any tabs in
-the code.
-
-Don't put multiple statements on a single line unless you have
-something to hide.
-
-Get a decent editor (vim) and don't leave whitespace at the end of lines.
-
-
- Chapter 2: Breaking long lines and strings
-
-Coding style is all about readability and maintainability using commonly
-available tools.
-
-The limit on the length of lines is 80 columns and this is a hard limit.
-
-Statements longer than 80 columns will be broken into sensible chunks.
-Descendants are always substantially shorter than the parent and are placed
-substantially to the right. The same applies to function headers with a long
-argument list. Long strings are as well broken into shorter strings.
-
- Chapter 3: Placing Braces and Spaces
-
-The other issue that always comes up in C styling is the placement of
-braces. Unlike the indent size, there are few technical reasons to
-choose one placement strategy over the other, but the preferred way, as
-shown to us by the prophets Kernighan and Ritchie, is to put the opening
-brace last on the line, and put the closing brace first, thusly:
-
- if (x is true) {
- we do y
- }
-
-This applies to all non-function statement blocks (if, switch, for,
-while, do). E.g.:
-
- switch (action) {
- case KOBJ_ADD:
- return "add";
- case KOBJ_REMOVE:
- return "remove";
- case KOBJ_CHANGE:
- return "change";
- default:
- return NULL;
- }
-
-However, there is one special case, namely functions: they have the
-opening brace at the beginning of the next line, thus:
-
- int function(int x)
- {
- body of function
- }
-
-Heretic people all over the world have claimed that this inconsistency
-is ... well ... inconsistent, but all right-thinking people know that
-(a) K&R are _right_ and (b) K&R are right. Besides, functions are
-special anyway (you can't nest them in C).
-
-Note that the closing brace is empty on a line of its own, _except_ in
-the cases where it is followed by a continuation of the same statement,
-ie a "while" in a do-statement or an "else" in an if-statement, like
-this:
-
- do {
- body of do-loop
- } while (condition);
-
-and
-
- if (x == y) {
- ..
- } else if (x > y) {
- ...
- } else {
- ....
- }
-
-Rationale: K&R.
-
-Also, note that this brace-placement also minimizes the number of empty
-(or almost empty) lines, without any loss of readability. Thus, as the
-supply of new-lines on your screen is not a renewable resource (think
-25-line terminal screens here), you have more empty lines to put
-comments on.
-
- 3.1: Spaces
-
-sga style for use of spaces depends (mostly) on
-function-versus-keyword usage. Use a space after (most) keywords. The
-notable exceptions are sizeof, typeof, alignof, and __attribute__, which look
-somewhat like functions (and are usually used with parentheses,
-although they are not required in the language, as in: "sizeof info" after
-"struct fileinfo info;" is declared).
-
-So use a space after these keywords:
- if, switch, case, for, do, while
-but not with sizeof, typeof, alignof, or __attribute__. E.g.,
- s = sizeof(struct file);
-
-Do not add spaces around (inside) parenthesized expressions. This example is
-*bad*:
-
- s = sizeof( struct file );
-
-When declaring pointer data or a function that returns a pointer type, the
-preferred use of '*' is adjacent to the data name or function name and not
-adjacent to the type name. Examples:
-
- char *sga_banner;
- unsigned long long memparse(char *ptr, char **retptr);
- char *match_strdup(substring_t *s);
-
-Use one space around (on each side of) most binary and ternary operators,
-such as any of these:
-
- = + - < > * / % | & ^ <= >= == != ? :
-
-but no space after unary operators:
- & * + - ~ ! sizeof typeof alignof __attribute__ defined
-
-no space before the postfix increment & decrement unary operators:
- ++ --
-
-no space after the prefix increment & decrement unary operators:
- ++ --
-
-and no space around the '.' and "->" structure member operators.
-
-Diregard these rules if doing so will aid clarity.
-
-
- Chapter 4: Naming
-
-C is a Spartan language, and so should your naming be. Unlike Modula-2
-and Pascal programmers, C programmers do not use cute names like
-ThisVariableIsATemporaryCounter. A C programmer would call that
-variable "tmp", which is much easier to write, and not the least more
-difficult to understand.
-
-HOWEVER, while mixed-case names are frowned upon, descriptive names for
-global variables are a must. To call a global function "foo" is a
-shooting offense.
-
-GLOBAL variables (to be used only if you _really_ need them) need to
-have descriptive names, as do global functions. If you have a function
-that counts the number of active users, you should call that
-"count_active_users()" or similar, you should _not_ call it "cntusr()".
-
-Encoding the type of a function into the name (so-called Hungarian
-notation) is brain damaged - the compiler knows the types anyway and can
-check those, and it only confuses the programmer. No wonder MicroSoft
-makes buggy programs.
-
-LOCAL variable names should be short, and to the point. If you have
-some random integer loop counter, it should probably be called "i".
-Calling it "loop_counter" is non-productive, if there is no chance of it
-being mis-understood. Similarly, "tmp" can be just about any type of
-variable that is used to hold a temporary value.
-
-If you are afraid to mix up your local variable names, you have another
-problem, which is called the function-growth-hormone-imbalance syndrome.
-See chapter 5 (Functions).
-
- Chapter 5: Functions
-
-Functions should be short and sweet, and do just one thing. They should
-fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24,
-as we all know), and do one thing and do that well.
-
-The maximum length of a function is inversely proportional to the
-complexity and indentation level of that function. So, if you have a
-conceptually simple function that is just one long (but simple)
-case-statement, where you have to do lots of small things for a lot of
-different cases, it's OK to have a longer function.
-
-However, if you have a complex function, and you suspect that a
-less-than-gifted first-year high-school student might not even
-understand what the function is all about, you should adhere to the
-maximum limits all the more closely. Use helper functions with
-descriptive names (you can ask the compiler to in-line them if you think
-it's performance-critical, and it will probably do a better job of it
-than you would have done).
-
-Another measure of the function is the number of local variables. They
-shouldn't exceed 5-10, or you're doing something wrong. Re-think the
-function, and split it into smaller pieces. A human brain can
-generally easily keep track of about 7 different things, anything more
-and it gets confused. You know you're brilliant, but maybe you'd like
-to understand what you did 2 weeks from now.
-
-In source files, separate functions with one blank line. If the function is
-exported, the EXPORT* macro for it should follow immediately after the closing
-function brace line. E.g.:
-
-int system_is_up(void)
-{
- return system_state == SYSTEM_RUNNING;
-}
-EXPORT_SYMBOL(system_is_up);
-
-In function prototypes, include parameter names with their data types.
-Although this is not required by the C language, it is preferred in sga
-because it is a simple way to add valuable information for the reader.
-
-
- Chapter 6: Centralized exiting of functions
-
-Albeit deprecated by some people, the equivalent of the goto statement is
-used frequently by compilers in form of the unconditional jump instruction.
-
-The goto statement comes in handy when a function exits from multiple
-locations and some common work such as cleanup has to be done.
-
-The rationale is:
-
-- unconditional statements are easier to understand and follow
-- nesting is reduced
-- errors by not updating individual exit points when making
- modifications are prevented
-- saves the compiler work to optimize redundant code away ;)
-
-int fun(int a)
-{
- int result = 0;
- char *buffer = kmalloc(SIZE);
-
- if (buffer == NULL)
- return -ENOMEM;
-
- if (condition1) {
- while (loop1) {
- ...
- }
- result = 1;
- goto out;
- }
- ...
-out:
- kfree(buffer);
- return result;
-}
-
- Chapter 7: Commenting
-
-Comments are good, but there is also a danger of over-commenting. NEVER
-try to explain HOW your code works in a comment: it's much better to
-write the code so that the _working_ is obvious, and it's a waste of
-time to explain badly written code.
-
-Generally, you want your comments to tell WHAT your code does, not HOW.
-Also, try to avoid putting comments inside a function body: if the
-function is so complex that you need to separately comment parts of it,
-you should probably go back to chapter 5 for a while. You can make
-small comments to note or warn about something particularly clever (or
-ugly), but try to avoid excess. Instead, put the comments at the head
-of the function, telling people what it does, and possibly WHY it does
-it.
-
-sga style for comments is the C89 "/* ... */" style.
-Don't use C99-style "// ..." comments.
-
-The preferred style for long (multi-line) comments is:
-
- /*
- This is the preferred style for multi-line
- comments in the sga source code.
- Please use it consistently.
- */
-
-It's also important to comment data, whether they are basic types or derived
-types. To this end, use just one data declaration per line (no commas for
-multiple data declarations). This leaves you room for a small comment on each
-item, explaining its use.
-
- Appendix I: References
-
-The C Programming Language, Second Edition
-by Brian W. Kernighan and Dennis M. Ritchie.
-Prentice Hall, Inc., 1988.
-ISBN 0-13-110362-8 (paperback), 0-13-110370-9 (hardback).
-URL: http://cm.bell-labs.com/cm/cs/cbook/
-
-The Practice of Programming
-by Brian W. Kernighan and Rob Pike.
-Addison-Wesley, Inc., 1999.
-ISBN 0-201-61586-X.
-URL: http://cm.bell-labs.com/cm/cs/tpop/
-
-GNU manuals - where in compliance with K&R and this text - for cpp, gcc,
-gcc internals and indent, all available from http://www.gnu.org/manual/
-
-WG14 is the international standardization working group for the programming
-language C, URL: http://www.open-std.org/JTC1/SC22/WG14/
-
-Kernel CodingStyle, by gr...@kr... at OLS 2002:
-http://www.kroah.com/linux/talks/ols_2002_kernel_codingstyle_talk/html/
-
Deleted: trunk/COPYING
===================================================================
--- trunk/COPYING 2007-12-18 18:06:54 UTC (rev 4)
+++ trunk/COPYING 2007-12-20 10:01:25 UTC (rev 5)
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
Deleted: trunk/CREDITS
===================================================================
--- trunk/CREDITS 2007-12-18 18:06:54 UTC (rev 4)
+++ trunk/CREDITS 2007-12-20 10:01:25 UTC (rev 5)
@@ -1,7 +0,0 @@
-This is an alphabetical list of people who have contributed to sga:
-
-Lewis Bond
-William Ellwood
-Matthew Lester
-Tim Watson
-David Whiteley
Deleted: trunk/Makefile
===================================================================
--- trunk/Makefile 2007-12-18 18:06:54 UTC (rev 4)
+++ trunk/Makefile 2007-12-20 10:01:25 UTC (rev 5)
@@ -1,2 +0,0 @@
-sga: sga.c
- gcc -o sga sga.c -lgsl -lgslcblas -lm
Deleted: trunk/README
===================================================================
--- trunk/README 2007-12-18 18:06:54 UTC (rev 4)
+++ trunk/README 2007-12-20 10:01:25 UTC (rev 5)
@@ -1,47 +0,0 @@
-sga - A Simple Genetic Algorithm
-
-WHAT IS SGA?
-
-sga is a program that demonstrates a standard genetic algorithm with some
-simple fitness functions. Its features include:
-
- o Fixed-length binary strings.
- o Static population size (all generations equal size).
- o Standard proportionate reproduction.
- o Optional one-point crossover and/or mutation (bit-flipping).
- o Choice of fitness function:
- 1 constant (all fitnesses the same),
- 2 random (fitness() returns a random value),
- 3 onemax (maximise the number of ones),
- 4 diffmax (maximise the difference between number of ones and zeros),
- 5 integer (fitness equals integer equivalent of bitstring).
- o Statistics: best, worst, mean, standard deviation per generation.
- o A one-line summary of the number of ones in each locus is shown below
- each displayed generation. A '-' means all ones or no ones, and a digit
- represents the percentage of ones: 0=less than 10%, 1=10%+, 2=20%+ etc.
-
-Command line options (each option takes a non-negative integer as an argument,
-the default value for each option is shown):
- -p 300 popsize (must be even, not 0 and not greater than 1000)
- -c 16 chromsize (length of bitstring, not 0 and not greater than 80)
- -x 70 crossover probability (0 = no crossover)
- -m 1000 mutation rate (0 = no mutation, 500 = 1 in 500 bits mutated)
- -f 1 fitness function (1 = constant, 2 = random, ... , 5 = integer)
- -b 1 fitness boost (e.g. 2 = double the fitness of each individual)
- -r 1 random seed (not 0)
- -g 1000 number of generations (0 = run indefinitely)
- -s 10 number of individuals to show in one generation (not > popsize)
- -d 1 frequency of display (not 0, 8 = display every 8th generation)
-
-Examples:
- sga defaults as above
- sga -p500 popsize = 500
- sga -c31 -x0 -m500 chromsize = 31, no crossover, 1 in 500 bits mutated
- sga -s33 -d2 display 33 individuals from every other generation
-
-INSTALLING, COMPILING, LINKING AND RUNNING SGA
-
-Install the source code and makefile in a directory, ensure that you have
-already installed both the gcc compiler and gsl development libraries,
-and type 'make'. The program should now run if you type './sga'
-
Copied: trunk/code/CODINGSTYLE (from rev 4, trunk/CODINGSTYLE)
===================================================================
--- trunk/code/CODINGSTYLE (rev 0)
+++ trunk/code/CODINGSTYLE 2007-12-20 10:01:25 UTC (rev 5)
@@ -0,0 +1,316 @@
+This document is adapted from the linux kernel coding style.
+
+This is a short document describing the preferred coding style for the
+sga. Coding style is very personal, and I won't _force_ my
+views on anybody, but this is what goes for anything that I have to be
+able to maintain, and I'd prefer it for most other things too. Please
+at least consider the points made here.
+
+First off, I'd suggest printing out a copy of the GNU coding standards,
+and NOT read it. Burn them, it's a great symbolic gesture.
+
+Anyway, here goes:
+
+
+ Chapter 1: Indentation
+
+In spite of Linus' deeply held belief on the virtues of eight-space tabs,
+every level of indentation should add two spaces. Don't use any tabs in
+the code.
+
+Don't put multiple statements on a single line unless you have
+something to hide.
+
+Get a decent editor (vim) and don't leave whitespace at the end of lines.
+
+
+ Chapter 2: Breaking long lines and strings
+
+Coding style is all about readability and maintainability using commonly
+available tools.
+
+The limit on the length of lines is 80 columns and this is a hard limit.
+
+Statements longer than 80 columns will be broken into sensible chunks.
+Descendants are always substantially shorter than the parent and are placed
+substantially to the right. The same applies to function headers with a long
+argument list. Long strings are as well broken into shorter strings.
+
+ Chapter 3: Placing Braces and Spaces
+
+The other issue that always comes up in C styling is the placement of
+braces. Unlike the indent size, there are few technical reasons to
+choose one placement strategy over the other, but the preferred way, as
+shown to us by the prophets Kernighan and Ritchie, is to put the opening
+brace last on the line, and put the closing brace first, thusly:
+
+ if (x is true) {
+ we do y
+ }
+
+This applies to all non-function statement blocks (if, switch, for,
+while, do). E.g.:
+
+ switch (action) {
+ case KOBJ_ADD:
+ return "add";
+ case KOBJ_REMOVE:
+ return "remove";
+ case KOBJ_CHANGE:
+ return "change";
+ default:
+ return NULL;
+ }
+
+However, there is one special case, namely functions: they have the
+opening brace at the beginning of the next line, thus:
+
+ int function(int x)
+ {
+ body of function
+ }
+
+Heretic people all over the world have claimed that this inconsistency
+is ... well ... inconsistent, but all right-thinking people know that
+(a) K&R are _right_ and (b) K&R are right. Besides, functions are
+special anyway (you can't nest them in C).
+
+Note that the closing brace is empty on a line of its own, _except_ in
+the cases where it is followed by a continuation of the same statement,
+ie a "while" in a do-statement or an "else" in an if-statement, like
+this:
+
+ do {
+ body of do-loop
+ } while (condition);
+
+and
+
+ if (x == y) {
+ ..
+ } else if (x > y) {
+ ...
+ } else {
+ ....
+ }
+
+Rationale: K&R.
+
+Also, note that this brace-placement also minimizes the number of empty
+(or almost empty) lines, without any loss of readability. Thus, as the
+supply of new-lines on your screen is not a renewable resource (think
+25-line terminal screens here), you have more empty lines to put
+comments on.
+
+ 3.1: Spaces
+
+sga style for use of spaces depends (mostly) on
+function-versus-keyword usage. Use a space after (most) keywords. The
+notable exceptions are sizeof, typeof, alignof, and __attribute__, which look
+somewhat like functions (and are usually used with parentheses,
+although they are not required in the language, as in: "sizeof info" after
+"struct fileinfo info;" is declared).
+
+So use a space after these keywords:
+ if, switch, case, for, do, while
+but not with sizeof, typeof, alignof, or __attribute__. E.g.,
+ s = sizeof(struct file);
+
+Do not add spaces around (inside) parenthesized expressions. This example is
+*bad*:
+
+ s = sizeof( struct file );
+
+When declaring pointer data or a function that returns a pointer type, the
+preferred use of '*' is adjacent to the data name or function name and not
+adjacent to the type name. Examples:
+
+ char *sga_banner;
+ unsigned long long memparse(char *ptr, char **retptr);
+ char *match_strdup(substring_t *s);
+
+Use one space around (on each side of) most binary and ternary operators,
+such as any of these:
+
+ = + - < > * / % | & ^ <= >= == != ? :
+
+but no space after unary operators:
+ & * + - ~ ! sizeof typeof alignof __attribute__ defined
+
+no space before the postfix increment & decrement unary operators:
+ ++ --
+
+no space after the prefix increment & decrement unary operators:
+ ++ --
+
+and no space around the '.' and "->" structure member operators.
+
+Diregard these rules if doing so will aid clarity.
+
+
+ Chapter 4: Naming
+
+C is a Spartan language, and so should your naming be. Unlike Modula-2
+and Pascal programmers, C programmers do not use cute names like
+ThisVariableIsATemporaryCounter. A C programmer would call that
+variable "tmp", which is much easier to write, and not the least more
+difficult to understand.
+
+HOWEVER, while mixed-case names are frowned upon, descriptive names for
+global variables are a must. To call a global function "foo" is a
+shooting offense.
+
+GLOBAL variables (to be used only if you _really_ need them) need to
+have descriptive names, as do global functions. If you have a function
+that counts the number of active users, you should call that
+"count_active_users()" or similar, you should _not_ call it "cntusr()".
+
+Encoding the type of a function into the name (so-called Hungarian
+notation) is brain damaged - the compiler knows the types anyway and can
+check those, and it only confuses the programmer. No wonder MicroSoft
+makes buggy programs.
+
+LOCAL variable names should be short, and to the point. If you have
+some random integer loop counter, it should probably be called "i".
+Calling it "loop_counter" is non-productive, if there is no chance of it
+being mis-understood. Similarly, "tmp" can be just about any type of
+variable that is used to hold a temporary value.
+
+If you are afraid to mix up your local variable names, you have another
+problem, which is called the function-growth-hormone-imbalance syndrome.
+See chapter 5 (Functions).
+
+ Chapter 5: Functions
+
+Functions should be short and sweet, and do just one thing. They should
+fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24,
+as we all know), and do one thing and do that well.
+
+The maximum length of a function is inversely proportional to the
+complexity and indentation level of that function. So, if you have a
+conceptually simple function that is just one long (but simple)
+case-statement, where you have to do lots of small things for a lot of
+different cases, it's OK to have a longer function.
+
+However, if you have a complex function, and you suspect that a
+less-than-gifted first-year high-school student might not even
+understand what the function is all about, you should adhere to the
+maximum limits all the more closely. Use helper functions with
+descriptive names (you can ask the compiler to in-line them if you think
+it's performance-critical, and it will probably do a better job of it
+than you would have done).
+
+Another measure of the function is the number of local variables. They
+shouldn't exceed 5-10, or you're doing something wrong. Re-think the
+function, and split it into smaller pieces. A human brain can
+generally easily keep track of about 7 different things, anything more
+and it gets confused. You know you're brilliant, but maybe you'd like
+to understand what you did 2 weeks from now.
+
+In source files, separate functions with one blank line. If the function is
+exported, the EXPORT* macro for it should follow immediately after the closing
+function brace line. E.g.:
+
+int system_is_up(void)
+{
+ return system_state == SYSTEM_RUNNING;
+}
+EXPORT_SYMBOL(system_is_up);
+
+In function prototypes, include parameter names with their data types.
+Although this is not required by the C language, it is preferred in sga
+because it is a simple way to add valuable information for the reader.
+
+
+ Chapter 6: Centralized exiting of functions
+
+Albeit deprecated by some people, the equivalent of the goto statement is
+used frequently by compilers in form of the unconditional jump instruction.
+
+The goto statement comes in handy when a function exits from multiple
+locations and some common work such as cleanup has to be done.
+
+The rationale is:
+
+- unconditional statements are easier to understand and follow
+- nesting is reduced
+- errors by not updating individual exit points when making
+ modifications are prevented
+- saves the compiler work to optimize redundant code away ;)
+
+int fun(int a)
+{
+ int result = 0;
+ char *buffer = kmalloc(SIZE);
+
+ if (buffer == NULL)
+ return -ENOMEM;
+
+ if (condition1) {
+ while (loop1) {
+ ...
+ }
+ result = 1;
+ goto out;
+ }
+ ...
+out:
+ kfree(buffer);
+ return result;
+}
+
+ Chapter 7: Commenting
+
+Comments are good, but there is also a danger of over-commenting. NEVER
+try to explain HOW your code works in a comment: it's much better ...
[truncated message content] |
|
From: <tim...@us...> - 2007-12-18 18:06:58
|
Revision: 4
http://sga.svn.sourceforge.net/sga/?rev=4&view=rev
Author: tim-watson
Date: 2007-12-18 10:06:54 -0800 (Tue, 18 Dec 2007)
Log Message:
-----------
Modified sga.c to tidy up layout of initial parameter display.
Modified Paths:
--------------
trunk/sga.c
Modified: trunk/sga.c
===================================================================
--- trunk/sga.c 2007-12-18 16:47:20 UTC (rev 3)
+++ trunk/sga.c 2007-12-18 18:06:54 UTC (rev 4)
@@ -112,9 +112,12 @@
/* display the significant parameter settings */
printf("--------------------------------------------------\n");
- printf("population size =%5d\tchromosone size =%5d\n", popsize, chromsize);
- printf("crossover rate =%5d\tmutation rate =%5d\n", crossrate, muterate);
- printf("fitness function =%5d\tboostfit =%5d\n", fitfunc, boostfit);
+ printf("population size =%5d chromosome size =%5d\n",
+ popsize, chromsize);
+ printf("crossover rate =%5d mutation rate =%5d\n",
+ crossrate, muterate);
+ printf("fitness function =%5d fitness boost =%5d\n",
+ fitfunc, boostfit);
printf("--------------------------------------------------\n");
/* initialise the population and the PRNG */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fr...@us...> - 2007-12-18 16:47:27
|
Revision: 3
http://sga.svn.sourceforge.net/sga/?rev=3&view=rev
Author: fragmad
Date: 2007-12-18 08:47:20 -0800 (Tue, 18 Dec 2007)
Log Message:
-----------
trunk.sga.c modified to include -h and -v command which display help and
version information respectively.
Modified Paths:
--------------
trunk/sga.c
Modified: trunk/sga.c
===================================================================
--- trunk/sga.c 2007-12-18 01:44:30 UTC (rev 2)
+++ trunk/sga.c 2007-12-18 16:47:20 UTC (rev 3)
@@ -54,6 +54,7 @@
/* accept the command line options */
while (--argc>0 && (*++argv)[0]=='-')
switch (*++argv[0]) {
+ case 'h': printf("SGA - The Simple Genetic Algorithm.\n\nSwitch Options\n\t\"-h\" - Displays this help page.\n\t\"-p\" - Sets the inital population size.\n\t\"-c\" - Sets the chromosome size.\n\t\"-x\" - Sets the crossover rate.\n\t\"-m\" - Sets the mutation rate.\n\t\"-f\" - Selects the fitness function used.\n\t\"-b\" - Boost fitness value.\n\t\"-r\" - Random number seed.\n\t\"-g\" - Sets the maximum number of generations.\n\t\"-s\" - Sets the display size.\n\t\"-d\" - Sets the display frequency.\n\t\"-v\" - Displays version information.\n");exit(0);
case 'p': if (*++argv[0])
popsize = atoi(argv[0]);
else if (--argc > 0)
@@ -104,14 +105,16 @@
else if (--argc > 0)
displfreq = atoi(*++argv);
break;
+ case 'v': printf("SGA - The Simple Gentic Algorithm Version 0.3.\nCopyright 2007 Tim Watson.\n Licenced Under the GNU Public Licence 3.0\n");exit(0);
+
default: break;
}
/* display the significant parameter settings */
printf("--------------------------------------------------\n");
- printf("popsize =%5d\tchromsize =%5d\n", popsize, chromsize);
- printf("crossrate =%5d\tmuterate =%5d\n", crossrate, muterate);
- printf("fitfunc =%5d\tboostfit =%5d\n", fitfunc, boostfit);
+ printf("population size =%5d\tchromosone size =%5d\n", popsize, chromsize);
+ printf("crossover rate =%5d\tmutation rate =%5d\n", crossrate, muterate);
+ printf("fitness function =%5d\tboostfit =%5d\n", fitfunc, boostfit);
printf("--------------------------------------------------\n");
/* initialise the population and the PRNG */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2007-12-18 01:44:36
|
Revision: 2
http://sga.svn.sourceforge.net/sga/?rev=2&view=rev
Author: fifthdim
Date: 2007-12-17 17:44:30 -0800 (Mon, 17 Dec 2007)
Log Message:
-----------
Update CREDITS file to add contributors, modify gerneation in sga.c
Modified Paths:
--------------
trunk/CREDITS
trunk/sga.c
Modified: trunk/CREDITS
===================================================================
--- trunk/CREDITS 2007-11-04 13:02:45 UTC (rev 1)
+++ trunk/CREDITS 2007-12-18 01:44:30 UTC (rev 2)
@@ -1,3 +1,7 @@
This is an alphabetical list of people who have contributed to sga:
+Lewis Bond
+William Ellwood
+Matthew Lester
Tim Watson
+David Whiteley
Modified: trunk/sga.c
===================================================================
--- trunk/sga.c 2007-11-04 13:02:45 UTC (rev 1)
+++ trunk/sga.c 2007-12-18 01:44:30 UTC (rev 2)
@@ -169,7 +169,7 @@
fconv = 1;
fconv_gen = gen;
}
- printf("gen=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
+ printf("generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
gen, best, worst, mean, std_dev);
for (i=0; i<chromsize; i++) /* init column counts */
count[i] = 0;
@@ -283,7 +283,7 @@
fconv = 1;
fconv_gen = gen;
}
- printf("gen=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
+ printf("generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
gen, best, worst, mean, std_dev);
for (i=0; i<chromsize; i++) /* init column counts */
count[i] = 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|