<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/lib/exe/css.php?s=feed" type="text/css"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>Ryan Fox</title>
    <subtitle></subtitle>
    <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/"/>
    <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/</id>
    <updated>2012-05-16T12:49:49-04:00</updated>
    <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
<link rel="self" type="application/atom+xml" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/feed.php" />
    <entry>
        <title>about_me</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=about_me&amp;rev=1267925485&amp;do=diff"/>
        <published>2010-03-06T20:31:25-04:00</published>
        <updated>2010-03-06T20:31:25-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=about_me&amp;rev=1267925485&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1,5 +1,5 @@
- {{http://a1.twimg.com/profile_images/664418706/2010-01-28-085559_bigger.jpg}}
+ {{http://www.gravatar.com/avatar/fcc79759f6398caee5df36cde61b36b7.png}}
  
  I'm Ryan Fox, an undergrad student at the [[http://www.uwaterloo.ca|University of Waterloo]].
  
  I'm studying [[http://ece.uwaterloo.ca|Computer Engineering]], with an option in [[http://ugradcalendar.uwaterloo.ca/?pageID=343|Cognitive Science]].

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>autocomparator</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=autocomparator&amp;rev=1268477133&amp;do=diff"/>
        <published>2010-03-13T05:45:33-04:00</published>
        <updated>2010-03-13T05:45:33-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=autocomparator&amp;rev=1268477133&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -3,5 +3,5 @@
  
  Currently, the documentation is in a PDF because I haven't gotten around to pulling it into the wiki properly.
  
    * {{:how_to_use_the_autocomparator.pdf|How To Use The AutoComparator}}
-   * {{:autocomparator.xls|Download}}
+   * {{:autocomparator.xls|AutoComparator.xls}}

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>circuit_solver</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=circuit_solver&amp;rev=1268475290&amp;do=diff"/>
        <published>2010-03-13T05:14:50-04:00</published>
        <updated>2010-03-13T05:14:50-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=circuit_solver&amp;rev=1268475290&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1,7 +1,9 @@
  ====== Circuit Solver ======
  
- ==== Code ====
+ I'll write a description at some point.
+ 
+ ===== Code =====
  &amp;lt;code perl&amp;gt;
  #!/usr/bin/perl
  use strict;
  use warnings;
@@ -134,11 +136,11 @@
  # Print the equivalent resistance.
  print abs($solution[$nodes][0]/$solution[$nodes+@components][0]) .&amp;quot;\n&amp;quot;;
  &amp;lt;/code&amp;gt;
  
- ==== To Do ====
+ ===== To Do =====
    - Use a sparse matrix library. This will likely make things faster and use less memory!
    - Support AC circuits
      * When a capacitor or inductor is seen, take the real value of the impedance as resistance.
      * Need to do a frequency sweep
    - Support transistor circuits
      * Need to find/make a matrix library that will allow adding a variable instead of just a value (dependent voltage sources)

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>devkitarm_libnds_installer_for_linux_osx</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=devkitarm_libnds_installer_for_linux_osx&amp;rev=1252534472&amp;do=diff"/>
        <published>2009-09-09T18:14:32-04:00</published>
        <updated>2009-09-09T18:14:32-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=devkitarm_libnds_installer_for_linux_osx&amp;rev=1252534472&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -30,8 +30,9 @@
  
  Note: Unless there's a big push for it, I probably won't get around to finishing off the Windows stuff, since there already is a [[http://www.devkitpro.org/downloads/devkitpro-windows-installer/|Windows installer]].
  
  ===== Code =====
+ [[http://code.assembla.com/rfox-ds/subversion/node/blob/libnds-downloader/libnds-downloader.pl|Download]]
  &amp;lt;code perl 1&amp;gt;
  extern&amp;gt;http://code.assembla.com/rfox-ds/subversion/node/blob/libnds-downloader/libnds-downloader.pl
  &amp;lt;/code&amp;gt;
  

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>directory_annotations</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=directory_annotations&amp;rev=1257670031&amp;do=diff"/>
        <published>2009-11-08T03:47:11-04:00</published>
        <updated>2009-11-08T03:47:11-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=directory_annotations&amp;rev=1257670031&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -62,21 +62,42 @@
  }
  &amp;lt;/code&amp;gt;
  
  And another called ''annotate'':
- &amp;lt;code&amp;gt;
- #!/bin/bash
- echo &amp;quot;$*&amp;quot; &amp;gt;&amp;gt; .ls
+ &amp;lt;code perl&amp;gt;
+ #!/usr/bin/perl
+ use strict;
+ use warnings;
+ 
+ open(my $file, '&amp;gt;&amp;gt;', &amp;quot;.ls&amp;quot;) or die(&amp;quot;Unable to open .ls&amp;quot;);
+ 
+ if(@ARGV)
+ {
+     print $file &amp;quot;@ARGV\n&amp;quot;;
+ }
+ else
+ {
+     my @lines = &amp;lt;&amp;gt;;
+     print $file @lines;
+ }
+ 
+ close($file);
  &amp;lt;/code&amp;gt;
  
  ===== How To Use =====
  I made these executable, put them on my ''PATH'', (I like to use ''~/.bin/'') and set an alias for ''ls'' in my ''~/.bashrc'' file:
  &amp;lt;code&amp;gt;alias ls='newls --color=auto'&amp;lt;/code&amp;gt;
  
- Now, if you want to make an annotation for the current directory:
+ Now, if you want to make an annotation for the current directory, it can either read from stdin, or the command-line:
+ &amp;lt;code&amp;gt;
+ ryan@caffeine:~$ annotate
+ This is my home directory. Whee!
+ &amp;lt;/code&amp;gt;
+ or
  &amp;lt;code&amp;gt;
  ryan@caffeine:~$ annotate This is my home directory. Whee!
  &amp;lt;/code&amp;gt;
+ (Note, if you're typing at the command-line, you must escape any quotation marks that you want to appear, and enclose many special characters in non-escaped quotes.)
  
  To see your annotations:
  &amp;lt;code&amp;gt;
  ryan@caffeine:~$ ls

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>ideas</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=ideas&amp;rev=1272953223&amp;do=diff"/>
        <published>2010-05-04T02:07:03-04:00</published>
        <updated>2010-05-04T02:07:03-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=ideas&amp;rev=1272953223&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -5,5 +5,5 @@
      * text editor
      * allow for custom code to be written (in C?) and then linked into the ROM. Perhaps allow for ROM expansion and replace pointers
      * final &amp;quot;compile&amp;quot; stage might have to calculate a checksum?
  
-   * Extract map data from ROMs to draw them. Why? For fun!
+   * Extract map data from ROMs to draw them. Why? For fun! [[http://www.romhacking.net/docs/dwbytes.txt]]

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>kirsch_edge_detector</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=kirsch_edge_detector&amp;rev=1267511989&amp;do=diff"/>
        <published>2010-03-02T01:39:49-04:00</published>
        <updated>2010-03-02T01:39:49-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=kirsch_edge_detector&amp;rev=1267511989&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1 +1,6 @@
+ Note: The script is rather slow, and runs for every page view.
  
+ {{http://rcfox.ca/img.png}}
+ {{http://www.eng.uwaterloo.ca/cgi-bin/cgiwrap/rcfox/kirsch.pl?img=http://rcfox.ca/img.png&amp;amp;.png?}}
+ 
+ Source: [[http://github.com/rcfox/Kirsch-Edge-Detector]]

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>linux_development_tools_for_the_msp430_launchpad</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=linux_development_tools_for_the_msp430_launchpad&amp;rev=1278145557&amp;do=diff"/>
        <published>2010-07-03T04:25:57-04:00</published>
        <updated>2010-07-03T04:25:57-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=linux_development_tools_for_the_msp430_launchpad&amp;rev=1278145557&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1 +1,67 @@
+ ~~NOTOC~~
+ ====== Linux Development Tools for the MSP430 LaunchPad ======
+ {{  :launchpad.png|}}
  
+ Texas Instruments has released the [[http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_(MSP-EXP430G2)|LaunchPad]],
+ a new open-source development board for the value line of the MSP430. The chips aren't very powerful, but at
+ [[http://processors.wiki.ti.com/index.php/MSP430_LaunchPad_(MSP-EXP430G2)#Quick_Links|$4.30]], it's hard to go wrong!
+ 
+ However, they do not give any official support for Linux development. There is already a GCC toolchain for the MSP430,
+ and little-to-no effort is needed to get it working with the LaunchPad.
+ 
+ ===== Getting Started =====
+ ==== GCC ====
+ The [[http://mspgcc4.sourceforge.net|mspgcc4 project]] offers a GCC toolchain targeted at the MSP430.
+ Compared to the (somehow much more visible) [[http://mspgcc.sourceforge.net/|mspgcc project]], it boasts better optimization, and
+ better support for C++.
+ 
+ From the [[http://mspgcc4.sourceforge.net/#building|building]] section, you can get latest version of mspgcc4 with:
+   svn checkout https://mspgcc4.svn.sourceforge.net/svnroot/mspgcc4
+   cd mspgcc4 &amp;amp;&amp;amp; sh buildgcc.sh
+ (For me, the script's default options worked well.)
+ 
+ This will take a while to build...
+ 
+ ==== MSPDebug ====
+ In order to load programs to your board, you'll need [[http://mspdebug.sourceforge.net/|MSPDebug]].
+ 
+ Grab the latest version from the [[http://sourceforge.net/projects/mspdebug/files|Sourceforge download page]].
+ From the [[http://mspdebug.sourceforge.net/download.html|installation instructions]], you can build MSPDebug with:
+   sudo apt-get install libusb-dev libreadline-dev
+   make
+   sudo make install
+ (If you're not running Debian or Ubuntu, you'll need to get libusb and libreadline another way.)
+ 
+ ===== Programming the Board =====
+ ==== Temperature Demo ====
+ The code written for the TI's Windows tools needs to be modified to build with GCC.
+ 
+ For now, I've shamelessly (and without permission) stolen some modified code from
+ [[http://losinggeneration.homelinux.org/2010/07/02/msp430-launchpad-on-linux/|&amp;quot;losinggeneration&amp;quot;]].
+ 
+ You can get it here: {{:temperature-demo.tar.bz2|}}
+ 
+ To build the code, simply run:
+   make
+   
+ You should end up with a file called main.elf.
+ 
+ ==== Loading the Code ====
+ To load the code, run:
+   sudo mspdebug rf2500
+   prog main.elf
+ (If you'd like to be able to run mspdebug without sudo, check the
+ [[http://mspdebug.sourceforge.net/download.html|MSPDebug installation instructions]].)
+ 
+ As soon as you exit mspdebug, the program will start.
+ 
+ ==== Debugging ====
+ Instead of closing mspdebug, you can run the 'gdb' command. This will open a &amp;quot;remote target.&amp;quot;
+ 
+ From another terminal, run:
+   msp430-gdb main.elf
+   target remote localhost:2000
+ 
+ Do whatever you might want to do, like setting breakpoints, etc.
+ 
+ Since the program is technically already running on the board, use the 'continue' command to start debugging.

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>nds_1_dollar_gesture_recognition</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=nds_1_dollar_gesture_recognition&amp;rev=1268469146&amp;do=diff"/>
        <published>2010-03-13T03:32:26-04:00</published>
        <updated>2010-03-13T03:32:26-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=nds_1_dollar_gesture_recognition&amp;rev=1268469146&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1,4 +1,11 @@
  {{  :dollar.png|}}
+ 
+ This is a demo of the [[http://depts.washington.edu/aimgroup/proj/dollar/|1$ Gesture Recognition algorithm]], written for the Nintendo DS.
+ 
+ Each gesture is drawn with one stroke. That is, once you lift the stylus, the gesture is done. 
+ The demo is currently trained to recognize the entire alphabet, in the style most similar to how I write. This will probably cause problems for other people...
+ 
+ Also, if you happen to look at the code, I did something pretty terrible: All of the training data has been converted to C++ code, and is #included at the point where it's needed. I realize that this is a bad way of doing things, but I didn't care to figure out how to read files and parse them.
  
    * [[http://rcfox.ca/binaries/dollar.nds|Download]]
    * Source: [[http://github.com/rcfox/NDS-1-Dollar-Gesture-Recognition]]

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>nds_pathfinder</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=nds_pathfinder&amp;rev=1268361022&amp;do=diff"/>
        <published>2010-03-11T21:30:22-04:00</published>
        <updated>2010-03-11T21:30:22-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=nds_pathfinder&amp;rev=1268361022&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -3,5 +3,6 @@
  Draw a maze, and have the pathfinder app find its way through!
  
  Green shows a location that was considered in the pathfinding algorithm, and blue shows the final path.
  
- Source: http://github.com/rcfox/NDS-Pathfinder
+   * [[http://rcfox.ca/binaries/pathfinder.nds|Download]]
+   * Source: http://github.com/rcfox/NDS-Pathfinder

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>nds_polynomial_plotter</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=nds_polynomial_plotter&amp;rev=1268466527&amp;do=diff"/>
        <published>2010-03-13T02:48:47-04:00</published>
        <updated>2010-03-13T02:48:47-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=nds_polynomial_plotter&amp;rev=1268466527&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1 +1,6 @@
+ {{  :polynomial.png|}}
  
+ Tap some points on the screen, and this Nintendo DS demo will draw a polynomial that goes through all of them.
+ 
+   * [[http://rcfox.ca/binaries/polynomial.nds|Download]]
+   * Source: [[http://github.com/rcfox/NDS-Polynomial-Plotter]]

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>perltex_matrix_manipulation_macros</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=perltex_matrix_manipulation_macros&amp;rev=1278965150&amp;do=diff"/>
        <published>2010-07-12T16:05:50-04:00</published>
        <updated>2010-07-12T16:05:50-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=perltex_matrix_manipulation_macros&amp;rev=1278965150&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1 +1,166 @@
+ ===== How to Use =====
+ In Ubuntu, PerlTeX is available in the texlive-latex-extra package.
+   sudo apt-get install texlive-latex-extra
  
+ To compile the document:  
+   perltex --latex=pdflatex matrix_test.tex
+ 
+ ===== Code =====
+ &amp;lt;code latex&amp;gt;
+ \documentclass[12pt]{article}
+ \usepackage[utf8]{inputenc}
+ \usepackage{parskip}
+ \usepackage{url}
+ \usepackage{verbatim}
+ \usepackage{graphicx}
+ \usepackage{amsmath}
+ \usepackage{perltex}
+ 
+ \title{Document Title}
+ \author{Ryan Fox}
+ \date{\today}
+ 
+ \perlnewcommand{\defmatrix}[2]
+ {
+ 	sub trim
+ 	{
+ 		my $str = shift;
+ 		$str =~ s/^\s+|\s+$//g;
+ 		return $str;
+ 	}
+ 
+ 	use Math::Matrix;
+ 	use Math::Trig;
+ 	
+ 	my ($name, $text) = @_;	
+ 	my @matrix;
+ 
+ 	for(split /\\\\/, $text)
+ 	{
+ 		if(trim($_) ne &amp;quot;&amp;quot;)
+ 		{
+ 			my @split;
+ 			for(map {trim $_} split /&amp;amp;/)
+ 			{
+ 				my $tmp = $1 if $_ =~ s/\\//g;
+ 				my $e = eval $_ or eval $tmp or $_;
+ 				push @split, $e;
+ 			}
+ 			push @matrix, \@split;
+ 		}
+ 	}
+     $global{$name} = new Math::Matrix(@matrix);
+ 	return &amp;quot;&amp;quot;;
+ }
+ 
+ \perlnewcommand{\printmatrix}[1]
+ {
+ 	my $name = $_[0];
+ 	my @matrix = @{$global{$name}};
+ 	my $text = &amp;quot;\\begin{bmatrix}&amp;quot;;
+ 	for my $r (@matrix)
+ 	{
+ 		my @row = @{$r};
+ 		for(my $i = 0; $i &amp;lt; @row-1; ++$i)
+ 		{
+ 			$text .= &amp;quot;$row[$i] &amp;amp; &amp;quot;;
+ 		}
+ 		$text .= &amp;quot;$row[$#row] \\\\&amp;quot;;
+ 	}
+ 	$text .= &amp;quot;\\end{bmatrix}&amp;quot;;
+ 	return $text;
+ }
+ 
+ \perlnewcommand{\invmatrix}[2]
+ {
+ 	my $name = $_[0];
+ 	my $newname = $_[1];
+ 	my $matrix = $global{$name};
+ 	$global{$newname} = $matrix-&amp;gt;invert;
+ 	return &amp;quot;&amp;quot;;
+ }
+ 
+ \perlnewcommand{\solvematrices}[3]
+ {
+ 	my $result = $_[2];
+ 	my $matrix1 = $global{$_[0]};
+ 	my $matrix2 = $global{$_[1]};
+ 	$global{$result} = $matrix1-&amp;gt;concat($matrix2)-&amp;gt;solve;
+ 	return &amp;quot;&amp;quot;;
+ }
+ 
+ \perlnewcommand{\multmatrices}[3]
+ {
+ 	my $result = $_[2];
+ 	my $matrix1 = $global{$_[0]};
+ 	my $matrix2 = $global{$_[1]};
+ 	if(ref $matrix2)
+ 	{
+ 		$global{$result} = $matrix1-&amp;gt;multiply($matrix2);
+ 	}
+ 	else
+ 	{
+ 		$global{$result} = $matrix1-&amp;gt;multiply_scalar($_[1]);
+ 	}
+ 	return &amp;quot;&amp;quot;;
+ }
+ 
+ \perlnewcommand{\addmatrices}[3]
+ {
+ 	my $result = $_[2];
+ 	my $matrix1 = $global{$_[0]};
+ 	my $matrix2 = $global{$_[1]};
+ 	if(ref $matrix2)
+ 	{
+ 		$global{$result} = $matrix1-&amp;gt;add($matrix2);
+ 	}
+ 	else
+ 	{
+ 		my ($m,$n) = $matrix1-&amp;gt;size;
+ 		my @vals;
+ 		for(1..$m)
+ 		{
+ 			my @v;
+ 			for(1..$n)
+ 			{
+ 				push @v, $_[1];
+ 			}
+ 			push @vals,\@v;
+ 		}
+ 		my $tmp = new Math::Matrix(@vals);
+ 		$global{$result} = $matrix1-&amp;gt;add($tmp);
+ 	}
+ 	return &amp;quot;&amp;quot;;
+ }
+ 
+ \perlnewcommand{\dumper}[1]
+ {
+ 	use Data::Dumper;
+ 	return &amp;quot;\\begin{verbatim}&amp;quot;.Dumper($global{$_[0]}).&amp;quot;\\end{verbatim}&amp;quot;;
+ }
+ 
+ \begin{document}
+ 
+ \defmatrix{test}
+ {
+ 	sin(pi/2) &amp;amp; cos(0) &amp;amp; 0 \\
+ 	2 &amp;amp; -1 &amp;amp; 0 \\
+ 	1 &amp;amp; rand &amp;amp; 1 \\
+ }
+     
+ \defmatrix{test2}
+ {
+ 	(rand()&amp;gt;0.5 ? 1 : 0) &amp;amp; 0 &amp;amp; 1 \\
+ 	0 &amp;amp; 1 &amp;amp; 0 \\
+ 	1 &amp;amp; 0 &amp;amp; 0 \\
+ }
+     
+ \invmatrix{test2}{test2}
+ \addmatrices{test2}{test}{sol}
+ 
+ \begin{eqnarray}
+   \printmatrix{test} + \printmatrix{test2} = \printmatrix{sol}  
+ \end{eqnarray}
+ 
+ \end{document}
+ &amp;lt;/code&amp;gt;

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>resistor_network_generator</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=resistor_network_generator&amp;rev=1268474445&amp;do=diff"/>
        <published>2010-03-13T05:00:45-04:00</published>
        <updated>2010-03-13T05:00:45-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=resistor_network_generator&amp;rev=1268474445&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -30,9 +30,9 @@
  
  You might notice the swapping of node 0 and some other node. This is due to a restriction of the circuit solving method I used, which requires that node 0 be ground. Since I was solving for the resistance between two points, I put a voltage source across them, and then measure the current. To do this correctly, I need to move the ground node around.
  
  ==== Non-Dot-Mode ====
- In non-Dot-mode, the output of the program is similar to [[http://bwrc.eecs.berkeley.edu/Classes/icbook/SPICE/|SPICE]] syntax. The output is usually piped into the [[code:Circuit Solver]].
+ In non-Dot-mode, the output of the program is similar to [[http://bwrc.eecs.berkeley.edu/Classes/icbook/SPICE/|SPICE]] syntax. The output is usually piped into the [[Circuit Solver]].
  
  &amp;lt;code&amp;gt;
  V1 5 0 5
  R1 5 1 1

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>rpg_aquarium</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=rpg_aquarium&amp;rev=1267169436&amp;do=diff"/>
        <published>2010-02-26T02:30:36-04:00</published>
        <updated>2010-02-26T02:30:36-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=rpg_aquarium&amp;rev=1267169436&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1,6 +1,35 @@
- &amp;lt;php&amp;gt;
- echo &amp;lt;&amp;lt;&amp;lt; 'EOD'
- &amp;lt;object width=&amp;quot;425&amp;quot; height=&amp;quot;344&amp;quot;&amp;gt;&amp;lt;param name=&amp;quot;movie&amp;quot; value=&amp;quot;http://www.youtube.com/v/0HzK-yhYinc&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;param name=&amp;quot;allowFullScreen&amp;quot; value=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;param name=&amp;quot;allowscriptaccess&amp;quot; value=&amp;quot;always&amp;quot;&amp;gt;&amp;lt;/param&amp;gt;&amp;lt;embed src=&amp;quot;http://www.youtube.com/v/0HzK-yhYinc&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;&amp;quot; type=&amp;quot;application/x-shockwave-flash&amp;quot; allowscriptaccess=&amp;quot;always&amp;quot; allowfullscreen=&amp;quot;true&amp;quot; width=&amp;quot;425&amp;quot; height=&amp;quot;344&amp;quot;&amp;gt;&amp;lt;/embed&amp;gt;&amp;lt;/object&amp;gt;
- EOD;
- &amp;lt;/php&amp;gt;
+ ====== Introduction ======
+ For me, writing a game is itself a game, or at least an equivalent pass-time. But who has time to actually play games these days? After reading about Squidi's [[http://www.squidi.net/three/entry.php?id=29|Tiny Crawl World]] and [[http://www.squidi.net/three/entry.php?id=70|Tiny World Cities]], I thought it would be neat to make a game that plays itself! Sure, it probably wouldn't be that great to watch or play with, but it sounds like a lot of fun to make!
+ 
+ ====== Behaviour ======
+ Each AI has a stack of goals. Goals might be simple like &amp;quot;Move to (x,y)&amp;quot;, &amp;quot;Pickup this object&amp;quot;, or complex like &amp;quot;Kill every monster.&amp;quot; A goal might have certain conditions. For example, to pick up an object, you must be standing near it. This will add the &amp;quot;Move&amp;quot; goal to the goal stack. Once the &amp;quot;Move&amp;quot; goal has completed, (by moving onto the point specified) the goal is pushed off of the stack, and the &amp;quot;Pickup&amp;quot; goal will be resumed. When the &amp;quot;Pickup&amp;quot; goal has completed, (by picking up the object) the goal is pushed off the stack, and the next goal will be resumed.
+ 
+ There are generic goals too, like &amp;quot;Find&amp;quot;. This will find the closest //something//, and apply the specified goal to it, like &amp;quot;Kill&amp;quot; or &amp;quot;Pickup&amp;quot;.
+ 
+ Goals can be arbitrarily complex. This makes it easy to give out quests. For instance, a quest could be:
+   - If you don't have a sword, create one.
+   - Kill 10 monsters.
+   - Collect 5 flowers.
+   - High-five someone.
+   - Bring the flowers back to the quest giver.
+ 
+ Each part of the quest may involve adding more intermediate goals.
+ 
+ ====== Videos ======
+ I've made some videos of my AI in action so far. I'm not an artist, so people are blue squares, and monsters/objects are red squares.
+ 
+ ===== Gathering AI =====
+ The goal of these AI is the pick up all of the objects (red squares) and bring them back to the corner. 
+ ==== Dumb Agents ====
+ {{youtube&amp;gt;large:Q-jTfZxv-zU|Gathering AI - Dumb Agents}}
+ ==== A* Agents ====
+ {{youtube&amp;gt;large:_U05ccQ5lsA|Gathering AI - A* Agents}}
+ ==== A* Agents, Sharing Work ====
+ {{youtube&amp;gt;large:ku6fDRV-OGs|Gathering AI - A* Agents, Shared Work}}
+ 
+ ===== Fighting AI =====
+ In this case, the red squares are monsters, which the people have to fight. The people gain levels as they kill monsters, which eventually makes them much more powerful.
+ 
+ {{youtube&amp;gt;large:0HzK-yhYinc|Fighting AI, A* Agents}}
+ 
  

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>schedule_visualizer</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=schedule_visualizer&amp;rev=1257539792&amp;do=diff"/>
        <published>2009-11-06T15:36:32-04:00</published>
        <updated>2009-11-06T15:36:32-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=schedule_visualizer&amp;rev=1257539792&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -45,26 +45,29 @@
  }
  
  $algorithm = ( isset($_GET['algorithm']) ? $_GET['algorithm'] : &amp;quot;fcfs&amp;quot;);
  $cpus = ( isset($_GET['cpus']) ? $_GET['cpus'] : 2);  
+ $timeslice = ( isset($_GET['timeslice']) ? $_GET['timeslice'] : 2);  
  
  $selected[$algorithm] = &amp;quot;selected=\&amp;quot;selected\&amp;quot;&amp;quot;;
  
  
  echo &amp;lt;&amp;lt;&amp;lt;ENDFORM
- &amp;lt;img src=&amp;quot;http://www.eng.uwaterloo.ca/cgi-bin/cgiwrap/rcfox/scheduleviewer.pl?manual=$urlinput&amp;amp;cpus=$cpus&amp;amp;algorithm=$algorithm&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;
+ &amp;lt;img src=&amp;quot;http://www.eng.uwaterloo.ca/cgi-bin/cgiwrap/rcfox/scheduleviewer.pl?manual=$urlinput&amp;amp;cpus=$cpus&amp;amp;timeslice=$timeslice&amp;amp;algorithm=$algorithm&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;
  
  &amp;lt;form action=&amp;quot;&amp;quot; method=&amp;quot;get&amp;quot;&amp;gt;
  &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;id&amp;quot; value=&amp;quot;$id&amp;quot;&amp;gt;
  
  Algorithm:
  &amp;lt;select name=&amp;quot;algorithm&amp;quot;&amp;gt;
    &amp;lt;option value=&amp;quot;fcfs&amp;quot; $selected[fcfs]&amp;gt;First Come First Served&amp;lt;/option&amp;gt;
    &amp;lt;option value=&amp;quot;sf&amp;quot; $selected[sf]&amp;gt;Shortest First&amp;lt;/option&amp;gt;
+   &amp;lt;option value=&amp;quot;rr&amp;quot; $selected[rr]&amp;gt;Round Robin&amp;lt;/option&amp;gt;
  &amp;lt;/select&amp;gt; (More scheduling algorithms to come!)&amp;lt;br /&amp;gt;
  
  CPUs: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;cpus&amp;quot; value=&amp;quot;$cpus&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;
- 
+ Time Slice: &amp;lt;input type=&amp;quot;text&amp;quot; name=&amp;quot;timeslice&amp;quot; value=&amp;quot;$timeslice&amp;quot; /&amp;gt;&amp;lt;br /&amp;gt;
+ (Some of these parameters will only apply to specific algorithms, and will be ignored for the others.)&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;
  Jobs: &amp;lt;br /&amp;gt;
  [Release Time] [Execution Time]&amp;lt;br /&amp;gt;
  &amp;lt;textarea name=&amp;quot;manual&amp;quot; cols=&amp;quot;60&amp;quot; rows=&amp;quot;20&amp;quot;&amp;gt;$input&amp;lt;/textarea&amp;gt;
  &amp;lt;br /&amp;gt;

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>start</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=start&amp;rev=1278964916&amp;do=diff"/>
        <published>2010-07-12T16:01:56-04:00</published>
        <updated>2010-07-12T16:01:56-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=start&amp;rev=1278964916&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -21,5 +21,6 @@
    * Miscellaneous Experiments
      * [[Directory Annotations]]
      * [[RPG Aquarium]]
      * [[Linux Development Tools for the MSP430 LaunchPad]]
+     * [[PerlTeX Matrix Manipulation Macros]]
  

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>timing_diagram_generator</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=timing_diagram_generator&amp;rev=1256744524&amp;do=diff"/>
        <published>2009-10-28T11:42:04-04:00</published>
        <updated>2009-10-28T11:42:04-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=timing_diagram_generator&amp;rev=1256744524&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -50,5 +50,5 @@
  ENDFORM;
  
  &amp;lt;/php&amp;gt;
  
- Note: This wasn't really meant to be very user-friendly and will blow up at the slightly provocation. Please be gentle.
+ Note: This wasn't really meant to be very user-friendly and will blow up at the slightest provocation. Please be gentle.

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>weird_circuit_diagram_drawer</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=weird_circuit_diagram_drawer&amp;rev=1256742861&amp;do=diff"/>
        <published>2009-10-28T11:14:21-04:00</published>
        <updated>2009-10-28T11:14:21-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=weird_circuit_diagram_drawer&amp;rev=1256742861&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -21,9 +21,9 @@
  ENDINPUT;
  }
  
  echo &amp;lt;&amp;lt;&amp;lt;ENDFORM
- &amp;lt;img src=&amp;quot;http://www.eng.uwaterloo.ca/cgi-bin/cgiwrap/rcfox/circuit_drawer.pl?manual=$urlinput&amp;quot;&amp;gt;
+ &amp;lt;img style=&amp;quot;float:right;&amp;quot; src=&amp;quot;http://www.eng.uwaterloo.ca/cgi-bin/cgiwrap/rcfox/circuit_drawer.pl?manual=$urlinput&amp;quot;&amp;gt;
  
  &amp;lt;form action=&amp;quot;&amp;quot; method=&amp;quot;get&amp;quot;&amp;gt;
  &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;id&amp;quot; value=&amp;quot;$id&amp;quot;&amp;gt;
  &amp;lt;textarea name=&amp;quot;manual&amp;quot; cols=&amp;quot;40&amp;quot; rows=&amp;quot;20&amp;quot;&amp;gt;$input&amp;lt;/textarea&amp;gt;

&lt;/pre&gt;</summary>
    </entry>
    <entry>
        <title>worst-case_execution_time_analysis_presentation</title>
        <link rel="alternate" type="text/html" href="http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=worst-case_execution_time_analysis_presentation&amp;rev=1260787506&amp;do=diff"/>
        <published>2009-12-14T05:45:06-04:00</published>
        <updated>2009-12-14T05:45:06-04:00</updated>
        <id>http://www.eng.uwaterloo.ca/~rcfox/dokuwiki/doku.php?id=worst-case_execution_time_analysis_presentation&amp;rev=1260787506&amp;do=diff</id>
        <summary>&lt;pre&gt;
@@ -1,8 +1,10 @@
- I gave this presentation in November 2009 for [[http://www.ece.uwaterloo.ca/Graduate/Courses/F09/ece750t22.pdf|ECE 750: Distributed Real-time Software Systems]]. The topic was on Worst-Case Execution Time Analysis in Real-Time Systems.
+ I gave this presentation in November 2009 for [[http://www.ece.uwaterloo.ca/Graduate/Courses/F09/ece750t22.pdf|ECE 750: Distributed Real-time Software Systems]]. 
+ 
+ The topic was on Worst-Case Execution Time Analysis in Real-Time Systems.
  
    * Presentation
      * {{:wcet.pdf}}
      * {{:wcet-print.pdf}} (No overlays - better for printing)
  
    * Source
      * [[http://github.com/rcfox/Worst-Case-Execution-Time-Analysis-Presentation]]

&lt;/pre&gt;</summary>
    </entry>
</feed>

