Tuesday, March 25, 2008

My Other Video Store

Since this is geek-oriented - I moved this from my main blog.

In my perpetual experiments with low-budget e-commerce, I've setup a store on zlio. Note that it is spelled Z-L-I-O, not "zilo". It took me two minutes. This is a lot like the Amazon aStore that I created. Which means that I don't actually ship anything. (I'll talk about my other experiments where I actually do ship things in another post.)

There is one difference: zlio will display items from several vendors. Apparently it was enough to cause Amazon to ban them from listing their products. I listed Rebel Without a Crew on my store. Through the link you can get if from Barnes and Nobles. Though of course as you may expect - Amazon had a much better price.

I actually like the look better then the aStore, because the page by itself is a full page. My aStore by itself needs some window dressing. You can compare them here:

Besides the product price issue, another drawback is that I couldn't find all the items that I have listed on my Amazon store - like my Sanyo Xacti VCP-E1 or Sony HVR-A1U. But I did find other Xacti cameras that I'd recommend.

If you think you'd like to try creating a store yourself, here's my referral link: http://www.zlio.com/signup?r=260186.

You may also find this article interesting:

Start a Web business in an extra few minutes (reuters.com)

Like with anything online, how much money you make depends on how much traffic you can generate to your store and peoples willingness to buy. Later I'll write about another way to make money online that will require a bit more work.

Friday, February 29, 2008

Gamasutra - Sponsored Feature: Democratizing Game Distribution: The Next Step

Gamasutra - Sponsored Feature: Democratizing Game Distribution: The Next Step

When we released XNA Game Studio Express 1.0 in December 2006, we had a feeling it would be an important development. After all, we were solving a set of common problems faced by all game developers. By offering a managed code framework and by empowering community members to run code safely on their Xbox 360 consoles, we made it easier for creators to write games.

With the release of XNA Game Studio 2.0, we added multiplayer support over Xbox LIVE and made several other improvements. We enhanced our tools with a steady stream of samples, articles, mini-games, and other types of content that are posted at http://creators.xna.com throughout the year. As the community embraced XNA Game Studio, we saw that we were redefining who could be a game developer.

The response of the creator community to XNA Game Studio has been overwhelmingly positive. At the time of this writing, we have seen over 800,000 downloads of our tools. Over 400 academic institutions incorporated XNA Game Studio and C# into their computer science curriculums.


I've always wanted to produce video games. But the barrier to entry for consoles has always been high. The good news is that that is no longer the case.

Tuesday, February 12, 2008

I'm going to let the computer figure it out

The problem with code written 16 years ago is that sometimes you can't figure it out - even when you're the one who wrote it. On top of that, most programmers will look at code they wrote so many years ago and gag at how bad it is. I'm having that problem with my Formula Tree code.

I'm sure if I wanted to bother I could reverse engineer my own code and figure out where I was going with it. But I decided that I'm going to take a different approach. I'm going to use Genetic Programming to finish the code. Yes, I'm going to let the computer figure it out.

There are several reasons:

* I'm more interested in working on GP than finishing the Formula Tree code - this way I can combine the two.
* Every thought I've had for resolving the parentheses problem doesn't seem very elegant.
* The application is perfect for Genetic Programming.

Think about it. What does the program need to do? Simple: take a formula as an input along with a variable to solve. Then produce another formula as an output. It's a simple transformation problem where the input and expected output can be listed along side each other in a table.

I will grant that the solution won't be very simple. It will probably require some tree manipulation. But I could help the process along by giving each Genetic Program access to a special library for manipulating trees. I could even make it so that the input to the program is a tree, as well as the expected output. That way the GP can operate at a more abstract level. I don't have to wait for it to evolve tree manipulation primitives to get started.

Monday, February 11, 2008

Advances in Genetic Programming

If you are interested in learning about Genetic Programming, a good place to start is the book Advances in Genetic Programming edited by Kenneth E. Kinnear.


The book contains a compilation of chapters written by several authors. The most prominent is John R. Koza, who provides a very good introduction to GP. Mr. Koza is the author of the definitive book Genetic Programming: On the Programming of Computers by Means of Natural Selection (Complex Adaptive Systems). But before you start with his 800 page explanation, the Kinnear book is a less overwhelming introduction.

You can find more information and the Table of Contents at the MIT Press Web site.

While looking up the Kinnear book on Amazon, I discovered that there were two follow-ups written. I just ordered copies and will review them at a later date.

Labels:

Friday, February 8, 2008

Formula Trees



I dug out some old code that I originally wrote back in 1992 for solving equations. At the time it was command line based (remember command lines?) and I would dump the output to a text file. The text output would represent the original formula as a tree like this:


Node # 1| 0 : [ D ] <- [ = ] -> 3 : [ - ]
Node # 3| 2 : [ A ] <- [ - ] -> 5 : [ / ]
Node # 5| 4 : [ B ] <- [ / ] -> 6 : [ C ]


I'd then have to grab a pen and sketch things out to visualize it. I've always wanted to combine such programs with Flash and ActionScript. The screenshot is of my very first rudimentary attempt.

The code lets me select a variable from the formula and solve it. The way I do that is by manipulating the tree. Here's the output from the trace window:


solveFormulaFor( C )
moveFormulaTree()
... moving: -
Node # 1| 2 : [ A ] <- [ = ] -> 3 : [ + ]
Node # 3| 0 : [ D ] <- [ + ] -> 5 : [ / ]
Node # 5| 4 : [ B ] <- [ / ] -> 6 : [ C ]
moveFormulaTree()
... moving: +
Node # 1| 5 : [ / ] <- [ = ] -> 3 : [ - ]
Node # 3| 2 : [ A ] <- [ - ] -> 0 : [ D ]
Node # 5| 4 : [ B ] <- [ / ] -> 6 : [ C ]
moveFormulaTree()
... moving: /
Node # 1| 4 : [ B ] <- [ = ] -> 5 : [ * ]
Node # 3| 2 : [ A ] <- [ - ] -> 0 : [ D ]
Node # 5| 3 : [ - ] <- [ * ] -> 6 : [ C ]
moveFormulaTree()
... moving: *
Node # 1| 6 : [ C ] <- [ = ] -> 5 : [ / ]
Node # 3| 2 : [ A ] <- [ - ] -> 0 : [ D ]
Node # 5| 4 : [ B ] <- [ / ] -> 3 : [ - ]


The last set of nodes represents the solution that you can see in the lower part of the screen shot.

I still have a few kinks to work out of the code. It doesn't handle solving formulas with parentheses too well. I didn't realize there was a problem until I started visualizing it through Flash. Whenever I get around to fixing that and have a much cleaner prototype I'll post an interactive version.

I know quite a lot about calc engines. I used to work for Lotus testing 1-2-3 as well as another company testing their calc engine. Before that as a consultant I wrote code to parse and pull out data from spreadsheet files. I've also written calc engines based on an old simulation language called Dynamo. One day, if I can ever find the time, I may write an e-book on spreadsheet mechanics, or just my experiments with formula trees.

This is just the tip of the iceberg. I'm interested in manipulating and visualizing formula trees because the techniques can also be applied to one of my favorite topics - Genetic Programming.

Labels: , ,

Friday, February 1, 2008

Interactive L-Systems Flash App






I have several books that discuss Turtle Graphics and L-Systems. The book that I used to produce the app above was The Computational Beauty of Nature: Computer Explorations of Fractals, Chaos, Complex Systems, and Adaptation by Gary William Flake (see the review in my previous post).

The book doesn't contain source code (though some pseudo code). But it included a very good explanation of what an L-System parser needs to do. I combined what I learned from the book with a Turtle Graphics library that I wrote in ActionScript. The models used in the app were described in the book.

Be patient. When you click on a button, it may take a few seconds for an image to generate.

Thursday, January 31, 2008

The Computational Beauty of Nature: Computer Explorations of Fractals, Chaos, Complex Systems, and Adaptation

While reading The Computational Beauty of Nature: Computer Explorations of Fractals, Chaos, Complex Systems, and Adaptation by Gary William Flake, I was most interested in the chapters covering Fractals, Complex Systems (cellular automata, ...) and Adaptation (genetic algorithms, neural networks, ...). I've never been that interested in Chaos, so I skimmed over that part. I would've like to have seen more then just a mere mention of my favorite topic, Genetic Programming. But the book has so much info there probably wasn't enough room for it!

I had never been that interested in Fractals. But the book made it clear to me as to why they are more then just some way to create digital art. For some reason I had never made the connection before between Fractal's and L-Systems. But now it all makes sense. The connection is that both areas cover building large structures from a small set of repeating instructions. For some reason I never got that point when reading about Fractal's before. Such sciences could be applied to anything from architecture to computer programming to biology.

Under Complex Systems I found a healthy review of Cellular Automata, Autonomous Agents, Self-Organization, Competition and Cooperation. Just as I found something new regarding L-Systems, I found something new referring to flocking behavior. Years ago I traded a few e-mails with Craig Reynolds. I was trying to decipher the mechanics of his Boids simulation (a simulation of a flock of birds). This book once again provided enough info so that I could probably put together my own simulation. If you'd like to look into it yourself, or just see a simulation, see this link:

http://www.red3d.com/cwr/boids/

Genetic Algorithms and especially Genetic Programming are two of my favorite topics of Computer Science. I did learn a few new things from reading the related chapter on Classifiers. The chapter on Neural Networks was familiar territory. If you are new to the subject, it covers all the basics. Personally, I think all NN's should be trained through GA. But still learning about BackProp can be useful.

Over all, a good solid book. If you are new to the science of Complexity, don't try to read the whole thing straight through. Skip around, like I did, and find the areas that interest you. If your Matrix Math or Calculus is a little rusty, just jump over the formulas. You'll still find a lot of interesting science to play with.