<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to OneMax 2</title><link>https://sourceforge.net/p/ugp3/wiki/OneMax%25202/</link><description>Recent changes to OneMax 2</description><atom:link href="https://sourceforge.net/p/ugp3/wiki/OneMax%202/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 08 Jun 2015 13:00:47 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/ugp3/wiki/OneMax%202/feed" rel="self" type="application/rss+xml"/><item><title>OneMax 2 modified by Alberto Tonda</title><link>https://sourceforge.net/p/ugp3/wiki/OneMax%25202/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v3
+++ v4
@@ -2,6 +2,8 @@
 In this second step of the tutorial, we will see how to modify µGP's configuration file, with a particular focus on the Constraints. It is recommended to read [Population Constraints](Population Constraints) before proceeding.

 In OneMax, each individual is a string of bits. So, open the constraints file (`onemax.constraints.xml`) and go to the last part.
+
+![Constraints for the OneMax problem](http://ugp3.sourceforge.net/wiki/Onemax-constraints.jpg)

 As you can see, both the global prologue and the global epilogue are empty. The list of sections includes only one section, called **bitString**. Both bitString’s prologue and epilogue are empty. In the list of bitString’s subsection there’s only one subsection called **main**, that again has an empty prologue and epilogue.

@@ -10,6 +12,8 @@
 The only macro described is called **bitString**. Inside the `&amp;lt;expression&amp;gt;` tags, there is a reference to one parameter, called **bit**. Below, between the `&amp;lt;parameters&amp;gt;` tags, we see that our bit is of type **definedType** (other valid types include **integer** and **float**).

 Ok, so we know that each individual will contain 50 repetitions of the macro main, composed by a single variable bit. But what values can **bit** assume? To answer this question, let’s return to the top of `onemax.constraints.xml`
+
+![Constraints for the OneMax problem, 2](http://ugp3.sourceforge.net/wiki/Onemax-constraints-2.jpg)

 All variables of type **definedType** must be specified at the beginning of the Constraints file, in the tags **typeDefinitions**. As you can see, there's only one variable type specified, **bit_type**. And bit_type variables can assume only value 0 or 1. Our individual will then be a string of 50 values that can be either 0 or 1.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alberto Tonda</dc:creator><pubDate>Mon, 08 Jun 2015 13:00:47 -0000</pubDate><guid>https://sourceforge.netd82cbb0969a577f606f56207a69fdb971307f31a</guid></item><item><title>OneMax 2 modified by Alberto Tonda</title><link>https://sourceforge.net/p/ugp3/wiki/OneMax%25202/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,5 +1,5 @@
 # More fun with OneMax
-In this second step of the tutorial, we will see how to modify µGP's configuration file, with a particular focus on the Constraints. It is recommended to read [Population Constraints] before proceeding.
+In this second step of the tutorial, we will see how to modify µGP's configuration file, with a particular focus on the Constraints. It is recommended to read [Population Constraints](Population Constraints) before proceeding.

 In OneMax, each individual is a string of bits. So, open the constraints file (`onemax.constraints.xml`) and go to the last part.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alberto Tonda</dc:creator><pubDate>Mon, 08 Jun 2015 11:55:03 -0000</pubDate><guid>https://sourceforge.net6de97590038fbb3ee61e0f974147466ad445c5aa</guid></item><item><title>OneMax 2 modified by Alberto Tonda</title><link>https://sourceforge.net/p/ugp3/wiki/OneMax%25202/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,5 +1,5 @@
 # More fun with OneMax
-In this second step of the tutorial, we will see how to modify µGP's configuration file, with a particular focus on the Constraints. It is recommended to read [[Population Constraints]] before proceeding.
+In this second step of the tutorial, we will see how to modify µGP's configuration file, with a particular focus on the Constraints. It is recommended to read [Population Constraints] before proceeding.

 In OneMax, each individual is a string of bits. So, open the constraints file (`onemax.constraints.xml`) and go to the last part.

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alberto Tonda</dc:creator><pubDate>Mon, 08 Jun 2015 11:53:45 -0000</pubDate><guid>https://sourceforge.net20b717743fca3234488e42b39389af1c55288b25</guid></item><item><title>OneMax 2 modified by Alberto Tonda</title><link>https://sourceforge.net/p/ugp3/wiki/OneMax%25202/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="more-fun-with-onemax"&gt;More fun with OneMax&lt;/h1&gt;
&lt;p&gt;In this second step of the tutorial, we will see how to modify µGP's configuration file, with a particular focus on the Constraints. It is recommended to read [[Population Constraints]] before proceeding.&lt;/p&gt;
&lt;p&gt;In OneMax, each individual is a string of bits. So, open the constraints file (&lt;code&gt;onemax.constraints.xml&lt;/code&gt;) and go to the last part.&lt;/p&gt;
&lt;p&gt;As you can see, both the global prologue and the global epilogue are empty. The list of sections includes only one section, called &lt;strong&gt;bitString&lt;/strong&gt;. Both bitString’s prologue and epilogue are empty. In the list of bitString’s subsection there’s only one subsection called &lt;strong&gt;main&lt;/strong&gt;, that again has an empty prologue and epilogue.&lt;/p&gt;
&lt;p&gt;In the &lt;strong&gt;macros&lt;/strong&gt; tag, we have our first interesting part: the parameters in macros specify the maximum, minimum, average and standard deviation of macro occurrences in our individual. So, in this simple case we have a maxOccurs of 50, a minOccurs of 50, an averageOccurs of 50 and a standard deviation (sigma) of 0: this means that each individual will contain EXACTLY 50 occurrences of the macros that are specified below.&lt;/p&gt;
&lt;p&gt;The only macro described is called &lt;strong&gt;bitString&lt;/strong&gt;. Inside the &lt;code&gt;&amp;lt;expression&amp;gt;&lt;/code&gt; tags, there is a reference to one parameter, called &lt;strong&gt;bit&lt;/strong&gt;. Below, between the &lt;code&gt;&amp;lt;parameters&amp;gt;&lt;/code&gt; tags, we see that our bit is of type &lt;strong&gt;definedType&lt;/strong&gt; (other valid types include &lt;strong&gt;integer&lt;/strong&gt; and &lt;strong&gt;float&lt;/strong&gt;).&lt;/p&gt;
&lt;p&gt;Ok, so we know that each individual will contain 50 repetitions of the macro main, composed by a single variable bit. But what values can &lt;strong&gt;bit&lt;/strong&gt; assume? To answer this question, let’s return to the top of &lt;code&gt;onemax.constraints.xml&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;All variables of type &lt;strong&gt;definedType&lt;/strong&gt; must be specified at the beginning of the Constraints file, in the tags &lt;strong&gt;typeDefinitions&lt;/strong&gt;. As you can see, there's only one variable type specified, &lt;strong&gt;bit_type&lt;/strong&gt;. And bit_type variables can assume only value 0 or 1. Our individual will then be a string of 50 values that can be either 0 or 1.&lt;/p&gt;
&lt;p&gt;Verifying this claim is easy: open &lt;code&gt;onemax.population.settings.xml&lt;/code&gt;, change the name of the evaluator to a non-existent executable in evaluatorPathName and run ugp3. The execution will terminate immediately, because ugp3 cannot find the evaluator: but in the directory, you will find a file called &lt;code&gt;individualA.in&lt;/code&gt;, the text version of individual A in the population. Opening the file will reveal something like:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;00011110000010000000100000101100110100110001111101
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;which is exactly what we were expecting.&lt;/p&gt;
&lt;p&gt;Now, let's see how the Configuration file might be modified to suit your purpose, in &lt;a class="" href="../OneMax%203"&gt;Even more fun with OneMax!&lt;/a&gt;.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alberto Tonda</dc:creator><pubDate>Mon, 08 Jun 2015 11:53:28 -0000</pubDate><guid>https://sourceforge.netf4c108b2d3a681a60f18ce7f4afaf9030f32e2e3</guid></item></channel></rss>