<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://airwiki.deib.polimi.it/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LuigiMalago</id>
		<title>AIRWiki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://airwiki.deib.polimi.it/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=LuigiMalago"/>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php/Special:Contributions/LuigiMalago"/>
		<updated>2026-04-10T09:11:04Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.25.6</generator>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14519</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14519"/>
				<updated>2012-03-01T15:56:32Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
*Servizio mappa IP&amp;lt;-&amp;gt;posizione geografica&lt;br /&gt;
http://www.maxmind.com/app/faq#ispvsorg&lt;br /&gt;
&lt;br /&gt;
*Analisi pacchetti HTTP&lt;br /&gt;
http://www.youtube.com/watch?v=RLh09OKyTgQ&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Come installare pacchetti in Ubuntu&lt;br /&gt;
http://dottorblaster.it/guida-veloce-ad-apt-get/&lt;br /&gt;
&lt;br /&gt;
*Repositories&lt;br /&gt;
http://saatulihsan.blogspot.com/2011/07/ubuntu-1110-repository.html&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server SSH su ubuntu&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/openssh-server.html&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;br /&gt;
&lt;br /&gt;
*Configurare FlatPress&lt;br /&gt;
http://flatpress.org/home/&lt;br /&gt;
&lt;br /&gt;
*Configurare server mail&lt;br /&gt;
http://www.sefi.it/linux/mail-server-ubuntu-postfix-dovecot-mailscanner-parte-1&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14462</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14462"/>
				<updated>2012-02-16T15:00:11Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
*Servizio mappa IP&amp;lt;-&amp;gt;posizione geografica&lt;br /&gt;
http://www.maxmind.com/app/faq#ispvsorg&lt;br /&gt;
&lt;br /&gt;
*Analisi pacchetti HTTP&lt;br /&gt;
http://www.youtube.com/watch?v=RLh09OKyTgQ&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Come installare pacchetti in Ubuntu&lt;br /&gt;
http://dottorblaster.it/guida-veloce-ad-apt-get/&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server SSH su ubuntu&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/openssh-server.html&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;br /&gt;
&lt;br /&gt;
*Configurare FlatPress&lt;br /&gt;
http://flatpress.org/home/&lt;br /&gt;
&lt;br /&gt;
*Configurare server mail&lt;br /&gt;
http://www.sefi.it/linux/mail-server-ubuntu-postfix-dovecot-mailscanner-parte-1&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14461</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14461"/>
				<updated>2012-02-16T14:56:20Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
*Servizio mappa IP&amp;lt;-&amp;gt;posizione geografica&lt;br /&gt;
http://www.maxmind.com/app/faq#ispvsorg&lt;br /&gt;
&lt;br /&gt;
*Analisi pacchetti HTTP&lt;br /&gt;
http://www.youtube.com/watch?v=RLh09OKyTgQ&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server SSH su ubuntu&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/openssh-server.html&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;br /&gt;
&lt;br /&gt;
*Configurare FlatPress&lt;br /&gt;
http://flatpress.org/home/&lt;br /&gt;
&lt;br /&gt;
*Configurare server mail&lt;br /&gt;
http://www.sefi.it/linux/mail-server-ubuntu-postfix-dovecot-mailscanner-parte-1&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14460</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14460"/>
				<updated>2012-02-16T14:48:44Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
*Servizio mappa IP&amp;lt;-&amp;gt;posizione geografica&lt;br /&gt;
http://www.maxmind.com/app/faq#ispvsorg&lt;br /&gt;
&lt;br /&gt;
*Analisi pacchetti HTTP&lt;br /&gt;
http://www.youtube.com/watch?v=RLh09OKyTgQ&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server SSH su ubuntu&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/openssh-server.html&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;br /&gt;
&lt;br /&gt;
*Configurare FlatPress&lt;br /&gt;
http://flatpress.org/home/&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14459</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14459"/>
				<updated>2012-02-16T14:42:58Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
*Servizio mappa IP&amp;lt;-&amp;gt;posizione geografica&lt;br /&gt;
http://www.maxmind.com/app/faq#ispvsorg&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server SSH su ubuntu&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/openssh-server.html&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;br /&gt;
&lt;br /&gt;
*Configurare FlatPress&lt;br /&gt;
http://flatpress.org/home/&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14458</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14458"/>
				<updated>2012-02-16T14:36:26Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
*Servizio mappa IP&amp;lt;-&amp;gt;posizione geografica&lt;br /&gt;
http://www.maxmind.com/app/faq#ispvsorg&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server SSH su ubuntu&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/openssh-server.html&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14457</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14457"/>
				<updated>2012-02-16T14:36:02Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
*Servizio mappa IP&amp;lt;-&amp;gt;posizione geografica&lt;br /&gt;
http://www.maxmind.com/app/faq#ispvsorg&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server SSH&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/openssh-server.html&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14456</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14456"/>
				<updated>2012-02-16T14:34:18Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
*Servizio mappa IP&amp;lt;-&amp;gt;posizione geografica&lt;br /&gt;
http://www.maxmind.com/app/faq#ispvsorg&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14455</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14455"/>
				<updated>2012-02-16T14:25:17Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
*Intestatario di un dominio&lt;br /&gt;
http://www.nic.it/web-whois/index.jsf&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14454</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14454"/>
				<updated>2012-02-16T14:21:03Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visualizzare il proprio IP nella rete&lt;br /&gt;
http://whatismyipaddress.com/&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14453</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14453"/>
				<updated>2012-02-16T14:18:07Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Visual traceroute &lt;br /&gt;
http://www.dnsqueries.com/it/effettuare_traceroute_tracert.php&lt;br /&gt;
&lt;br /&gt;
'''Linux'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14452</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14452"/>
				<updated>2012-02-16T14:15:15Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Ubuntu&lt;br /&gt;
http://www.ubuntu.com/download/ubuntu/download&lt;br /&gt;
&lt;br /&gt;
*Shell dei comandi di linux &lt;br /&gt;
http://linux.collectiontricks.it/wiki/Guida_ai_comandi_base_della_shell_in_GNU/Linux&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti in linux&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14451</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14451"/>
				<updated>2012-02-16T14:12:26Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Slide dell'ing. Cesana'''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'''Link utili'''&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14450</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14450"/>
				<updated>2012-02-16T14:12:05Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''''Slide dell'ing. Cesana''''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
''''Link utili''''&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14449</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14449"/>
				<updated>2012-02-16T14:11:23Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''Slide dell'ing. Cesana''&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
''Link utili''&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14448</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14448"/>
				<updated>2012-02-16T14:11:07Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'Slide dell'ing. Cesana'&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
'Link utili'&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14447</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14447"/>
				<updated>2012-02-16T14:10:42Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;**Slide dell'ing. Cesana&lt;br /&gt;
&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
**Link utili&lt;br /&gt;
&lt;br /&gt;
*Creazione utenti&lt;br /&gt;
&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
*Configurazione server apache2 per ubuntu&lt;br /&gt;
&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
*Configurare server FTP&lt;br /&gt;
&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14446</id>
		<title>CorsoReti</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=CorsoReti&amp;diff=14446"/>
				<updated>2012-02-16T14:08:31Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: Created page with &amp;quot;Slide dell'ing. Cesana http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191  Creazione utenti http://www.luca-canducci.com/2009/03/gestione-de...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Slide dell'ing. Cesana&lt;br /&gt;
http://antlab.elet.polimi.it/index.php?option=com_content&amp;amp;task=view&amp;amp;id=182&amp;amp;Itemid=191&lt;br /&gt;
&lt;br /&gt;
Creazione utenti&lt;br /&gt;
http://www.luca-canducci.com/2009/03/gestione-degli-utenti-in-ambiente-linux-via-shell-parte-1/&lt;br /&gt;
&lt;br /&gt;
Configurazione server apache2 per ubuntu&lt;br /&gt;
http://help.ubuntu-it.org/6.06/ubuntu/serverguide/it/httpd.html&lt;br /&gt;
&lt;br /&gt;
Configurare server FTP&lt;br /&gt;
http://www.linuxfactory.it/configurazione_server_ftp.htm&lt;br /&gt;
(&amp;quot;apt-get install proftpd&amp;quot; e poi &lt;br /&gt;
dalla sezione Configurazione del server FTP)&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14364</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14364"/>
				<updated>2012-01-09T14:38:15Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Benchmark functions implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[http://iridia.ulb.ac.be/~gvalentini/ Gabriele Valentini] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* Genetic Algorithms&lt;br /&gt;
** SGA&lt;br /&gt;
*Estimation of Distribution Algorithms&lt;br /&gt;
**PBIL, UMDA, cGA, COMIT, BOA, FCA&lt;br /&gt;
* DEUM framework&lt;br /&gt;
**DEUMd, IsingDEUM, DEUM-Chain, DEUM-LDA, DEUM-CE, DEUM-X2, DEUM-JEMP, DEUM-l1, sDEUM&lt;br /&gt;
* Stochastic Gradient Descent&lt;br /&gt;
**SGD, SNGD&lt;br /&gt;
* Other Meta-heuristics&lt;br /&gt;
**Simulated Annealing&lt;br /&gt;
&lt;br /&gt;
References to original papers will be added soon.&lt;br /&gt;
&lt;br /&gt;
====Benchmark functions implemented====&lt;br /&gt;
* OneMax&lt;br /&gt;
* AltBit&lt;br /&gt;
* Trap3&lt;br /&gt;
* Trap5&lt;br /&gt;
* IsingSpinGlass2D (*)&lt;br /&gt;
* IsingSpinGlass3D (*)&lt;br /&gt;
* Max Cut&lt;br /&gt;
&lt;br /&gt;
(*) instances generated and solved with Spin Glass Server. This service is provided by COPhy and M. Jünger's group.&lt;br /&gt;
http://www.informatik.uni-koeln.de/spinglass/&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** ''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
**  ''R (lars package)''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available statistics  ====&lt;br /&gt;
&lt;br /&gt;
In the configuration xml file you can enable the evaluation of three set of statistics:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;statisticsConfiguration&amp;gt;&lt;br /&gt;
    &amp;lt;evalPopulationStatistics&amp;gt;yes&amp;lt;/evalPopulationStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalModelStatistics&amp;gt;yes&amp;lt;/evalModelStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalExecutionStatistics&amp;gt;No&amp;lt;/evalExecutionStatistics&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/statisticsConfiguration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the headers file in evoptool/common/src for details.&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14363</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14363"/>
				<updated>2012-01-09T14:38:03Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Benchmark functions implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[http://iridia.ulb.ac.be/~gvalentini/ Gabriele Valentini] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* Genetic Algorithms&lt;br /&gt;
** SGA&lt;br /&gt;
*Estimation of Distribution Algorithms&lt;br /&gt;
**PBIL, UMDA, cGA, COMIT, BOA, FCA&lt;br /&gt;
* DEUM framework&lt;br /&gt;
**DEUMd, IsingDEUM, DEUM-Chain, DEUM-LDA, DEUM-CE, DEUM-X2, DEUM-JEMP, DEUM-l1, sDEUM&lt;br /&gt;
* Stochastic Gradient Descent&lt;br /&gt;
**SGD, SNGD&lt;br /&gt;
* Other Meta-heuristics&lt;br /&gt;
**Simulated Annealing&lt;br /&gt;
&lt;br /&gt;
References to original papers will be added soon.&lt;br /&gt;
&lt;br /&gt;
====Benchmark functions implemented====&lt;br /&gt;
* OneMax&lt;br /&gt;
* AltBit&lt;br /&gt;
* Trap3&lt;br /&gt;
* Trap5&lt;br /&gt;
* IsingSpinGlass2D (*)&lt;br /&gt;
* IsingSpinGlass3D (*)&lt;br /&gt;
* Max Cut&lt;br /&gt;
&lt;br /&gt;
* instances generated and solved with Spin Glass Server. This service is provided by COPhy and M. Jünger's group.&lt;br /&gt;
http://www.informatik.uni-koeln.de/spinglass/&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** ''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
**  ''R (lars package)''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available statistics  ====&lt;br /&gt;
&lt;br /&gt;
In the configuration xml file you can enable the evaluation of three set of statistics:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;statisticsConfiguration&amp;gt;&lt;br /&gt;
    &amp;lt;evalPopulationStatistics&amp;gt;yes&amp;lt;/evalPopulationStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalModelStatistics&amp;gt;yes&amp;lt;/evalModelStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalExecutionStatistics&amp;gt;No&amp;lt;/evalExecutionStatistics&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/statisticsConfiguration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the headers file in evoptool/common/src for details.&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14362</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14362"/>
				<updated>2012-01-09T14:36:16Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Benchmark functions implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[http://iridia.ulb.ac.be/~gvalentini/ Gabriele Valentini] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* Genetic Algorithms&lt;br /&gt;
** SGA&lt;br /&gt;
*Estimation of Distribution Algorithms&lt;br /&gt;
**PBIL, UMDA, cGA, COMIT, BOA, FCA&lt;br /&gt;
* DEUM framework&lt;br /&gt;
**DEUMd, IsingDEUM, DEUM-Chain, DEUM-LDA, DEUM-CE, DEUM-X2, DEUM-JEMP, DEUM-l1, sDEUM&lt;br /&gt;
* Stochastic Gradient Descent&lt;br /&gt;
**SGD, SNGD&lt;br /&gt;
* Other Meta-heuristics&lt;br /&gt;
**Simulated Annealing&lt;br /&gt;
&lt;br /&gt;
References to original papers will be added soon.&lt;br /&gt;
&lt;br /&gt;
====Benchmark functions implemented====&lt;br /&gt;
* OneMax&lt;br /&gt;
* AltBit&lt;br /&gt;
* Trap3&lt;br /&gt;
* Trap5&lt;br /&gt;
* IsingSpinGlass2D*&lt;br /&gt;
* IsingSpinGlass3D*&lt;br /&gt;
* Max Cut&lt;br /&gt;
&lt;br /&gt;
* instances generated and solved with Spin Glass Server (This service is provided by COPhy and M. Jünger's group.)&lt;br /&gt;
http://www.informatik.uni-koeln.de/spinglass/&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** ''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
**  ''R (lars package)''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available statistics  ====&lt;br /&gt;
&lt;br /&gt;
In the configuration xml file you can enable the evaluation of three set of statistics:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;statisticsConfiguration&amp;gt;&lt;br /&gt;
    &amp;lt;evalPopulationStatistics&amp;gt;yes&amp;lt;/evalPopulationStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalModelStatistics&amp;gt;yes&amp;lt;/evalModelStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalExecutionStatistics&amp;gt;No&amp;lt;/evalExecutionStatistics&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/statisticsConfiguration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the headers file in evoptool/common/src for details.&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14361</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14361"/>
				<updated>2012-01-09T14:35:58Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Benchmark functions implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[http://iridia.ulb.ac.be/~gvalentini/ Gabriele Valentini] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* Genetic Algorithms&lt;br /&gt;
** SGA&lt;br /&gt;
*Estimation of Distribution Algorithms&lt;br /&gt;
**PBIL, UMDA, cGA, COMIT, BOA, FCA&lt;br /&gt;
* DEUM framework&lt;br /&gt;
**DEUMd, IsingDEUM, DEUM-Chain, DEUM-LDA, DEUM-CE, DEUM-X2, DEUM-JEMP, DEUM-l1, sDEUM&lt;br /&gt;
* Stochastic Gradient Descent&lt;br /&gt;
**SGD, SNGD&lt;br /&gt;
* Other Meta-heuristics&lt;br /&gt;
**Simulated Annealing&lt;br /&gt;
&lt;br /&gt;
References to original papers will be added soon.&lt;br /&gt;
&lt;br /&gt;
====Benchmark functions implemented====&lt;br /&gt;
* OneMax&lt;br /&gt;
* AltBit&lt;br /&gt;
* Trap3&lt;br /&gt;
* Trap5&lt;br /&gt;
* IsingSpinGlass2D\*&lt;br /&gt;
* IsingSpinGlass3D\*&lt;br /&gt;
* Max Cut&lt;br /&gt;
&lt;br /&gt;
\* instances solved with Spin Glass Server (This service is provided by COPhy and M. Jünger's group.)&lt;br /&gt;
http://www.informatik.uni-koeln.de/spinglass/&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** ''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
**  ''R (lars package)''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available statistics  ====&lt;br /&gt;
&lt;br /&gt;
In the configuration xml file you can enable the evaluation of three set of statistics:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;statisticsConfiguration&amp;gt;&lt;br /&gt;
    &amp;lt;evalPopulationStatistics&amp;gt;yes&amp;lt;/evalPopulationStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalModelStatistics&amp;gt;yes&amp;lt;/evalModelStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalExecutionStatistics&amp;gt;No&amp;lt;/evalExecutionStatistics&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/statisticsConfiguration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the headers file in evoptool/common/src for details.&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool&amp;diff=14206</id>
		<title>Evoptool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool&amp;diff=14206"/>
				<updated>2011-10-27T21:35:59Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: Redirected page to Evoptool: Evolutionary Optimization Tool&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Evoptool:_Evolutionary_Optimization_Tool]]&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool&amp;diff=14205</id>
		<title>Evoptool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool&amp;diff=14205"/>
				<updated>2011-10-27T21:34:27Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: Redirected page to Http://airwiki.ws.dei.polimi.it/index.php/Evoptool: Evolutionary Optimization Tool&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[http://airwiki.ws.dei.polimi.it/index.php/Evoptool:_Evolutionary_Optimization_Tool]]&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14195</id>
		<title>Evoptool Experiments</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14195"/>
				<updated>2011-10-24T22:33:16Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|function&lt;br /&gt;
|instance, run&lt;br /&gt;
|size&lt;br /&gt;
|algorithm+param&lt;br /&gt;
|optimum found&lt;br /&gt;
|author&lt;br /&gt;
|when&lt;br /&gt;
|rev evoptool&lt;br /&gt;
|location&lt;br /&gt;
|description&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|30 runs&lt;br /&gt;
|25&lt;br /&gt;
|SNGD, step=4, p=100&lt;br /&gt;
|100%&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|30 runs&lt;br /&gt;
|64&lt;br /&gt;
|SNGD, step=4, p=500&lt;br /&gt;
|100%&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|30 runs&lt;br /&gt;
|100&lt;br /&gt;
|SNGD, step=4, p=1000&lt;br /&gt;
|100%&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14194</id>
		<title>Evoptool Experiments</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14194"/>
				<updated>2011-10-24T22:31:23Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;5&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|function&lt;br /&gt;
|instance, run&lt;br /&gt;
|size&lt;br /&gt;
|algorithm+param&lt;br /&gt;
|optimum found&lt;br /&gt;
|author&lt;br /&gt;
|when&lt;br /&gt;
|rev evoptool&lt;br /&gt;
|location&lt;br /&gt;
|description&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|30 runs&lt;br /&gt;
|25,64,100&lt;br /&gt;
|SNGD, step=4&lt;br /&gt;
|100%&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14193</id>
		<title>Evoptool Experiments</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14193"/>
				<updated>2011-10-24T22:30:26Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|function&lt;br /&gt;
|instance, run&lt;br /&gt;
|size&lt;br /&gt;
|algorithm+param&lt;br /&gt;
|optimum found&lt;br /&gt;
|author&lt;br /&gt;
|when&lt;br /&gt;
|rev evoptool&lt;br /&gt;
|location&lt;br /&gt;
|description&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|30 runs&lt;br /&gt;
|25,64,100&lt;br /&gt;
|SNGD, step=4&lt;br /&gt;
|100%&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14192</id>
		<title>Evoptool Experiments</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14192"/>
				<updated>2011-10-24T22:29:48Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|function&lt;br /&gt;
|size&lt;br /&gt;
|instance, run&lt;br /&gt;
|algorithm+param&lt;br /&gt;
|optimum found&lt;br /&gt;
|author&lt;br /&gt;
|when&lt;br /&gt;
|rev evoptool&lt;br /&gt;
|location&lt;br /&gt;
|description&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|30 runs&lt;br /&gt;
|25,64,100&lt;br /&gt;
|SNGD, step=4&lt;br /&gt;
|100%&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14191</id>
		<title>Evoptool Experiments</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14191"/>
				<updated>2011-10-24T22:29:07Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|function&lt;br /&gt;
|size&lt;br /&gt;
|instance, run&lt;br /&gt;
|algorithm+param&lt;br /&gt;
|author&lt;br /&gt;
|when&lt;br /&gt;
|rev evoptool&lt;br /&gt;
|location&lt;br /&gt;
|description&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|30 runs&lt;br /&gt;
|25,64,100&lt;br /&gt;
|SNGD, step=4&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14190</id>
		<title>Evoptool Experiments</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14190"/>
				<updated>2011-10-24T22:28:38Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Function&lt;br /&gt;
|Size&lt;br /&gt;
|Instance,run&lt;br /&gt;
|Algorithm+param&lt;br /&gt;
|Author&lt;br /&gt;
|when&lt;br /&gt;
|rev evoptool&lt;br /&gt;
|location&lt;br /&gt;
|description&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|30 runs&lt;br /&gt;
|25,64,100&lt;br /&gt;
|SNGD, step=4&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14189</id>
		<title>Evoptool Experiments</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14189"/>
				<updated>2011-10-24T22:27:44Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Function&lt;br /&gt;
|Size&lt;br /&gt;
|Algorithm+param&lt;br /&gt;
|Author&lt;br /&gt;
|when&lt;br /&gt;
|rev evoptool&lt;br /&gt;
|location&lt;br /&gt;
|description&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|25,64,100&lt;br /&gt;
|SNGD, step=4&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14188</id>
		<title>Evoptool Experiments</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool_Experiments&amp;diff=14188"/>
				<updated>2011-10-24T22:27:05Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: Created page with &amp;quot;{| cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot; |Function |Size |Algorithm |Author |when |rev evoptool |location |description |- |OneMax |25,64,100 |SNGD |luigi |2011/06 |~400 |ho...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| cellpadding=&amp;quot;20&amp;quot; cellspacing=&amp;quot;0&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|Function&lt;br /&gt;
|Size&lt;br /&gt;
|Algorithm&lt;br /&gt;
|Author&lt;br /&gt;
|when&lt;br /&gt;
|rev evoptool&lt;br /&gt;
|location&lt;br /&gt;
|description&lt;br /&gt;
|-&lt;br /&gt;
|OneMax&lt;br /&gt;
|25,64,100&lt;br /&gt;
|SNGD&lt;br /&gt;
|luigi&lt;br /&gt;
|2011/06&lt;br /&gt;
|~400&lt;br /&gt;
|home jobe, SNGD-OneMax&lt;br /&gt;
|CEC2011&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14187</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14187"/>
				<updated>2011-10-24T22:06:00Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* Genetic Algorithms&lt;br /&gt;
** SGA&lt;br /&gt;
*Estimation of Distribution Algorithms&lt;br /&gt;
**PBIL, UMDA, cGA, COMIT, BOA, FCA&lt;br /&gt;
* DEUM framework&lt;br /&gt;
**DEUMd, IsingDEUM, DEUM-Chain, DEUM-LDA, DEUM-CE, DEUM-X2, DEUM-JEMP, DEUM-l1, sDEUM&lt;br /&gt;
* Stochastic Gradient Descent&lt;br /&gt;
**SGD, SNGD&lt;br /&gt;
* Other Meta-heuristics&lt;br /&gt;
**Simulated Annealing&lt;br /&gt;
&lt;br /&gt;
References to original papers will be added soon.&lt;br /&gt;
&lt;br /&gt;
====Benchmark functions implemented====&lt;br /&gt;
* OneMax&lt;br /&gt;
* AltBit&lt;br /&gt;
* Trap3&lt;br /&gt;
* Trap5&lt;br /&gt;
* IsingSpinGlass2D&lt;br /&gt;
* IsingSpinGlass3D&lt;br /&gt;
* Max Cut&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** ''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
**  ''R (lars package)''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available statistics  ====&lt;br /&gt;
&lt;br /&gt;
In the configuration xml file you can enable the evaluation of three set of statistics:&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;statisticsConfiguration&amp;gt;&lt;br /&gt;
    &amp;lt;evalPopulationStatistics&amp;gt;yes&amp;lt;/evalPopulationStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalModelStatistics&amp;gt;yes&amp;lt;/evalModelStatistics&amp;gt;&lt;br /&gt;
    &amp;lt;evalExecutionStatistics&amp;gt;No&amp;lt;/evalExecutionStatistics&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
  &amp;lt;/statisticsConfiguration&amp;gt;&lt;br /&gt;
&lt;br /&gt;
See the headers file in evoptool/common/src for details.&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14174</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14174"/>
				<updated>2011-10-24T13:25:04Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Algorithms implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* Genetic Algorithms&lt;br /&gt;
** SGA&lt;br /&gt;
*Estimation of Distribution Algorithms&lt;br /&gt;
**PBIL, UMDA, cGA, COMIT, BOA, FCA&lt;br /&gt;
* DEUM framework&lt;br /&gt;
**DEUMd, IsingDEUM, DEUM-Chain, DEUM-LDA, DEUM-CE, DEUM-X2, DEUM-JEMP, DEUM-l1, sDEUM&lt;br /&gt;
* Stochastic Gradient Descent&lt;br /&gt;
**SGD, SNGD&lt;br /&gt;
* Other Meta-heuristics&lt;br /&gt;
**Simulated Annealing&lt;br /&gt;
&lt;br /&gt;
References to original papers will be added soon.&lt;br /&gt;
&lt;br /&gt;
====Benchmark functions implemented====&lt;br /&gt;
* OneMax&lt;br /&gt;
* AltBit&lt;br /&gt;
* Trap3&lt;br /&gt;
* Trap5&lt;br /&gt;
* IsingSpinGlass2D&lt;br /&gt;
* IsingSpinGlass3D&lt;br /&gt;
* Max Cut&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available Statistics  ====&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14173</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14173"/>
				<updated>2011-10-24T13:24:48Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Algorithms implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* Genetic Algorithms&lt;br /&gt;
** SGA&lt;br /&gt;
*Estimation of Distribution Algorithms&lt;br /&gt;
**PBIL, UMDA, cGA, COMIT, BOA, FCA&lt;br /&gt;
* DEUM framework&lt;br /&gt;
**DEUMd, IsingDEUM, DEUM-Chain, DEUM-LDA, DEUM-CE, DEUM-X2, DEUM-JEMP, DEUM-l1, sDEUM&lt;br /&gt;
* Stochastic Gradient Descent&lt;br /&gt;
**SNGD, SNGD&lt;br /&gt;
* Other Meta-heuristics&lt;br /&gt;
**Simulated Annealing&lt;br /&gt;
&lt;br /&gt;
References to original papers will be added soon.&lt;br /&gt;
&lt;br /&gt;
====Benchmark functions implemented====&lt;br /&gt;
* OneMax&lt;br /&gt;
* AltBit&lt;br /&gt;
* Trap3&lt;br /&gt;
* Trap5&lt;br /&gt;
* IsingSpinGlass2D&lt;br /&gt;
* IsingSpinGlass3D&lt;br /&gt;
* Max Cut&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available Statistics  ====&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14172</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14172"/>
				<updated>2011-10-24T13:23:38Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Algorithms implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* Genetic Algorithms&lt;br /&gt;
** SGA&lt;br /&gt;
*Estimation of Distribution Algorithms&lt;br /&gt;
**PBIL, UMDA, cGA, COMIT, BOA, FCA&lt;br /&gt;
* DEUM framework&lt;br /&gt;
**DEUMd, IsingDEUM, DEUM-Chain&lt;br /&gt;
* Stochastic Gradient Descent&lt;br /&gt;
**SNGD, SNGD&lt;br /&gt;
* Other Meta-heuristics&lt;br /&gt;
**Simulated Annealing&lt;br /&gt;
&lt;br /&gt;
References to original papers will be added soon.&lt;br /&gt;
&lt;br /&gt;
====Benchmark functions implemented====&lt;br /&gt;
* OneMax&lt;br /&gt;
* AltBit&lt;br /&gt;
* Trap3&lt;br /&gt;
* Trap5&lt;br /&gt;
* IsingSpinGlass2D&lt;br /&gt;
* IsingSpinGlass3D&lt;br /&gt;
* Max Cut&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available Statistics  ====&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14171</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14171"/>
				<updated>2011-10-24T13:18:22Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Algorithms implemented */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
* DEUM&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available Statistics  ====&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14170</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14170"/>
				<updated>2011-10-24T13:17:40Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
''DEUM''&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available Statistics  ====&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14169</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14169"/>
				<updated>2011-10-24T13:16:43Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Mailing List */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
&lt;br /&gt;
====Algorithms implemented====&lt;br /&gt;
''DEUM''&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;br /&gt;
&lt;br /&gt;
==== Available Statistics  ====&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14167</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14167"/>
				<updated>2011-10-24T13:14:07Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* To create a new algorithm */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*[[User:DavideCucci| Davide Cucci]] - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithms must inherit from the Algorithm class. First override the Algorithm::initAlgorithm as follows:&lt;br /&gt;
&lt;br /&gt;
  void DEUM::initAlgorithm(ObjectiveFunction* of) {&lt;br /&gt;
    Algorithm::initAlgorithm(of);&lt;br /&gt;
  &lt;br /&gt;
    /* Initialization tasks */&lt;br /&gt;
    ...&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Then implement a run() method which performs al the required task for '''one''' iteration of your algorithm.&lt;br /&gt;
&lt;br /&gt;
There are some classes which contain useful methods such as samplers and estimators from which your algorithm can inherit. The most useful are:&lt;br /&gt;
&lt;br /&gt;
  PopulationBasedAlgorithm&lt;br /&gt;
  ModelBasedAlgorithm&lt;br /&gt;
  ExponentialFamilyAlgorithm&lt;br /&gt;
  BayesianNetworkBasedAlgorithm&lt;br /&gt;
&lt;br /&gt;
2. Append entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum in Evoptool.h.&lt;br /&gt;
&lt;br /&gt;
  typedef enum {&lt;br /&gt;
    ...&lt;br /&gt;
    DEUM    // 5&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
In the xml configuration file, your algorithm will be characterized by the int value associated with the position in this enum declaration.&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp. Search for the method &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt; and insert an new entry for your algorithm in the &amp;lt;tt&amp;gt;algorithmParameters&amp;lt;/tt&amp;gt; array, for example&lt;br /&gt;
&lt;br /&gt;
  AlgorithmParameters algorithmParameters[] = {&lt;br /&gt;
    ...&lt;br /&gt;
    { Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }, // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
    ...&lt;br /&gt;
  };&lt;br /&gt;
&lt;br /&gt;
In each entry, the first field is the name of the entry in the &amp;lt;tt&amp;gt;Algorithms&amp;lt;/tt&amp;gt; enum just modified in &amp;lt;tt&amp;gt;Evoptool.h&amp;lt;/tt&amp;gt;, the second is the number of parameters to be parsed in the xml configuration file and the third is a string specifying their type: &amp;lt;tt&amp;gt;I&amp;lt;/tt&amp;gt; for integer and &amp;lt;tt&amp;gt;D&amp;lt;/tt&amp;gt; for double.&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &amp;lt;tt&amp;gt;bool XMLParser::parseAlgorithms&amp;lt;/tt&amp;gt;, for instance:&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::DEUM: &lt;br /&gt;
    algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
    algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
    break;&lt;br /&gt;
&lt;br /&gt;
Note that your algorithm can employ the random number generator provided by the Evoptool core, &amp;lt;tt&amp;gt;params-&amp;gt;rng&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
5. Include your headers in core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
6. Document how your algorithm is instantiated in the comments appearing in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
   Algorithm  Id    Types    Parameters&lt;br /&gt;
  =====================================================================================================&lt;br /&gt;
    ...&lt;br /&gt;
    FCA       26    &amp;quot;IDDII&amp;quot;  (Pop, PercSelection, LearningRate, MaxCompositionLenght, MaxMonomialOrder)&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
7. Add an instantiation example for your algorithm in evoptool-file/exec-scripts/example.xml&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;algo id=&amp;quot;26&amp;quot; instanceName=&amp;quot;FCA&amp;quot;&amp;gt;  &lt;br /&gt;
    &amp;lt;int&amp;gt;1000&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;0.5&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;double&amp;gt;1&amp;lt;/double&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;64&amp;lt;/int&amp;gt;&lt;br /&gt;
    &amp;lt;int&amp;gt;2&amp;lt;/int&amp;gt;&lt;br /&gt;
  &amp;lt;/algo&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14131</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14131"/>
				<updated>2011-10-22T20:53:34Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* The Evoptool Team */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14129</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14129"/>
				<updated>2011-10-22T17:48:41Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò]] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist&amp;lt;/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14128</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14128"/>
				<updated>2011-10-22T17:48:18Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò]] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
** '''f2c'&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14127</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14127"/>
				<updated>2011-10-22T16:50:22Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò]] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following orderm due to dependencies&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  stochastic&lt;br /&gt;
  eda&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14126</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14126"/>
				<updated>2011-10-22T15:41:05Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò]] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following order&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  eda&lt;br /&gt;
  stochastic&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14125</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14125"/>
				<updated>2011-10-22T15:40:45Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò]] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following order&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  eda&lt;br /&gt;
  stochastic&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14124</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14124"/>
				<updated>2011-10-22T15:40:26Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Installation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò]] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn https://svn.ws.dei.polimi.it/evoptool/&lt;br /&gt;
&lt;br /&gt;
  User&lt;br /&gt;
  Password&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (stable?) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following order&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  eda&lt;br /&gt;
  stochastic&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14123</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14123"/>
				<updated>2011-10-22T15:39:28Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò]] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
  svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn https://svn.ws.dei.polimi.it/evoptool/&lt;br /&gt;
&lt;br /&gt;
  User&lt;br /&gt;
  Password&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (instable) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following order&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  eda&lt;br /&gt;
  stochastic&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14122</id>
		<title>Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14122"/>
				<updated>2011-10-22T15:39:15Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Description ==&lt;br /&gt;
&lt;br /&gt;
Evolutionary Optimization Tool (Evoptool) is an open source optimization tool writte in C++, distributed under GNU General Public License. Evoptool implements meta-heuristics based on the Evolutionary Computation paradigm and aims to provide a common platform for the development and test of new algorithms, in order to facilitate the performance comparison activity. Evoptool offers a wide set of benchmark problems, from classical toy samples to more complex tasks, and a collection of algorithm implementations from Genetic Algorithms and Estimation of Distribution Algorithms paradigms. Evoptool is flexible, easy to extend, also with algorithms based on other approaches other from EAs.&lt;br /&gt;
&lt;br /&gt;
== The Evoptool Team ==&lt;br /&gt;
&lt;br /&gt;
*[[User:MatteoMatteucci| Matteo Matteucci]] - matteucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
*[[http://www.dei.polimi.it/personale/dettaglio.php?id_persona=829&amp;amp;id_sezione=&amp;amp;lettera=M&amp;amp;idlang=ita| Luigi Malagò]] - malago [AT] elet.polimi.it &lt;br /&gt;
&lt;br /&gt;
*[[User:GabrieleValentini| Gabriele Valentini]] - gvalentini [AT] iridia.ulb.ac.be&lt;br /&gt;
&lt;br /&gt;
*Cucci Davide - cucci [AT] elet.polimi.it&lt;br /&gt;
&lt;br /&gt;
'''Formerly involved'''&lt;br /&gt;
*Emanuele Corsano&lt;br /&gt;
&lt;br /&gt;
== Mailing List ==&lt;br /&gt;
http://groups.google.com/group/evoptool&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
svn checkout https://svn.ws.dei.polimi.it/evoptool/trunk --username usrevoptool --password evoptoolpsw&lt;br /&gt;
&lt;br /&gt;
Developers may also access unstable branch. Contact the evoptool team for more details.&lt;br /&gt;
&lt;br /&gt;
== Installation ==&lt;br /&gt;
Follow these steps in order to compile evoptool&lt;br /&gt;
&lt;br /&gt;
1. Download source code from svn https://svn.ws.dei.polimi.it/evoptool/&lt;br /&gt;
&lt;br /&gt;
  User&lt;br /&gt;
  Password&lt;br /&gt;
&lt;br /&gt;
Refer to trunk for the lastest (instable) version of evoptool&lt;br /&gt;
&lt;br /&gt;
2. First you need to manually compile the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; package, http://www.stanford.edu/~boyd/l1_logreg/&lt;br /&gt;
whose source are already included in the evoptool repository. In order to do that follow the instrunctions in &lt;br /&gt;
&amp;lt;code&amp;gt;README.evoptool&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;l1_logreg-0.8.2&amp;lt;/code&amp;gt; directory&lt;br /&gt;
&lt;br /&gt;
Next, compile &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; following the instructions in &amp;lt;code&amp;gt;README.evoptool&amp;lt;code&amp;gt; in the &amp;lt;code&amp;gt;&amp;lt;id_dist/code&amp;gt; folder&lt;br /&gt;
&lt;br /&gt;
3. Then you need to compile a module at a time. Each module is included in a different folder. &lt;br /&gt;
To compile a module, from go to the module source folder and do make lib. For instance, for the module named &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  cd common/src&lt;br /&gt;
  make lib&lt;br /&gt;
  cd ..&lt;br /&gt;
&lt;br /&gt;
Compile modules in the following order&lt;br /&gt;
&lt;br /&gt;
  common&lt;br /&gt;
  functions&lt;br /&gt;
  ga&lt;br /&gt;
  eda&lt;br /&gt;
  stochastic&lt;br /&gt;
&lt;br /&gt;
To clean a module, do &lt;br /&gt;
&lt;br /&gt;
  make clean&lt;br /&gt;
&lt;br /&gt;
from the module source directory&lt;br /&gt;
&lt;br /&gt;
4. Go to &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;  module and type&lt;br /&gt;
&lt;br /&gt;
  make exe&lt;br /&gt;
&lt;br /&gt;
Binary files will be copied in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root as well as the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory of the &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; module&lt;br /&gt;
&lt;br /&gt;
'''Required packages'''&lt;br /&gt;
* Libraries&lt;br /&gt;
&lt;br /&gt;
** ''gtkmm-2.4''&lt;br /&gt;
** ''glademm-2.4''&lt;br /&gt;
** ''gthread-2.0''&lt;br /&gt;
** ''sigc++-2.0''&lt;br /&gt;
** ''opencv'' (see for instance http://www.samontab.com/web/2011/06/installing-opencv-2-2-in-ubuntu-11-04/)&lt;br /&gt;
** ''gsl''&lt;br /&gt;
** ''gslcblas''&lt;br /&gt;
** ''libxml++-2.6''&lt;br /&gt;
&lt;br /&gt;
* Software&lt;br /&gt;
** ''gnuplot''&lt;br /&gt;
&lt;br /&gt;
== Running  ==&lt;br /&gt;
&lt;br /&gt;
Right now &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; only runs as a script. GUI is not maintained in the latest version.&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; binary file is supposed to be run in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory in the root, this is because right now the script looks for some configuration files, for the instances of the problems, and temp directories. If you want to run the script from other directories, you just need to copy in that directory the &amp;lt;code&amp;gt;evoptool-file&amp;lt;/code&amp;gt; directory that you find in the &amp;lt;code&amp;gt;bin&amp;lt;/code&amp;gt; directory. Link such directory instead of copying it is not safe if you run multiple scripts at the same time, since output files will be shared. &lt;br /&gt;
&lt;br /&gt;
To run the algorithm you need to enter as input an xml file. For instance you can run&lt;br /&gt;
&lt;br /&gt;
  ./evoptool evoptool-file/examples/unitTestOneMax.xml&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;evoptool-file/example&amp;lt;/code&amp;gt; directory contains a set of xml files for different benchmarks and different algorithms.&lt;br /&gt;
Take a loot at the &amp;lt;code&amp;gt;example.xml&amp;lt;/code&amp;gt; file for the documentation on hoe to set the parameters for an each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt; produces a set of files as output. You can find all files in &amp;lt;code&amp;gt;evoptool-file/temp&amp;lt;/code&amp;gt; directory. Plus a tar.gz file containing such files can be produced at the end of the execution of &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. See the xml file for details.&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/data&lt;br /&gt;
contains the raw data of the statistics according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/gnuplot&lt;br /&gt;
contains the gnuplot files to produce images of the statistics&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/image&lt;br /&gt;
contains images of the statistics produced according to the xml file&lt;br /&gt;
&lt;br /&gt;
  evoptool-file/temp/support&lt;br /&gt;
contains logs&lt;br /&gt;
&lt;br /&gt;
== Documentation ==&lt;br /&gt;
&lt;br /&gt;
==== Implement a new benchmark function====&lt;br /&gt;
&lt;br /&gt;
Benchmarks are defined in the &amp;lt;code&amp;gt;function&amp;lt;/code&amp;gt; module. A benchmark is the maximization problem of a real valued function defined over a vector of n binary variables. Functions are maximized in &amp;lt;code&amp;gt;evoptool&amp;lt;/code&amp;gt;. In order to implement a new benchmark function you have to create a new &amp;lt;code&amp;gt;class&amp;lt;/code&amp;gt; that inherits from &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;common&amp;lt;/code&amp;gt; module. Take a look at the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; benchmark function.&lt;br /&gt;
&lt;br /&gt;
Among the arguments of the constructor of the &amp;lt;code&amp;gt;ObjectiveFunction&amp;lt;/code&amp;gt; class there must be the size of the benchmark, which may or may not be a parameter of the new benchmark.&lt;br /&gt;
&lt;br /&gt;
  OneMax::OneMax(int size) : ObjectiveFunction(size)&lt;br /&gt;
&lt;br /&gt;
In the constructor you have whether the maximum of the function is known or not&lt;br /&gt;
&lt;br /&gt;
   _knownSolution = true;&lt;br /&gt;
&lt;br /&gt;
And in case this is known, set the minimum value and maximum value for the function&lt;br /&gt;
&lt;br /&gt;
 _minFitness = 0; &lt;br /&gt;
 _maxFitness = size; //the maximum value of the OneMax function is defined as the sum of the bits of x set to one.&lt;br /&gt;
&lt;br /&gt;
Besides, such values are used in the normalization of the functions in the plots of the statistics.&lt;br /&gt;
&lt;br /&gt;
Each benchmark must implement the &amp;lt;code&amp;gt;f&amp;lt;/code&amp;gt; method, which takes the &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x and return f(x). For instance, for &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; you have&lt;br /&gt;
&lt;br /&gt;
  double OneMax::f(BinaryString *bi) {&lt;br /&gt;
  &amp;amp;nbsp;if (bi != NULL) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;if(!(bi-&amp;gt;validCache())) { &lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;/* Fitness cache value not valid */&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;int sum = 0;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;for (int j = 0; j &amp;lt; _size; j++) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;sum = sum + bi-&amp;gt;get(j);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;bi-&amp;gt;setFitnessCache(sum);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return sum;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;return bi-&amp;gt;getFitnessCache();&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;} else {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;cerr &amp;lt;&amp;lt; &amp;quot;[OneMax::f] binary instance cannot be null&amp;quot; &amp;lt;&amp;lt; endl;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;return 0;&lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
In order to avoid multiple evaluations of the same &amp;lt;code&amp;gt;BinaryString&amp;lt;/code&amp;gt; x, a caching mechanism has been implemented.&lt;br /&gt;
&lt;br /&gt;
Moreover, you are asked to implement the &amp;lt;code&amp;gt;exportInteration&amp;lt;/code&amp;gt; function, which return an &amp;lt;code&amp;gt;HyperGraph&amp;lt;/code&amp;gt; which represents the interactions present in the function. In order to determine such hypergraph, start from the polinomial representation of the function, and for each monomial introduce a new hyperedge in the hypergraph.&lt;br /&gt;
&lt;br /&gt;
For the &amp;lt;code&amp;gt;OneMax&amp;lt;/code&amp;gt; function, such representation corresponds to the independence graph, since such function is linear. &lt;br /&gt;
&lt;br /&gt;
  HyperGraph* OneMax::exportInteractions() {&lt;br /&gt;
  &amp;amp;nbsp;HyperGraph *interactions = new HyperGraph();&lt;br /&gt;
  &amp;amp;nbsp;interactions-&amp;gt;createIndependenceGraph(_size);&lt;br /&gt;
  &amp;amp;nbsp;return interactions;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
In &amp;lt;code&amp;gt;Evoptool.h&amp;lt;/code&amp;gt; add an entry in the &amp;lt;code&amp;gt;Tasks&amp;lt;/code&amp;gt; enum.&lt;br /&gt;
&lt;br /&gt;
  /* This enumeration defines an identifier for each task function. */&lt;br /&gt;
  typedef enum {&lt;br /&gt;
  &amp;amp;nbsp;ONE_MAX = 7,&lt;br /&gt;
  } Tasks;&lt;br /&gt;
&lt;br /&gt;
This value will identify uniquely the benchmark in the xml file. In the &amp;lt;code&amp;gt;XMLParser.cpp&amp;lt;/code&amp;gt; file, add an entry for the new function.&lt;br /&gt;
&lt;br /&gt;
  bool XMLParser::parseTask(xmlpp::TextReader &amp;amp;reader, Evoptool::TestParameters *params) {&lt;br /&gt;
  &amp;amp;nbsp;.. &lt;br /&gt;
  &amp;amp;nbsp;switch (task) {&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;case Evoptool::ONE_MAX: params-&amp;gt;task = new OneMax(size);&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;break;&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;..&lt;br /&gt;
  &amp;amp;nbsp;&amp;amp;nbsp;default: return false; &lt;br /&gt;
  &amp;amp;nbsp;}&lt;br /&gt;
  &amp;amp;nbsp;..&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Additional parameters can be obtained using the xml TextReader object, as for the &amp;lt;code&amp;gt;ForPeaks&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
  case Evoptool::FOUR_PEAKS: &lt;br /&gt;
  &amp;amp;nbsp;value = readNodeContent(reader, &amp;quot;peaks&amp;quot;, &amp;amp;errorFlag);&lt;br /&gt;
  &amp;amp;nbsp;if (errorFlag) return false;&lt;br /&gt;
  &amp;amp;nbsp;int peaks = toInt(value);&lt;br /&gt;
  &amp;amp;nbsp;params-&amp;gt;task = new FourPeaks(size, peaks);&lt;br /&gt;
  &amp;amp;nbsp;break; &lt;br /&gt;
&lt;br /&gt;
Finally in the xml file, a function can set with the &amp;lt;code&amp;gt;task&amp;lt;/code&amp;gt; tag, together with all parameters.&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;task&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;name&amp;gt;7&amp;lt;/name&amp;gt;&lt;br /&gt;
  &amp;amp;nbsp;&amp;lt;size&amp;gt;64&amp;lt;/size&amp;gt;&lt;br /&gt;
  &amp;lt;/task&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== To create a new algorithm (draft) ====&lt;br /&gt;
&lt;br /&gt;
1. Implement a new algorithm&lt;br /&gt;
&lt;br /&gt;
All algorithm must implement intiAlgorithm, and call Algorithm::initAlgorithm&lt;br /&gt;
same thing for &lt;br /&gt;
Algorithm::run();&lt;br /&gt;
&lt;br /&gt;
2. Add an entry in Evoptool.h&lt;br /&gt;
&lt;br /&gt;
  typedef enum {   &lt;br /&gt;
    DEUM&lt;br /&gt;
  } Algorithms;&lt;br /&gt;
&lt;br /&gt;
3. modify the file&lt;br /&gt;
core/src/XMLParser.cpp&lt;br /&gt;
and insert an new entry for your algorithm in&lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
for instance&lt;br /&gt;
&lt;br /&gt;
{ Evoptool::DEUM, 5, (char*) &amp;quot;IDDDI&amp;quot; }	          // Pop, percElitism, percSelec, CoolRate, GibbsIterations&lt;br /&gt;
where the first argument is the class of the algorithm &lt;br /&gt;
the second the number of paramers parsed in the xml file&lt;br /&gt;
the third the types of each parameter&lt;br /&gt;
&lt;br /&gt;
4. add a case in the switch that follows in &lt;br /&gt;
bool XMLParser::parseAlgorithms&lt;br /&gt;
&lt;br /&gt;
for instance&lt;br /&gt;
	case Evoptool::EXTENDEDFCA: &lt;br /&gt;
	  algos[i] = new extendedFCA(intVal[0], doubleVal[0], doubleVal[1], intVal[1], intVal[2], params-&amp;gt;rng);&lt;br /&gt;
	  algos[i]-&amp;gt;initAlgorithm(params-&amp;gt;task);&lt;br /&gt;
	  break;&lt;br /&gt;
&lt;br /&gt;
where the algorithm is instantiated&lt;br /&gt;
&lt;br /&gt;
5. Add an entry for your algorithm in &lt;br /&gt;
core/src/Algorithms.h&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6. Add a line in &lt;br /&gt;
evoptool-file/exec-scripts/example.xml&lt;br /&gt;
as a documenation for the parameters of your algorithm.&lt;br /&gt;
Choose a new Id for your algorithm&lt;br /&gt;
Types indicates then type of the parameters (the order is important) that will must be specified&lt;br /&gt;
in the xml file (see &amp;lt;algo&amp;gt;) and are passed to the constructor of the algorithm when the object is instantiated&lt;br /&gt;
I = integer&lt;br /&gt;
D = double&lt;br /&gt;
B = bool&lt;br /&gt;
&lt;br /&gt;
==== Run an algorithm in a C++ program ====&lt;br /&gt;
&lt;br /&gt;
The simplest way to do this is to create a new submodule in &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt;, i.e., a new source directory within the source directory of a module&lt;br /&gt;
For instance, the steps to create a new submodule named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; are&lt;br /&gt;
&lt;br /&gt;
1. copy the example submodule &amp;lt;code&amp;gt;exampleRunAlgorithm&amp;lt;/code&amp;gt; in a new folder named &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; in&lt;br /&gt;
&lt;br /&gt;
  evoptool/core/src&lt;br /&gt;
&lt;br /&gt;
2. modify the &amp;lt;code&amp;gt;Makefile&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;myexample&amp;lt;/code&amp;gt; directory, see comments in the makefile for more details.&lt;br /&gt;
&lt;br /&gt;
3. edit the &amp;lt;code&amp;gt;main&amp;lt;/code&amp;gt; function in the source file, if you need you can create other C++ and .h files in the same folder.&lt;br /&gt;
&lt;br /&gt;
4. from &amp;lt;code&amp;gt;evoptool/core/src/myexample&amp;lt;/code&amp;gt; run&lt;br /&gt;
&lt;br /&gt;
  make bin&lt;br /&gt;
&lt;br /&gt;
The bin file is create in &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; and copied in &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTICE that &amp;lt;code&amp;gt;evoptool/core/bin&amp;lt;/code&amp;gt; may be deleted after a &amp;lt;code&amp;gt;make cleanall&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
5. from &amp;lt;code&amp;gt;evoptool/bin&amp;lt;/code&amp;gt; run &lt;br /&gt;
&lt;br /&gt;
  ./myexample&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	<entry>
		<id>https://airwiki.deib.polimi.it/index.php?title=Talk:Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14121</id>
		<title>Talk:Evoptool: Evolutionary Optimization Tool</title>
		<link rel="alternate" type="text/html" href="https://airwiki.deib.polimi.it/index.php?title=Talk:Evoptool:_Evolutionary_Optimization_Tool&amp;diff=14121"/>
				<updated>2011-10-22T15:37:13Z</updated>
		
		<summary type="html">&lt;p&gt;LuigiMalago: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>LuigiMalago</name></author>	</entry>

	</feed>