<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://robust.cs.unm.edu/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Robust-first Computing Wiki - dev</title>
        <description></description>
        <link>https://robust.cs.unm.edu/</link>
        <lastBuildDate>Fri, 17 Apr 2026 08:26:46 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://robust.cs.unm.edu/lib/exe/fetch.php?media=wiki:logo.png</url>
            <title>Robust-first Computing Wiki</title>
            <link>https://robust.cs.unm.edu/</link>
        </image>
        <item>
            <title>abstract_elements</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:abstract_elements&amp;rev=1411500939</link>
            <description>&lt;pre&gt;
@@ -29,20 +29,21 @@
    SPoint wanderPt;
    Random&amp;amp; rand = window.GetRandom();
    MDist&amp;lt;R&amp;gt; md = MDist&amp;lt;R&amp;gt;::get();
    Dir d = (Dir)rand.Create(Dirs::DIR_COUNT);
-   u32 maxWanderDist = Dirs::IsCorner(d) ? R : (R / 2);
-   
-   maxWanderDist = MAX(GetWanderDistance(), maxWanderDist);
  
    Dirs::FillDir(wanderPt, d);
  
-   wanderPt *= maxWanderDist;
+   wanderPt *= Dirs::IsCorner(d) ? (GetWanderDistance() / 2) : GetWanderDistance();
  
-   if(window.GetRelativeAtom(wanderPt).GetType() ==
-      Element_Empty&amp;lt;CC&amp;gt;::THE_INSTANCE.GetType())
+   if(window.IsLiveSite(wanderPt))
    {
-     window.SwapAtoms(wanderPt, SPoint(0, 0));
+     if(window.GetRelativeAtom(wanderPt).GetType() ==
+        Element_Empty&amp;lt;CC&amp;gt;::THE_INSTANCE.GetType())
+        {
+          window.SwapAtoms(wanderPt, SPoint(0, 0));
+        }
+     }
    }
  }
  &amp;lt;/code&amp;gt;
  Finally, we need a new pure abstract method. This will allow a sub-class to tell this base class how far it would like to wander per event. We write it like this, in a &amp;#039;&amp;#039;protected&amp;#039;&amp;#039; section:

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 23 Sep 2014 19:35:39 +0000</pubDate>
        </item>
        <item>
            <title>atomic_parameters</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:atomic_parameters&amp;rev=1411322045</link>
            <description>&lt;pre&gt;
@@ -21,15 +21,15 @@
  &amp;lt;code&amp;gt;
  typedef BitField&amp;lt;BitVector&amp;lt;BITS&amp;gt;, BYTE_BITS_LENGTH, BYTE_BITS_POSITION&amp;gt; AFByteBits;
  &amp;lt;/code&amp;gt;
  
- make sure that BitField is included in the file by adding.
+ make sure that BitField is included in the file by adding:
  
  &amp;lt;code&amp;gt;
  #include &amp;quot;BitField.h&amp;quot;
  &amp;lt;/code&amp;gt;
  
- to the top of the file
+ to the top of the file.
  
  ===== Make Getter and Setter =====
  
  We now need methods which access these bits. In the public section of your elemenet, place:
@@ -39,9 +39,9 @@
  {
      return AFByteBits::Read(this-&amp;gt;GetBits(us));
  }
  
- void SetByteBits(const T&amp;amp; us, u32 bits) const
+ void SetByteBits(T&amp;amp; us, u32 bits) const
  {
      AFByteBits::Write(this-&amp;gt;GetBits(us), bits &amp;amp; 0xff);
  }
  &amp;lt;/code&amp;gt;

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 21 Sep 2014 17:54:05 +0000</pubDate>
        </item>
        <item>
            <title>circular_dependencies</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:circular_dependencies&amp;rev=1411411551</link>
            <description>&lt;pre&gt;
@@ -1 +1,43 @@
+ ====== Avoiding Circular Dependencies ======
  
+ Many times, you may run into a circular dependency when writing your Elements. This happens when you have two Elements, **A** and **B**, where **A**&amp;#039;s Behavior method needs to use **B**, and **B**&amp;#039;s Behavior method needs to use **A**. **g++** won&amp;#039;t allow you to compile code like this witout defining these methods in a certain way. This tutorial will guide you through creating Elements like this.
+ 
+ In the repo, there are two Elements named **Element_CheckerForkBlue** and **Element_CheckerForkRed**, which were created to illustrate the correct way to get around this problem. Please use these as a reference when reading this tutorial.
+ 
+ ===== Create **.tcc** files =====
+ 
+ Each Element involved in this kind of problem needs an associated **.tcc** file, which is used to define its behavior. Create one of these files per Element in the **elements/include** directory.
+ 
+ After these are created, we need to attach them to the existing **.h** files. Just outside of the MFM namespace block, **#include** the corresponding **.tcc** file. For instance, in **A.h**, you need to **#include &amp;quot;A.tcc&amp;quot;** .
+ 
+ ===== Include dependencies =====
+ 
+ In each **.tcc** file, we can now **#include** the Elements that we wish to reference in our behavior function. For instance, in **A.tcc**, we need to **#include &amp;quot;B.h&amp;quot;** .
+ 
+ ===== Move Behavior method =====
+ 
+ Now, we need to move the Behavior method to our new **.tcc** file. Then, following the **A** example, write:
+ 
+ &amp;lt;code&amp;gt;
+ namespace MFM
+ {
+   template &amp;lt;class CC&amp;gt;
+   void Element_A&amp;lt;CC&amp;gt;::Behavior(EventWindow&amp;amp; window) const
+   {
+      /* Define Behavior for Element_A here. */
+   }
+ }
+ &amp;lt;/code&amp;gt;
+ 
+ Then, in our **.h** file, we need to change the definition of our Behavior method to a prototype. Simply get rid of the body of the Behavior method and place a semicolon at the end of the line, like this:
+ 
+ &amp;lt;code&amp;gt;
+ virtual void Behavior(EventWindow&amp;lt;CC&amp;gt;&amp;amp; window) const;
+ &amp;lt;/code&amp;gt;
+ 
+ Once you do this for both elements, they should now be able to reference each other and compile.
+ 
+ ===== Tips =====
+ 
+   * Make sure your **.h** file does **NOT** **#include** the Element which causes the circular dependency. Only your **.tcc** should do this.
+   * Your Behavior method might not be the only one with a circular dependency like this. Make sure to define any other methods which do in your **.tcc** as well.

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 22 Sep 2014 18:45:51 +0000</pubDate>
        </item>
        <item>
            <title>clone_from_github</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:clone_from_github&amp;rev=1500125533</link>
            <description>&lt;pre&gt;
@@ -20,9 +20,9 @@
  ===== Install needed packages =====
  These packages are described in more detail in the immediately following subsections, but here they are all in one command for convenience:
  
  &amp;lt;code&amp;gt;
- sudo apt-get install git g++ libsdl1.2-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcapture-tiny-perl
+ sudo apt-get install git g++ libsdl1.2-dev libsdl-image1.2-dev libsdl-ttf2.0-dev libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcapture-tiny-perl
  &amp;lt;/code&amp;gt;
  
  ==== Install git ====
  
@@ -48,19 +48,16 @@
  
  &amp;#039;&amp;#039;libsdl1.2-dev&amp;#039;&amp;#039; is the package for the main SDL system.
  
  &amp;#039;&amp;#039;libsdl-image1.2-dev&amp;#039;&amp;#039; is the package for translating image types other than bitmaps.
- 
- &amp;#039;&amp;#039;libsdl-mixer1.2-dev&amp;#039;&amp;#039; is the package for playing audio.
  
  &amp;#039;&amp;#039;libsdl-ttf2.0-dev&amp;#039;&amp;#039; is the package for rendering TrueType fonts. Note that, despite the name, this is an SDL 1.2 package.
  
  Install the packages:
  
  &amp;lt;code&amp;gt;
  sudo apt-get install libsdl1.2-dev
  sudo apt-get install libsdl-image1.2-dev
- sudo apt-get install libsdl-mixer1.2-dev
  sudo apt-get install libsdl-ttf2.0-dev
  &amp;lt;/code&amp;gt;
  
  ==== Install crypto support and misc packages ====

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sat, 15 Jul 2017 13:32:13 +0000</pubDate>
        </item>
        <item>
            <title>data_output</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:data_output&amp;rev=1413518142</link>
            <description>&lt;pre&gt;
@@ -74,9 +74,9 @@
    Super::DoEpochEvents(grid, epochs, epochAEPS);
  }
  &amp;lt;/code&amp;gt;
  
- Please note: There are 3 TODO tags in the above snippet. Make sure you modify the code to your needs before running.
+ Please note: There are 3 TODO tags in the above snippet. These are where you&amp;#039;ll need to modify the code to suit your needs.
  
  ====AbstractDriver.h====
  Now we need to do a small modifcation to the AbstractDriver.h file. Paste the following code into the **public** section:
  &amp;lt;code cpp&amp;gt;
@@ -85,5 +85,5 @@
    return &amp;amp;m_simDirBasePath[0];
  }
  &amp;lt;/code&amp;gt;
  
- And that&amp;#039;s it! Happy sciencing.
+ And that&amp;#039;s it! Happy scienceing.

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Fri, 17 Oct 2014 03:55:42 +0000</pubDate>
        </item>
        <item>
            <title>element_tutorial</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:element_tutorial&amp;rev=1410984040</link>
            <description>&lt;pre&gt;
@@ -25,9 +25,9 @@
  
  In order for the compiler to be able to create a compiled version of this Element, you will need to create a small C++ file which associates with it. Create the file:
  
  &amp;lt;code&amp;gt;
- MFMv2/src/elements/src/Element_Creg.h
+ MFMv2/src/elements/src/Element_Creg.cpp
  &amp;lt;/code&amp;gt;
  
  Add the line:
  
@@ -55,9 +55,9 @@
  
  &amp;lt;code&amp;gt;
  m_targetDensity(this, &amp;quot;density&amp;quot;, &amp;quot;Target Density&amp;quot;,
                        &amp;quot;The Creg will try to fill this many spots in its event &amp;quot;
-                       &amp;quot;window with other Creg.&amp;quot;, 0, 3, 45, 1)
+                       &amp;quot;window with other Creg.&amp;quot;, 0, 3, 41, 1)
  &amp;lt;/code&amp;gt;
  
  The first argument is a pointer to this Element, which needs to be &amp;quot;this&amp;quot;.
  

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Wed, 17 Sep 2014 20:00:40 +0000</pubDate>
        </item>
        <item>
            <title>install_latest_mfm</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:install_latest_mfm&amp;rev=1432007677</link>
            <description>&lt;pre&gt;
@@ -5,12 +5,19 @@
  
  &amp;lt;code&amp;gt;
  git clone https://github.com/DaveAckley/MFM.git
  &amp;lt;/code&amp;gt;
- After the clone is done, a new directory is created: /home/user/ＭＦＭ. The &amp;#039;user&amp;#039; is your account name.
+ After the clone is done, a new directory is created: /home/user/MFM. The &amp;#039;user&amp;#039; is your account name.
  
  ==== Install the MFM ====
  Now you can install the MFM. Go to the /home/user/MFM/. Type the make command.
  &amp;lt;code&amp;gt;
  make
  &amp;lt;/code&amp;gt;
  If it throws out errors, there may be some dependencies lacked that caused these errors. Go to the  install SDL section of [[dev:clone_from_github|Clone from github]] to check these packages are installed. 
+ 
+ ==== check your MFM ====
+ Go to the /home/user/MFM/. Type the mfms command.
+ &amp;lt;code&amp;gt;
+ ./bin/mfms
+ &amp;lt;/code&amp;gt;
+ The Movable Feast Machine should show up. 

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 19 May 2015 03:54:37 +0000</pubDate>
        </item>
        <item>
            <title>install_ulam</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:install_ulam&amp;rev=1433273243</link>
            <description>&lt;pre&gt;
@@ -5,9 +5,9 @@
  
  You will need to clone the code from github. Git will create a new folder of ULAM, so you don&amp;#039;t need to make a new directory.
  
  &amp;lt;code&amp;gt;
- git clone https://github.com/elenasa/ULAM.wiki.git
+ git clone https://github.com/elenasa/ULAM.git
  &amp;lt;/code&amp;gt;
  After the clone is done, a new directory is created: /home/user/ULAM. The &amp;#039;user&amp;#039; is your account name.
  
  ===== Configuration of the ULAM =====
@@ -25,7 +25,7 @@
  &amp;lt;code&amp;gt;
  make
  &amp;lt;/code&amp;gt;
  If it throws out errors, there may be some missing dependencies. Open your package manager (for example, here we use Synaptic), and make sure you have installed libcapture-tiny-perl. {{ :dev:ulam_dependent_packages.png?560 |}}
- Once you get all the packages installed, try the make again. Welcome to ULAM. 
+ Once you get all the packages installed, try the make again. Welcome to the land of ULAM. This [[dev:program_ulam|portal]] will take you to a tour of ULAM programming.
+ 
  
- TODO: Next steps; where to now?

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Tue, 02 Jun 2015 19:27:23 +0000</pubDate>
        </item>
        <item>
            <title>logging_and_debugging</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:logging_and_debugging&amp;rev=1411904045</link>
            <description>&lt;pre&gt;
@@ -2,9 +2,9 @@
  
  Here are a few quick notes on getting logging output from the simulator.
  
    * The simulator has a logging system accessed via the static object &amp;#039;&amp;#039;LOG&amp;#039;&amp;#039;.
-   * The logging system has a &amp;#039;level&amp;#039; determining how much output is desired.  The level can be set on the command line by the &amp;#039;&amp;#039;-l NUM&amp;#039;&amp;#039; switch, where &amp;#039;&amp;#039;NUM&amp;#039;&amp;#039; can range from 0 (for the least output) to 8 (for the most output).
+   * The logging system has a &amp;#039;level&amp;#039; determining how much output is desired.  The level can be set on the command line by the &amp;#039;&amp;#039;-l NUM&amp;#039;&amp;#039; switch, where &amp;#039;&amp;#039;NUM&amp;#039;&amp;#039; can range from 0 to 8.  &amp;#039;&amp;#039;-l 0&amp;#039;&amp;#039; on the command line produces the least output, &amp;#039;&amp;#039;-l 8&amp;#039;&amp;#039; produces the most.
    * The logging levels have names and numbers: NONE(0), ERROR(1), WARNING(2), MESSAGE(3), DEBUG(4), DEBUG1(5), DEBUG2(6), DEBUG3(7), and ALL(8). 
    * The logging code provides direct methods for producing output at levels ERROR, WARNING, MESSAGE, and DEBUG.  For example: &amp;lt;code cpp&amp;gt;LOG.Debug(&amp;quot;Hi there&amp;quot;);&amp;lt;/code&amp;gt; prints &amp;#039;Hi there&amp;#039; to the console and the logging buffer (whose display is toggled by &amp;#039;l&amp;#039; in the GUI) -- **if** the logging level is 4 or larger.
    * &amp;#039;&amp;#039;LOG&amp;#039;&amp;#039; offers simple, internally-implemented &amp;#039;printf-like&amp;#039; functionality.  Among other things, it supports &amp;#039;%d&amp;#039;, &amp;#039;%o&amp;#039;, &amp;#039;%x&amp;#039;, &amp;#039;%s&amp;#039;. Its biggest current limitation is no floating point support (so, no &amp;#039;%f&amp;#039;, &amp;#039;%e&amp;#039;, or &amp;#039;%g&amp;#039; conversions).  For example: 
  &amp;lt;code cpp&amp;gt;
@@ -21,6 +21,6 @@
  &amp;lt;/code&amp;gt;
  might print something like &amp;#039;&amp;#039;20140928032150-3123: At (14,3): type is 00F0 (so there)&amp;#039;&amp;#039;
  if the logging level was 3 or higher.
    * Note the logger adds a newline at the end of each log message, so typically it&amp;#039;s expected that each log message will be a single line.
-   * Use %d for both signed and unsigned ints; there is no &amp;#039;%u&amp;#039;.
-   * Grep around in the codebase for examples!
+   * Use %d for both signed and unsigned ints; there is no &amp;#039;%u&amp;#039;.  (Or use %x or %o).
+   * Grep around in the codebase for &amp;#039;LOG&amp;#039; to find lots of examples!

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 28 Sep 2014 11:34:05 +0000</pubDate>
        </item>
        <item>
            <title>plotting_elem_counts</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:plotting_elem_counts&amp;rev=1414357316</link>
            <description>&lt;pre&gt;
@@ -1,16 +1,17 @@
- The //plot_element_counts.py// script.
+ The //plot_element_counts.py// script.  If you get an error that it cannot find the module &amp;quot;matplotlib&amp;quot; or something, it&amp;#039;s probably not installed.  This fixes that on Ubuntu:
+ 
+ sudo apt-get install python-matplotlib
  
  Example usage:
  
  ./plot_element_counts.py /tmp/xxx/tbd/data.dat &amp;quot;a nice title&amp;quot; &amp;quot;Data&amp;quot; &amp;quot;Creg&amp;quot; &amp;quot;Dreg&amp;quot;
  
  &amp;lt;code python&amp;gt;
  #!/usr/bin/env python
  
- # Reads .mfs files in a directory and makes plots of
- # particular elements (Data, Isolator) in them
- # Work-in-progress.
+ # This script plots the counts of the specified elements against AEPS, 
+ # each plot having the specified title.
  
  import sys
  import matplotlib.pyplot as plt
  

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 26 Oct 2014 21:01:56 +0000</pubDate>
        </item>
        <item>
            <title>program_ulam</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:program_ulam&amp;rev=1452755588</link>
            <description>&lt;pre&gt;
@@ -19,11 +19,14 @@
  
  
  ==== EventWindow Indices ====
  
- The following graph shows the index numbers within an &amp;#039;&amp;#039;EventWindow&amp;#039;&amp;#039;. The &amp;#039;&amp;#039;EventWindow&amp;#039;&amp;#039; has two functions to describe those indices. The &amp;#039;&amp;#039;getCoord(siteNum)&amp;#039;&amp;#039; converts an 1-d index(which is an &amp;#039;&amp;#039;Unsigned(6)&amp;#039;&amp;#039; ) to a 2-d coordinate(which is a quark &amp;#039;&amp;#039;C2D&amp;#039;&amp;#039;). The &amp;#039;&amp;#039;getSiteNumber(coord)&amp;#039;&amp;#039; convert &amp;#039;&amp;#039;C2D&amp;#039;&amp;#039; back to 1-d &amp;#039;&amp;#039;Unsigned(6)&amp;#039;&amp;#039;.  The quark &amp;#039;&amp;#039;C2D&amp;#039;&amp;#039; has &amp;#039;&amp;#039;getX()&amp;#039;&amp;#039; and &amp;#039;&amp;#039;getY()&amp;#039;&amp;#039; to interpret the //(x,y)// better.
+ {{ :dev:event-window-10.png?300|}} The image at right (click to enlarge) shows the indexing scheme used for sites within an &amp;#039;&amp;#039;EventWindow&amp;#039;&amp;#039;.  Both 2D &amp;#039;coord&amp;#039; numbering and a 1D &amp;#039;site number&amp;#039; approach are offered.  
+ 
+ The &amp;#039;&amp;#039;getCoord(siteNum)&amp;#039;&amp;#039; function converts an 1D index (which is an &amp;#039;&amp;#039;Unsigned(6)&amp;#039;&amp;#039; ) to a 2D coordinate (which is a quark &amp;#039;&amp;#039;C2D&amp;#039;&amp;#039;). The &amp;#039;&amp;#039;getSiteNumber(coord)&amp;#039;&amp;#039; convert &amp;#039;&amp;#039;C2D&amp;#039;&amp;#039; back to 1-d &amp;#039;&amp;#039;Unsigned(6)&amp;#039;&amp;#039;.  The quark &amp;#039;&amp;#039;C2D&amp;#039;&amp;#039; has &amp;#039;&amp;#039;getX()&amp;#039;&amp;#039; and &amp;#039;&amp;#039;getY()&amp;#039;&amp;#039; methods to access the //x// and //y// coordinate values individually.
+ 
+ In general, when code is referring to individual fixed sites within the event window, the 1D coordinate system is used (see the &amp;#039;First&amp;#039; element below for an example).  Two-dimensional C2D indexing is more commonly used when there is some flexibility depending on geometry or relative positions.  
  
- {{:dev:event-window-10.png?280|}}
  
  ===== The &amp;#039;First&amp;#039; Element =====
  
  Our first ULAM element is literally named &amp;#039;&amp;#039;First&amp;#039;&amp;#039;, and is stored in a file called //First.ulam//: 
@@ -31,9 +34,9 @@
  &amp;lt;code - First.ulam&amp;gt;
  element First{
    EventWindow ew;
    Void behave(){
-     ew[1]=ew[0];
+     ew[1]=ew[0]; // Copy self one site west
    }
  }
  &amp;lt;/code&amp;gt;
  

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Thu, 14 Jan 2016 07:13:08 +0000</pubDate>
        </item>
        <item>
            <title>questions_ulam</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:questions_ulam&amp;rev=1433182280</link>
            <description>&lt;pre&gt;
@@ -143,9 +143,100 @@
  
  ==== Q: Does ws.getPick(typeIndex) only return one site? How to access each site within an event window? ====
  **Thank you**! Now I understand that &amp;#039;&amp;#039;ws.getPick(typeIndex)&amp;#039;&amp;#039; returns an event window index. &amp;#039;&amp;#039;ws.getPick(typeIndex)&amp;#039;&amp;#039; can randomly pick one atom of this type. When I want to select an atom of this type but also has the maximum value of a certain data member, I should use the for loop to check each atom of this type and get this maximum atom. Like here I want to find the &amp;#039;&amp;#039;Request ATOM&amp;#039;&amp;#039; which has the max density value within this EventWindow. 
  
- **A: 31-May-2015 12:51:43AM-0600:** To select an atom based on anything other than its type, &amp;#039;&amp;#039;WindowServices&amp;#039;&amp;#039; can help with the event window indexing, but in general you&amp;#039;ll need to write a loop explicitly, rather than using &amp;#039;&amp;#039;scan()&amp;#039;&amp;#039;.  But even if so there&amp;#039;s some help for doing fair picking among maxima and minima.  (Rest of answer pending!) 
+ **A: 31-May-2015 12:51:43AM-0600:** To select an atom based on anything other than its type, in general you&amp;#039;ll need to write a loop explicitly, rather than using &amp;#039;&amp;#039;scan()&amp;#039;&amp;#039; -- although &amp;#039;&amp;#039;WindowServices&amp;#039;&amp;#039; can help with the event window indexing.
+ 
+ But even when you do need to loop, we have &amp;#039;&amp;#039;SelectorServices&amp;#039;&amp;#039; to provide some help for simpler tasks like finding and picking fairly among maxima and minima.  Here are two &amp;#039;&amp;#039;SelectorServices&amp;#039;&amp;#039; examples.  The first, &amp;#039;&amp;#039;SSDemo1&amp;#039;&amp;#039;, uses &amp;#039;&amp;#039;SelectorServices&amp;#039;&amp;#039; in a relatively general way, while the second, &amp;#039;&amp;#039;SSDemo2&amp;#039;&amp;#039;, is a bit optimized for shorter code.
+ 
+ &amp;lt;code - SSDemo1.ulam&amp;gt;
+ 
+ /**
+    SSDemo1s share the highest Score among their connected group.
+  */
+ 
+ element SSDemo1 {
+   // Typedefs
+   typedef Unsigned(8) Score;
+ 
+   // Utilities
+   EventWindow ew;
+   Random random;
+   DebugUtils du;
+ 
+   // Data members
+   Score val;
+ 
+   Void behave() {
+     if (val == 0) // randomize initial vals
+       val = random.bits(val.sizeof);
+ 
+     WindowServices ws;    // Scanning support
+     SelectorServices ss;  // Selection support
+ 
+     ws.reset(1,4); // Scan all but us (for this example)
+     ss.reset();
+ 
+     for (Int idx = ws.next(); idx &amp;gt;= 0; idx = ws.next()) {
+       Atom a = ew[idx];
+       if (a as SSDemo1)
+         ss.maximize(idx, (Int) a.val);
+     }
+     // This code is fairly general, but cumbersome.  Compare SSDemo2
+     if (ss.selectionMade()) {
+       Int sidx = ss.getSelectedKey(); // The site that maximized
+       SSDemo1 f = (SSDemo1) ew[sidx]; // which we know is a SSDemo1
+       if (f.val &amp;gt; 0)                  // ..if they&amp;#039;ve been initted
+         val = f.val;                  // ..pick up their val
+       du.printContext();              // and report for debugging.
+     }
+   }
+ }
+ 
+ &amp;lt;/code&amp;gt;
+ 
+ &amp;lt;code - SSDemo2.ulam&amp;gt;
+ 
+ /**
+    SSDemo2s share the highest Score among their connected group.
+  */
+ 
+ element SSDemo2 {
+   // Typedefs
+   typedef Unsigned(8) Score;
+ 
+   // Utilities
+   EventWindow ew;
+   Random random;
+   DebugUtils du;
+ 
+   // Data members
+   Score val;
+ 
+   Void behave() {
+     if (val == 0) // randomize initial vals
+       val = random.bits(val.sizeof);
+ 
+     WindowServices ws;    // Scanning support
+     SelectorServices ss;  // Selection support
+ 
+     ws.reset(0,4); // Scan everyone including us
+     ss.reset();
+ 
+     for (Int idx = ws.next(); idx &amp;gt;= 0; idx = ws.next()) {
+       Atom a = ew[idx];
+       if (a as SSDemo2)
+         ss.maximize((Int) a.val);  // Don&amp;#039;t need the idx this way..
+     }
+     // We scanned ourselves, so we know ss.selectionMade() will be
+     // true.  So we just take the chosen value (even if it was ours).
+     val = (Score) ss.getSelectedValue();
+     du.printContext();
+   }
+ }
+ 
+ &amp;lt;/code&amp;gt;
+ 
  
  ==== Q: How to change the size of the MFM simulator? ====
  Sometimes the canvas is too big for my experiment. If I don&amp;#039;t want those atoms diffuse too far away, I will draw a box of &amp;#039;&amp;#039;Wall&amp;#039;&amp;#039;. Can we change the size of MFM simulator?
  
@@ -166,9 +257,12 @@
  ==== Q: Do smaller grid geometries make the simulator run faster? ====
  
  **Thank you!** That&amp;#039;s better than drawing &amp;#039;&amp;#039;Walls&amp;#039;&amp;#039; by hand. The right side is the resized MFM simulator by {2C2}. And isn&amp;#039;t the smaller simulator running faster?
  
- {{:dev:mfms_signalrequest_2.9.png?nolink&amp;amp;400 |}}{{:dev:mfms_resize.png?nolink&amp;amp;400 |}}
+ 
+ 
  
  **A: 31-May-2015 01:06:01AM-0600: ** It depends somewhat on your hardware -- in particular, how many //real// cores you have, but yes, in general a smaller grid geometry -- fewer and smaller tiles, down to some limit -- will typically be faster than more and larger tiles.  Any single tile geometry will be running single-threaded, though, so in some cases multiple smaller tiles will be faster than one bigger one -- you&amp;#039;ll need to experiment some, if maximizing AER is crucial.   Also, if you type **&amp;#039;&amp;#039;a&amp;#039;&amp;#039;** a few times after typing **&amp;#039;&amp;#039;i&amp;#039;&amp;#039;** in the simulator, it will display the AER it is producing, so you can get a rough sense of what&amp;#039;s faster and slower.
  
  On a separate point, note that the &amp;quot;edge of the grid&amp;quot; is somewhat different that a ring of &amp;#039;&amp;#039;Wall&amp;#039;&amp;#039;s.  For example, non-existent sites return &amp;#039;&amp;#039;false&amp;#039;&amp;#039; from the &amp;#039;&amp;#039;EventWindow isLive&amp;#039;&amp;#039; method, but sites containing &amp;#039;&amp;#039;Wall&amp;#039;&amp;#039;s return true.  For consistency you might want to draw a ring of &amp;#039;&amp;#039;Wall&amp;#039;&amp;#039; around the boundary of even a smaller grid.
+ 
+ {{:dev:mfms_signalrequest_2.9.png?nolink&amp;amp;400 |}}{{:dev:mfms_resize.png?nolink&amp;amp;400 |}}

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Mon, 01 Jun 2015 18:11:20 +0000</pubDate>
        </item>
        <item>
            <title>quiz_ulam</title>
            <link>https://robust.cs.unm.edu/doku.php?id=dev:quiz_ulam&amp;rev=1435513960</link>
            <description>&lt;pre&gt;
@@ -84,9 +84,11 @@
  In the bigger simulator and less time length, we had no data hitting the boundary. The &amp;#039;&amp;#039;{4C4}&amp;#039;&amp;#039; average distance we got seems greater than the &amp;#039;&amp;#039;{2C2}&amp;#039;&amp;#039; average distance. However, nearly 1/4 of the &amp;#039;&amp;#039;{2C2}&amp;#039;&amp;#039; data fell out of the edge. So the actual average distance in &amp;#039;&amp;#039;{2C2}&amp;#039;&amp;#039; should be greater than the data shows. In both experiments, we can see the grid helped to extend the range a &amp;#039;&amp;#039;Pair&amp;#039;&amp;#039; traversed. The extension in &amp;#039;&amp;#039;{2C2}&amp;#039;&amp;#039; seems to be less than 5% (from 18.8 to 19.4) because more data points fell out of the edge. In &amp;#039;&amp;#039;{4C4}&amp;#039;&amp;#039; experiments, the average distances are extended nearly by 9% (from 21.1 to 23.1). This shows that the some //pulses// that travel faster than //walks// are produced in the grid. 
  
  The end-positions of the experiments didn&amp;#039;t show obvious bias. That&amp;#039;s fair because of the initial layout of our experiments. When &amp;#039;&amp;#039;Boxes&amp;#039;&amp;#039; are evenly placed in grid pattern, they //attract// the &amp;#039;&amp;#039;Pairs&amp;#039;&amp;#039; evenly, which will produce no bias. When &amp;#039;&amp;#039;Boxes&amp;#039;&amp;#039; are placed in a line, they are too sparse to //trap// &amp;#039;&amp;#039;Pairs&amp;#039;&amp;#039;. This did not produce bias either. In the following experiment, we will place a bunch of &amp;#039;&amp;#039;Boxes&amp;#039;&amp;#039; in the 1st quadrant. This cluster of &amp;#039;&amp;#039;Boxes&amp;#039;&amp;#039; will //attract// the first &amp;#039;&amp;#039;Pair&amp;#039;&amp;#039; and produce more &amp;#039;&amp;#039;Pairs&amp;#039;&amp;#039;. Then, the end-positions will show obvious favor to the 1st quadrant.                      
  
- If the end-positions of &amp;#039;&amp;#039;Pairs&amp;#039;&amp;#039; are not surprising, how about the &amp;#039;&amp;#039;Boxes&amp;#039;&amp;#039;? Did they still remain in line or in grid? How are they messed up by the &amp;#039;&amp;#039;Pair&amp;#039;&amp;#039;?
+ {{:dev:4overlay_500.png?350|}}
+ 
+ The above graph is what we saw if we put the three pictures together. If the end-positions of &amp;#039;&amp;#039;Pairs&amp;#039;&amp;#039; are not surprising, how about the &amp;#039;&amp;#039;Boxes&amp;#039;&amp;#039;? Did they still remain in line or in grid? How they were messed up by the &amp;#039;&amp;#039;Pair&amp;#039;&amp;#039;?
  
   
  Excluding runs that hit the boundary messes up the data.  Should use a bigger grid, so that hitting the boundary is very rare.  It will run slower but just use more machines.  And we don&amp;#039;t care if more pairs are created, right?  We just wanted the distance to the farthest pair.
  

&lt;/pre&gt;</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 28 Jun 2015 17:52:40 +0000</pubDate>
        </item>
    </channel>
</rss>
