Quick and Easy Gaussian Random Numbers

Generating random numbers which fit a normal distribution is essential for stochastic optimization, especially for continuous evolutionary algorithms.

For high-quality results the weapon of choice is the Box–Muller transform. It’s a little expensive; it involves exponents and trigonometry and such. Recently I was working on an EA written in JavaScript, and I wanted to avoid using those functions. There’s actually a damn simple alternate method.

Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Main Sequence – The Ownership Society

the_ownership_society

This album is excellent. It is strange and intelligent and off-beat and slick. It is not available for sale any more; the artist grants permission to distribute: e78cc2a231f3f2d6b1278f795b0346ae4b98c7e7

Posted in Uncategorized | Tagged | Leave a comment

My Stance On Piracy

I’ve done my civic duty the past few weeks pushing another 150 gigabytes or so of MST3K out to the world. Full burn bandwidth overnight, polite moderation during business hours.

74d7d2304d50e1660c1e7752d0936fc30b9999a3
This number may be the one and only place in the world where you can get all of this.
Keep circulating the tapes.

Posted in Uncategorized | Tagged | Leave a comment

PWM LED driver design difficulties

For my custom alarm clock, I needed a light source with controllable intensity and color. It didn’t come together as easily as I expected.

Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

Ordering Tagged Items by Similarity

So I’ve got this web-based image gallery. The images in it are organized with simple tags (there’s a many-to-many relationship between images and tags). Every image has at least one tag, and almost all images have several tags. When a user wants to look up an image in the gallery, they select one or more tags and are shown thumbnails for all images which have at least those tags. At first the image thumbnails were simply sorted alphabetically by file name, and this worked fine when the size of the collection was modest, but that didn’t last. Soon the collection grew to the point where most queries would give forty or more thumbnails, and it became pretty challenging to find your desired image in the pile. The search was even trickier if you had only a general idea of what you were looking for and couldn’t select lots of tags to narrow things down.

To improve the usability of this thing I had to come up with a way to arrange the image thumbnails in a particular order such that images with similar characteristics were placed near each other. This would make it much, much easier to visually scan the mass of thumbnails. In this post I’ll elaborate on the technical details of the problem and how I developed the algorithm I’m currently using.

Continue reading

Posted in Uncategorized | Tagged , | Leave a comment