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: <she...@us...> - 2008-02-22 17:24:01
|
Revision: 51
http://sga.svn.sourceforge.net/sga/?rev=51&view=rev
Author: shearclass
Date: 2008-02-22 09:23:55 -0800 (Fri, 22 Feb 2008)
Log Message:
-----------
About section added
Modified Paths:
--------------
trunk/code/gui/gsga.c
trunk/code/gui/gsga.h
Modified: trunk/code/gui/gsga.c
===================================================================
--- trunk/code/gui/gsga.c 2008-02-21 22:28:53 UTC (rev 50)
+++ trunk/code/gui/gsga.c 2008-02-22 17:23:55 UTC (rev 51)
@@ -49,6 +49,31 @@
gtk_main_quit();
}
+void view_about()
+{
+ char *name = "gsga";
+ char* comments = "gsga is a graphicsal user interface,\nwhich is designed to run with the sga program.";
+ 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* 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",
+ "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,
+ NULL, NULL);
+}
+
/* Creates items within the top menu bar */
static GtkWidget *get_menubar_menu(GtkWidget *window)
{
@@ -277,7 +302,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,800);
+ gtk_widget_set_size_request(GTK_WIDGET(window), 1024,768);
main_vbox = gtk_vbox_new(FALSE, 1);
make_vbox(main_vbox, window);
Modified: trunk/code/gui/gsga.h
===================================================================
--- trunk/code/gui/gsga.h 2008-02-21 22:28:53 UTC (rev 50)
+++ trunk/code/gui/gsga.h 2008-02-22 17:23:55 UTC (rev 51)
@@ -1,6 +1,7 @@
static void destroy( GtkWidget *widget, gpointer data);
void make_vbox(GtkWidget* main_vbox, GtkWidget* window);
static GtkWidget *make_box(gboolean homogeneous, gint spacing, gboolean expand, gboolean fill, guint padding);
+void view_about();
void on_button_released(GtkWidget *button);
void on_button_pressed(GtkWidget *button);
void on_button_clicked(GtkWidget *button);
@@ -10,6 +11,8 @@
static GtkItemFactoryEntry menu_items[] = {
{ "/_File", NULL, NULL, 0, "<Branch>"},
{ "/File/Exit", "<CTRL>Q", gtk_main_quit, 1, "<StockItem>", GTK_STOCK_QUIT },
+ { "/_Help", NULL, NULL, 0, "<Branch>"},
+ { "/Help/About", "<CTRL>A", view_about, 1, "<StockItem>", GTK_STOCK_ABOUT },
};
static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-21 22:28:57
|
Revision: 50
http://sga.svn.sourceforge.net/sga/?rev=50&view=rev
Author: fifthdim
Date: 2008-02-21 14:28:53 -0800 (Thu, 21 Feb 2008)
Log Message:
-----------
Modifications to the Makefile so sga will compile on FreeBSD with the GSL libs.
Modified Paths:
--------------
trunk/code/Makefile
Modified: trunk/code/Makefile
===================================================================
--- trunk/code/Makefile 2008-02-21 21:50:01 UTC (rev 49)
+++ trunk/code/Makefile 2008-02-21 22:28:53 UTC (rev 50)
@@ -7,27 +7,29 @@
# make clean - removes all .o files and sga
LIBS = `pkg-config --cflags --libs gtk+-2.0`
+CFLAGS = "-I/usr/local/include"
+LDFLAGS = "-L/usr/local/lib"
sga: sga.o displayfile.o output.o
- gcc sga.o displayfile.o output.o -lgsl -lgslcblas -lm -o sga
+ gcc ${CFLAGS} ${LDFLAGS} sga.o displayfile.o output.o -lgsl -lgslcblas -lm -o sga
sga.o: sga.c
- gcc -c sga.c -o sga.o
+ gcc ${CFLAGS} -c sga.c -o sga.o
nogsl: sga.nogsl.o displayfile.o output.o
- gcc sga.o displayfile.o output.o -lm -o sga
+ gcc ${CFLAGS} sga.o displayfile.o output.o -lm -o sga
sga.nogsl.o: sga.c
- gcc -c -DNOGSL sga.c -o sga.o
+ gcc ${CFLAGS} -c -DNOGSL sga.c -o sga.o
displayfile.o: displayfile.c
- gcc -c displayfile.c -o displayfile.o
+ gcc ${CFLAGS} -c displayfile.c -o displayfile.o
output.o: output.c
- gcc -c output.c -o output.o
+ gcc ${CFLAGS} -c output.c -o output.o
gsga: sga gui/gsga.c
- gcc gui/gsga.c -o gsga $(LIBS)
+ gcc ${CFLAGS} ${LDFLAGS} gui/gsga.c -o gsga $(LIBS)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-02-21 21:50:18
|
Revision: 49
http://sga.svn.sourceforge.net/sga/?rev=49&view=rev
Author: syinet
Date: 2008-02-21 13:50:01 -0800 (Thu, 21 Feb 2008)
Log Message:
-----------
Sourceforge logo added to all pages. basic sitemap created.
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
Added Paths:
-----------
trunk/web/images/sourceforge_logo.png
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/about.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -36,6 +36,7 @@
</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>
Modified: trunk/web/bugs.html
===================================================================
--- trunk/web/bugs.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/bugs.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -31,6 +31,7 @@
</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>
Modified: trunk/web/docs.html
===================================================================
--- trunk/web/docs.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/docs.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -75,6 +75,7 @@
</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>
Modified: trunk/web/download.html
===================================================================
--- trunk/web/download.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/download.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -37,6 +37,7 @@
</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>
Added: trunk/web/images/sourceforge_logo.png
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/sourceforge_logo.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/web/index.html
===================================================================
--- trunk/web/index.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/index.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -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">
@@ -27,17 +27,18 @@
<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" />
+ <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><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>
+ <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>
</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>
Modified: trunk/web/license.html
===================================================================
--- trunk/web/license.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/license.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -708,6 +708,7 @@
</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>
Modified: trunk/web/roadmap.html
===================================================================
--- trunk/web/roadmap.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/roadmap.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -47,6 +47,7 @@
</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>
Modified: trunk/web/sitemap.html
===================================================================
--- trunk/web/sitemap.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/sitemap.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -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>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>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">
@@ -27,10 +27,26 @@
<div id="content">
<div class="article">
<h2>Sitemap</h2>
- <p>coming soon </p>
+ <ul>
+ <li><a href="index.html">News</a> - The latest project developments.</li>
+ <li><a href="about.html">About</a> - Information about the project and the code.</li>
+ <li><a href="roadmap.html">Roadmap</a> - What is planned for the project and code.</li>
+ <li><a href="support.html">Support</a> - IRC, Mailing list Info and Tutorials:
+ <ul>
+ <li><a href="support_runonwin.html">How to get sga up and running on a Windows machine</a> </li>
+ <li><a href="support_irc.html">Accessing our IRC channel using LeafChat on Windows</a></li>
+ </ul>
+ </li>
+ <li><a href="docs.html">Documentation</a></li>
+ <li><a href="download.html">Download</a> - Accessing our repository.</li>
+ <li><a href="bugs.html">Bugs</a> - Help the project by reporting bugs.</li>
+ <li><a href="license.html">License</a> - A copy of the GPL 3.0 License.</li>
+ <li><a href="sitemap.html">Sitemap</a> - You are here.</li>
+ </ul>
</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>
Modified: trunk/web/support.html
===================================================================
--- trunk/web/support.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/support.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -46,8 +46,7 @@
</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>
Modified: trunk/web/support_irc.html
===================================================================
--- trunk/web/support_irc.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/support_irc.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -56,8 +56,7 @@
</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>
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-21 20:48:32 UTC (rev 48)
+++ trunk/web/support_runonwin.html 2008-02-21 21:50:01 UTC (rev 49)
@@ -112,9 +112,8 @@
</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: <fif...@us...> - 2008-02-21 20:48:40
|
Revision: 48
http://sga.svn.sourceforge.net/sga/?rev=48&view=rev
Author: fifthdim
Date: 2008-02-21 12:48:32 -0800 (Thu, 21 Feb 2008)
Log Message:
-----------
Reverse some codestyle changes and improve clarity of Makefile.
Modified Paths:
--------------
trunk/code/Makefile
trunk/code/sga.c
Modified: trunk/code/Makefile
===================================================================
--- trunk/code/Makefile 2008-02-21 20:11:00 UTC (rev 47)
+++ trunk/code/Makefile 2008-02-21 20:48:32 UTC (rev 48)
@@ -1,7 +1,10 @@
-# make makes sga
-# make nogsl makes sga without using gsl
-# make gsga makes gsga
-# make clean removes all .o files and sga
+# --- sga Project Makefile ---
+#
+# Usage:
+# make - makes sga
+# make nogsl - makes sga without using GSL
+# make gsga - makes gsga (sga GUI, requires GTK+ libs)
+# make clean - removes all .o files and sga
LIBS = `pkg-config --cflags --libs gtk+-2.0`
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-02-21 20:11:00 UTC (rev 47)
+++ trunk/code/sga.c 2008-02-21 20:48:32 UTC (rev 48)
@@ -166,7 +166,7 @@
}
/* calculate stats, and display stats and individuals, if required */
- if (((gen-1) % displfreq) == 0) {
+ if (((gen-1)%displfreq) == 0) {
mean = best = worst = fit[0];
for (i = 1; i < popsize; i++) {
mean += fit[i];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-21 20:11:12
|
Revision: 47
http://sga.svn.sourceforge.net/sga/?rev=47&view=rev
Author: fifthdim
Date: 2008-02-21 12:11:00 -0800 (Thu, 21 Feb 2008)
Log Message:
-----------
Begin modifications to code layout to hopefully make it easier to read, encourage participation and conform with CODINGSTYLE docs.
Modified Paths:
--------------
trunk/code/sga.c
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-02-21 12:05:11 UTC (rev 46)
+++ trunk/code/sga.c 2008-02-21 20:11:00 UTC (rev 47)
@@ -132,30 +132,30 @@
#endif /* NOGSL */
/* initialise the population */
- for (i=0; i<popsize; i++)
- for (j=0; j<chromsize; 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] */
-
+
/* main loop of genetic algorithm */
- for (gen=1; gen!=gens; gen++) {
+ for (gen = 1; gen != gens; gen++) {
/* calculate fitness of current population */
- for (i=0; i<popsize; i++) {
+ 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++)
+ 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++)
+ 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++)
+ for (j = 1; j < chromsize; j++)
fit[i] = (fit[i]<<1) + curr[i][j] - '0';
fit[i]++;
break;
@@ -166,9 +166,9 @@
}
/* calculate stats, and display stats and individuals, if required */
- if (((gen-1)%displfreq) == 0) {
+ if (((gen-1) % displfreq) == 0) {
mean = best = worst = fit[0];
- for (i=1; i<popsize; i++) {
+ for (i = 1; i < popsize; i++) {
mean += fit[i];
if (fit[i] > best)
best = fit[i];
@@ -177,31 +177,31 @@
}
mean /= popsize;
std_dev = 0.0;
- for (i=0; i<popsize; i++)
+ 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 */
+ if ((!fconv) && (std_dev == 0)) { /* if fit converged */
fconv = 1;
fconv_gen = gen;
}
setGenInfo(gen);
- for (i=0; i<chromsize; i++) /* init column counts */
+ for (i = 0; i < chromsize; i++) /* init column counts */
count[i] = 0;
- for (i=0; i<sizedispl; i++) {
+ for (i = 0; i < sizedispl; i++) {
setSequenceOpen();
- for (j=0; j<chromsize; j++) { /* show individuals */
+ for (j = 0; j < chromsize; j++) { /* show individuals */
setSequenceChar(curr[i][j]);
count[j] += curr[i][j] - '0'; /* sum columns in pop */
}
setSequenceClose();
}
- for (; i<popsize; i++)
- for (j=0; j<chromsize; j++)
+ for (; i < popsize; i++)
+ for (j = 0; j < chromsize; j++)
count[j] += curr[i][j] - '0';
pconv_count = 0;
setSequenceOpen();
- for (i=0; i<chromsize; i++) {
- if ((count[i]!=0) && (count[i]!=popsize))
+ for (i = 0; i < chromsize; i++) {
+ if ((count[i] != 0) && (count[i] != popsize))
count[i] = count[i]*10/popsize + '0';
else {
count[i] = '-';
@@ -210,7 +210,7 @@
setSequenceChar(count[i]);
}
setSequenceClose();
- if ((!pconv) && (pconv_count==chromsize)) { /* if pop converged */
+ if ((!pconv) && (pconv_count == chromsize)) { /* if pop converged */
pconv = 1;
pconv_gen = gen;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <she...@us...> - 2008-02-21 12:05:16
|
Revision: 46
http://sga.svn.sourceforge.net/sga/?rev=46&view=rev
Author: shearclass
Date: 2008-02-21 04:05:11 -0800 (Thu, 21 Feb 2008)
Log Message:
-----------
Please wait message added
Modified Paths:
--------------
trunk/code/gui/gsga.c
trunk/code/gui/gsga.h
Modified: trunk/code/gui/gsga.c
===================================================================
--- trunk/code/gui/gsga.c 2008-02-20 17:22:02 UTC (rev 45)
+++ trunk/code/gui/gsga.c 2008-02-21 12:05:11 UTC (rev 46)
@@ -180,6 +180,16 @@
return main_hbox;
}
+void on_button_released(GtkWidget *button)
+{
+ gtk_button_set_label(GTK_BUTTON(button), "UPDATE");
+}
+
+void on_button_pressed(GtkWidget *button)
+{
+ gtk_button_set_label(GTK_BUTTON(button), "Please wait...");
+}
+
/* Callback function for the update button. */
void on_button_clicked(GtkWidget *button)
{
@@ -252,7 +262,7 @@
input[read(infd[0], input, 2000)] = 0;
gtk_text_buffer_insert_at_cursor (buffer, input, -1);
buffer_size = gtk_text_buffer_get_line_count(buffer);
- }
+ }
}
}
@@ -266,7 +276,7 @@
gtk_init(&argc, &argv);
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_window_set_title(GTK_WINDOW(window), "Simple Genetic Algorithm (SGA)");
gtk_widget_set_size_request(GTK_WIDGET(window), 1024,800);
main_vbox = gtk_vbox_new(FALSE, 1);
@@ -287,9 +297,18 @@
gtk_container_add(GTK_CONTAINER(scroll_bar), text_view);
button = gtk_button_new_with_label("UPDATE");
+
+ g_signal_connect(G_OBJECT (button), "pressed",
+ G_CALLBACK (on_button_pressed),
+ NULL);
+
g_signal_connect(G_OBJECT (button), "clicked",
G_CALLBACK (on_button_clicked),
- NULL);
+ NULL);
+
+ g_signal_connect(G_OBJECT (button), "released",
+ G_CALLBACK (on_button_released),
+ NULL);
gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, TRUE, 0);
gtk_box_pack_start(GTK_BOX(main_vbox), main_box, 0, 0, 0);
Modified: trunk/code/gui/gsga.h
===================================================================
--- trunk/code/gui/gsga.h 2008-02-20 17:22:02 UTC (rev 45)
+++ trunk/code/gui/gsga.h 2008-02-21 12:05:11 UTC (rev 46)
@@ -1,6 +1,8 @@
static void destroy( GtkWidget *widget, gpointer data);
void make_vbox(GtkWidget* main_vbox, GtkWidget* window);
static GtkWidget *make_box(gboolean homogeneous, gint spacing, gboolean expand, gboolean fill, guint padding);
+void on_button_released(GtkWidget *button);
+void on_button_pressed(GtkWidget *button);
void on_button_clicked(GtkWidget *button);
void text_box(GtkWidget *text);
void print_data();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-02-20 17:22:07
|
Revision: 45
http://sga.svn.sourceforge.net/sga/?rev=45&view=rev
Author: syinet
Date: 2008-02-20 09:22:02 -0800 (Wed, 20 Feb 2008)
Log Message:
-----------
altered overall width of website to compensate for varying texts used on different operating systems to address menu overlapping bug.
Modified Paths:
--------------
trunk/web/styles/screen.css
Modified: trunk/web/styles/screen.css
===================================================================
--- trunk/web/styles/screen.css 2008-02-19 14:53:46 UTC (rev 44)
+++ trunk/web/styles/screen.css 2008-02-20 17:22:02 UTC (rev 45)
@@ -96,7 +96,7 @@
}
#main {
- width : 750px;
+ width : 770px;
margin-right: auto;
margin-left: auto;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <she...@us...> - 2008-02-19 14:53:52
|
Revision: 44
http://sga.svn.sourceforge.net/sga/?rev=44&view=rev
Author: shearclass
Date: 2008-02-19 06:53:46 -0800 (Tue, 19 Feb 2008)
Log Message:
-----------
Allow GUI to go beyond 1000 Generations
Modified Paths:
--------------
trunk/code/gui/gsga.c
Modified: trunk/code/gui/gsga.c
===================================================================
--- trunk/code/gui/gsga.c 2008-02-19 09:49:53 UTC (rev 43)
+++ trunk/code/gui/gsga.c 2008-02-19 14:53:46 UTC (rev 44)
@@ -244,11 +244,14 @@
dup2(oldstdout, 1);
close(outfd[0]);
close(infd[1]);
- write(outfd[1],"2^32\n",5);
+ write(outfd[1],"2^32\n",5);
- for (i = 0; i < 290; i++) {
+ int buffer_size = gtk_text_buffer_get_line_count(buffer);
+
+ for (i = 0; i < buffer_size; i++ ) {
input[read(infd[0], input, 2000)] = 0;
gtk_text_buffer_insert_at_cursor (buffer, input, -1);
+ buffer_size = gtk_text_buffer_get_line_count(buffer);
}
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-19 09:49:56
|
Revision: 43
http://sga.svn.sourceforge.net/sga/?rev=43&view=rev
Author: fifthdim
Date: 2008-02-19 01:49:53 -0800 (Tue, 19 Feb 2008)
Log Message:
-----------
CSS fix to correct a display error in firefox where windows/unix platforms default to differing font sizes. Patch created by Matt.
Modified Paths:
--------------
trunk/web/styles/screen.css
Modified: trunk/web/styles/screen.css
===================================================================
--- trunk/web/styles/screen.css 2008-02-19 08:10:50 UTC (rev 42)
+++ trunk/web/styles/screen.css 2008-02-19 09:49:53 UTC (rev 43)
@@ -96,11 +96,9 @@
}
#main {
- margin : auto;
- max-width : 65em;
- min-width : 40em;
- width : auto !important;
- width : 65em;
+ width : 750px;
+ margin-right: auto;
+ margin-left: auto;
}
#header {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tim...@us...> - 2008-02-19 08:10:54
|
Revision: 42
http://sga.svn.sourceforge.net/sga/?rev=42&view=rev
Author: tim-watson
Date: 2008-02-19 00:10:50 -0800 (Tue, 19 Feb 2008)
Log Message:
-----------
Commit of Tom Smith's patch that corrects errors in sga.c, output.c and data.h.
Modified Paths:
--------------
trunk/code/data.h
trunk/code/output.c
trunk/code/sga.c
Modified: trunk/code/data.h
===================================================================
--- trunk/code/data.h 2008-02-18 22:12:58 UTC (rev 41)
+++ trunk/code/data.h 2008-02-19 08:10:50 UTC (rev 42)
@@ -1,26 +1,26 @@
-#ifndef INC_DATA.H
-#define INC_DATA.H
+#ifndef INC_DATA_H
+#define INC_DATA_H
-extern char header[512], /* header of output*/
- genoutput[1024], /* generation output */
- footer[512], /* footer of output*/
- curr[1000][80], /* current generation */
- next[1000][80]; /* next generation */
-extern int fit[1000], /* fitness values */
- popsize = 300,
- chromsize = 16,
- crossrate = 70,
- muterate = 1000,
- fitfunc = 1,
- boostfit = 1,
- rseed = 1,
- gens = 1000,
- sizedispl = 10,
- displfreq = 1,
- outputtype = 0,
- best, /* best of generation */
- worst; /* worst of generation */
-extern double mean, /* mean fitness for generation */
- std_dev; /* standard deviation of fitnesses */
+char header[512], /* header of output*/
+ genoutput[1024], /* generation output */
+ footer[512], /* footer of output*/
+ curr[1000][80], /* current generation */
+ next[1000][80]; /* next generation */
+int fit[1000], /* fitness values */
+ popsize,
+ chromsize,
+ crossrate,
+ muterate,
+ fitfunc,
+ boostfit,
+ rseed,
+ gens,
+ sizedispl,
+ displfreq,
+ outputtype,
+ best, /* best of generation */
+ worst; /* worst of generation */
+double mean, /* mean fitness for generation */
+ std_dev; /* standard deviation of fitnesses */
#endif /* INC_DATA.H*/
Modified: trunk/code/output.c
===================================================================
--- trunk/code/output.c 2008-02-18 22:12:58 UTC (rev 41)
+++ trunk/code/output.c 2008-02-19 08:10:50 UTC (rev 42)
@@ -14,13 +14,13 @@
}
}
-void setGenInfo(int gen)
+void setGenInfo(int gens)
{
switch(outputtype)
{
default: sprintf(genoutput,"generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
- gen, best, worst, mean, std_dev);break;
+ gens, best, worst, mean, std_dev);break;
}
}
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-02-18 22:12:58 UTC (rev 41)
+++ trunk/code/sga.c 2008-02-19 08:10:50 UTC (rev 42)
@@ -40,6 +40,18 @@
{
int i, j, k, gen, choice, count[80],
fconv=0, fconv_gen=0, pconv=0, pconv_count, pconv_gen=0;
+
+ popsize = 300;
+ chromsize = 16;
+ crossrate = 70;
+ muterate = 1000;
+ fitfunc = 1;
+ boostfit = 1;
+ rseed = 1;
+ gens = 1000;
+ sizedispl = 10;
+ displfreq = 1;
+ outputtype = 0;
/* accept the command line options */
while (--argc>0 && (*++argv)[0]=='-')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-18 22:13:01
|
Revision: 41
http://sga.svn.sourceforge.net/sga/?rev=41&view=rev
Author: fifthdim
Date: 2008-02-18 14:12:58 -0800 (Mon, 18 Feb 2008)
Log Message:
-----------
JavaScript support for target="_blank" links:
Added new javascript file under a javascript directory to convert 'rel="external"' links into 'target="_blank"' links during execution. This is a workaround required to make web pages that link to external sites by creating a new window still validate as XHTML-strict.
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
Added Paths:
-----------
trunk/web/javascript/
trunk/web/javascript/external.js
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/about.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +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" />
+ <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">
@@ -28,10 +29,10 @@
<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>
- <p>The <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" target="_blank">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" target="_blank">More... </a></p>
+ <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>
- <p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" target="_blank">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 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>
Modified: trunk/web/bugs.html
===================================================================
--- trunk/web/bugs.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/bugs.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +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 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" />
+ <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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
@@ -26,7 +27,7 @@
<div id="content">
<div class="article">
<h2>Bugs</h2>
- <p>For bug tracking please visit our <a href="http://sourceforge.net/tracker/?group_id=208083&atid=1004272" target="_blank">sourceforge page</a>.</p>
+ <p>For bug tracking please visit our <a href="http://sourceforge.net/tracker/?group_id=208083&atid=1004272" rel="external">sourceforge page</a>.</p>
</div>
</div>
</div>
Modified: trunk/web/docs.html
===================================================================
--- trunk/web/docs.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/docs.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +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 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" />
+ <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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
Modified: trunk/web/download.html
===================================================================
--- trunk/web/download.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/download.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +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>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" />
+ <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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
Modified: trunk/web/index.html
===================================================================
--- trunk/web/index.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/index.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +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" />
+ <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">
Added: trunk/web/javascript/external.js
===================================================================
--- trunk/web/javascript/external.js (rev 0)
+++ trunk/web/javascript/external.js 2008-02-18 22:12:58 UTC (rev 41)
@@ -0,0 +1,15 @@
+// JavaScript Document
+
+//JS to enable links to external sites to open in a new window
+
+function externalLinks()
+{
+ if (!document.getElementsByTagName) return;
+ var anchors = document.getElementsByTagName("a");
+ for (var i=0; i<anchors.length; i++) {
+ var anchor = anchors[i];
+ if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external")
+ anchor.target = "_blank";
+ }
+}
+window.onload = externalLinks;
Modified: trunk/web/license.html
===================================================================
--- trunk/web/license.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/license.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +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 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" />
+ <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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
Modified: trunk/web/roadmap.html
===================================================================
--- trunk/web/roadmap.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/roadmap.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +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 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" />
+ <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" />
+ <script type="text/JavaScript" src="javascript/external.js"></script>
</head>
<body>
<div id="main">
Modified: trunk/web/sitemap.html
===================================================================
--- trunk/web/sitemap.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/sitemap.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +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>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" />
+ <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>
</head>
<body>
<div id="main">
Modified: trunk/web/support.html
===================================================================
--- trunk/web/support.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/support.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -5,6 +5,7 @@
<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">
@@ -39,7 +40,7 @@
<ul>
<li><a href="support_runonwin.html">How to get sga up and running on a Windows machine </a>
<br />
- (You will need to compile sga and create an exe file using <a href="http://cygwin.com/" target="_blank">cygwin</a>)</li>
+ (You will need to compile sga and create an exe file using <a href="http://cygwin.com/" rel="external">cygwin</a>)</li>
<li><a href="support_irc.html">Accessing our IRC channel using LeafChat on Windows</a></li>
</ul>
</div>
Modified: trunk/web/support_irc.html
===================================================================
--- trunk/web/support_irc.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/support_irc.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -5,6 +5,7 @@
<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/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-18 21:46:17 UTC (rev 40)
+++ trunk/web/support_runonwin.html 2008-02-18 22:12:58 UTC (rev 41)
@@ -1,10 +1,11 @@
<!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>
+ <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">
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fif...@us...> - 2008-02-18 21:46:23
|
Revision: 40
http://sga.svn.sourceforge.net/sga/?rev=40&view=rev
Author: fifthdim
Date: 2008-02-18 13:46:17 -0800 (Mon, 18 Feb 2008)
Log Message:
-----------
Modifications to website files relating to support documents; corrected errors, clean up/reformat code.
Modified Paths:
--------------
trunk/web/support.html
trunk/web/support_irc.html
trunk/web/support_runonwin.html
Modified: trunk/web/support.html
===================================================================
--- trunk/web/support.html 2008-02-18 20:43:23 UTC (rev 39)
+++ trunk/web/support.html 2008-02-18 21:46:17 UTC (rev 40)
@@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
-<title>SGA Support - The Simple genetic Algorithm</title>
-<meta name="description" content="" />
-<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
-<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+ <title>SGA Support - The Simple Genetic Algorithm</title>
+ <meta name="description" content="" />
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+ <link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
</head>
<body>
<div id="main">
@@ -27,21 +27,26 @@
<div class="article">
<h2>Support</h2>
<p>The best place to get support for sga is on our mailing list. We also have an IRC channel for instant contact.</p>
+
<h3>Mailing Lists </h3>
- <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>
+ <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>
+
<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>
<ul>
<li><a href="support_runonwin.html">How to get sga up and running on a Windows machine </a>
- <br />
- (You will need to compile sga and create an exe file using <a href="http://cygwin.com/" target="_blank">cygwin</a>)</li>
+ <br />
+ (You will need to compile sga and create an exe file using <a href="http://cygwin.com/" target="_blank">cygwin</a>)</li>
<li><a href="support_irc.html">Accessing our IRC channel using LeafChat on Windows</a></li>
</ul>
</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>
+</div>
</body>
</html>
Modified: trunk/web/support_irc.html
===================================================================
--- trunk/web/support_irc.html 2008-02-18 20:43:23 UTC (rev 39)
+++ trunk/web/support_irc.html 2008-02-18 21:46:17 UTC (rev 40)
@@ -1,10 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
-<title>SGA Support - The Simple genetic Algorithm</title>
-<meta name="description" content="" />
-<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
-<link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
+ <title>SGA Support - The Simple Genetic Algorithm</title>
+ <meta name="description" content="" />
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+ <link rel="stylesheet" title="Normal" type="text/css" media="screen" href="./styles/screen.css" />
</head>
<body>
<div id="main">
@@ -25,28 +25,27 @@
</div>
<div id="content">
<div class="article">
- <h2><a href="support.html">Support</a> » sga IRC Chat Setup Guide (For Windows) </h2>
- <h3></h3>
- <p>This is a quick guide to get the sga IRC Chat setup on your <strong>Windows</strong> machine using <em>LeafChat</em>. You may still find this guide useful if using other OSes as<em> leafChat</em> is an IRC client for Windows, Mac OS X, and Linux. Other IRC clients tend to expire after 30 days and require you to spend money, one reason for choosing this program. This process should take you about 5 minutes to complete. </p>
+ <h2><a href="support.html">Support</a> » sga IRC Chat Setup Guide (For Windows)</h2>
+ <p>This is a quick guide to get the sga IRC Chat setup on your <strong>Windows</strong> machine using <em>LeafChat</em>. You may still find this guide useful if using other Operating Systems as <em>leafChat</em> is an IRC client for Windows, Mac OS X, and Linux. Other IRC clients tend to expire after 30 days and require you to spend money, one reason for choosing this program. This process should take you about 5 minutes to complete.</p>
<ol>
- <li><a href="http://www.leafdigital.com/software/leafchat/download.html" target="_blank">Download</a> Leaf Chat and install it. (make sure you select the latest version for your OS)</li>
+ <li><a href="http://www.leafdigital.com/software/leafchat/download.html" target="_blank">Download</a> Leaf Chat and install it. (make sure you select the latest version for your OS)</li>
<li>Start the program by selecting <em>Start > All programs > Leaf Chat 2 > Leaf Chat 2</em></li>
<li>You will be presented with a welcome screen (see below). (If this screen does not automatically appear select options on the menu bar at the top of the program window and click 'Re-run settings Wizard'.) When you see the screen below click <strong>next</strong>.
<p><img src="images/irc_01.gif" alt="Setup Guide" width="520" height="400" /></p>
</li>
<li>The second screen will ask you for a nickname and a username, you may be asked to change your nickname if somebody else has it when signing onto the IRC server. Enter your details and click<strong> next.</strong></li>
- <li>You are now asked to enter a <strong>Quit Message </strong>which will be sent on exiting the IRC channel. Also your real name should be entered to allow users to identify you using a WHOIS command. Enter your details and click<strong> next.</strong></li>
- <li>You will now be asked to set an interface style, I prefer the tabbed layout. Make you selection and click <strong>next</strong>. </li>
- <li>You will now be asked to select a theme, make your preference and click <strong>next. </strong></li>
- <li>You should now see a confirmation that the setup is complete, click <strong>finish.</strong></li>
- <li>Click the <strong>'Connect' </strong>button (the first button at the top of the program window). </li>
+ <li>You are now asked to enter a <strong>Quit Message</strong> which will be sent on exiting the IRC channel. Also your real name should be entered to allow users to identify you using a WHOIS command. Enter your details and click<strong> next.</strong></li>
+ <li>You will now be asked to set an interface style, I prefer the tabbed layout. Make you selection and click <strong>next</strong>.</li>
+ <li>You will now be asked to select a theme, make your preference and click <strong>next.</strong></li>
+ <li>You should now see a confirmation that the setup is complete, click <strong>finish.</strong></li>
+ <li>Click the <strong>'Connect'</strong> button (the first button at the top of the program window).</li>
<li>At the <strong>'Address'</strong> Input bar enter <em>'irc.elasticmind.net'</em> without the quotes and click the<strong> 'Connect' </strong>button on the right hand side (see below).
<p><img src="images/irc_02.gif" alt="Setup Guide" width="550" height="323" /></p>
</li>
<li>You should now be connected to the IRC server as show below.
<p><img src="images/irc_03.gif" alt="Setup Guide" width="550" height="323" /></p>
</li>
- <li>To join the sga channel simply click the<strong> 'Join' </strong>button (along the top of the program window) and where it says 'Enter the name of the channel...' type <em>'#sga</em>' as shown below then click <strong>Join</strong> on the right hand side.
+ <li>To join the sga channel simply click the <strong>'Join'</strong> button (along the top of the program window) and where it says 'Enter the name of the channel...' type <em>'#sga</em>' as shown below then click <strong>Join</strong> on the right hand side.
<p><img src="images/irc_04.gif" alt="Setup Guide" width="550" height="323" /></p>
</li>
<li>You should now be connected to the sga IRC channel! type your message into the bar along the bottom of the program window and hit return to send it.</li>
@@ -56,6 +55,8 @@
</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>
+</div>
</body>
</html>
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-18 20:43:23 UTC (rev 39)
+++ trunk/web/support_runonwin.html 2008-02-18 21:46:17 UTC (rev 40)
@@ -1,52 +1,57 @@
<!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" />
+<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>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>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>
+<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: -
- <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
+ <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
<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>a) The first part shows the parameter settings that were used.</p>
@@ -56,54 +61,59 @@
</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 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>
+</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-18 20:43:29
|
Revision: 39
http://sga.svn.sourceforge.net/sga/?rev=39&view=rev
Author: skywalker85
Date: 2008-02-18 12:43:23 -0800 (Mon, 18 Feb 2008)
Log Message:
-----------
edited website. coverted all SGAs to sga, so in line with all other docs, and Tims requests
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/support.html
trunk/web/support_irc.html
trunk/web/support_runonwin.html
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/about.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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>
@@ -25,13 +25,13 @@
</div>
<div id="content">
<div class="article">
- <h2>About SGA </h2>
- <p> SGA is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. SGA is written in C in is released under the <strong>GNU General Public License (GPL) 3.0</strong> </p>
+ <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>
<p>The <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" target="_blank">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" target="_blank">More... </a></p>
<h3>The Team </h3>
- <p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" target="_blank">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 student 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" target="_blank">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>
Modified: trunk/web/bugs.html
===================================================================
--- trunk/web/bugs.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/bugs.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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/docs.html
===================================================================
--- trunk/web/docs.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/docs.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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/download.html
===================================================================
--- trunk/web/download.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/download.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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/index.html
===================================================================
--- trunk/web/index.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/index.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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/license.html
===================================================================
--- trunk/web/license.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/license.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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>
@@ -26,7 +26,7 @@
<div id="content">
<div class="article">
<h2>License</h2>
- <p>SGA is released under the GNU GENERAL PUBLIC LICENSE Version 3, a copy of which is below. </p>
+ <p>sga is released under the GNU GENERAL PUBLIC LICENSE Version 3, a copy of which is below. </p>
<p>
<textarea name="textarea" cols="75" rows="20"> GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Modified: trunk/web/roadmap.html
===================================================================
--- trunk/web/roadmap.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/roadmap.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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-18 20:24:22 UTC (rev 38)
+++ trunk/web/support.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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>
@@ -31,10 +31,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>
- <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>
+ <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>
<ul>
- <li><a href="support_runonwin.html">How to get SGA up and running on a Windows machine </a>
+ <li><a href="support_runonwin.html">How to get sga up and running on a Windows machine </a>
<br />
(You will need to compile sga and create an exe file using <a href="http://cygwin.com/" target="_blank">cygwin</a>)</li>
<li><a href="support_irc.html">Accessing our IRC channel using LeafChat on Windows</a></li>
Modified: trunk/web/support_irc.html
===================================================================
--- trunk/web/support_irc.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/support_irc.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -9,7 +9,7 @@
<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>
@@ -25,9 +25,9 @@
</div>
<div id="content">
<div class="article">
- <h2><a href="support.html">Support</a> » SGA IRC Chat Setup Guide (For Windows) </h2>
+ <h2><a href="support.html">Support</a> » sga IRC Chat Setup Guide (For Windows) </h2>
<h3></h3>
- <p>This is a quick guide to get the SGA IRC Chat setup on your <strong>Windows</strong> machine using <em>LeafChat</em>. You may still find this guide useful if using other OSes as<em> leafChat</em> is an IRC client for Windows, Mac OS X, and Linux. Other IRC clients tend to expire after 30 days and require you to spend money, one reason for choosing this program. This process should take you about 5 minutes to complete. </p>
+ <p>This is a quick guide to get the sga IRC Chat setup on your <strong>Windows</strong> machine using <em>LeafChat</em>. You may still find this guide useful if using other OSes as<em> leafChat</em> is an IRC client for Windows, Mac OS X, and Linux. Other IRC clients tend to expire after 30 days and require you to spend money, one reason for choosing this program. This process should take you about 5 minutes to complete. </p>
<ol>
<li><a href="http://www.leafdigital.com/software/leafchat/download.html" target="_blank">Download</a> Leaf Chat and install it. (make sure you select the latest version for your OS)</li>
<li>Start the program by selecting <em>Start > All programs > Leaf Chat 2 > Leaf Chat 2</em></li>
@@ -46,10 +46,10 @@
<li>You should now be connected to the IRC server as show below.
<p><img src="images/irc_03.gif" alt="Setup Guide" width="550" height="323" /></p>
</li>
- <li>To join the SGA channel simply click the<strong> 'Join' </strong>button (along the top of the program window) and where it says 'Enter the name of the channel...' type <em>'#sga</em>' as shown below then click <strong>Join</strong> on the right hand side.
+ <li>To join the sga channel simply click the<strong> 'Join' </strong>button (along the top of the program window) and where it says 'Enter the name of the channel...' type <em>'#sga</em>' as shown below then click <strong>Join</strong> on the right hand side.
<p><img src="images/irc_04.gif" alt="Setup Guide" width="550" height="323" /></p>
</li>
- <li>You should now be connected to the SGA IRC channel! type your message into the bar along the bottom of the program window and hit return to send it.</li>
+ <li>You should now be connected to the sga IRC channel! type your message into the bar along the bottom of the program window and hit return to send it.</li>
<li>That's it you're done!</li>
</ol>
<p> </p>
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-18 20:24:22 UTC (rev 38)
+++ trunk/web/support_runonwin.html 2008-02-18 20:43:23 UTC (rev 39)
@@ -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>SGA - The Simple Genetic Algorithm</h1>
+ <h1>sgas - The Simple Genetic Algorithm</h1>
</div>
<div id="menu">
<ul><li><a href="./index.html">News</a></li>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-18 20:24:25
|
Revision: 38
http://sga.svn.sourceforge.net/sga/?rev=38&view=rev
Author: skywalker85
Date: 2008-02-18 12:24:22 -0800 (Mon, 18 Feb 2008)
Log Message:
-----------
edited grammer on webpage homepage
Modified Paths:
--------------
trunk/web/index.html
Modified: trunk/web/index.html
===================================================================
--- trunk/web/index.html 2008-02-18 17:58:04 UTC (rev 37)
+++ trunk/web/index.html 2008-02-18 20:24:22 UTC (rev 38)
@@ -29,7 +29,7 @@
<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 in is released under the <strong>GNU General Public License (GPL)</strong>. To get involed today download it and have a play with sga. 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 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><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: <sy...@us...> - 2008-02-18 17:58:10
|
Revision: 37
http://sga.svn.sourceforge.net/sga/?rev=37&view=rev
Author: syinet
Date: 2008-02-18 09:58:04 -0800 (Mon, 18 Feb 2008)
Log Message:
-----------
Removed windows thumbnail file
Removed Paths:
-------------
trunk/web/images/Thumbs.db
Deleted: trunk/web/images/Thumbs.db
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fr...@us...> - 2008-02-18 17:31:20
|
Revision: 36
http://sga.svn.sourceforge.net/sga/?rev=36&view=rev
Author: fragmad
Date: 2008-02-18 09:31:16 -0800 (Mon, 18 Feb 2008)
Log Message:
-----------
Another attempt at making moduler code. Work in progress.
Modified Paths:
--------------
trunk/code/Makefile
trunk/code/sga.c
Added Paths:
-----------
trunk/code/data.h
trunk/code/output.c
trunk/code/output.h
Modified: trunk/code/Makefile
===================================================================
--- trunk/code/Makefile 2008-02-18 09:46:59 UTC (rev 35)
+++ trunk/code/Makefile 2008-02-18 17:31:16 UTC (rev 36)
@@ -5,14 +5,14 @@
LIBS = `pkg-config --cflags --libs gtk+-2.0`
-sga: sga.o displayfile.o
- gcc sga.o displayfile.o -lgsl -lgslcblas -lm -o sga
+sga: sga.o displayfile.o output.o
+ gcc sga.o displayfile.o output.o -lgsl -lgslcblas -lm -o sga
sga.o: sga.c
gcc -c sga.c -o sga.o
-nogsl: sga.nogsl.o displayfile.o
- gcc sga.o displayfile.o -lm -o sga
+nogsl: sga.nogsl.o displayfile.o output.o
+ gcc sga.o displayfile.o output.o -lm -o sga
sga.nogsl.o: sga.c
gcc -c -DNOGSL sga.c -o sga.o
@@ -20,9 +20,14 @@
displayfile.o: displayfile.c
gcc -c displayfile.c -o displayfile.o
+output.o: output.c
+ gcc -c output.c -o output.o
+
gsga: sga gui/gsga.c
gcc gui/gsga.c -o gsga $(LIBS)
+
+
.PHONY: clean
clean:
rm -f *.o sga gsga
Added: trunk/code/data.h
===================================================================
--- trunk/code/data.h (rev 0)
+++ trunk/code/data.h 2008-02-18 17:31:16 UTC (rev 36)
@@ -0,0 +1,26 @@
+#ifndef INC_DATA.H
+#define INC_DATA.H
+
+extern char header[512], /* header of output*/
+ genoutput[1024], /* generation output */
+ footer[512], /* footer of output*/
+ curr[1000][80], /* current generation */
+ next[1000][80]; /* next generation */
+extern int fit[1000], /* fitness values */
+ popsize = 300,
+ chromsize = 16,
+ crossrate = 70,
+ muterate = 1000,
+ fitfunc = 1,
+ boostfit = 1,
+ rseed = 1,
+ gens = 1000,
+ sizedispl = 10,
+ displfreq = 1,
+ outputtype = 0,
+ best, /* best of generation */
+ worst; /* worst of generation */
+extern double mean, /* mean fitness for generation */
+ std_dev; /* standard deviation of fitnesses */
+
+#endif /* INC_DATA.H*/
Added: trunk/code/output.c
===================================================================
--- trunk/code/output.c (rev 0)
+++ trunk/code/output.c 2008-02-18 17:31:16 UTC (rev 36)
@@ -0,0 +1,68 @@
+#include <stdio.h>
+#include "data.h"
+
+void setHeader(){
+ switch(outputtype){
+ default:sprintf(header, "--------------------------------------------------\n");
+ sprintf(header, "%spopulation size =%5d chromosome size =%5d\n",
+ header, popsize, chromsize);
+ sprintf(header, "%scrossover rate =%5d mutation rate =%5d\n",
+ header, crossrate, muterate);
+ sprintf(header, "%sfitness function =%5d fitness boost =%5d\n",
+ header, fitfunc, boostfit);
+ sprintf(header ,"%s--------------------------------------------------\n",header);break;
+ }
+}
+
+void setGenInfo(int gen)
+{
+
+ switch(outputtype)
+ {
+ default: sprintf(genoutput,"generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
+ gen, best, worst, mean, std_dev);break;
+ }
+
+}
+
+void setSequenceOpen()
+{
+ switch(outputtype)
+ {
+ default:break;//do nothing
+ }
+}
+
+void setSequenceChar(char c)
+{
+ switch(outputtype)
+ {
+ default:sprintf(genoutput,"%s%c",genoutput,c);break;
+ }
+}
+
+void setSequenceClose()
+{
+ switch(outputtype)
+ {
+ default:sprintf(genoutput,"%s\n",genoutput);break;
+ }
+}
+
+void setGenEnd()
+{
+ switch(outputtype)
+ {
+ default: sprintf(genoutput,"%s--------------------------------------------------\n",genoutput);break;
+ }
+}
+
+void setFooter(int fconv_gen,int pconv_gen){
+
+ switch(outputtype)
+ {
+ default: sprintf(footer, "fitness converged at generation %d\n", fconv_gen);
+ sprintf(footer, "%spopulation converged at generation %d\n", footer, pconv_gen);
+ sprintf(footer, "%s--------------------------------------------------\n", footer); break;
+ }
+}
Added: trunk/code/output.h
===================================================================
--- trunk/code/output.h (rev 0)
+++ trunk/code/output.h 2008-02-18 17:31:16 UTC (rev 36)
@@ -0,0 +1,7 @@
+void setHeader();
+void setGenInfo(int gen);
+void setSequenceOpen();
+void setSequenceChar(char c);
+void setSequenceClose();
+void setGenEnd();
+void setFooter(int fconv_gen,int pconv_gen);
Modified: trunk/code/sga.c
===================================================================
--- trunk/code/sga.c 2008-02-18 09:46:59 UTC (rev 35)
+++ trunk/code/sga.c 2008-02-18 17:31:16 UTC (rev 36)
@@ -21,6 +21,12 @@
#include <math.h> /* needed for sqrt() to calc std. dev. */
#include "displayfile.h" /* display the help and version files */
+
+#include "data.h"
+
+#include "output.h"
+
+
#ifdef NOGSL /* if the GNU library is not available */
#include <stdlib.h> /* include rand() and srand() */
#define RNG(N) (rand()%(N)) /* and set RNG() to rand() */
@@ -29,95 +35,7 @@
#define RNG(N) (gsl_rng_uniform_int(prng,(N))) /* and set RNG() to it */
#endif /* endif NOGSL */
-char header[512], /* header of output*/
- genoutput[1024], /* generation output */
- footer[512], /* footer of output*/
- curr[1000][80], /* current generation */
- next[1000][80]; /* next generation */
-int fit[1000], /* fitness values */
- popsize = 300,
- chromsize = 16,
- crossrate = 70,
- muterate = 1000,
- fitfunc = 1,
- boostfit = 1,
- rseed = 1,
- gens = 1000,
- sizedispl = 10,
- displfreq = 1,
- outputtype = 0,
- best, /* best of generation */
- worst; /* worst of generation */
-double mean, /* mean fitness for generation */
- std_dev; /* standard deviation of fitnesses */
-
-void setHeader(){
- switch(outputtype){
- default:sprintf(header, "--------------------------------------------------\n");
- sprintf(header, "%spopulation size =%5d chromosome size =%5d\n",
- header, popsize, chromsize);
- sprintf(header, "%scrossover rate =%5d mutation rate =%5d\n",
- header, crossrate, muterate);
- sprintf(header, "%sfitness function =%5d fitness boost =%5d\n",
- header, fitfunc, boostfit);
- sprintf(header ,"%s--------------------------------------------------\n",header);break;
- }
-}
-
-void setGenInfo(int gen)
-{
-
- switch(outputtype)
- {
- default: sprintf(genoutput,"generation=%d best=%d worst=%d mean=%.2f std.dev.=%.2f\n",
- gen, best, worst, mean, std_dev);break;
- }
-
-}
-
-void setSequenceOpen()
-{
- switch(outputtype)
- {
- default:break;//do nothing
- }
-}
-
-void setSequenceChar(char c)
-{
- switch(outputtype)
- {
- default:sprintf(genoutput,"%s%c",genoutput,c);break;
- }
-}
-
-void setSequenceClose()
-{
- switch(outputtype)
- {
- default:sprintf(genoutput,"%s\n",genoutput);break;
- }
-}
-
-void setGenEnd()
-{
- switch(outputtype)
- {
- default: sprintf(genoutput,"%s--------------------------------------------------\n",genoutput);break;
- }
-}
-
-void setFooter(int fconv_gen,int pconv_gen){
-
- switch(outputtype)
- {
- default: sprintf(footer, "fitness converged at generation %d\n", fconv_gen);
- sprintf(footer, "%spopulation converged at generation %d\n", footer, pconv_gen);
- sprintf(footer, "%s--------------------------------------------------\n", footer); break;
- }
-}
-
main(int argc, char *argv[])
{
int i, j, k, gen, choice, count[80],
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ty...@us...> - 2008-02-18 09:47:03
|
Revision: 35
http://sga.svn.sourceforge.net/sga/?rev=35&view=rev
Author: tyront
Date: 2008-02-18 01:46:59 -0800 (Mon, 18 Feb 2008)
Log Message:
-----------
added tom to CREDITS
Modified Paths:
--------------
trunk/CREDITS
Modified: trunk/CREDITS
===================================================================
--- trunk/CREDITS 2008-02-17 20:53:10 UTC (rev 34)
+++ trunk/CREDITS 2008-02-18 09:46:59 UTC (rev 35)
@@ -3,6 +3,7 @@
Lewis Bond
William Ellwood
Matthew Lester
+Thomas Smith
Tim Watson
Colin Wilkinson
David Whiteley
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-02-17 20:53:16
|
Revision: 34
http://sga.svn.sourceforge.net/sga/?rev=34&view=rev
Author: syinet
Date: 2008-02-17 12:53:10 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Website update summary:
- Footer and side bars added as discussed.
- New article added to main page.
- Animated gif added to main page.
- Content added / altered on several pages.
- Mailing list and IRC info added to support page
All links and content need double checking as well as proof reading of content.
Thanks,
Matt
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/styles/screen.css
trunk/web/support.html
trunk/web/support_irc.html
trunk/web/support_runonwin.html
Added Paths:
-----------
trunk/web/images/sga.gif
trunk/web/sitemap.html
Modified: trunk/web/about.html
===================================================================
--- trunk/web/about.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/about.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -26,12 +26,15 @@
<div id="content">
<div class="article">
<h2>About SGA </h2>
- <p> SGA is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. SGA is written in C in is released under the <strong>GNU General Public License (GPL) </strong></p>
- <p> </p>
- <p class="highlight">more info needed, visuals also to help conceptualise GAs</p>
- <p> </p>
+ <p> SGA is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. SGA is written in C in is released under the <strong>GNU General Public License (GPL) 3.0</strong> </p>
+ <h3>What are Gentic Algorithms? </h3>
+ <p>The <a href="http://en.wikipedia.org/wiki/Genetic_algorithm" target="_blank">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" target="_blank">More... </a></p>
+ <h3>The Team </h3>
+ <p>The majority of people working on the sga project are students of <a href="http://www.dmu.ac.uk" target="_blank">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 student 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></div>
</body>
</html>
Modified: trunk/web/bugs.html
===================================================================
--- trunk/web/bugs.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/bugs.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -30,5 +30,6 @@
</div>
</div>
</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
Modified: trunk/web/docs.html
===================================================================
--- trunk/web/docs.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/docs.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -26,12 +26,54 @@
<div id="content">
<div class="article">
<h2>Documentation</h2>
- <p>links to documentation here </p>
- <p> </p>
- <p class="highlight">We need to put this together, A coverall document broken down into sections to accompany the code would be a start.</p>
- <p> </p>
+ <p>This page is simply a web version of the README file found in the repository. </p>
+ <h3>What Is sga?
+ </h3>
+ <p>sga is a program that demonstrates a standard genetic algorithm with some <br />
+ simple fitness functions. Its features include:</p>
+ <p> o Fixed-length binary strings.<br />
+ o Static population size (all generations equal size).<br />
+ o Standard proportionate reproduction.<br />
+ o Optional one-point crossover and/or mutation (bit-flipping).<br />
+ o Choice of fitness function: <br />
+ 1 constant (all fitnesses the same),<br />
+ 2 random (fitness() returns a random value),<br />
+ 3 onemax (maximise the number of ones),<br />
+ 4 diffmax (maximise the difference between number of ones and zeros),<br />
+ 5 integer (fitness equals integer equivalent of bitstring).<br />
+ o Statistics: best, worst, mean, standard deviation per generation.<br />
+ o A one-line summary of the number of ones in each locus is shown below<br />
+ each displayed generation. A '-' means all ones or no ones, and a digit<br />
+ represents the percentage of ones: 0=less than 10%, 1=10%+, 2=20%+ etc.<br /></p>
+ <h3>Command line options</h3>
+ <p>each option takes a non-negative integer as an argument, <br />
+ the default value for each option is shown):<br />
+ -p 300 popsize (must be even, not 0 and not greater than 1000)<br />
+ -c 16 chromsize (length of bitstring, not 0 and not greater than 80)<br />
+ -x 70 crossover probability (0 = no crossover)<br />
+ -m 1000 mutation rate (0 = no mutation, 500 = 1 in 500 bits mutated)<br />
+ -f 1 fitness function (1 = constant, 2 = random, ... , 5 = integer)<br />
+ -b 1 fitness boost (e.g. 2 = double the fitness of each individual)<br />
+ -r 1 random seed (not 0)<br />
+ -g 1000 number of generations (0 = run indefinitely)<br />
+ -s 10 number of individuals to show in one generation (not > popsize)<br />
+ -d 1 frequency of display (not 0, 8 = display every 8th generation)<br />
+ -h displays help and exits<br />
+ -v displays the version and exits<br />
+ </p>
+ <h3> Examples: </h3>
+ <p>sga defaults as above<br />
+ sga -p500 popsize = 500<br />
+ sga -c31 -x0 -m500 chromsize = 31, no crossover, 1 in 500 bits mutated<br />
+ sga -s33 -d2 display 33 individuals from every other generation</p>
+ <h3>Installing, compiling, linking and running sga </h3>
+ <p>Install the source code and makefile in a directory, ensure that you have <br />
+ already installed both the gcc compiler and gsl development libraries,<br />
+ and type 'make'. The program should now run if you type './sga'<br />
+ </p>
</div>
</div>
</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
Modified: trunk/web/download.html
===================================================================
--- trunk/web/download.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/download.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -26,9 +26,16 @@
<div id="content">
<div class="article">
<h2>Download</h2>
- <p>We currently do not have any packages available to download. Although for information on downloading the latest version of the SGA code please visit our <a href="http://sourceforge.net/projects/sga/" target="_blank">sourceforge page</a>.</p>
+ <h3>Latest Version - 0.3</h3>
+ <p>We currently do not have any packages available to download. You'll need to download a working copy to get sga running on your machine. The project's SourceForge.net Subversion repository can be checked out through <a href="http://subversion.tigris.org/">SVN</a> with the following instruction set: <br />
+ </p>
+ <big>
+ <pre>svn co https://sga.svn.sourceforge.net/svnroot/sga sga </pre>
+ </big></p>
+ <p><a href="license.html">Licenced under the GNU Public Licence 3.0.</a></p>
</div>
</div>
</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
Added: trunk/web/images/sga.gif
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/sga.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: trunk/web/index.html
===================================================================
--- trunk/web/index.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/index.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -25,14 +25,18 @@
</div>
<div id="content">
<div class="article">
- <h2>Welcome to SGA </h2>
- <p> SGA is a simple genetic algorithm (GA) program that demonstrates the dynamic behaviour of standard Genetic Algorithms. SGA is written in C in is released under the <strong>GNU General Public License (GPL)</strong></p>
- <p><a href="about.html"> More Info / Screenshots </a> </p>
- <p> </p>
- <p class="highlight">What images? extra content? news items?</p>
- <p> </p>
+ <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 in is released under the <strong>GNU General Public License (GPL)</strong>. To get involed today download it and have a play with sga. 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>
</div>
</div>
</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
Modified: trunk/web/license.html
===================================================================
--- trunk/web/license.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/license.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -707,5 +707,6 @@
</div>
</div>
</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
Modified: trunk/web/roadmap.html
===================================================================
--- trunk/web/roadmap.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/roadmap.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -27,7 +27,6 @@
<div class="article">
<h2>Roadmap</h2>
<p> As the project is still in it's early stages of development there is lots of things to do! A brief outline of what is planned and currently being worked is below.</p>
- <p> </p>
<h3>Core Code </h3>
<ul>
<li> Divide existing code into seperate moduals. Tentitively broken up into input, output, processing and storage.</li>
@@ -37,17 +36,16 @@
<li> Provide a simple GUI which teachs prospective GUI writers how to interface with SGA. </li>
<li>Ability to configure in greater depth then is really simple.</li>
</ul>
- <p> </p>
- <h3> <strong></strong>Documentation</h3>
+ <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>
</ul>
- <p><a href="about.html"></a> </p>
- </div>
+ </div>
</div>
</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
Added: trunk/web/sitemap.html
===================================================================
--- trunk/web/sitemap.html (rev 0)
+++ trunk/web/sitemap.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -0,0 +1,35 @@
+<!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" />
+</head>
+<body>
+<div id="main">
+ <div id="header">
+ <h1>SGA - The Simple Genetic Algorithm</h1>
+ </div>
+ <div id="menu">
+ <ul>
+ <li><a href="./index.html">News</a></li>
+ <li><a href="./about.html">About</a></li>
+ <li><a href="./roadmap.html">Roadmap</a></li>
+ <li><a href="./support.html">Support</a></li>
+ <li><a href="./docs.html">Documentation</a></li>
+ <li><a href="./download.html">Download</a></li>
+ <li><a href="./bugs.html">Bugs</a></li>
+ <li><a href="./license.html">License</a></li>
+ </ul>
+ </div>
+ <div id="content">
+ <div class="article">
+ <h2>Sitemap</h2>
+ <p>coming soon </p>
+ </div>
+ </div>
+</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
+</body>
+</html>
Modified: trunk/web/styles/screen.css
===================================================================
--- trunk/web/styles/screen.css 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/styles/screen.css 2008-02-17 20:53:10 UTC (rev 34)
@@ -26,7 +26,7 @@
h4 {
color : #343434;
font : bold italic 110% sans-serif;
- padding : 1em 1em 0 1em;
+ padding : 1em 1em 1em 1em;
}
html {
@@ -87,12 +87,12 @@
}
p {
- padding : 1em 1em 0 1em;
+ padding : 1em 1em 1em 1em;
}
ul,
ol {
- padding : 1em 1em 0 3em;
+ padding : 1em 1em 1em 3em;
}
#main {
@@ -143,11 +143,19 @@
}
#content {
- border-bottom : 1px solid #cfcfcf;
height : auto !important;
height : 1%;
overflow : hidden;
padding : 2em 0 0 0;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-right-style: solid;
+ border-bottom-style: solid;
+ border-left-style: solid;
+ border-right-color: #cfcfcf;
+ border-bottom-color: #cfcfcf;
+ border-left-color: #cfcfcf;
}
#content div {
padding : 0 4em 2em 4em;
Modified: trunk/web/support.html
===================================================================
--- trunk/web/support.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/support.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -26,31 +26,22 @@
<div id="content">
<div class="article">
<h2>Support</h2>
- <p>Here you can access the various documents we have created to help you with using and understnding the SGA program. </p>
- <p> </p>
- <h3>FAQs</h3>
- <p>If you cannot get an answer to your question please consider posting to our mailing list.</p>
- <p><a href="#">Click here for FAQs</a> </p>
- <p> </p>
- <p class="highlight"> for a start one question could be, what mailing list should i use?</p>
- <p> </p>
- <p> </p>
+ <p>The best place to get support for sga is on our mailing list. We also have an IRC channel for instant contact.</p>
+ <h3>Mailing Lists </h3>
+ <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>
<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>
<ul>
- <li><a href="#">How to get SGA up and running on Linux </a></li>
- <li><a href="support_runonwin.html">How to get SGA up and running on a Windows machine </a></li>
+ <li><a href="support_runonwin.html">How to get SGA up and running on a Windows machine </a>
+ <br />
+ (You will need to compile sga and create an exe file using <a href="http://cygwin.com/" target="_blank">cygwin</a>)</li>
+ <li><a href="support_irc.html">Accessing our IRC channel using LeafChat on Windows</a></li>
</ul>
- <p> </p>
- <h3>Other Tutorials</h3>
- <ul>
- <li><a href="support_irc.html">Accessing our IRC channel using LeafChat on Windows </a></li>
- <li><a href="#">How to accessing the svn server and download a working copy. </a></li>
- </ul>
- <p> </p>
- <p class="highlight">suggestions for other tutorials and guides would be good</p>
- <p> </p>
</div>
</div>
</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
Modified: trunk/web/support_irc.html
===================================================================
--- trunk/web/support_irc.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/support_irc.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -56,5 +56,6 @@
</div>
</div>
</div>
+<div id="footer"><a href="index.html">Home</a> | <a href="sitemap.html">Site Map</a></div>
</body>
</html>
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-17 20:24:56 UTC (rev 33)
+++ trunk/web/support_runonwin.html 2008-02-17 20:53:10 UTC (rev 34)
@@ -103,6 +103,7 @@
</div>
</div>
</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: <tim...@us...> - 2008-02-17 20:25:03
|
Revision: 33
http://sga.svn.sourceforge.net/sga/?rev=33&view=rev
Author: tim-watson
Date: 2008-02-17 12:24:56 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Modified Makefile to ensure that gsga is dependent on sga and that make clean removes gsga.
Modified Paths:
--------------
trunk/code/Makefile
Modified: trunk/code/Makefile
===================================================================
--- trunk/code/Makefile 2008-02-17 20:11:54 UTC (rev 32)
+++ trunk/code/Makefile 2008-02-17 20:24:56 UTC (rev 33)
@@ -20,10 +20,9 @@
displayfile.o: displayfile.c
gcc -c displayfile.c -o displayfile.o
-gsga: gui/gsga.c
- @echo "--- Remember to compile sga to use the GUI ---"
+gsga: sga gui/gsga.c
gcc gui/gsga.c -o gsga $(LIBS)
.PHONY: clean
clean:
- rm -f *.o sga
+ rm -f *.o sga gsga
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ty...@us...> - 2008-02-17 20:11:59
|
Revision: 32
http://sga.svn.sourceforge.net/sga/?rev=32&view=rev
Author: tyront
Date: 2008-02-17 12:11:54 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
added the first attempt of gsga the sga gui
Modified Paths:
--------------
trunk/code/Makefile
Added Paths:
-----------
trunk/code/GSGA
trunk/code/gui/
trunk/code/gui/gsga.c
trunk/code/gui/gsga.h
Added: trunk/code/GSGA
===================================================================
--- trunk/code/GSGA (rev 0)
+++ trunk/code/GSGA 2008-02-17 20:11:54 UTC (rev 32)
@@ -0,0 +1,32 @@
+GSGA - Graphical User Interface for sga -Simple Genetic Algorithm
+
+gsga is a graphicsal user interface (GUI), which is designed to run with the sga program.
+
+BENEFITS OF USING THE GUI
+
+The GUI makes it quicker and easier to run sga, adding a user friendly environment and a simple text box feature to change the following values:
+
+ o Population Size
+ o Chromosome Size
+ o Crossover Probability
+ o Mutation Rate
+ o Fitness Function
+ o Fitness Boost
+ o Number of Generations
+
+WHAT YOU NEED TO RUN THE GUI
+
+ o sga - Simple Genetic Algorithm
+ o GTK+ 2.0 or higher
+
+INSTALLING, COMPILING, LINKING AND RUNNING GUI
+
+To compiler type make gsga using the sga makefile, please make sure sga is
+compilered first before running. The gcc compiler will be required to compile source code.
+Make sure you have the gsl and at least gtk+ 2.0 development libraries
+installed as well.
+
+
+
+
+
Modified: trunk/code/Makefile
===================================================================
--- trunk/code/Makefile 2008-02-17 13:38:28 UTC (rev 31)
+++ trunk/code/Makefile 2008-02-17 20:11:54 UTC (rev 32)
@@ -1,7 +1,10 @@
# make makes sga
# make nogsl makes sga without using gsl
+# make gsga makes gsga
# make clean removes all .o files and sga
+LIBS = `pkg-config --cflags --libs gtk+-2.0`
+
sga: sga.o displayfile.o
gcc sga.o displayfile.o -lgsl -lgslcblas -lm -o sga
@@ -17,6 +20,10 @@
displayfile.o: displayfile.c
gcc -c displayfile.c -o displayfile.o
+gsga: gui/gsga.c
+ @echo "--- Remember to compile sga to use the GUI ---"
+ gcc gui/gsga.c -o gsga $(LIBS)
+
.PHONY: clean
clean:
rm -f *.o sga
Added: trunk/code/gui/gsga.c
===================================================================
--- trunk/code/gui/gsga.c (rev 0)
+++ trunk/code/gui/gsga.c 2008-02-17 20:11:54 UTC (rev 32)
@@ -0,0 +1,301 @@
+#include <gtk/gtk.h>
+#include <unistd.h>
+#include "gsga.h"
+#include <stdio.h>
+#include <stdlib.h>
+
+char input[2000],
+ text_pop[512],
+ text_chrom[512],
+ text_cross[512],
+ text_mute[512],
+ text_fit[512],
+ text_boost[512],
+ text_gen[512];
+
+GtkWidget *window,
+ *main_vbox,
+ *text_view = NULL,
+ *button,
+ *text_entry[7],
+ *label[7],
+ *main_hbox,
+ *main_box,
+ *main_text,
+ *viewport,
+ *scroll_bar,
+ *menubar;
+
+GtkAdjustment *textview_size;
+
+GtkTextBuffer *buffer = NULL;
+pid_t pid;
+
+char *pop = "300",
+ *chrom = "16",
+ *cross = "70",
+ *mute = "1000",
+ *fit = "1",
+ *boost = "1",
+ *gen = "1000";
+
+int i = 0;
+
+const char *SGAPATH = "./sga";
+
+/* A callback function which quits the program when called */
+static void destroy(GtkWidget *widget, gpointer data)
+{
+ gtk_main_quit();
+}
+
+/* Creates items within the top menu bar */
+static GtkWidget *get_menubar_menu(GtkWidget *window)
+{
+ GtkItemFactory *item_factory;
+ GtkAccelGroup *accel_group;
+ accel_group = gtk_accel_group_new ();
+ item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "<main>",
+ accel_group);
+
+ gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL);
+ gtk_window_add_accel_group (GTK_WINDOW (window), accel_group);
+
+ return gtk_item_factory_get_widget (item_factory, "<main>");
+}
+
+/*
+ Creates a container for the vertical box
+ and adds it to the main window.
+*/
+void make_vbox(GtkWidget* main_vbox, GtkWidget* window)
+{
+ gtk_container_set_border_width (GTK_CONTAINER (main_vbox), 0.1);
+ gtk_container_add (GTK_CONTAINER (window), main_vbox);
+}
+
+/*
+ Adds all the labels and text boxes into a horizontal box,
+ sets the text boxes to a width of 5 and gives them default values.
+*/
+static GtkWidget *make_box(gboolean homogeneous, gint spacing,
+ gboolean expand, gboolean fill,
+ guint padding)
+{
+ main_hbox = gtk_hbox_new(homogeneous, spacing);
+
+ int text_width = 5;
+
+ char *txtBuffer = "Population: ";
+ label[0] = gtk_label_new (txtBuffer);
+ gtk_misc_set_alignment (GTK_MISC (label[0]), 0, 0);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), label[0], expand, fill, padding);
+
+ text_entry[0] = gtk_entry_new();
+ gtk_entry_set_width_chars(GTK_ENTRY(text_entry[0]), text_width);
+ gtk_editable_set_editable(GTK_EDITABLE(text_entry[0]), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(text_entry[0]), pop);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), text_entry[0], expand, fill, padding);
+
+ char *txtBuffer1 = "Chromosome: ";
+ label[1] = gtk_label_new (txtBuffer1);
+ gtk_misc_set_alignment (GTK_MISC (label[1]), 0, 0);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), label[1], expand, fill, padding);
+
+ text_entry[1] = gtk_entry_new();
+ gtk_entry_set_width_chars(GTK_ENTRY(text_entry[1]), text_width);
+ gtk_editable_set_editable(GTK_EDITABLE(text_entry[1]), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(text_entry[1]), chrom);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), text_entry[1], expand, fill, padding);
+
+ char *txtBuffer2 = "Crossover Rate: ";
+ label[2] = gtk_label_new (txtBuffer2);
+ gtk_misc_set_alignment (GTK_MISC (label[2]), 0, 0);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), label[2], expand, fill, padding);
+
+ text_entry[2] = gtk_entry_new();
+ gtk_entry_set_width_chars(GTK_ENTRY(text_entry[2]), text_width);
+ gtk_editable_set_editable(GTK_EDITABLE(text_entry[2]), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(text_entry[2]), cross);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), text_entry[2], expand, fill, padding);
+
+ char *txtBuffer3 = "Mutation Rate: ";
+ label[3] = gtk_label_new (txtBuffer3);
+ gtk_misc_set_alignment (GTK_MISC (label[3]), 0, 0);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), label[3], expand, fill, padding);
+
+ text_entry[3] = gtk_entry_new();
+ gtk_entry_set_width_chars(GTK_ENTRY(text_entry[3]), text_width);
+ gtk_editable_set_editable(GTK_EDITABLE(text_entry[3]), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(text_entry[3]), mute);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), text_entry[3], expand, fill, padding);
+
+ char *txtBuffer4 = "Fitness Function: ";
+ label[4] = gtk_label_new (txtBuffer4);
+ gtk_misc_set_alignment (GTK_MISC (label[4]), 0, 0);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), label[4], expand, fill, padding);
+
+ text_entry[4] = gtk_entry_new();
+ gtk_entry_set_width_chars(GTK_ENTRY(text_entry[4]), text_width);
+ gtk_editable_set_editable(GTK_EDITABLE(text_entry[4]), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(text_entry[4]), fit);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), text_entry[4], expand, fill, padding);
+
+ char *txtBuffer5 = "Fitness Boost: ";
+ label[5] = gtk_label_new (txtBuffer5);
+ gtk_misc_set_alignment (GTK_MISC (label[5]), 0, 0);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), label[5], expand, fill, padding);
+
+ text_entry[5] = gtk_entry_new();
+ gtk_entry_set_width_chars(GTK_ENTRY(text_entry[5]), text_width);
+ gtk_editable_set_editable(GTK_EDITABLE(text_entry[5]), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(text_entry[5]), boost);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), text_entry[5], expand, fill, padding);
+
+ char *txtBuffer6 = "Generation: ";
+ label[6] = gtk_label_new (txtBuffer6);
+ gtk_misc_set_alignment (GTK_MISC (label[6]), 0, 0);
+
+ gtk_box_pack_start (GTK_BOX (main_hbox), label[6], expand, fill, padding);
+
+ text_entry[6] = gtk_entry_new();
+ gtk_entry_set_width_chars(GTK_ENTRY(text_entry[6]), text_width);
+ gtk_editable_set_editable(GTK_EDITABLE(text_entry[6]), TRUE);
+ gtk_entry_set_text(GTK_ENTRY(text_entry[6]), gen);
+
+ gtk_box_pack_start(GTK_BOX(main_hbox), text_entry[6], expand, fill, padding);
+
+ return main_hbox;
+}
+
+/* Callback function for the update button. */
+void on_button_clicked(GtkWidget *button)
+{
+ GtkTextIter start;
+ GtkTextIter end;
+
+ /* Obtain iters for the start and end of points of the buffer. */
+ gtk_text_buffer_get_start_iter (buffer, &start);
+ gtk_text_buffer_get_end_iter (buffer, &end);
+
+ /* Deletes entire contents between the start and end of the buffer. */
+ gtk_text_buffer_delete(buffer, &start, &end);
+
+ print_data();
+}
+
+/*
+ Captures the output from the sga program and prints to the main text field.
+ Array parmList is created to store the commands for the program and apply
+ them when called upon.
+*/
+void print_data()
+{
+ int outfd[2];
+ int infd[2];
+
+ int oldstdin, oldstdout;
+
+ sprintf(text_pop, "%s", gtk_entry_get_text(GTK_ENTRY(text_entry[0])));
+ sprintf(text_chrom, "%s", gtk_entry_get_text(GTK_ENTRY(text_entry[1])));
+ sprintf(text_cross, "%s", gtk_entry_get_text (GTK_ENTRY(text_entry[2])));
+ sprintf(text_mute, "%s", gtk_entry_get_text (GTK_ENTRY(text_entry[3])));
+ sprintf(text_fit, "%s", gtk_entry_get_text (GTK_ENTRY(text_entry[4])));
+ sprintf(text_boost, "%s", gtk_entry_get_text (GTK_ENTRY(text_entry[5])));
+ sprintf(text_gen, "%s", gtk_entry_get_text (GTK_ENTRY(text_entry[6])));
+
+ char *const parmList[] = {"SGAPATH", "-p", text_pop, "-c", text_chrom, "-x", text_cross, "-m", text_mute, "-f", text_fit, "-b", text_boost, "-g", text_gen, NULL};
+
+ pipe(outfd);
+ pipe(infd);
+
+ oldstdin = dup(0);
+ oldstdout = dup(1);
+
+ close(0);
+ close(1);
+
+ dup2(outfd[0], 0);
+ dup2(infd[1],1);
+
+ if (!fork()) {
+ close(outfd[0]);
+ close(outfd[1]);
+ close(infd[0]);
+ close(infd[1]);
+ execv(SGAPATH,parmList);
+ }
+ else {
+ close(0);
+ close(1);
+ dup2(oldstdin, 0);
+ dup2(oldstdout, 1);
+ close(outfd[0]);
+ close(infd[1]);
+ write(outfd[1],"2^32\n",5);
+
+ for (i = 0; i < 290; i++) {
+ input[read(infd[0], input, 2000)] = 0;
+ gtk_text_buffer_insert_at_cursor (buffer, input, -1);
+ }
+ }
+}
+
+/*
+ Creates the main window of the GUI, and places the boxes into the relevant order.
+ Creates the update button and its handler so the relevant callback function
+ (on_button_clicked) is called when clicked.
+*/
+int main(int argc, char *argv[])
+{
+ gtk_init(&argc, &argv);
+ 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,800);
+
+ main_vbox = gtk_vbox_new(FALSE, 1);
+ make_vbox(main_vbox, window);
+ main_box = make_box(0, 0, 0, 0, 0);
+ menubar = get_menubar_menu(window);
+
+ main_text = gtk_hbox_new(FALSE, 0);
+
+ text_view = gtk_text_view_new();
+ buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW (text_view));
+ gtk_text_view_set_editable(GTK_TEXT_VIEW(text_view), FALSE);
+ gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(text_view), FALSE);
+
+ scroll_bar = gtk_scrolled_window_new (NULL, NULL);
+
+ gtk_container_add(GTK_CONTAINER(main_text), scroll_bar);
+ gtk_container_add(GTK_CONTAINER(scroll_bar), text_view);
+
+ button = gtk_button_new_with_label("UPDATE");
+ g_signal_connect(G_OBJECT (button), "clicked",
+ G_CALLBACK (on_button_clicked),
+ NULL);
+
+ gtk_box_pack_start(GTK_BOX(main_vbox), menubar, FALSE, TRUE, 0);
+ gtk_box_pack_start(GTK_BOX(main_vbox), main_box, 0, 0, 0);
+ gtk_box_pack_start(GTK_BOX(main_vbox), main_text, 1, 1, 0);
+ gtk_box_pack_start(GTK_BOX(main_vbox), button, 0, 0, 0);
+
+ gtk_widget_show_all(window);
+
+ gtk_main();
+
+ return 0;
+}
Added: trunk/code/gui/gsga.h
===================================================================
--- trunk/code/gui/gsga.h (rev 0)
+++ trunk/code/gui/gsga.h 2008-02-17 20:11:54 UTC (rev 32)
@@ -0,0 +1,17 @@
+static void destroy( GtkWidget *widget, gpointer data);
+void make_vbox(GtkWidget* main_vbox, GtkWidget* window);
+static GtkWidget *make_box(gboolean homogeneous, gint spacing, gboolean expand, gboolean fill, guint padding);
+void on_button_clicked(GtkWidget *button);
+void text_box(GtkWidget *text);
+void print_data();
+
+static GtkItemFactoryEntry menu_items[] = {
+ { "/_File", NULL, NULL, 0, "<Branch>"},
+ { "/File/Exit", "<CTRL>Q", gtk_main_quit, 1, "<StockItem>", GTK_STOCK_QUIT },
+};
+
+static gint nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]);
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ty...@us...> - 2008-02-17 13:38:34
|
Revision: 31
http://sga.svn.sourceforge.net/sga/?rev=31&view=rev
Author: tyront
Date: 2008-02-17 05:38:28 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
added sga.php and sga.html to allow input and to display xml output on the web first attempt
Added Paths:
-----------
branches/xml-output/web/sga.html
branches/xml-output/web/sga.php
Added: branches/xml-output/web/sga.html
===================================================================
--- branches/xml-output/web/sga.html (rev 0)
+++ branches/xml-output/web/sga.html 2008-02-17 13:38:28 UTC (rev 31)
@@ -0,0 +1,20 @@
+<!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>XML Test</title>
+<meta name="description" content="" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
+</head>
+<body>
+ <form action="sga.php" method="get">
+ <label for="sga[g]">Generation:</label>
+ <input type="text" name="sga[g]" size="20"/>
+ <br />
+ <label for="sga[f]">Fitness Function:</label>
+ <input type="text" name="sga[f]" size="20"/>
+ <br />
+ <input type="hidden" name="sga[t]" value="2" />
+ <input type="submit" value="Submit" />
+ </form>
+</body>
+</html>
Added: branches/xml-output/web/sga.php
===================================================================
--- branches/xml-output/web/sga.php (rev 0)
+++ branches/xml-output/web/sga.php 2008-02-17 13:38:28 UTC (rev 31)
@@ -0,0 +1,60 @@
+<?php
+
+ //set the page to a xml content type
+ header ("content-type: text/xml");
+
+ /*
+ sga take in a GET or POST array called 'sga'. It will then run sga with that input and return xml
+ */
+
+ //declare varibles
+
+ $SGAPATH = "../code/sga"; //were ever the sga command is compiled
+ $MAXGEN = 100; //max number of generations will return error if over this is specifed
+ $sgainput = "";
+
+
+ function outputError($error){
+ echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n" .
+ " <sgaresult>\n" .
+ " <error>$error</error>\n" .
+ " </sgaresult>\n";
+
+ exit(1); // kills the program
+ }
+
+
+ //check for input
+ if (isset($_POST['sga'])){
+ $sgainput = $_POST['sga'];
+ }
+ elseif (isset($_GET['sga'])){
+ $sgainput = $_GET['sga'];
+ }
+ else {
+ outputError("error input is not found");
+ }
+
+ //check to see if input is of type array
+ if (!is_array($sgainput)){
+ outputError("error input is not array");
+ }
+
+ //build command
+ $sgacommand = "$SGAPATH ";
+
+ foreach ($sgainput as $key => $value){
+ switch($key){
+ case "h": outputError("Using h will not produce xml");
+ case "v": outputError("Using v will not produce xml");
+ case "g": if ($value > $MAXGEN) outputError("Not letting the program show more than 100 generations");
+ }
+
+ $sgacommand .= "-$key $value ";
+ }
+
+ //execute commnd
+ exec($sgacommand,$sgaoutput);
+ echo implode("\n",$sgaoutput);
+
+?>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sy...@us...> - 2008-02-17 13:04:38
|
Revision: 30
http://sga.svn.sourceforge.net/sga/?rev=30&view=rev
Author: syinet
Date: 2008-02-17 05:04:32 -0800 (Sun, 17 Feb 2008)
Log Message:
-----------
Removed duplicate image files
Removed Paths:
-------------
trunk/web/images/cmdwindow.JPG
trunk/web/images/runbox.JPG
trunk/web/images/sgaoutput.JPG
Deleted: trunk/web/images/cmdwindow.JPG
===================================================================
(Binary files differ)
Deleted: trunk/web/images/runbox.JPG
===================================================================
(Binary files differ)
Deleted: trunk/web/images/sgaoutput.JPG
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-16 20:52:12
|
Revision: 29
http://sga.svn.sourceforge.net/sga/?rev=29&view=rev
Author: skywalker85
Date: 2008-02-16 12:52:10 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
fixed some corruption in win tut to sga commands
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-16 20:33:58 UTC (rev 28)
+++ trunk/web/support_runonwin.html 2008-02-16 20:52:10 UTC (rev 29)
@@ -25,7 +25,7 @@
<h3> </h3>
<h3>Assumptions</h3>
<p>OK, firstly we have made some assumptions, these being:</p>
- <ul><li>You are running Windows XP and above</li>
+ <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>
@@ -46,13 +46,13 @@
<p> C:\sga</p>
</blockquote>
</li>
- <li> Now the fun can really start! For your first ???experiment??? if you like, type in the following sga -f3 | more and press ENTER
+ <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>a) The first part shows the parameter settings that were used.</p>
<p>b) The second part is the settings for each generation separated by dashed lines.</p>
- <p>c) Underneath the dashed lines are the first 10 generations of each population, unless the ???s command has been used to change the number displayed. </p>
- <p>d) Just above the dashed line for the next generation is a string of digits and/or dashes that represent the percentage of ones in each column: a - means no one???s or all ones (i.e. convergence), a 0 means less than 10% ones, a 1 means 10% or more but less than 20%, and so on..</p>
+ <p>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>
</ol>
@@ -82,11 +82,25 @@
<p>-d 1 frequency of display (not 0, 8 = display every 8th generation) </p>
<br>
<h3>Examples</h3>
- <p>sga uses defaults as above </p>
- <p>sga -p 500 sets the population size to 500 </p>
- <p>sga -c 25 x2 m800 chromsize = 25, crossover = 25, 1 in 800 bits mutated </p>
- <p>sga -s 33 d2 display 33 individuals from every population </p>
- </div>
+ <table width="561" border="0">
+ <tr>
+ <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>
+ </tr>
+ <tr>
+ <td>sga -c25 -x2 -m800</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>
+ </tr>
+ </table>
+</div>
</div>
</div>
</body>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-16 20:34:00
|
Revision: 28
http://sga.svn.sourceforge.net/sga/?rev=28&view=rev
Author: skywalker85
Date: 2008-02-16 12:33:58 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
tweaked image size on win tut and made Tims changes
Modified Paths:
--------------
trunk/web/support_runonwin.html
Modified: trunk/web/support_runonwin.html
===================================================================
--- trunk/web/support_runonwin.html 2008-02-16 20:30:39 UTC (rev 27)
+++ trunk/web/support_runonwin.html 2008-02-16 20:33:58 UTC (rev 28)
@@ -47,7 +47,7 @@
</blockquote>
</li>
<li> Now the fun can really start! For your first ???experiment??? if you like, type in the following sga -f3 | more and press ENTER
- <p><img src="images/sgaoutput.jpg" alt="cmd window" width="393" height="213"/></p>
+ <p><img src="images/sgaoutput.jpg" alt="cmd window" width="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>a) The first part shows the parameter settings that were used.</p>
<p>b) The second part is the settings for each generation separated by dashed lines.</p>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <sky...@us...> - 2008-02-16 20:30:41
|
Revision: 27
http://sga.svn.sourceforge.net/sga/?rev=27&view=rev
Author: skywalker85
Date: 2008-02-16 12:30:39 -0800 (Sat, 16 Feb 2008)
Log Message:
-----------
renamed images for win tutorial
Added Paths:
-----------
trunk/web/images/cmdwindow.jpg
trunk/web/images/runbox.jpg
trunk/web/images/sgaoutput.jpg
Added: trunk/web/images/cmdwindow.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/cmdwindow.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/images/runbox.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/runbox.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
Added: trunk/web/images/sgaoutput.jpg
===================================================================
(Binary files differ)
Property changes on: trunk/web/images/sgaoutput.jpg
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|