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.

Wednesday, January 30, 2008

The Algorithmic Beauty of Plants

The Algorithmic Beauty of Plants by P. Prusinkiewicz and A. Lindenmayer:

"Lindenmayer systems — or L-systems for short — were conceived as a mathematical theory of plant development [82]. Originally, they did not include enough detail to allow for comprehensive modeling of higher plants. The emphasis was on plant topology, that is, the neighborhood relations between cells or larger plant modules. Their geometric aspects were beyond the scope of the theory. Subsequently, several geometric interpretations of L-systems were proposed with a view to turning them into a versatile tool for plant modeling. Throughout this book, an interpretation based on turtle geometry is used [109]. Basic notions related to L-system theory and their turtle interpretation are presented below."

Visit the link to download a free PDF version of the book.

Labels: , ,

Tuesday, January 29, 2008

The Armchair Universe: An Exploration of Computer Worlds

One of my favorite resources for exploring cellular automata is The Armchair Universe: An Exploration of Computer Worlds by A.K. Dewdney. The chapter "Three-Dimensional Life" is worth the price of the book (which you can get used for less then $2 on Amazon). It gives several examples of stable and cyclic forms that can emerge in a 3D version of the Game of Life. I also used the info to create an interesting Glider Gun display.

Instead of sections, the book is broken up into "worlds" to explore. The worlds are:

  • Infinite Graphics - exploring Mandelbrots (fractals), Wallpaper for the Mind.
  • Mathemagadgets
  • Artificial Intelligence and Artificial Insanity - with a great introduction to game theory and the minimax algorithm using a game of checkers.
  • Life in Automata - from One-Dimensional Computers to Three-Dimensional Life
  • Puzzles and Worldplay
  • Stimulation through Simulation
  • Core Wars

While visiting Amazon, you may also want to pick up a copy of his other book: The Tinkertoy Computer and other Machinations: Computer Recreations from the pages of Scientific American and Algorithm. In that book you'll find more interesting chapters playing with fractals, automata, etc.

Labels: , , , ,

Monday, January 28, 2008

Code Generation and Testing

For my day job I specialize in writing automated API tests for an SDK (Software Development Kit). The SDK consists of ActiveX components. That means our customers can write application using either C++, C#, JavaScript or even Java. To test that in all supported languages - even a single language - I need to generate a lot of code. It can be a maintenance nightmare. To make my life easier I turned to code generation.

Code generation is too complicated to explain in a blog posting. So I may write an eBook on the subject as it relates to testing at some point. Until then a great place to start is the book Code Generation in Action by Jack Herrington.

There is no set way on how to implement code generation. It's a matter of personal preference. You can write your own template language and parser. What I decided to do was encode my test cases in XML using a pseudo language customized for the SDK. Then I use XSLT to transform the XML into source files (*.js, *.cs, etc.).

I write all of my test cases in Eclipse using Ant to drive the transformation. It's worked out quite well (except for Ant throwing Java heap errors now and then). In the old days I had to cut and paste test case functions into huge source files that were quite easy to mangle and get lost in. Now I don't write one line of code in a traditional software language. I write one test case per XML file and let the computer generate the source code for me.

Labels: , , ,

Friday, January 25, 2008

Latest buzz words in science: Robot swarms (usatoday.com)

Going back over the archives from an old site of mine, I found this interesting geek-related article from 2005:

Latest buzz words in science: Robot swarms (usatoday.com):

"Robotmakers find inspiration for their programs in nature: the behavior of bee, ant, and wasp colonies, as well as of flocks of birds and schools of fish. Ants, for example, communicate by leaving pheromone trails that other ants can follow to food. Ants also work as teams to distribute their workload, such as finding the most efficient paths for foraging or deciding who will haul bits of leaves back to the nest, without needing any directions from a leader."

Labels: ,

Thursday, January 24, 2008

Complexity: The Emerging Science at the Edge of Order and Chaos

This is my favorite book on the science of Complexity. You won't find any how-to's. This book is the story of several pioneers of the science and the Santa Fe Institute. Think of it more as a history book then as a science book.

If you are interested in Artificial Life, you'll be interested in the story of Christopher Langton. You may have seen his name on the cover of compilations on the subject.

The book was published in 1992. But because it's a history book, I don't think you'll find it to be outdated. I found it fascinating to discover there was a whole institute and individuals dedicated to this stuff. It inspired me in my own work to develop CA (cellular automata) based maze solvers and 3D Life programs. I hope you'll find it just as interesting.

Complexity: The Emerging Science at the Edge of Order and Chaos by M. Mitchell Waldrop

Labels: , ,

Wednesday, January 23, 2008

Jim Buckmaster on site design

From 10 Hours a Week, $10 Million a Year (nytimes.com)

Craigslist’s personals draw about six million unique visitors a month, more than any other dating site, and its listings for all categories generate 10 billion page views a month. It covers 450 localities in 50 countries around the world — with only 25 employees. It is among the top 10 busiest English-language sites, but the customers who enjoy its free listings, like Plenty of Fish’s, must serve themselves or seek assistance from others. “Anything that represents customer hand-holding represents a failure of site design,” said Jim Buckmaster, Craigslist’s chief executive. “We try to make changes to the site to make the problem go away.”

Labels: