<?xml version="1.0" encoding="iso-8859-1"?>
<rss version="2.0">
	
	<channel>
		<title>Scarybug</title>
		<link>http://www.tablenaked.com/blogs/scarybug/index.php</link>
		<description>Scarybug's Adventures</description>
		<language>en</language>
		<managingEditor>pivotadmin@tablenaked.com</managingEditor>
                <copyright>Copyright 2007</copyright>
		<generator>Pivot Pivot - 1.40.0: 'Dreadwind'</generator>
		<pubDate>Thu, 8 Mar 2007 11:03:47 -0800</pubDate>
		<ttl>60</ttl>
		
		
		
		
		<item>
			<title>Hibernating Frogs</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=316&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=316&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ I just thought I&#39;d mention that last weekend I had a population of frogs that evolved hibernation naturally. Frogs use the least energy when resting, 5 times less than any other biot. This is because of those legends of ancient frogs living in stasis inside stones for decades. I did specifically expect to eventually see a natural hibernation stratagy evolve in Biots. It was nice to see it actually happen last weekend. The population was really successful too. They were around for a few dozen &quot;years&quot; at least. Eventually they were usurped by some Gilas, probably after a dramatic climate change. I wasn&#39;t watching the entire time. ]]></description>
			<guid isPermaLink="false">316@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug</category>
			<pubDate>Thu, 08 Mar 2007 05:03:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>Polish Notation Parser in ActionScript</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=315&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=315&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ I&#39;m planning on writing a Space Shooter that evolves enemies using a Genetic Algorithm. To do this, I need a simple programming language that the enemies will follow. I&#39;m planning on building it using Polish Notation because then I don&#39;t have to bother with precedence and can just breeze through strings to evaluate them as code. The first hurdle is the Artimetic Operators...var stack:Array = new Array();<br />
<br />
function evaluate(prog_str:String):Number{<br />
&nbsp;&nbsp;&nbsp; prog = prog_str.split(&quot; &quot;); //convert space delimeted string to an array<br />
&nbsp;&nbsp; &nbsp;<br />
&nbsp;&nbsp;&nbsp; for(x in prog){ //go backwards throught the prog array<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trace(stack);<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(isNaN(Number(prog[x]))){ //look for Not a Number<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trace(prog[x]);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //trace the function we&#39;re about to call<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //take the top two items from the stack, evaluate them, push down the answer<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //the this[] dealie is evaluating the function with the same name as the string. nifty, huh?<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stack.push(this[prog[x]](stack.pop(), stack.pop()));<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else{<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; stack.push(Number(prog[x])); //convert the element to a Number, and push it on the stack<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; if(stack[1]!=undefined){<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; trace(&quot;ERROR IN ARITHMETIC STACK&quot;);&nbsp; //leftovers means there was a grammar error in the string. <br />
<br />
&nbsp;&nbsp;&nbsp; }<br />
&nbsp;&nbsp;&nbsp; return Number(stack.pop());&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //return the answer, the (hopefully only) number left in the stack<br />
<br />
}<br />
<br />
<br />
//define some math functions, note the args are switched because I&#39;m <br />
//backwardsifying the reverse polish notation to get regular type polish notation!<br />
<br />
function ADD(arg2, arg1):Number{<br />
&nbsp;&nbsp;&nbsp; return&nbsp;&nbsp;&nbsp;&nbsp; arg1+arg2;<br />
}<br />
<br />
function MUL(arg2, arg1):Number{<br />
&nbsp;&nbsp;&nbsp; return&nbsp;&nbsp;&nbsp;&nbsp; arg1*arg2;<br />
}<br />
<br />
function SUB(arg2, arg1):Number{<br />
&nbsp;&nbsp;&nbsp; return&nbsp;&nbsp;&nbsp;&nbsp; arg1-arg2;<br />
}<br />
<br />
function DIV(arg2, arg1):Number{<br />
&nbsp;&nbsp;&nbsp; return&nbsp;&nbsp;&nbsp;&nbsp; Math.floor(arg1/arg2);<br />
}<br />
<br />
function MOD(arg2, arg1):Number{<br />
&nbsp;&nbsp;&nbsp; return arg1%arg2;<br />
}<br />
<br />
function POW(arg2, arg1):Number{<br />
&nbsp;&nbsp;&nbsp; return pow(arg1, arg2);&nbsp;&nbsp; &nbsp;<br />
}<br />
<br />
//test it out with some function calls!<br />
trace(&quot;evaluate: &quot;+evaluate(&quot;ADD MUL 4 SUB 9 1 2&quot;));<br />
trace(&quot;evaluate: &quot;+evaluate(&quot;MUL ADD MUL 4 SUB 9 1 2 DIV 1 1&quot;)); ]]></description>
			<guid isPermaLink="false">315@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug</category>
			<pubDate>Wed, 07 Mar 2007 09:16:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>Logical, Altruistic Biots</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=312&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=312&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ <p>
Last night I had some time to add some more logical operations to the biot brian! Their &quot;mental actions&quot; used to only consist of AND, SKIP, and IF/ELSE blocks, which are described on the <a href="http://www.scarybug.org/biots/info.html"  target="_blank" target='_blank'>biots info page</a>.
</p>
<p>
The new mental actions are OR, XOR, and NOCOPY. OR and XOR work like AND, evaluating two conditions instead of the usual one in order to decide to try an associated action. NOCOPY skips the next meme if its action is the same action the biot took in the previous turn. I can see all of these abilities adding useful sophistication to the Biot mind. For instance a Biot could easily use NOCOPY in an algorithm that makes them curve left, then curve right as they walk, sweeping a wider area, perhaps using vision to tell them to move towards food.
</p>
<p>
I also added an action called FEED. Biots can use this action to donate some energy to a fellow biot (or even a plant!). This is a test to see if Biots will evolve altruism given the chance. I can see a parent feeding its children being a useful survival strategy. Feeding plants could even encourage farming, but I doubt biots can &quot;think&quot; that far ahead.</p> ]]></description>
			<guid isPermaLink="false">312@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug</category>
			<pubDate>Wed, 07 Feb 2007 10:16:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>Laser Bunnies!</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=311&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=311&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ <p>
Just an anecdote. I&#39;m sure these biots will kill each other off soon, but I&#39;ve got some rabbits that blast each other with lasers for no good reason. They don&#39;t even eat the meat!
</p>
<p>
Edit: Yep. they&#39;re all dead. Such sensless destruction! When will they learn?</p> ]]></description>
			<guid isPermaLink="false">311@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug</category>
			<pubDate>Mon, 05 Feb 2007 09:06:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>Genetic Algorithms Can Learn Conceptual Relationships?</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=310&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=310&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ Or at least act like they do. I&#39;m looking at a population of biots that has made the connection between trees and fruit. Specifically, there are some pine-cone eating species that make sure they stay inside the pine forests, curving around back into the woods whenever they enter a clearing, or a copse of trees that aren&#39;t pine. Obviously, this means they are much more likely to find their favorite food. Unfortunately, like most really-efficient food-finding algorithms in Biots, it makes the tree population suffer. ]]></description>
			<guid isPermaLink="false">310@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug</category>
			<pubDate>Mon, 05 Feb 2007 08:56:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>Searching for food and territoriality</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=309&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=309&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ <p>
&nbsp;I&#39;m looking at a population of biots that spends most of their time spinning around. It looks like most of them are moving up to food when it appears ahead of them. This is a pretty straightforward searching strategy. It&#39;s probably an easier algorithm to come by then walking until food comes into vision, and then turning the correct direction. It&#39;s probably just as simple an algorithm as walking until food is felt, and then spinning until it&#39;s in front of them so they can eat it, but it uses less energy and covers a different kind of area. Since food tends to appear near other food, moving towards one thing to eat puts biots in a position to discover more food. 
</p>
<p>
&nbsp;The interesting thing about this search strategy is that the area a hundred pixels around each biot is hotly contested territory. When a biot feels another biot, it uses it&#39;s pikachu-like electricity power to zap the other biot, flinging it aside and stunning it for a few turns. Obviously biots this concerned with territory aren&#39;t so good at sexual reproduction. They reproduce asexually, and one sibling will zap the other away to make sure they aren&#39;t competing so directly for food in the same area.
</p>
<p>
&nbsp;A little while earlier, some of the biots were attacking and eating intruders instead of zapping them, but the zapping biots quickly became the dominant strain. This is probably for two reasons. One, an attacking biot will get zapped by zapping biot before being able to kill and eat it. Two, attacking biots either compete with, or eat their siblings, while zapping biots settle territory disputes quickly and then get on with their separate lives.</p> ]]></description>
			<guid isPermaLink="false">309@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug</category>
			<pubDate>Thu, 01 Feb 2007 05:02:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>Teleporting Penguins</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=308&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=308&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ <p>
I decided to turn off the &quot;cheat&quot; on a local version of Biots that started newly created biots out with instructions to reproduce and eat. The Mac at work is a dual-processor, which means I can actually take advantage of the fact that Biots is multi-threaded. In biots, the trees can mutate into laying eggs instead of fruit. I use this to generate a whole population from a singe seed, and also to simulate &quot;genetic drift&quot;. But now these mutant children of plants don&#39;t get any more breaks, and it takes a while of random trial and error to get an animal that will move, eat, and reproduce.
</p>
<p>
&nbsp;But it payed off, thanks to the speed of this computer. Right now I&#39;m looking at a population of biots whose reproductive strategy is to 1) teleport to a random location 2) feel for a piece of fruit, or a pine-cone 3) turn until they face the food 3)&nbsp; eat 4) reproduce asexually, if they have enough energy. 5) some of them hybernate in winter, while others continue on (thereby reducing competition)
</p>
<p>
&nbsp;All completely unprogrammed at the beginning! These biots figured out how to eat and reproduce on their own! 
</p>
<p>
&nbsp;Also, I added sunflowers. Sunflowers grow very fast in the summer, but not at all during the rest of the year. They can&#39;t pass energy to other sunflowers, like grass and lilypads do. They also count as protein, food, and leafy during the summer (they are hidden during winter and flood, and just leafy the rest of the year)</p> ]]></description>
			<guid isPermaLink="false">308@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug</category>
			<pubDate>Fri, 26 Jan 2007 04:23:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>Artificial Unlife?</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=307&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=307&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ <p>
I finally got around to listening to the <a href="http://www.biota.org"  target="_blank" target='_blank'>Biota</a>.org podcasts, which reminded me that I wanted to add zombies to <a href="http://www.scarybug.org/biots/"  target="_blank" target='_blank'>biots</a>. Actually, playing Urban Dead, and adding both ALife characters and Undead to the Nerdcore Card Game rules also may have had something to do with it.
</p>
<p>
Zombies can&#39;t have babies, but they can inject their (often mutated) programming into another biot just by biting it! 
</p>
<p>
Zombies can be added via the ridiculously long menu, or by waiting for a <a href="http://www.scarybug.org/biots/toadstool.gif"  target="_blank" target='_blank'>special mutant fungus</a> to appear and then wating for a biot to eat it.<br />
<br />
Here are the <a href="http://scarybug.org/biots/imgzom/test.html"  target="_blank" target='_blank'>sprites</a> I made for the zombies. Spooky!<a href="http://scarybug.org/biots/imgzom/test.html"  target="_blank" target='_blank'></a><br />
<br />
<a href="http://www.scarybug.org/biots/spritesheet.html"  target="_blank" target='_blank'>Grar!</a>
</p>
<p>
By the way, if Brian ever gets around to setting up my wiki space, I&#39;m
going to start putting the Nerdcore Card Game rules online. I&#39;d also like to put up a Biots wiki.</p> ]]></description>
			<guid isPermaLink="false">307@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug</category>
			<pubDate>Wed, 24 Jan 2007 10:26:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>More by Scarybug</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=34&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=34&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ <a href="http://www.scarybug.org/biots"  target='_blank'>Biots</a><br  />
<a href="http://www.wurb.com/if/game/2398"  target='_blank'>Magocracy</a><br  />
<a href="http://www.fief.org/ShackledCity/The_Book_of_Ignatious"  target='_blank'>The Book of Ignatious</a><br  />
<a href="http://www.tablenaked.com/blogs/scarybug/rss.xml"  target='_blank'>Scarybug's Adventures RSS</a> ]]></description>
			<guid isPermaLink="false">34@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug-links</category>
			<pubDate>Wed, 30 Nov 2005 11:13:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>My Webcomics</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=33&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=33&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ <a href="http://www.piratejesus.com/nerdcore"  target='_blank'>Nerdcore: The Core Wars</a><br  />
<a href="http://www.piratejesus.com/001.html"  target='_blank'>Pirate Jesus</a><br  />
<a href="http://www.piratejesus.com/worldforum/archives.html"  target='_blank'>World Forum</a> ]]></description>
			<guid isPermaLink="false">33@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug-links</category>
			<pubDate>Wed, 30 Nov 2005 11:07:00 -0800</pubDate>
		</item>
		
		
		
		<item>
			<title>Personal Sites</title>
			<link>http://www.tablenaked.com/blogs/pivot/entry.php?id=32&amp;w=scarybug</link>
			<comments>http://www.tablenaked.com/blogs/pivot/entry.php?id=32&amp;w=scarybug#comm</comments>
                        <description><![CDATA[ <a href="http://www.scarybug.org"  target='_blank'>Scarybug's Lair</a><br  />
<a href="http://www.livejournal.com/~scarybug"  target='_blank'>Scarybug's LiveJournal</a> ]]></description>
			<guid isPermaLink="false">32@http://tablenaked.com/blogs/pivot/</guid>
			<category>scarybug-links</category>
			<pubDate>Wed, 30 Nov 2005 11:04:00 -0800</pubDate>
		</item>
		
		
		
	</channel>
</rss>
