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: <fr...@us...> - 2008-10-07 21:05:19
|
Revision: 72
http://sga.svn.sourceforge.net/sga/?rev=72&view=rev
Author: fragmad
Date: 2008-10-07 21:05:11 +0000 (Tue, 07 Oct 2008)
Log Message:
-----------
Modified branches/will/code/sga.c on 07/10/08
- Added quiet mode.
On executing sga with the -q option (sga -q), sga displays only the inital starting statistics and final population and fitness convergence. Intention is remove clutter from terminal while developing. Possibly handy in future if fitness functions start giving out real answers.
- Issue found
longnames options. It simply doesn't work. Will endevour to solve. Slightly weary as to its use now a few months have past. Probably will scrap it but keep the gnu option code in place.
Will.
Modified Paths:
--------------
branches/will/code/sga.c
Modified: branches/will/code/sga.c
===================================================================
--- branches/will/code/sga.c 2008-07-04 16:31:07 UTC (rev 71)
+++ branches/will/code/sga.c 2008-10-07 21:05:11 UTC (rev 72)
@@ -70,7 +70,7 @@
#endif /* endif NOGSL */
-
+int quiet = 0;
char curr[1000][80], /* current generation */
next[1000][80]; /* next generation */
int fit[1000], /* fitness values */
@@ -101,8 +101,8 @@
void accept_options(int argc, char *argv[])
{
int opt;
- char cmdstring[20] = {'p',':','c',':','x',':','m',':','f',':','b',':',
- 'r',':','g',':','s',':','d',':'};
+ char cmdstring[21] = {'p',':','c',':','x',':','m',':','f',':','b',':',
+ 'r',':','g',':','s',':','d',':','q'};
struct option longopts[] = {
{"popsize",1,NULL,'p'},
@@ -112,7 +112,7 @@
{"fitfunc",1,NULL,'f'},
{"boostfit",1,NULL,'b'},
{"rseed",1,NULL,'r'},
- {"generations",1,NULL,'g'},
+ {"gens",1,NULL,'g'},
{"sizedisplay",1,NULL,'s'},
{"displfreq",1,NULL,'d'},
{0,0,0,0}};
@@ -122,7 +122,7 @@
case 'p':
popsize = atoi(optarg);
if (popsize < 1) {
- popsize = 300;
+ popsize = 1;
}
break;
case 'c':
@@ -178,6 +178,9 @@
displfreq = 1;
}
break;
+ case 'q':
+ quiet = 1;
+ break;
case ':':
printf("option needs a value\n");
break;
@@ -348,34 +351,36 @@
std_dev = sqrt(std_dev);
if ((!*fcptr) && (std_dev==0)) /* if fit converged */
*fcptr = gen;
- 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;
- for (i=0; i<sizedispl; i++) {
- for (j=0; j<chromsize; j++) { /* show individuals */
- putchar(curr[i][j]);
- count[j] += curr[i][j] - '0'; /* sum columns in pop */
+
+ if (!quiet){
+ 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;
+ for (i=0; i<sizedispl; i++) {
+ for (j=0; j<chromsize; j++) { /* show individuals */
+ putchar(curr[i][j]);
+ count[j] += curr[i][j] - '0'; /* sum columns in pop */
+ }
+ printf("\n");
}
- printf("\n");
+ for (; i<popsize; i++)
+ for (j=0; j<chromsize; j++)
+ count[j] += curr[i][j] - '0';
+ pc_count = 0;
+ for (i=0; i<chromsize; i++) {
+ if ((count[i]!=0) && (count[i]!=popsize))
+ count[i] = count[i]*10/popsize + '0';
+ else {
+ count[i] = '-';
+ pc_count++;
+ }
+ putchar(count[i]);
+ }
+ if ((!*pcptr) && (pc_count==chromsize)) /* if pop converged */
+ *pcptr = gen;
+ printf("\n--------------------------------------------------\n");
}
- for (; i<popsize; i++)
- for (j=0; j<chromsize; j++)
- count[j] += curr[i][j] - '0';
- pc_count = 0;
- for (i=0; i<chromsize; i++) {
- if ((count[i]!=0) && (count[i]!=popsize))
- count[i] = count[i]*10/popsize + '0';
- else {
- count[i] = '-';
- pc_count++;
- }
- putchar(count[i]);
- }
- if ((!*pcptr) && (pc_count==chromsize)) /* if pop converged */
- *pcptr = gen;
- printf("\n--------------------------------------------------\n");
-
if (last_gen) {
printf("fitness converged at generation %d\n", *fcptr);
printf("population converged at generation %d\n", *pcptr);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fr...@us...> - 2008-07-04 16:31:10
|
Revision: 71
http://sga.svn.sourceforge.net/sga/?rev=71&view=rev
Author: fragmad
Date: 2008-07-04 09:31:07 -0700 (Fri, 04 Jul 2008)
Log Message:
-----------
Added basic validation to getopt_long input.
Modified Paths:
--------------
branches/will/code/sga.c
Modified: branches/will/code/sga.c
===================================================================
--- branches/will/code/sga.c 2008-07-04 16:01:18 UTC (rev 70)
+++ branches/will/code/sga.c 2008-07-04 16:31:07 UTC (rev 71)
@@ -121,32 +121,62 @@
switch(opt) {
case 'p':
popsize = atoi(optarg);
+ if (popsize < 1) {
+ popsize = 300;
+ }
break;
case 'c':
chromsize = atoi(optarg);
+ if (chromsize < 1) {
+ chromsize = 16;
+ }
break;
case 'x':
crossrate = atoi(optarg);
+ if (crossrate < 1) {
+ crossrate = 70;
+ }
break;
case 'm':
muterate = atoi(optarg);
+ if (muterate < 0) { /* Not sure if this is a sensible value.*/
+ muterate = 1000;
+ }
break;
case 'f':
fitfunc = atoi(optarg);
+ if (fitfunc < 1) {
+ fitfunc = 1;
+ }
case 'b':
boostfit = atoi(optarg);
+ if (boostfit < 1) {
+ boostfit = 1;
+ }
break;
case 'r':
rseed = atoi(optarg);
+ if (rseed < 1) {
+ rseed = 1;
+ }
break;
case 'g':
gens = atoi(optarg);
+ if (gens < 1) {
+ gens = 1; /*If gens has been set lower then 1 we give 1 gen.*/
+ }
break;
case 's':
sizedispl = atoi(optarg);
+ if (sizedispl < 1) {
+ sizedispl = 10;
+ }
break;
case 'd':
displfreq = atoi(optarg);
+ if (displfreq < 1) {
+ displfreq = 1;
+ }
break;
case ':':
printf("option needs a value\n");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fr...@us...> - 2008-07-04 16:01:20
|
Revision: 70
http://sga.svn.sourceforge.net/sga/?rev=70&view=rev
Author: fragmad
Date: 2008-07-04 09:01:18 -0700 (Fri, 04 Jul 2008)
Log Message:
-----------
This commit makes the following changes to branches/will/code/sga.c
- Implements command line parsing using getopt_long.
- Gives basic long names to all the original commands.
- Is backwards compatable to the original commands.
- Does not provide any validation at present on the new input.
- Allows the addition two commands "--version" and "--help"
which are part of the GNU coding standard and are expected behavour
for command line programs.
Modified Paths:
--------------
branches/will/code/sga.c
Modified: branches/will/code/sga.c
===================================================================
--- branches/will/code/sga.c 2008-06-18 00:03:05 UTC (rev 69)
+++ branches/will/code/sga.c 2008-07-04 16:01:18 UTC (rev 70)
@@ -57,6 +57,7 @@
#include <stdio.h>
+#include <getopt.h> /*needed for option handling.*/
#include <math.h> /* needed for sqrt() to calc std. dev. */
#ifdef NOGSL /* if the GNU library is not available */
@@ -97,10 +98,83 @@
void calc_stats(int, int *, int *, int);
void next_gen(void);
+void accept_options(int argc, char *argv[])
+{
+ int opt;
+ char cmdstring[20] = {'p',':','c',':','x',':','m',':','f',':','b',':',
+ 'r',':','g',':','s',':','d',':'};
+
+ struct option longopts[] = {
+ {"popsize",1,NULL,'p'},
+ {"chromsize",1,NULL,'c'},
+ {"crossrate",1,NULL,'x'},
+ {"muterate",1,NULL,'m'},
+ {"fitfunc",1,NULL,'f'},
+ {"boostfit",1,NULL,'b'},
+ {"rseed",1,NULL,'r'},
+ {"generations",1,NULL,'g'},
+ {"sizedisplay",1,NULL,'s'},
+ {"displfreq",1,NULL,'d'},
+ {0,0,0,0}};
+ while((opt = getopt_long(argc, argv, cmdstring, longopts, NULL)) != -1) {
+ switch(opt) {
+ case 'p':
+ popsize = atoi(optarg);
+ break;
+ case 'c':
+ chromsize = atoi(optarg);
+ break;
+ case 'x':
+ crossrate = atoi(optarg);
+ break;
+ case 'm':
+ muterate = atoi(optarg);
+ break;
+ case 'f':
+ fitfunc = atoi(optarg);
+ case 'b':
+ boostfit = atoi(optarg);
+ break;
+ case 'r':
+ rseed = atoi(optarg);
+ break;
+ case 'g':
+ gens = atoi(optarg);
+ break;
+ case 's':
+ sizedispl = atoi(optarg);
+ break;
+ case 'd':
+ displfreq = atoi(optarg);
+ break;
+ case ':':
+ printf("option needs a value\n");
+ break;
+ case '?':
+ printf("unknown option: %c\n", optopt);
+ break;
+ }
+ }
+}
+/*void accept_options(int argc, char *argv[])
+{
+ int pvalue = 0;
+ int cvalue = 0;
+ int xvalue = 0;
+ int mvalue = 0;
+ int fvalue = 0;
+ int bvalue = 0;
+ int rvalue = 0;
+ int gvalue = 0;
+ int svalue = 0;
+ int tvalue = 0;
+ int dvalue = 0;
+}*/
+
/* accept the command line options */
-void accept_options(int argc, char *argv[]) {
+/*void accept_options(int argc, char *argv[]) {
while (--argc>0 && (*++argv)[0]=='-')
switch (*++argv[0]) {
case 'p': if (*++argv[0])
@@ -155,7 +229,7 @@
break;
default: break;
}
-}
+}*/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fr...@us...> - 2008-06-18 00:03:08
|
Revision: 69
http://sga.svn.sourceforge.net/sga/?rev=69&view=rev
Author: fragmad
Date: 2008-06-17 17:03:05 -0700 (Tue, 17 Jun 2008)
Log Message:
-----------
This commit makes the following changes to trunk/code/gui/gsga.c
- Corrects a couple of typos within the sourcefile.
- Removes William Ellwood from the credits for documentation.
- Changes the text within the about license window to include a highlighted view of GPL version 3.
- Changes the behaviour of the about license window to wrap around the text in the window.
This commit also forks the branch "tim" into a new branch called "will". At this commit both branchs are the same and this commit should be assumed to be absolute start for the branch titled "will".
Modified Paths:
--------------
trunk/code/gui/gsga.c
Added Paths:
-----------
branches/will/
Copied: branches/will (from rev 68, branches/tim)
Modified: trunk/code/gui/gsga.c
===================================================================
--- trunk/code/gui/gsga.c 2008-03-13 14:10:14 UTC (rev 68)
+++ trunk/code/gui/gsga.c 2008-06-18 00:03:05 UTC (rev 69)
@@ -65,25 +65,24 @@
void view_about()
{
char *name = "gsga";
- char* comments = "gsga is a graphicsal user interface,\nwhich is designed to run with the sga program.";
+ char* comments = "gsga is a graphicsal user interface for sga.\nsga stands for simple genetic algorithm and the program is intended as a learning aid for those wishing to aquire praticel experience with genetic algoithms.";
char* web_label = "sga project site";
char* weblink = "http://sga.sourceforge.net";
- char* licence = "gsga is distributed under the GNU GENERAL PUBLIC LICENCE Version 3\na copy of the licence can be found by going to the following website:\nhttp://www.gnu.org/licenses/gpl-3.0.txt";
+ char* license = "gsga and sga are 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.\n\ngsga and sga 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.\n\nYou should have received a copy of the GNU General Public License along with gsga and sga; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA";
char* author[] = {"Lewis Bond", "William Ellwood",
"Matthew Lester", "Thomas Smith",
"Tim Watson", "Colin Wilkinson",
"David Whiteley", NULL};
- char* docu[] = {"Lewis Bond", "William Ellwood",
- "Matthew Lester", "Thomas Smith",
+ char* docu[] = {"Lewis Bond","Matthew Lester", "Thomas Smith",
"Tim Watson", "Colin Wilkinson",
"David Whiteley", NULL};
gtk_show_about_dialog (GTK_WINDOW(window),"name", name,
"comments", comments, "website-label", web_label,
- "website", weblink, "license", licence, "authors",
- author, "documenters", docu, NULL, NULL,
+ "website", weblink, "license", license, "authors",
+ author, "documenters", docu, "wrap-license", TRUE, NULL, NULL,
NULL, NULL);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-03-13 14:10:17
|
Revision: 68
http://sga.svn.sourceforge.net/sga/?rev=68&view=rev
Author: syinet
Date: 2008-03-13 07:10:14 -0700 (Thu, 13 Mar 2008)
Log Message:
-----------
Main page updated to include mission statement.
Minor changes to style sheet for consistency.
Modified Paths:
--------------
trunk/web/index.html
trunk/web/styles/screen.css
Modified: trunk/web/index.html
===================================================================
--- trunk/web/index.html 2008-02-27 18:24:53 UTC (rev 67)
+++ trunk/web/index.html 2008-03-13 14:10:14 UTC (rev 68)
@@ -27,14 +27,19 @@
<div id="content">
<div class="article">
<h2>Welcome to the sga project</h2>
- <p> </p>
- <img src="images/sga.gif" alt="sga working" width="127" height="152" hspace="5" align="right" />
- <h3>What is sga?</h3>
+ <div class="index_right">
+ <p>Our Mission Statement :<br />
+ <strong>'The goal of the sga project is to develop a simple program to demonstrate genetic algorithms and facilitate the understanding of them to everyone.'</strong></p>
+ <p><img src="images/sga.gif" alt="sga working" width="127" height="152" /></p>
+ </div>
+ <div class="index_left">
+ <h3>What is sga?</h3>
<p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL)</strong>. To get involved today download it from the Download page, and have a play. There are various <a href="support.html">guides</a> to help you on your way and we're always looking for people to <a href="download.html">contribute</a> to the general development of sga.</p>
- <p><a href="about.html"> More Info / Screenshots »</a></p>
+ <p><a href="about.html">More Info / Screenshots »</a></p>
<h3>News & Updates</h3>
<p><strong>17/02/08 - XML Branch and GUI Dev</strong><br />
Within the past couple of days a branch has been created that is experimenting with xml output. This opens a lot of doors for developers and the potential of sga! Also a graphical front-end for the sga is under development, more on this soon.</p>
+ </div>
</div>
</div>
</div>
Modified: trunk/web/styles/screen.css
===================================================================
--- trunk/web/styles/screen.css 2008-02-27 18:24:53 UTC (rev 67)
+++ trunk/web/styles/screen.css 2008-03-13 14:10:14 UTC (rev 68)
@@ -35,18 +35,6 @@
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;
@@ -144,7 +132,7 @@
height : auto !important;
height : 1%;
overflow : hidden;
- padding : 2em 0 0 0;
+ padding : 2em 4em 2em 4em;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
@@ -155,9 +143,6 @@
border-bottom-color: #cfcfcf;
border-left-color: #cfcfcf;
}
-#content div {
- padding : 0 4em 2em 4em;
-}
#panel {
background : #efefef;
@@ -199,3 +184,19 @@
border: 1px solid #006600;
float: left;
}
+.index_right {
+ float: right;
+ width: 180px;
+ text-align: left;
+ border-left-width: 1px;
+ border-left-style: dotted;
+ border-left-color: #999999;
+}
+.index_left {
+ width: 480px;
+ margin: 0px;
+ padding-top: 20px;
+ padding-right: 0px;
+ padding-bottom: 0px;
+ padding-left: 0px;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <she...@us...> - 2008-02-27 18:26:35
|
Revision: 67
http://sga.svn.sourceforge.net/sga/?rev=67&view=rev
Author: shearclass
Date: 2008-02-27 10:24:53 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Low Res Fix
Modified Paths:
--------------
trunk/code/gui/gsga.c
Modified: trunk/code/gui/gsga.c
===================================================================
--- trunk/code/gui/gsga.c 2008-02-26 22:45:50 UTC (rev 66)
+++ trunk/code/gui/gsga.c 2008-02-27 18:24:53 UTC (rev 67)
@@ -316,7 +316,7 @@
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL);
gtk_window_set_title(GTK_WINDOW(window), "Simple Genetic Algorithm (SGA)");
- gtk_widget_set_size_request(GTK_WIDGET(window), 1024,768);
+ gtk_widget_set_size_request(GTK_WIDGET(window), 1024,500);
main_vbox = gtk_vbox_new(FALSE, 1);
make_vbox(main_vbox, window);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-26 22:45:52
|
Revision: 66
http://sga.svn.sourceforge.net/sga/?rev=66&view=rev
Author: fifthdim
Date: 2008-02-26 14:45:50 -0800 (Tue, 26 Feb 2008)
Log Message:
-----------
Tidy up website code/content and improve consistency (home page title looks a bit odd with punctuation when the others don't have any).
Modified Paths:
--------------
trunk/web/index.html
Modified: trunk/web/index.html
===================================================================
--- trunk/web/index.html 2008-02-26 22:39:37 UTC (rev 65)
+++ trunk/web/index.html 2008-02-26 22:45:50 UTC (rev 66)
@@ -26,11 +26,11 @@
</div>
<div id="content">
<div class="article">
- <h2>Welcome to the sga project.</h2>
+ <h2>Welcome to the sga project</h2>
<p> </p>
<img src="images/sga.gif" alt="sga working" width="127" height="152" hspace="5" align="right" />
<h3>What is sga?</h3>
- <p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL)</strong>. To get involved today download it from the Download page, and have a play. There are various <a href="support.html">guides</a> to help you on your way and we're always looking for people to <a href="download.html">contribute</a> to the general development of sga. </p>
+ <p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL)</strong>. To get involved today download it from the Download page, and have a play. There are various <a href="support.html">guides</a> to help you on your way and we're always looking for people to <a href="download.html">contribute</a> to the general development of sga.</p>
<p><a href="about.html"> More Info / Screenshots »</a></p>
<h3>News & Updates</h3>
<p><strong>17/02/08 - XML Branch and GUI Dev</strong><br />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-26 22:39:45
|
Revision: 65
http://sga.svn.sourceforge.net/sga/?rev=65&view=rev
Author: fifthdim
Date: 2008-02-26 14:39:37 -0800 (Tue, 26 Feb 2008)
Log Message:
-----------
Tidying up website code and textual content.
Modified Paths:
--------------
trunk/web/about.html
trunk/web/index.html
trunk/web/roadmap.html
trunk/web/support.html
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-24 14:58:40 UTC (rev 64)
+++ trunk/web/about.html 2008-02-26 22:39:37 UTC (rev 65)
@@ -43,7 +43,7 @@
<p>A <strong>genetic algorithm (GA)</strong> is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics, and are a particular class of evolutionary algorithms (also known as evolutionary computation) that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover (also called recombination). <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">More... </a></p>
<h3><a name="functions" id="functions"></a>Overview of features</h3>
- <p>sga allows the user to define a number of different variables and functions prior to running the program. Each individual in the system is treated as a fixed-length binary string and all generations have a static population size. This allows users to quickly get an idea of how each generation has changed from the last. The program has options for one-point crossover and/or mutation. This means that individuals can be sliced in two and recombined to make new individuals or some bits in each individual can be randomly flipped to simulate mutation. The program offers a number of <a href="#fitness">fitness functions</a> which can affect which individuals are allowed to pass to the next generation. Each generation is summarised <a href="#output">on-screen</a> with various statistics including best, worst, mean, and standard deviation per generation. Also a one-line summary of the number of ones in each locus is shown below each displayed generation.</p>
+ <p>sga allows the user to define a number of different variables and functions prior to running the program. Each individual in the system is treated as a fixed-length binary string and all generations have a static population size. This allows users to quickly get an idea of how each generation has changed from the last. The program has options for one-point crossover and/or mutation. This means that individuals can be sliced in two and recombined to make new individuals or some bits in each individual can be randomly flipped to simulate mutation. The program offers a number of <a href="#fitness">fitness functions</a> that can affect which individuals are allowed to pass to the next generation. Each generation is summarised <a href="#output">on-screen</a> with various statistics including best, worst, mean, and standard deviation per generation. Also a one-line summary of the number of ones in each locus is shown below each displayed generation.</p>
<h3><a name="fitness" id="fitness"></a>Fitness functions</h3>
<p>The fitness functions are the tests we put in place to determine how likely it is that an individual will be killed off or moved into the next generation. The fitness functions in sga include:</p>
@@ -67,7 +67,7 @@
</ol>
<h3><a name="team" id="team"></a>The Team</h3>
- <p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" rel="external">De Montfort University</a>. <strong>The godfather?</strong> That's Tim Watson, the person who created the sga project firstly to demonstate how genetic algorithms work to his students, and secondly to give his students a flavour of an open source project.</p>
+ <p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" rel="external">De Montfort University</a>. <strong>The godfather?</strong> That's Tim Watson, the person who created the sga project firstly to demonstrate how genetic algorithms work to his students, and secondly to give his students a flavour of an open source project.</p>
</div>
</div>
</div>
Modified: trunk/web/index.html
===================================================================
--- trunk/web/index.html 2008-02-24 14:58:40 UTC (rev 64)
+++ trunk/web/index.html 2008-02-26 22:39:37 UTC (rev 65)
@@ -26,19 +26,21 @@
</div>
<div id="content">
<div class="article">
- <h2>Welcome to the sga project. </h2>
+ <h2>Welcome to the sga project.</h2>
<p> </p>
<img src="images/sga.gif" alt="sga working" width="127" height="152" hspace="5" align="right" />
<h3>What is sga?</h3>
- <p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL)</strong>. To get involed today download it from the Download page, and have a play. There are various <a href="support.html">guides</a> to help you on your way and we're always looking for people to <a href="download.html">contribute</a> to the general development of sga. </p>
+ <p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL)</strong>. To get involved today download it from the Download page, and have a play. There are various <a href="support.html">guides</a> to help you on your way and we're always looking for people to <a href="download.html">contribute</a> to the general development of sga. </p>
<p><a href="about.html"> More Info / Screenshots »</a></p>
<h3>News & Updates</h3>
<p><strong>17/02/08 - XML Branch and GUI Dev</strong><br />
- Within the past couple of days a branch has been created that is experimenting with xml output. This opens a lot of doors for developers and the potential of sga! Also a graphical front end the sga is under development, more on this soon. </p>
+ Within the past couple of days a branch has been created that is experimenting with xml output. This opens a lot of doors for developers and the potential of sga! Also a graphical front-end for the sga is under development, more on this soon.</p>
</div>
</div>
</div>
-<div id="footer"> <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
- <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" /> </div>
+<div id="footer">
+ <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
+ <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" />
+</div>
</body>
</html>
Modified: trunk/web/roadmap.html
===================================================================
--- trunk/web/roadmap.html 2008-02-24 14:58:40 UTC (rev 64)
+++ trunk/web/roadmap.html 2008-02-26 22:39:37 UTC (rev 65)
@@ -27,27 +27,31 @@
<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>As the project is still in it's early stages of development there are lots of things to do! A brief outline of what is planned and currently being worked on is below.</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>
+ <li>Divide existing code into separate 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 that teaches prospective GUI writers how to interface with SGA.</li>
+ <li>Ability to configure in greater depth while maintaining simplicity in its use.</li>
</ul>
+
<h3>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>
+ <li>A quick start guide to get users running the software quickly (even on Microsoft 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>
</div>
</div>
</div>
-<div id="footer"> <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
- <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" /> </div>
+<div id="footer">
+ <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
+ <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" />
+</div>
</body>
</html>
Modified: trunk/web/support.html
===================================================================
--- trunk/web/support.html 2008-02-24 14:58:40 UTC (rev 64)
+++ trunk/web/support.html 2008-02-26 22:39:37 UTC (rev 65)
@@ -33,10 +33,10 @@
<p>Our main mailing list used to discuss the development of the sga code is <a href="https://lists.sourceforge.net/lists/listinfo/sga-devel">sga-devel</a>. Use <a href="http://sourceforge.net/mailarchive/forum.php?forum_name=sga-commit">sga-commit</a> to follow our sga commits.</p>
<h3>IRC</h3>
- <p>Our channel currently resides on <strong>irc.elasticmind.net</strong>, channel name: <strong>#sga</strong> </p>
+ <p>Our channel currently resides on <strong>irc.elasticmind.net</strong>, channel name: <strong>#sga</strong></p>
<h3>sga Tutorials</h3>
- <p>Here you can access the various documents we have created to help you with using and understnding the sga program.</p>
+ <p>Here you can access the various documents we have created to help you with using and understanding the sga program.</p>
<ul>
<li><a href="support_runonwin.html">How to get sga up and running on a Windows machine </a>
<br />
@@ -46,7 +46,9 @@
</div>
</div>
</div>
-<div id="footer"> <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
- <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" /> </div>
+<div id="footer">
+ <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
+ <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" />
+</div>
</body>
</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Matt L. <m05...@dm...> - 2008-02-24 15:53:28
|
fair points. To be honest a lot of the time i'll validate the code but not spend as long as i should on the code side formatting side of things. I'll definitely consider this in future. matt lester Lewis wrote: > I am not intending to criticise or blame anyone in particular, but just > wanted to point out a couple of things... > > I don't understand why formatting and indentation is being removed or > made worse when patches are submitted? Often HTML seems to have double > or trailing spaces here there and everywhere making it inconsistent with > what is being output in browsers. HTML tags without a closing > counterpart are not written as self-closing. There also seems to be a > tendency to overuse the <br /> tag to insert spacing when really the CSS > padding/margins should be modified for consistency across the site. > > I am a bit concerned that the code is in danger of looking a bit dirty > and unprofessional, and unless we keep an eye out for these and similar > errors, the pages will not validate XHTML-strict. I think it would be > good if we could all keep on top of things and make sure the code is > accurate and correct in both its syntax and formatting. > > Regards, > Lewis. > > sy...@us... wrote: > >> Revision: 60 >> http://sga.svn.sourceforge.net/sga/?rev=60&view=rev >> Author: syinet >> Date: 2008-02-24 03:53:22 -0800 (Sun, 24 Feb 2008) >> >> Log Message: >> ----------- >> added extra content to about page as well as an sga screen shot. >> >> Modified Paths: >> -------------- >> trunk/web/about.html >> >> Modified: trunk/web/about.html >> =================================================================== >> --- trunk/web/about.html 2008-02-24 10:27:52 UTC (rev 59) >> +++ trunk/web/about.html 2008-02-24 11:53:22 UTC (rev 60) >> @@ -1,11 +1,11 @@ >> <!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" /> >> - <script type="text/JavaScript" src="javascript/external.js"></script> >> +<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" /> >> +<script type="text/JavaScript" src="javascript/external.js"></script> >> >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > sga-commit mailing list > sga...@li... > https://lists.sourceforge.net/lists/listinfo/sga-commit > |
|
From: <fif...@us...> - 2008-02-24 14:58:44
|
Revision: 64
http://sga.svn.sourceforge.net/sga/?rev=64&view=rev
Author: fifthdim
Date: 2008-02-24 06:58:40 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
Formatting/tweaks to about.html and consistency changes across HTML pages.
Modified Paths:
--------------
trunk/web/about.html
trunk/web/bugs.html
trunk/web/docs.html
trunk/web/download.html
trunk/web/index.html
trunk/web/license.html
trunk/web/roadmap.html
trunk/web/sitemap.html
trunk/web/support.html
trunk/web/support_irc.html
trunk/web/support_runonwin.html
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/about.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,11 +1,11 @@
<!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" />
-<script type="text/JavaScript" src="javascript/external.js"></script>
+ <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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
@@ -26,7 +26,7 @@
</div>
<div id="content">
<div class="article">
- <h2>About sga </h2>
+ <h2>About sga</h2>
<ul>
<li><a href="#abstract">Abstract</a></li>
<li><a href="#what">What are Genetic Algorithms?</a></li>
@@ -37,37 +37,43 @@
</ul>
<h3><a name="abstract" id="abstract"></a>Abstract</h3>
<p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard genetic algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL) 3.0.</strong></p>
- <h3><a name="what" id="what"></a>What are Genetic Algorithms? </h3>
- <p>The <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">Wikipedia</a> definition... </p>
- <p>A <strong>genetic algorithm (GA)</strong> is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. Genetic algorithms are a particular class of evolutionary algorithms (also known as evolutionary computation) that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover (also called recombination). <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">More... </a></p>
+
+ <h3><a name="what" id="what"></a>What are Genetic Algorithms?</h3>
+ <p>The <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">Wikipedia</a> definition...</p>
+ <p>A <strong>genetic algorithm (GA)</strong> is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics, and are a particular class of evolutionary algorithms (also known as evolutionary computation) that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover (also called recombination). <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">More... </a></p>
+
<h3><a name="functions" id="functions"></a>Overview of features</h3>
- <p>sga allows the user to define a number of different variables and functions prior to running the program. Each individual in the system is treated as a fixed-length binary string and all generations have a static population size. This allows users to quickly get an idea of how each generation has changed from the last. The program has options for one-point crossover and/or mutation. This means that individuals can be sliced in two and recombined to make new individuals or some bits in each individual can be randomly flipped to simulate mutation. The program offers a number of <a href="#fitness">fitness functions</a> which can affect which individuals are allowed to pass to the next generation. Each generation is summarised <a href="#output">on-screen</a> with various statistics including best, worst, mean, and standard deviation per generation. Also a one-line summary of the number of ones in each locus is shown below each displayed generation. </p>
+ <p>sga allows the user to define a number of different variables and functions prior to running the program. Each individual in the system is treated as a fixed-length binary string and all generations have a static population size. This allows users to quickly get an idea of how each generation has changed from the last. The program has options for one-point crossover and/or mutation. This means that individuals can be sliced in two and recombined to make new individuals or some bits in each individual can be randomly flipped to simulate mutation. The program offers a number of <a href="#fitness">fitness functions</a> which can affect which individuals are allowed to pass to the next generation. Each generation is summarised <a href="#output">on-screen</a> with various statistics including best, worst, mean, and standard deviation per generation. Also a one-line summary of the number of ones in each locus is shown below each displayed generation.</p>
+
<h3><a name="fitness" id="fitness"></a>Fitness functions</h3>
- <p>The fitness functions are the tests we put in place to determine how likely it is that an individual will be killed off or moved into the next generation. The fitness functions in sga include: </p>
+ <p>The fitness functions are the tests we put in place to determine how likely it is that an individual will be killed off or moved into the next generation. The fitness functions in sga include:</p>
<ol>
- <li>Constant (all fitnesses the same)</li>
- <li>Random (fitness() returns a random value)</li>
- <li>Onemax (maximise the number of ones)</li>
- <li>Diffmax (maximise the difference between number of ones and zeros)</li>
- <li>Integer (fitness equals integer equivalent of bitstring).<br />
- </li>
+ <li>Constant (all fitnesses the same)</li>
+ <li>Random (fitness() returns a random value)</li>
+ <li>Onemax (maximise the number of ones)</li>
+ <li>Diffmax (maximise the difference between number of ones and zeros)</li>
+ <li>Integer (fitness equals integer equivalent of bitstring).<br /></li>
</ol>
+
<h3><a name="output" id="output"></a>Program Output</h3>
<p><img src="images/about_screenshot.png" alt="sga Output" width="620" height="310" /></p>
<ol>
- <li>The generation we are summarising. </li>
+ <li>The generation we are summarising.</li>
<li>A snap-shot of the generation summarised below by the percentage of ones, A '-' means all ones or no ones, and a digit: 0=less than 10%, 1=10%+, 2=20%+ etc.</li>
<li>The number of individuals where all bits are ones.</li>
<li>The number of individuals where there are no ones.</li>
<li>The mean number of individuals with all ones.</li>
<li>The standard deviation for this generation.</li>
</ol>
- <h3><a name="team" id="team"></a>The Team </h3>
- <p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" rel="external">De Montfort University</a>. <strong>The godfather?</strong> That's Tim Watson, the person who created the sga project firstly to demonstate how genetic algorithms work to his students, and secondly to give his students a flavour of an open source project. </p>
+
+ <h3><a name="team" id="team"></a>The Team</h3>
+ <p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" rel="external">De Montfort University</a>. <strong>The godfather?</strong> That's Tim Watson, the person who created the sga project firstly to demonstate how genetic algorithms work to his students, and secondly to give his students a flavour of an open source project.</p>
</div>
</div>
</div>
-<div id="footer"> <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
- <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" /> </div>
+<div id="footer">
+ <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
+ <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" />
+</div>
</body>
</html>
Modified: trunk/web/bugs.html
===================================================================
--- trunk/web/bugs.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/bugs.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,7 +1,7 @@
<!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>
+ <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" />
Modified: trunk/web/docs.html
===================================================================
--- trunk/web/docs.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/docs.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,7 +1,7 @@
<!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>
+ <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" />
Modified: trunk/web/download.html
===================================================================
--- trunk/web/download.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/download.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,7 +1,7 @@
<!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>
+ <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" />
Modified: trunk/web/index.html
===================================================================
--- trunk/web/index.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/index.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,11 +1,11 @@
<!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" />
-<script type="text/JavaScript" src="javascript/external.js"></script>
+ <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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
Modified: trunk/web/license.html
===================================================================
--- trunk/web/license.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/license.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,7 +1,7 @@
<!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>
+ <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" />
Modified: trunk/web/roadmap.html
===================================================================
--- trunk/web/roadmap.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/roadmap.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,7 +1,7 @@
<!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>
+ <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" />
Modified: trunk/web/sitemap.html
===================================================================
--- trunk/web/sitemap.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/sitemap.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,16 +1,16 @@
<!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>Sitemap - 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" />
-<script type="text/JavaScript" src="javascript/external.js"></script>
+ <title>sga Sitemap - 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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
<div id="header">
- <h1>SGA - The Simple Genetic Algorithm</h1>
+ <h1>sga - The Simple Genetic Algorithm</h1>
</div>
<div id="menu">
<ul>
Modified: trunk/web/support.html
===================================================================
--- trunk/web/support.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/support.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,7 +1,7 @@
<!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>
+ <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" />
Modified: trunk/web/support_irc.html
===================================================================
--- trunk/web/support_irc.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/support_irc.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,7 +1,7 @@
<!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>
+ <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" />
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-24 12:25:08 UTC (rev 63)
+++ trunk/web/support_runonwin.html 2008-02-24 14:58:40 UTC (rev 64)
@@ -1,7 +1,7 @@
<!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>
+ <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" />
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Lewis <os...@el...> - 2008-02-24 14:37:11
|
I think these changes are a good idea and perhaps should be merged with the main trunk. I was hoping something like this would be possible later on to perhaps allow the sga code to be split up into smaller files meaning people can work on individual bits without causing conflicts in the SVN repository, and maybe make things easier to read? ...not sure - what do you guys think? Lewis. tim...@us... wrote: > Revision: 58 > http://sga.svn.sourceforge.net/sga/?rev=58&view=rev > Author: tim-watson > Date: 2008-02-24 01:38:43 -0800 (Sun, 24 Feb 2008) > > Log Message: > ----------- > Partial modularisation of sga.c in tim branch. > > Modified Paths: > -------------- > branches/tim/code/sga.c > > Modified: branches/tim/code/sga.c > =================================================================== > --- branches/tim/code/sga.c 2008-02-23 23:36:23 UTC (rev 57) > +++ branches/tim/code/sga.c 2008-02-24 09:38:43 UTC (rev 58) > @@ -64,6 +64,7 @@ > #define RNG(N) (rand()%(N)) /* and set RNG() to rand() */ > #else /* else */ > #include <gsl/gsl_rng.h> /* include a good random number generator */ > +gsl_rng *prng; /* define a pointer to it */ > #define RNG(N) (gsl_rng_uniform_int(prng,(N))) /* and set RNG() to it */ > #endif /* endif NOGSL */ > > @@ -87,11 +88,17 @@ > double mean, /* mean fitness for generation */ > std_dev; /* standard deviation of fitnesses */ > > -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; > - > - /* accept the command line options */ > + > +void accept_options(int, char **); > +void diplay_params(void); > +void init_prng(void); > +void init_pop(void); > +void calc_fit(void); > + > + > + > +/* accept the command line options */ > +void accept_options(int argc, char *argv[]) { > while (--argc>0 && (*++argv)[0]=='-') > switch (*++argv[0]) { > case 'p': if (*++argv[0]) > @@ -146,56 +153,89 @@ > break; > default: break; > } > - > - /* display the significant parameter settings */ > +} > + > + > + > +/* display the significant parameter settings */ > +void display_params() { > 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("--------------------------------------------------\n"); > - > - /* initialise the PRNG */ > +} > + > + > + > +/* initialise the PRNG */ > +void init_prng() { > #ifdef NOGSL > srand(rseed); > #else > - gsl_rng * prng = gsl_rng_alloc(gsl_rng_ranlxs2); > + prng = gsl_rng_alloc(gsl_rng_ranlxs2); > gsl_rng_set(prng, rseed); > #endif /* NOGSL */ > +} > > - /* initialise the population */ > + > + > +/* initialise the population */ > +void init_pop() { > + int i, j; > + > for (i=0; i<popsize; i++) > for (j=0; j<chromsize; j++) > curr[i][j] = '0' + (RNG(2)); /* RNG(N+1) returns rand int from [0..N] */ > +} > + > + > + > +/* calculate fitness of current population */ > +void calc_fit() { > + int i, j; > + > + for (i=0; i<popsize; i++) { > + switch (fitfunc) { > + case 2: fit[i] = RNG(chromsize+1) + 1; /* random */ > + break; > + 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 */ > + 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 */ > + for (j=1; j<chromsize; j++) > + fit[i] = (fit[i]<<1) + curr[i][j] - '0'; > + fit[i]++; > + break; > + default: fit[i] = 1; /* constant */ > + break; > + } > + fit[i] *= boostfit; > + } > +} > + > + > + > +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; > > + accept_options(argc, argv); > + display_params(); > + init_prng(); > + init_pop(); > + > /* main loop of genetic algorithm */ > for (gen=1; gen!=gens; gen++) { > - > - /* calculate fitness of current population */ > - for (i=0; i<popsize; i++) { > - switch (fitfunc) { > - case 2: fit[i] = RNG(chromsize+1) + 1; /* random */ > - break; > - 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 */ > - 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 */ > - for (j=1; j<chromsize; j++) > - fit[i] = (fit[i]<<1) + curr[i][j] - '0'; > - fit[i]++; > - break; > - default: fit[i] = 1; /* constant */ > - break; > - } > - fit[i] *= boostfit; > - } > - > + calc_fit(); > + > /* calculate stats, and display stats and individuals, if required */ > if (((gen-1)%displfreq) == 0) { > mean = best = worst = fit[0]; > @@ -285,31 +325,7 @@ > /* end of main loop of genetic algorithm */ > } > > - /* calculate fitness of last generation */ > - for (i=0; i<popsize; i++) { > - switch (fitfunc) { > - case 2: fit[i] = RNG(chromsize+1) + 1; /* random */ > - break; > - 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 */ > - 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 */ > - for (j=1; j<chromsize; j++) > - fit[i] = (fit[i]<<1) + curr[i][j] - '0'; > - fit[i]++; > - break; > - default: fit[i] = 1; /* constant */ > - break; > - } > - fit[i] *= boostfit; > - } > + calc_fit(); > > /* calculate and display stats and individuals in last generation */ > mean = best = worst = fit[0]; > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > sga-commit mailing list > sga...@li... > https://lists.sourceforge.net/lists/listinfo/sga-commit > |
|
From: Lewis <os...@el...> - 2008-02-24 14:33:25
|
I am not intending to criticise or blame anyone in particular, but just wanted to point out a couple of things... I don't understand why formatting and indentation is being removed or made worse when patches are submitted? Often HTML seems to have double or trailing spaces here there and everywhere making it inconsistent with what is being output in browsers. HTML tags without a closing counterpart are not written as self-closing. There also seems to be a tendency to overuse the <br /> tag to insert spacing when really the CSS padding/margins should be modified for consistency across the site. I am a bit concerned that the code is in danger of looking a bit dirty and unprofessional, and unless we keep an eye out for these and similar errors, the pages will not validate XHTML-strict. I think it would be good if we could all keep on top of things and make sure the code is accurate and correct in both its syntax and formatting. Regards, Lewis. sy...@us... wrote: > Revision: 60 > http://sga.svn.sourceforge.net/sga/?rev=60&view=rev > Author: syinet > Date: 2008-02-24 03:53:22 -0800 (Sun, 24 Feb 2008) > > Log Message: > ----------- > added extra content to about page as well as an sga screen shot. > > Modified Paths: > -------------- > trunk/web/about.html > > Modified: trunk/web/about.html > =================================================================== > --- trunk/web/about.html 2008-02-24 10:27:52 UTC (rev 59) > +++ trunk/web/about.html 2008-02-24 11:53:22 UTC (rev 60) > @@ -1,11 +1,11 @@ > <!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" /> > - <script type="text/JavaScript" src="javascript/external.js"></script> > +<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" /> > +<script type="text/JavaScript" src="javascript/external.js"></script> > > |
|
From: <tim...@us...> - 2008-02-24 12:25:43
|
Revision: 63
http://sga.svn.sourceforge.net/sga/?rev=63&view=rev
Author: tim-watson
Date: 2008-02-24 04:25:08 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
Minor editing of about webpage.
Modified Paths:
--------------
trunk/web/about.html
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-24 12:12:04 UTC (rev 62)
+++ trunk/web/about.html 2008-02-24 12:25:08 UTC (rev 63)
@@ -36,14 +36,14 @@
<li><a href="#team">The Team</a></li>
</ul>
<h3><a name="abstract" id="abstract"></a>Abstract</h3>
- <p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL) 3.0.</strong></p>
+ <p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard genetic algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL) 3.0.</strong></p>
<h3><a name="what" id="what"></a>What are Genetic Algorithms? </h3>
<p>The <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">Wikipedia</a> definition... </p>
<p>A <strong>genetic algorithm (GA)</strong> is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. Genetic algorithms are a particular class of evolutionary algorithms (also known as evolutionary computation) that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover (also called recombination). <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">More... </a></p>
<h3><a name="functions" id="functions"></a>Overview of features</h3>
- <p>sga allows the user to define a number of different variables and functions prior to running the program. Each individual in the system is treated as a fixed-length binary string and all generations have a static population size. This allows users to quickly get an idea of how each generation has changed form the last. The program has an optional feature of one-point crossover and/or mutation. This means that individuals can be sliced in two and recombined to make a new individual or all parts of the individual can be switched around to simulate mutation. The program offers a number of <a href="#fitness">fitness functions</a> which can affect which individuals are allowed to pass to the next generation. Each generation is summarised <a href="#output">on-screen</a> with various statistics including best, worst, mean, and standard deviation per generation. Also a one-line summary of the number of ones in each locus is shown below each displayed generation. </p>
+ <p>sga allows the user to define a number of different variables and functions prior to running the program. Each individual in the system is treated as a fixed-length binary string and all generations have a static population size. This allows users to quickly get an idea of how each generation has changed from the last. The program has options for one-point crossover and/or mutation. This means that individuals can be sliced in two and recombined to make new individuals or some bits in each individual can be randomly flipped to simulate mutation. The program offers a number of <a href="#fitness">fitness functions</a> which can affect which individuals are allowed to pass to the next generation. Each generation is summarised <a href="#output">on-screen</a> with various statistics including best, worst, mean, and standard deviation per generation. Also a one-line summary of the number of ones in each locus is shown below each displayed generation. </p>
<h3><a name="fitness" id="fitness"></a>Fitness functions</h3>
- <p>The fitness functions are the tests we put in place to judge whether an individual will be killed off or move into the next generation. The functions is sga include: </p>
+ <p>The fitness functions are the tests we put in place to determine how likely it is that an individual will be killed off or moved into the next generation. The fitness functions in sga include: </p>
<ol>
<li>Constant (all fitnesses the same)</li>
<li>Random (fitness() returns a random value)</li>
@@ -55,7 +55,7 @@
<h3><a name="output" id="output"></a>Program Output</h3>
<p><img src="images/about_screenshot.png" alt="sga Output" width="620" height="310" /></p>
<ol>
- <li>The generation we are summerising. </li>
+ <li>The generation we are summarising. </li>
<li>A snap-shot of the generation summarised below by the percentage of ones, A '-' means all ones or no ones, and a digit: 0=less than 10%, 1=10%+, 2=20%+ etc.</li>
<li>The number of individuals where all bits are ones.</li>
<li>The number of individuals where there are no ones.</li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2008-02-24 12:12:07
|
Revision: 62
http://sga.svn.sourceforge.net/sga/?rev=62&view=rev
Author: tim-watson
Date: 2008-02-24 04:12:04 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
Further modularisation of sga.c in tim branch.
Modified Paths:
--------------
branches/tim/code/sga.c
Modified: branches/tim/code/sga.c
===================================================================
--- branches/tim/code/sga.c 2008-02-24 11:57:10 UTC (rev 61)
+++ branches/tim/code/sga.c 2008-02-24 12:12:04 UTC (rev 62)
@@ -95,6 +95,7 @@
void init_pop(void);
void calc_fit(void);
void calc_stats(int, int *, int *, int);
+void next_gen(void);
@@ -225,8 +226,8 @@
/* calculate stats, and display stats and individuals, if required */
-void calc_stats(int gen, int *fconv, int *pconv, int last_gen) {
- int i, j, count[80], pconv_count;
+void calc_stats(int gen, int *fcptr, int *pcptr, int last_gen) {
+ int i, j, count[80], pc_count;
mean = best = worst = fit[0];
for (i=1; i<popsize; i++) {
@@ -241,8 +242,8 @@
for (i=0; i<popsize; i++)
std_dev += (fit[i]-mean)*(fit[i]-mean) / popsize;
std_dev = sqrt(std_dev);
- if ((!*fconv) && (std_dev==0)) /* if fit converged */
- *fconv = gen;
+ if ((!*fcptr) && (std_dev==0)) /* if fit converged */
+ *fcptr = gen;
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 */
@@ -257,35 +258,76 @@
for (; i<popsize; i++)
for (j=0; j<chromsize; j++)
count[j] += curr[i][j] - '0';
- pconv_count = 0;
+ pc_count = 0;
for (i=0; i<chromsize; i++) {
if ((count[i]!=0) && (count[i]!=popsize))
count[i] = count[i]*10/popsize + '0';
else {
count[i] = '-';
- pconv_count++;
+ pc_count++;
}
putchar(count[i]);
}
- if ((!*pconv) && (pconv_count==chromsize)) /* if pop converged */
- *pconv = gen;
+ if ((!*pcptr) && (pc_count==chromsize)) /* if pop converged */
+ *pcptr = gen;
printf("\n--------------------------------------------------\n");
if (last_gen) {
- printf("fitness converged at generation %d\n", *fconv);
- printf("population converged at generation %d\n", *pconv);
+ printf("fitness converged at generation %d\n", *fcptr);
+ printf("population converged at generation %d\n", *pcptr);
printf("--------------------------------------------------\n");
}
}
+
+/* produce next generation and make it the current generation */
+void next_gen() {
+ int i, j, k, choice;
+ for (i=1; i<popsize; i++) /* calculate proportions */
+ fit[i] += fit[i-1];
+
+ for (i=0; i<popsize; i++) { /* reproduce */
+ choice = RNG(fit[popsize-1]) + 1;
+ j=0;
+ while (choice > fit[j])
+ j++;
+ for (k=0; k<chromsize; k++)
+ next[i][k] = curr[j][k];
+ }
+
+ for (i=0; i<popsize; i+=2) /* crossover */
+ 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];
+ }
+ for (; j<chromsize; j++) {
+ curr[i][j] = next[i+1][j];
+ curr[i+1][j] = next[i][j];
+ }
+ } else
+ for (j=0; j<chromsize; j++) {
+ curr[i][j] = next[i][j];
+ curr[i+1][j] = next[i+1][j];
+ }
+
+ if (muterate) /* mutate */
+ for (i=0; i<popsize; i++)
+ for (j=0; j<chromsize; j++)
+ if (RNG(muterate) == 0)
+ curr[i][j] ^= 1; /* XOR the lsb to swap '0' and '1' */
+}
+
+
+
int main(int argc, char *argv[]) {
- int i, j, k, gen, choice, *fconv, *pconv;
+ int gen;
+ /* fc and pc store the gen when fitness and pop converge */
+ int fc=0, pc=0, *fcptr=&fc, *pcptr=&pc;
- /* fitness and population convergence initially set at gen 0 */
- *fconv = *pconv = 0;
-
accept_options(argc, argv);
display_params();
init_prng();
@@ -295,49 +337,12 @@
for (gen=1; gen!=gens; gen++) {
calc_fit();
if (((gen-1)%displfreq) == 0)
- calc_stats(gen, fconv, pconv, 0);
-
- /* produce next generation and make it the current generation */
- for (i=1; i<popsize; i++) /* calculate proportions */
- fit[i] += fit[i-1];
-
- for (i=0; i<popsize; i++) { /* reproduce */
- choice = RNG(fit[popsize-1]) + 1;
- j=0;
- while (choice > fit[j])
- j++;
- for (k=0; k<chromsize; k++)
- next[i][k] = curr[j][k];
- }
-
- for (i=0; i<popsize; i+=2) /* crossover */
- 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];
- }
- for (; j<chromsize; j++) {
- curr[i][j] = next[i+1][j];
- curr[i+1][j] = next[i][j];
- }
- } else
- for (j=0; j<chromsize; j++) {
- curr[i][j] = next[i][j];
- curr[i+1][j] = next[i+1][j];
- }
-
- if (muterate) /* mutate */
- for (i=0; i<popsize; i++)
- for (j=0; j<chromsize; j++)
- if (RNG(muterate) == 0)
- curr[i][j] ^= 1; /* XOR the lsb to swap '0' and '1' */
-
- /* end of main loop of genetic algorithm */
+ calc_stats(gen, fcptr, pcptr, 0);
+ next_gen();
}
calc_fit();
- calc_stats(gen, fconv, pconv, 1);
+ calc_stats(gen, fcptr, pcptr, 1);
#ifndef NOGSL
gsl_rng_free(prng);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-02-24 11:57:14
|
Revision: 61
http://sga.svn.sourceforge.net/sga/?rev=61&view=rev
Author: syinet
Date: 2008-02-24 03:57:10 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
removed misplaced spaces.
Modified Paths:
--------------
trunk/web/about.html
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-24 11:53:22 UTC (rev 60)
+++ trunk/web/about.html 2008-02-24 11:57:10 UTC (rev 61)
@@ -57,10 +57,10 @@
<ol>
<li>The generation we are summerising. </li>
<li>A snap-shot of the generation summarised below by the percentage of ones, A '-' means all ones or no ones, and a digit: 0=less than 10%, 1=10%+, 2=20%+ etc.</li>
- <li>The n umber of individuals where all bits are ones.</li>
- <li>The n umber of individuals where there are no ones.</li>
+ <li>The number of individuals where all bits are ones.</li>
+ <li>The number of individuals where there are no ones.</li>
<li>The mean number of individuals with all ones.</li>
- <li>The standard deviation for this generation. </li>
+ <li>The standard deviation for this generation.</li>
</ol>
<h3><a name="team" id="team"></a>The Team </h3>
<p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" rel="external">De Montfort University</a>. <strong>The godfather?</strong> That's Tim Watson, the person who created the sga project firstly to demonstate how genetic algorithms work to his students, and secondly to give his students a flavour of an open source project. </p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-02-24 11:53:26
|
Revision: 60
http://sga.svn.sourceforge.net/sga/?rev=60&view=rev
Author: syinet
Date: 2008-02-24 03:53:22 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
added extra content to about page as well as an sga screen shot.
Modified Paths:
--------------
trunk/web/about.html
Added Paths:
-----------
trunk/web/images/about_screenshot.png
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-24 10:27:52 UTC (rev 59)
+++ trunk/web/about.html 2008-02-24 11:53:22 UTC (rev 60)
@@ -1,11 +1,11 @@
<!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" />
- <script type="text/JavaScript" src="javascript/external.js"></script>
+<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" />
+<script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
@@ -27,11 +27,42 @@
<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 and is released under the <strong>GNU General Public License (GPL) 3.0</strong> </p>
- <h3>What are Gentic Algorithms? </h3>
+ <ul>
+ <li><a href="#abstract">Abstract</a></li>
+ <li><a href="#what">What are Genetic Algorithms?</a></li>
+ <li><a href="#functions">Overview of Features</a></li>
+ <li><a href="#fitness">Fitness Functions</a></li>
+ <li><a href="#output">Program Output</a></li>
+ <li><a href="#team">The Team</a></li>
+ </ul>
+ <h3><a name="abstract" id="abstract"></a>Abstract</h3>
+ <p>sga is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. sga is written in C and is released under the <strong>GNU General Public License (GPL) 3.0.</strong></p>
+ <h3><a name="what" id="what"></a>What are Genetic Algorithms? </h3>
<p>The <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">Wikipedia</a> definition... </p>
<p>A <strong>genetic algorithm (GA)</strong> is a search technique used in computing to find exact or approximate solutions to optimization and search problems. Genetic algorithms are categorized as global search heuristics. Genetic algorithms are a particular class of evolutionary algorithms (also known as evolutionary computation) that use techniques inspired by evolutionary biology such as inheritance, mutation, selection, and crossover (also called recombination). <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" rel="external">More... </a></p>
- <h3>The Team </h3>
+ <h3><a name="functions" id="functions"></a>Overview of features</h3>
+ <p>sga allows the user to define a number of different variables and functions prior to running the program. Each individual in the system is treated as a fixed-length binary string and all generations have a static population size. This allows users to quickly get an idea of how each generation has changed form the last. The program has an optional feature of one-point crossover and/or mutation. This means that individuals can be sliced in two and recombined to make a new individual or all parts of the individual can be switched around to simulate mutation. The program offers a number of <a href="#fitness">fitness functions</a> which can affect which individuals are allowed to pass to the next generation. Each generation is summarised <a href="#output">on-screen</a> with various statistics including best, worst, mean, and standard deviation per generation. Also a one-line summary of the number of ones in each locus is shown below each displayed generation. </p>
+ <h3><a name="fitness" id="fitness"></a>Fitness functions</h3>
+ <p>The fitness functions are the tests we put in place to judge whether an individual will be killed off or move into the next generation. The functions is sga include: </p>
+ <ol>
+ <li>Constant (all fitnesses the same)</li>
+ <li>Random (fitness() returns a random value)</li>
+ <li>Onemax (maximise the number of ones)</li>
+ <li>Diffmax (maximise the difference between number of ones and zeros)</li>
+ <li>Integer (fitness equals integer equivalent of bitstring).<br />
+ </li>
+ </ol>
+ <h3><a name="output" id="output"></a>Program Output</h3>
+ <p><img src="images/about_screenshot.png" alt="sga Output" width="620" height="310" /></p>
+ <ol>
+ <li>The generation we are summerising. </li>
+ <li>A snap-shot of the generation summarised below by the percentage of ones, A '-' means all ones or no ones, and a digit: 0=less than 10%, 1=10%+, 2=20%+ etc.</li>
+ <li>The n umber of individuals where all bits are ones.</li>
+ <li>The n umber of individuals where there are no ones.</li>
+ <li>The mean number of individuals with all ones.</li>
+ <li>The standard deviation for this generation. </li>
+ </ol>
+ <h3><a name="team" id="team"></a>The Team </h3>
<p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" rel="external">De Montfort University</a>. <strong>The godfather?</strong> That's Tim Watson, the person who created the sga project firstly to demonstate how genetic algorithms work to his students, and secondly to give his students a flavour of an open source project. </p>
</div>
</div>
Added: trunk/web/images/about_screenshot.png
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/about_screenshot.png
___________________________________________________________________
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: <tim...@us...> - 2008-02-24 10:27:53
|
Revision: 59
http://sga.svn.sourceforge.net/sga/?rev=59&view=rev
Author: tim-watson
Date: 2008-02-24 02:27:52 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
Further modularisation of sga.c in tim branch.
Modified Paths:
--------------
branches/tim/code/sga.c
Modified: branches/tim/code/sga.c
===================================================================
--- branches/tim/code/sga.c 2008-02-24 09:38:43 UTC (rev 58)
+++ branches/tim/code/sga.c 2008-02-24 10:27:52 UTC (rev 59)
@@ -94,6 +94,7 @@
void init_prng(void);
void init_pop(void);
void calc_fit(void);
+void calc_stats(int, int *, int *, int);
@@ -223,9 +224,67 @@
+/* calculate stats, and display stats and individuals, if required */
+void calc_stats(int gen, int *fconv, int *pconv, int last_gen) {
+ int i, j, count[80], pconv_count;
+
+ mean = best = worst = fit[0];
+ for (i=1; i<popsize; i++) {
+ mean += fit[i];
+ if (fit[i] > best)
+ best = fit[i];
+ else if (fit[i] < worst)
+ worst = fit[i];
+ }
+ mean /= popsize;
+ std_dev = 0.0;
+ for (i=0; i<popsize; i++)
+ std_dev += (fit[i]-mean)*(fit[i]-mean) / popsize;
+ std_dev = sqrt(std_dev);
+ if ((!*fconv) && (std_dev==0)) /* if fit converged */
+ *fconv = gen;
+ 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;
+ for (i=0; i<sizedispl; i++) {
+ for (j=0; j<chromsize; j++) { /* show individuals */
+ putchar(curr[i][j]);
+ count[j] += curr[i][j] - '0'; /* sum columns in pop */
+ }
+ printf("\n");
+ }
+ for (; i<popsize; i++)
+ for (j=0; j<chromsize; j++)
+ count[j] += curr[i][j] - '0';
+ pconv_count = 0;
+ for (i=0; i<chromsize; i++) {
+ if ((count[i]!=0) && (count[i]!=popsize))
+ count[i] = count[i]*10/popsize + '0';
+ else {
+ count[i] = '-';
+ pconv_count++;
+ }
+ putchar(count[i]);
+ }
+ if ((!*pconv) && (pconv_count==chromsize)) /* if pop converged */
+ *pconv = gen;
+ printf("\n--------------------------------------------------\n");
+
+ if (last_gen) {
+ printf("fitness converged at generation %d\n", *fconv);
+ printf("population converged at generation %d\n", *pconv);
+ printf("--------------------------------------------------\n");
+ }
+}
+
+
+
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;
+ int i, j, k, gen, choice, *fconv, *pconv;
+
+ /* fitness and population convergence initially set at gen 0 */
+ *fconv = *pconv = 0;
accept_options(argc, argv);
display_params();
@@ -235,56 +294,8 @@
/* main loop of genetic algorithm */
for (gen=1; gen!=gens; gen++) {
calc_fit();
-
- /* calculate stats, and display stats and individuals, if required */
- if (((gen-1)%displfreq) == 0) {
- mean = best = worst = fit[0];
- for (i=1; i<popsize; i++) {
- mean += fit[i];
- if (fit[i] > best)
- best = fit[i];
- else if (fit[i] < worst)
- worst = fit[i];
- }
- mean /= popsize;
- std_dev = 0.0;
- for (i=0; i<popsize; i++)
- std_dev += (fit[i]-mean)*(fit[i]-mean) / popsize;
- std_dev = sqrt(std_dev);
- if ((!fconv) && (std_dev==0)) { /* if fit converged */
- fconv = 1;
- fconv_gen = gen;
- }
- 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;
- for (i=0; i<sizedispl; i++) {
- for (j=0; j<chromsize; j++) { /* show individuals */
- putchar(curr[i][j]);
- count[j] += curr[i][j] - '0'; /* sum columns in pop */
- }
- printf("\n");
- }
- for (; i<popsize; i++)
- for (j=0; j<chromsize; j++)
- count[j] += curr[i][j] - '0';
- pconv_count = 0;
- for (i=0; i<chromsize; i++) {
- if ((count[i]!=0) && (count[i]!=popsize))
- count[i] = count[i]*10/popsize + '0';
- else {
- count[i] = '-';
- pconv_count++;
- }
- putchar(count[i]);
- }
- if ((!pconv) && (pconv_count==chromsize)) { /* if pop converged */
- pconv = 1;
- pconv_gen = gen;
- }
- printf("\n--------------------------------------------------\n");
- }
+ if (((gen-1)%displfreq) == 0)
+ calc_stats(gen, fconv, pconv, 0);
/* produce next generation and make it the current generation */
for (i=1; i<popsize; i++) /* calculate proportions */
@@ -326,57 +337,7 @@
}
calc_fit();
-
- /* calculate and display stats and individuals in last generation */
- mean = best = worst = fit[0];
- for (i=1; i<popsize; i++) {
- mean += fit[i];
- if (fit[i] > best)
- best = fit[i];
- else if (fit[i] < worst)
- worst = fit[i];
- }
- mean /= popsize;
- std_dev = 0.0;
- for (i=0; i<popsize; i++)
- std_dev += (fit[i]-mean)*(fit[i]-mean) / popsize;
- std_dev = sqrt(std_dev);
- if ((!fconv) && (std_dev==0)) { /* if fit converged */
- fconv = 1;
- fconv_gen = gen;
- }
- 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;
- for (i=0; i<sizedispl; i++) {
- for (j=0; j<chromsize; j++) { /* show individuals */
- putchar(curr[i][j]);
- count[j] += curr[i][j] - '0'; /* sum columns in pop */
- }
- printf("\n");
- }
- for (; i<popsize; i++)
- for (j=0; j<chromsize; j++)
- count[j] += curr[i][j] - '0';
- pconv_count = 0;
- for (i=0; i<chromsize; i++) {
- if ((count[i]!=0) && (count[i]!=popsize))
- count[i] = count[i]*10/popsize + '0';
- else {
- count[i] = '-';
- pconv_count++;
- }
- putchar(count[i]);
- }
- 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");
+ calc_stats(gen, fconv, pconv, 1);
#ifndef NOGSL
gsl_rng_free(prng);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2008-02-24 09:38:47
|
Revision: 58
http://sga.svn.sourceforge.net/sga/?rev=58&view=rev
Author: tim-watson
Date: 2008-02-24 01:38:43 -0800 (Sun, 24 Feb 2008)
Log Message:
-----------
Partial modularisation of sga.c in tim branch.
Modified Paths:
--------------
branches/tim/code/sga.c
Modified: branches/tim/code/sga.c
===================================================================
--- branches/tim/code/sga.c 2008-02-23 23:36:23 UTC (rev 57)
+++ branches/tim/code/sga.c 2008-02-24 09:38:43 UTC (rev 58)
@@ -64,6 +64,7 @@
#define RNG(N) (rand()%(N)) /* and set RNG() to rand() */
#else /* else */
#include <gsl/gsl_rng.h> /* include a good random number generator */
+gsl_rng *prng; /* define a pointer to it */
#define RNG(N) (gsl_rng_uniform_int(prng,(N))) /* and set RNG() to it */
#endif /* endif NOGSL */
@@ -87,11 +88,17 @@
double mean, /* mean fitness for generation */
std_dev; /* standard deviation of fitnesses */
-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;
-
- /* accept the command line options */
+
+void accept_options(int, char **);
+void diplay_params(void);
+void init_prng(void);
+void init_pop(void);
+void calc_fit(void);
+
+
+
+/* accept the command line options */
+void accept_options(int argc, char *argv[]) {
while (--argc>0 && (*++argv)[0]=='-')
switch (*++argv[0]) {
case 'p': if (*++argv[0])
@@ -146,56 +153,89 @@
break;
default: break;
}
-
- /* display the significant parameter settings */
+}
+
+
+
+/* display the significant parameter settings */
+void display_params() {
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("--------------------------------------------------\n");
-
- /* initialise the PRNG */
+}
+
+
+
+/* initialise the PRNG */
+void init_prng() {
#ifdef NOGSL
srand(rseed);
#else
- gsl_rng * prng = gsl_rng_alloc(gsl_rng_ranlxs2);
+ prng = gsl_rng_alloc(gsl_rng_ranlxs2);
gsl_rng_set(prng, rseed);
#endif /* NOGSL */
+}
- /* initialise the population */
+
+
+/* initialise the population */
+void init_pop() {
+ int i, j;
+
for (i=0; i<popsize; i++)
for (j=0; j<chromsize; j++)
curr[i][j] = '0' + (RNG(2)); /* RNG(N+1) returns rand int from [0..N] */
+}
+
+
+
+/* calculate fitness of current population */
+void calc_fit() {
+ int i, j;
+
+ for (i=0; i<popsize; i++) {
+ switch (fitfunc) {
+ case 2: fit[i] = RNG(chromsize+1) + 1; /* random */
+ break;
+ 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 */
+ 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 */
+ for (j=1; j<chromsize; j++)
+ fit[i] = (fit[i]<<1) + curr[i][j] - '0';
+ fit[i]++;
+ break;
+ default: fit[i] = 1; /* constant */
+ break;
+ }
+ fit[i] *= boostfit;
+ }
+}
+
+
+
+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;
+ accept_options(argc, argv);
+ display_params();
+ init_prng();
+ init_pop();
+
/* main loop of genetic algorithm */
for (gen=1; gen!=gens; gen++) {
-
- /* calculate fitness of current population */
- for (i=0; i<popsize; i++) {
- switch (fitfunc) {
- case 2: fit[i] = RNG(chromsize+1) + 1; /* random */
- break;
- 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 */
- 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 */
- for (j=1; j<chromsize; j++)
- fit[i] = (fit[i]<<1) + curr[i][j] - '0';
- fit[i]++;
- break;
- default: fit[i] = 1; /* constant */
- break;
- }
- fit[i] *= boostfit;
- }
-
+ calc_fit();
+
/* calculate stats, and display stats and individuals, if required */
if (((gen-1)%displfreq) == 0) {
mean = best = worst = fit[0];
@@ -285,31 +325,7 @@
/* end of main loop of genetic algorithm */
}
- /* calculate fitness of last generation */
- for (i=0; i<popsize; i++) {
- switch (fitfunc) {
- case 2: fit[i] = RNG(chromsize+1) + 1; /* random */
- break;
- 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 */
- 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 */
- for (j=1; j<chromsize; j++)
- fit[i] = (fit[i]<<1) + curr[i][j] - '0';
- fit[i]++;
- break;
- default: fit[i] = 1; /* constant */
- break;
- }
- fit[i] *= boostfit;
- }
+ calc_fit();
/* calculate and display stats and individuals in last generation */
mean = best = worst = fit[0];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-23 23:36:34
|
Revision: 57
http://sga.svn.sourceforge.net/sga/?rev=57&view=rev
Author: fifthdim
Date: 2008-02-23 15:36:23 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
Minor formatting change to test automated website update cron.
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-23 17:00:52 UTC (rev 56)
+++ trunk/web/support_runonwin.html 2008-02-23 23:36:23 UTC (rev 57)
@@ -28,6 +28,7 @@
<div id="content">
<div class="article">
<h2><a href="support.html">Support</a> » Running sga on Windows</h2>
+ <br />
<h3>Assumptions</h3>
<p>OK, firstly we have made some assumptions, these being:</p>
<ul>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-23 17:00:58
|
Revision: 56
http://sga.svn.sourceforge.net/sga/?rev=56&view=rev
Author: fifthdim
Date: 2008-02-23 09:00:52 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
Resolved patch conflicts after revision 49 by reverting file, some post-patch conflict modifications that made sense have been merged into new revision so they can be retained. This file should be back to normal and in sync with the repository.
Revision Links:
--------------
http://sga.svn.sourceforge.net/sga/?rev=49&view=rev
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-23 15:01:27 UTC (rev 55)
+++ trunk/web/support_runonwin.html 2008-02-23 17:00:52 UTC (rev 56)
@@ -1,109 +1,118 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<!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="text/html; charset=utf-8" />
-<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+ <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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</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><br />
- Assumptions</h3>
- <p>OK, firstly we have made some assumptions, these being:</p>
- <ul><li><strong>You are running Windows XP and above</strong></li>
-<li><strong>That you have downloaded the sga C code and have converted it into an .exe file.</strong></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.<br>
- </li>
-</ul>
-<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>
+<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>
-<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: -<br />
- <br />
- C:\sga<br />
- <br />
- </li>
- <li> Now the fun can really start! For your first experiment type in the following sga -f3 | more and press ENTER
+ <div id="content">
+ <div class="article">
+ <h2><a href="support.html">Support</a> » Running sga on Windows</h2>
+ <h3>Assumptions</h3>
+ <p>OK, firstly we have made some assumptions, these being:</p>
+ <ul>
+ <li><strong>You are running Windows XP and above</strong></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 type in the following sga -f3 | more and press ENTER
<p><img src="images/sgaoutput.jpg" alt="cmd window" width="570" height="365"/></p>
- <p>This will display the window above, showing the first page of results. To see more results, press SPACEBAR. Ok, now to explain what each line shows. </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 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.<br>
- </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>
- <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>
+
+ <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 ones), </li>
- <li> 4 diffmax (maximise the difference between number of ones and zeros), </li>
- <li> 5 integer (fitness equals integer equivalent of bitstring). <br>
- </li>
+ <li> 1 constant (all fitnesses the same),</li>
+ <li> 2 random (fitness() returns a random value),</li>
+ <li> 3 onemax (maximise the number of ones),</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>
+
<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 up that can be used when running sga: </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)<br>
- </p>
+ <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>
+ <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>
<table width="561" border="0">
<tr>
- <td width="133">sga </td>
+ <td width="133">sga</td>
<td width="412">uses the defaults as above</td>
</tr>
<tr>
<td>sga -p500</td>
- <td>sets the population size to 500 </td>
+ <td>sets the population size to 500</td>
</tr>
<tr>
<td>sga -c25 -x2 -m800</td>
- <td>chromsize = 25, crossover = 25, 1 in 800 bits mutated </td>
+ <td>chromsize = 25, crossover = 25, 1 in 800 bits mutated</td>
</tr>
<tr>
<td>sga -s33 -d2</td>
- <td>displays 33 individuals from every population </td>
+ <td>displays 33 individuals from every population</td>
</tr>
</table>
-</div>
+ </div>
</div>
</div>
-<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
+<div id="footer">
+ <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
+ <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" />
+</div>
</body>
</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-23 15:01:30
|
Revision: 55
http://sga.svn.sourceforge.net/sga/?rev=55&view=rev
Author: skywalker85
Date: 2008-02-23 07:01:27 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
Whoops. Got it right this time
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-23 14:59:19 UTC (rev 54)
+++ trunk/web/support_runonwin.html 2008-02-23 15:01:27 UTC (rev 55)
@@ -22,7 +22,8 @@
</div>
<div id="content"><div class="article">
<h2><a href="support.html">Support</a> » Running sga on Windows </h2>
- <h3>Assumptions</h3>
+ <h3><br />
+ Assumptions</h3>
<p>OK, firstly we have made some assumptions, these being:</p>
<ul><li><strong>You are running Windows XP and above</strong></li>
<li><strong>That you have downloaded the sga C code and have converted it into an .exe file.</strong></li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-23 14:59:24
|
Revision: 54
http://sga.svn.sourceforge.net/sga/?rev=54&view=rev
Author: skywalker85
Date: 2008-02-23 06:59:19 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
fixed win tut formatting issues. Thanks to Tim for pointing this out
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-23 13:20:29 UTC (rev 53)
+++ trunk/web/support_runonwin.html 2008-02-23 14:59:19 UTC (rev 54)
@@ -7,7 +7,7 @@
<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
</head>
<body><div id="main"><div id="header">
- <h1>sgas - The Simple Genetic Algorithm</h1>
+ <h1>sga - The Simple Genetic Algorithm</h1>
</div>
<div id="menu">
<ul><li><a href="./index.html">News</a></li>
@@ -22,16 +22,15 @@
</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><strong>You are running Windows XP and above</strong></li>
<li><strong>That you have downloaded the sga C code and have converted it into an .exe file.</strong></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>
+<li>You are running sga from a folder called sga on your C:\ and have saved sga.exe and cygwin1.dll into this folder.<br>
+ </li>
</ul>
-<br>
- <h3>How To Use the sga Program</h3>
+<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>
@@ -41,10 +40,10 @@
<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>Navigate to the C:\sga folder by using the following command: -<br />
+ <br />
+ C:\sga<br />
+ <br />
</li>
<li> Now the fun can really start! For your first experiment type in the following sga -f3 | more and press ENTER
<p><img src="images/sgaoutput.jpg" alt="cmd window" width="570" height="365"/></p>
@@ -54,20 +53,20 @@
<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 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.<br>
+ </li>
</ol>
- <br>
- <h3>Fitness Functions</h3>
+ <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> 3 onemax (maximise the number of ones), </li>
<li> 4 diffmax (maximise the difference between number of ones and zeros), </li>
- <li> 5 integer (fitness equals integer equivalent of bitstring). </li>
+ <li> 5 integer (fitness equals integer equivalent of bitstring). <br>
+ </li>
</ul>
- <br>
<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 up that can be used when running sga: </p>
<p>-p 300 popsize (must be even, not 0 and not greater than 1000) </p>
@@ -79,8 +78,8 @@
<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>
+ <p>-d 1 frequency of display (not 0, 8 = display every 8th generation)<br>
+ </p>
<h3>Examples</h3>
<table width="561" border="0">
<tr>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Lewis <os...@el...> - 2008-02-23 14:35:11
|
It looks as though this patch conflicts with a previous patch by modifying some of the code formatting, removing spaces and indentation, removes the JavaScript target="_blank" script functionality, and introduces xhtml errors. I propose this revision be reversed until the correct changes can be made again. Regards, Lewis. sky...@us... wrote: > Revision: 53 > http://sga.svn.sourceforge.net/sga/?rev=53&view=rev > Author: skywalker85 > Date: 2008-02-23 05:20:29 -0800 (Sat, 23 Feb 2008) > > Log Message: > ----------- > spotted, and amended grammatical errors on the win support tutorial > > Modified Paths: > -------------- > trunk/web/support_runonwin.html > > Modified: trunk/web/support_runonwin.html > =================================================================== > --- trunk/web/support_runonwin.html 2008-02-22 18:23:21 UTC (rev 52) > +++ trunk/web/support_runonwin.html 2008-02-23 13:20:29 UTC (rev 53) > @@ -1,60 +1,54 @@ > <!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" /> > - <script type="text/JavaScript" src="javascript/external.js"></script> > +<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> > +<body><div id="main"><div id="header"> > + <h1>sgas - 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><strong>You are running Windows XP and above</strong></li> > +<li><strong>That you have downloaded the sga C code and have converted it into an .exe file.</strong></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> > > - <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><strong>You are running Windows XP and above</strong></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 type in the following sga -f3 | more and press ENTER > +<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 type in the following sga -f3 | more and press ENTER > <p><img src="images/sgaoutput.jpg" alt="cmd window" width="570" height="365"/></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>This will display the window above, showing the first page of results. To see more results, 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> > @@ -62,58 +56,54 @@ > </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> > - > + <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> > + <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> > + <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>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> > - <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> > - > + <p>There are several command options (with default values) which can be used to pass parameters to the program on start up that can be used when running sga: </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> > <table width="561" border="0"> > <tr> > - <td width="133">sga</td> > + <td width="133">sga </td> > <td width="412">uses the defaults as above</td> > </tr> > <tr> > <td>sga -p500</td> > - <td>sets the population size to 500</td> > + <td>sets the population size to 500 </td> > </tr> > <tr> > <td>sga -c25 -x2 -m800</td> > - <td>chromsize = 25, crossover = 25, 1 in 800 bits mutated</td> > + <td>chromsize = 25, crossover = 25, 1 in 800 bits mutated </td> > </tr> > <tr> > <td>sga -s33 -d2</td> > - <td>displays 33 individuals from every population</td> > + <td>displays 33 individuals from every population </td> > </tr> > </table> > - </div> > +</div> > </div> > </div> > -<div id="footer"> <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br /> > - <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" /> </div> > +<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div> > </body> > </html> > > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > sga-commit mailing list > sga...@li... > https://lists.sourceforge.net/lists/listinfo/sga-commit > |
|
From: <sky...@us...> - 2008-02-23 13:20:33
|
Revision: 53
http://sga.svn.sourceforge.net/sga/?rev=53&view=rev
Author: skywalker85
Date: 2008-02-23 05:20:29 -0800 (Sat, 23 Feb 2008)
Log Message:
-----------
spotted, and amended grammatical errors on the win support tutorial
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-22 18:23:21 UTC (rev 52)
+++ trunk/web/support_runonwin.html 2008-02-23 13:20:29 UTC (rev 53)
@@ -1,60 +1,54 @@
<!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" />
- <script type="text/JavaScript" src="javascript/external.js"></script>
+<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>
+<body><div id="main"><div id="header">
+ <h1>sgas - 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><strong>You are running Windows XP and above</strong></li>
+<li><strong>That you have downloaded the sga C code and have converted it into an .exe file.</strong></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>
- <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><strong>You are running Windows XP and above</strong></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 type in the following sga -f3 | more and press ENTER
+<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 type in the following sga -f3 | more and press ENTER
<p><img src="images/sgaoutput.jpg" alt="cmd window" width="570" height="365"/></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>This will display the window above, showing the first page of results. To see more results, 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>
@@ -62,58 +56,54 @@
</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>
-
+ <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>
+ <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>
+ <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>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>
- <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>
-
+ <p>There are several command options (with default values) which can be used to pass parameters to the program on start up that can be used when running sga: </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>
<table width="561" border="0">
<tr>
- <td width="133">sga</td>
+ <td width="133">sga </td>
<td width="412">uses the defaults as above</td>
</tr>
<tr>
<td>sga -p500</td>
- <td>sets the population size to 500</td>
+ <td>sets the population size to 500 </td>
</tr>
<tr>
<td>sga -c25 -x2 -m800</td>
- <td>chromsize = 25, crossover = 25, 1 in 800 bits mutated</td>
+ <td>chromsize = 25, crossover = 25, 1 in 800 bits mutated </td>
</tr>
<tr>
<td>sga -s33 -d2</td>
- <td>displays 33 individuals from every population</td>
+ <td>displays 33 individuals from every population </td>
</tr>
</table>
- </div>
+</div>
</div>
</div>
-<div id="footer"> <a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a><br />
- <img src="images/sourceforge_logo.png" alt="Hosted on Sourceforge.net" width="86" height="29" longdesc="http://www.sourceforge.net" /> </div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ty...@us...> - 2008-02-22 18:23:23
|
Revision: 52
http://sga.svn.sourceforge.net/sga/?rev=52&view=rev
Author: tyront
Date: 2008-02-22 10:23:21 -0800 (Fri, 22 Feb 2008)
Log Message:
-----------
added functionality to allow execution of gui from anywhere instead of the smae directory
Modified Paths:
--------------
trunk/code/gui/gsga.c
Modified: trunk/code/gui/gsga.c
===================================================================
--- trunk/code/gui/gsga.c 2008-02-22 17:23:55 UTC (rev 51)
+++ trunk/code/gui/gsga.c 2008-02-22 18:23:21 UTC (rev 52)
@@ -2,6 +2,7 @@
#include <unistd.h>
#include "gsga.h"
#include <stdio.h>
+#include <string.h>
#include <stdlib.h>
char input[2000],
@@ -41,8 +42,20 @@
int i = 0;
-const char *SGAPATH = "./sga";
+const char *SGAPATH;
+/* gets the absolute path of sga*/
+void init(char* path)
+{
+ int mc = strlen(path);
+ path[mc-4] = 's';
+ path[mc-3] = 'g';
+ path[mc-2] = 'a';
+ path[mc-1] = '\0';
+
+ SGAPATH = path;
+}
+
/* A callback function which quits the program when called */
static void destroy(GtkWidget *widget, gpointer data)
{
@@ -298,6 +311,7 @@
*/
int main(int argc, char *argv[])
{
+ init(argv[0]);
gtk_init(&argc, &argv);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT (window), "destroy", G_CALLBACK (destroy), NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|