Wednesday, April 23, 2008

Math Toys

In my spare time, I like to play with math. And flash. And now, I'll share a couple with you. Do keep in mind that the following experiments are completely bare bones and share little consistency with one another at this point, but I digress. Clicking these two titles will take you to a new window in which to experiment with two rather fascinating mathnerd toys.

Cellular Automata:
A very simple application of a one-dimensional cellular automata, allowing you to manipulate the rule (0-255), the initialization value (string of 1s and 0s), the total number of steps (Flash allows up to 2000), and the constraint (some value less than twice the length of the steps value). There are some great explanations of cellular automata on Wikipedia and Stephen Wolfram's Mathworld site. This is about a straightforward an implementation as possible. Changing a value takes effect by either changing then hitting enter, or tabbing out of the text field.

Fibonacci Game:
Very recently I've been working on a Flash adaptation of a very old Javascript app I created years and years ago with the hope of playing around and exploring the intricacies of these patterns in ways I couldn't before. The idea centers around the Fibonacci Sequence, specifically exploring the patterns found in isolating the final digits within all possible bases. (IE: base ten, then base in which we tend to think.) I talked to a 2nd degree friend at my very favorite IHOP many years ago. While the idea is almost entirely his, I took it upon myself to create a program that would automate the whole process. The application is slightly interactive; press 'h' to toggle the help window.
Also keep in mind that with the Fibonacci app, the higher the base, the computation time increases more or less exponentially, depending on the number of sets required to complete the entire sequence. This will require a fair amount of optimization, as it times out on my macbook pro some time around base 71, but it's fun up until that point!

This was a very brief introduction to these. I'll post a much more detailed exploration either here or at my personal blog soon enough. Just wanted to get this out and let you play!

Edit: This post has been severely edited, because (as is now obvious to me) I should never be trusted to write anything in the middle of the night after an enjoyable evening at the local pub. So if you read this last night and anything struck you as making zero sense, I've hopefully noticed that too and corrected it.

3 comments:

Scott said...

I beat the Fibonacci game but the Princess was in another castle...

Daniel said...

That's how I get you to purchase the sequel.

Rachael said...

See Daniel? This is why you are my most awesome friend.

Can't wait to play with these when I get home from today's neuro exam!