<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/alex-2012.css" ?>
<rss version="2.0"
    xmlns:wiki="http://purl.org/rss/1.0/modules/wiki/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:cc="http://web.resource.org/cc/"
    xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<title>Alex Schroeder: Generator</title>
<link>http://alexschroeder.ch/wiki/Diary</link>
<atom:link href="http://www.google.com/profiles/kensanata" rel="me" type="text/html" />
<atom:link href="http://alexschroeder.ch/wiki?action=rss;full=1" rel="self" type="application/rss+xml" />
<description>The Homepage of Alex Schroeder.</description>
<pubDate>Sat, 18 May 2013 11:50:08 GMT</pubDate>
<lastBuildDate>Sat, 18 May 2013 11:50:08 GMT</lastBuildDate>
<generator>Oddmuse</generator>
<copyright>Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation.</copyright>
<cc:license>http://www.gnu.org/copyleft/fdl.html</cc:license>
<image>
<url>http://alexschroeder.ch/pics/alex.png</url>
<title>Alex Schroeder: Generator</title>
<link>http://alexschroeder.ch/wiki</link>
</image>

<item>
<title>Random Subsector Generator</title>
<link>http://alexschroeder.ch/wiki/2009-09-11_Random_Subsector_Generator</link>
<guid>http://alexschroeder.ch/wiki/2009-09-11_Random_Subsector_Generator</guid>
<description>&lt;p&gt;Once I had the &lt;a class="local" href="http://alexschroeder.ch/wiki/2009-09-11_Elite_Names"&gt;name generator&lt;/a&gt;, I was ready to write up the rest of the script. The &lt;a class="url http outside" href="http://alexschroeder.ch/uwp-generator"&gt;subsector UWP list generator&lt;/a&gt; will also compute the temperature for internal purposes, but doesn&amp;#x2019;t print it because it&amp;#x2019;s not part of the &lt;a class="url http outside" href="http://www.travellermap.com/formats.htm"&gt;UWP&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;I decided that systems with code Amber and piratets are considered code Red. The rules just say that &amp;#x201c;Red codes are given out at the discretion of the Referee.&amp;#x201d;&lt;/p&gt;&lt;p&gt;The cool thing is that you can paste &amp;amp; copy the resulting list into the &lt;a class="local" href="http://alexschroeder.ch/wiki/2009-09-11_Traveller_Map_Based_on_UWP"&gt;map generator&lt;/a&gt; and generate the map to go along with it.&lt;/p&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Traveller"&gt;Traveller&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Traveller"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=RPG"&gt;RPG&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/RPG"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Generator"&gt;Generator&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Generator"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://alexschroeder.ch/wiki?action=tag;id=Perl"&gt;Perl&lt;/a&gt; &lt;a class="feed tag" title="Feed for this tag" rel="feed" href="http://alexschroeder.ch/wiki/feed/full/Perl"&gt;&lt;img src="http://alexschroeder.ch/pics/rss.png" alt="RSS" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Fri, 11 Sep 2009 23:28:36 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2009-09-11_Random_Subsector_Generator</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>updated</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>2</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2009-09-11_Random_Subsector_Generator</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2009-09-11_Random_Subsector_Generator</wiki:diff>
<category>Traveller</category>
<category>RPG</category>
<category>Generator</category>
<category>Perl</category>
</item>

<item>
<title>Elite Names</title>
<link>http://alexschroeder.ch/wiki/2009-09-11_Elite_Names</link>
<guid>http://alexschroeder.ch/wiki/2009-09-11_Elite_Names</guid>
<description>&lt;p&gt;I&amp;#x2019;m thinking of a system name generator for my upcoming Traveller UWP generator.&lt;/p&gt;&lt;p&gt;I was trying to write code in Perl, based on code in Python &lt;a class="url http number" href="http://forum.cartographersguild.com/showpost.php?p=40167&amp;amp;postcount=12"&gt;&lt;span&gt;&lt;span class="bracket"&gt;[&lt;/span&gt;1&lt;span class="bracket"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, based on code in C &lt;a class="url http number" href="http://www.iancgbell.clara.net/elite/text/index.htm"&gt;&lt;span&gt;&lt;span class="bracket"&gt;[&lt;/span&gt;2&lt;span class="bracket"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;, reverse engineered from assembly code written for the BBC &amp;#x2013; the &lt;a class="near" title="Wikipedia" href="http://en.wikipedia.org/wiki/Elite (video game)"&gt;Elite&lt;/a&gt; random name generator. The fool that I was &amp;#x2013; I didn&amp;#x2019;t realize that just a a few posts later &lt;a class="url http number" href="http://forum.cartographersguild.com/showpost.php?p=40184&amp;amp;postcount=16"&gt;&lt;span&gt;&lt;span class="bracket"&gt;[&lt;/span&gt;3&lt;span class="bracket"&gt;]&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; somebody had done just that. &lt;img class="smiley" src="http://www.emacswiki.org/pics/dead.png" alt="X(" /&gt;&lt;/p&gt;&lt;p&gt;Then I started wondering: How the hell did this work? How much of the magic was just a pseudo random number generator? Clearly the algorithm was picking pairs of characters from the digraph string. There was an element controlling the length of the name, and that&amp;#x2019;s it? I tried it, but the names were less than stellar. Then I realized that the digraph string probably listed pairs that went together well. I should not be picking starting characters at random, I should be picking pairs at random. The result is this:&lt;/p&gt;&lt;pre class="real"&gt;my $digraphs = "..lexegezacebisousesarmaindire.aeratenberalavetiedorquanteisrion";
my $max = length($digraphs);

sub name {
  my $length = 5 + rand(5); # 4-8
  my $name = '';
  while (length($name) &amp;lt; $length) {
    $name .= substr($digraphs, 2*int(rand($max/2)), 2);
  }
  $name =~ s/\.//g;
  return $name;
}

for my $n (0..100) {
  printf "%3d. %s\n", $n, name();
}&lt;/pre&gt;&lt;p&gt;Random names:&lt;/p&gt;&lt;pre&gt;  1. ertexebeis
  2. cetiisar
  3. marain
  4. atsocezaat
  5. biraza
  6. tezaordi
  7. beenes
  8. orxeesle
  9. quxeisis
 10. errabiat
 11. riquatis
 12. inisered
 13. diraanated
 14. orquisbiqu
 15. arvevein
 16. lebereza
 17. gemazaisen
 18. inzadius
 19. isbixebiti
 20. vemama&lt;/pre&gt;&lt;p&gt;Sounds good to me! &lt;img class="smiley" src="http://www.emacswiki.org/pics/vee.png" alt="vee" /&gt;&lt;/p&gt;&lt;p&gt;And by changing the digraph, you can get different sounds, too.&lt;/p&gt;&lt;pre class="real"&gt;my $digraphs = "fafemalunabararerixevivoine.n.q.pazizozutatetitotu..";&lt;/pre&gt;&lt;p&gt;Results in this list:&lt;/p&gt;&lt;pre&gt;  1. zuravo
  2. zobarati
  3. zireqti
  4. efare
  5. votuqbain
  6. vomafezo
  7. fantaetu
  8. xeinra
  9. ferati
 10. ribabata&lt;/pre&gt;&lt;p&gt;I like it! &lt;img class="smiley" src="http://www.emacswiki.org/pics/ok.png" alt="ok" /&gt;&lt;/p&gt;&lt;p&gt;More variation in name length?&lt;/p&gt;&lt;pre class="real"&gt;  my $length = 4 + rand(7); # 4-8&lt;/pre&gt;&lt;p&gt;Tags: &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=RPG"&gt;RPG&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:RPG"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Software"&gt;Software&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:Software"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Generator"&gt;Generator&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:Generator"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Traveller"&gt;Traveller&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:Traveller"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt; &lt;a class="outside tag" title="Tag" rel="tag" href="http://www.emacswiki.org/alex?action=tag;id=Elite"&gt;Elite&lt;/a&gt; &lt;a class="feed tag" title="Feed für diesen Tag" rel="feed" href="http://www.emacswiki.org/alex?action=journal;full=1;search=tag:Elite"&gt;&lt;img src="http://www.emacswiki.org/alex/pics/rss.png" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
<pubDate>Fri, 11 Sep 2009 14:38:25 GMT</pubDate>
<comments>http://alexschroeder.ch/wiki/Comments_on_2009-09-11_Elite_Names</comments>
<dc:contributor>AlexSchroeder</dc:contributor>
<wiki:status>new</wiki:status>
<wiki:importance>major</wiki:importance>
<wiki:version>1</wiki:version>
<wiki:history>http://alexschroeder.ch/wiki?action=history;id=2009-09-11_Elite_Names</wiki:history>
<wiki:diff>http://alexschroeder.ch/wiki?action=browse;diff=1;id=2009-09-11_Elite_Names</wiki:diff>
<category>RPG</category>
<category>Software</category>
<category>Generator</category>
<category>Traveller</category>
<category>Elite</category>
</item>
</channel>
</rss>
