Category: neat algos

Neat Algorithms - Paxos

This is an explanation and demonstration of an extraordinarily neat algorithm called Paxos. Paxos is a family of algorithms for teaching a whole bunch of decidedly unreliable processes to reliably decide on stuff. More formally: it allows a group of unreliable processors to deterministically and safely reach consensus if some certain conditions can be met, while ensuring the group remains consistent if the conditions can't be met.

Why Batman?

[Batman.js](http://batmanjs.org/) is [Shopify](http://shopify.com)'s new open source CoffeeScript framework, and I'm absolutely elated to introduce it to the world after spending so much time on it. Find Batman on GitHub [here](https://github.com/Shopify/batman). Batman emerges into a world populated with extraordinary frameworks being used to great effect. With the incredible stuff being pushed out in projects like [Sproutcore 2.0](http://www.sproutcore.com/about/) and [Backbone.js](http://documentcloud.github.com/backbone/), how is a developer to know what to use when? There's only so much time to play with cool new stuff, so I'd like to give a quick tour of what makes Batman different and why you might want to use it instead of the other amazing frameworks available today.

Neat Algorithms - Harmony Search

Here I'll try and demonstrate a neat optimization algorithm based on the principles of performing jazz musicians by applying it to solve Sudoku puzzles. __Update Sept 28th 2015__: Turns out this algorithm is ballyhoo and I don't like it any more, use something else. Kind of a fun idea though. See [http://www.dennisweyland.net/blog/?p=12](http://www.dennisweyland.net/blog/?p=12). Harmony Search (often abbreviated HS) is a [metaheuristic optimization](http://en.wikipedia.org/wiki/Metaheuristic) algorithm pioneered by [Dr Zong Woo Geem](https://sites.google.com/a/hydroteq.com/www/). Metaheuristic algorithms like harmony search attempt to find the optimal input to some objecting measure of quality, or in other words, find the "best" solution to a given problem. Harmony search has been successfully applied to a vast array of such problems, such as the Travelling Salesman problem, water network design, and actual algorithmic music generation.

Converting from Jasmine to QUnit

I had to convert a sizeable test suite from [Jasmine](https://github.com/pivotal/jasmine/wiki) to [QUnit](http://docs.jquery.com/QUnit). The former has a wide array of matchers and situation specific helpers for explicitly testing things, and the latter is about as barebones as it gets. This is all well and good, it just means converting is a pain.

Neat Algorithms - Flocking

In this post I'll explain and demonstrate an algorithm that simulates a group of entities grouping together, illustrating something called "flocking". I think it's quite neat because the flock exhibits some complex collective intelligence when just a few simple governing rules are applied to each entity.