Original image
Wikimedia Commons

The Balkan Chess Game

Original image
Wikimedia Commons

The First World War was an unprecedented catastrophe that killed millions and set the continent of Europe on the path to further calamity two decades later. But it didn’t come out of nowhere. With the centennial of the outbreak of hostilities coming up in August, Erik Sass will be looking back at the lead-up to the war, when seemingly minor moments of friction accumulated until the situation was ready to explode. He'll be covering those events 100 years after they occurred. This is the 100th installment in the series. 

January 24, 1914: The Balkan Chess Game

While most Europeans viewed the region as a cultural and economic backwater, the Balkans played an outsized role in continental diplomacy, as Europe’s Great Powers vied for favor by selling arms, bankrolling loans, and providing other forms of patronage to the Balkan kingdoms, all in the hopes of expanding their own influence and limiting rivals’. In the final months of peace the great Balkan chess game took a surprising turn as two big regional powers—Bulgaria and Romania—suddenly switched sides.  

For decades, the basic alignment had remained unchanged. Bulgaria was historically a client state of Russia, which freed the Slavic Bulgarians from Ottoman rule in the Russo-Turkish war of 1877-1878; that put Bulgaria on the side of the Triple Entente of Russia, France, and Britain. Meanwhile Romania leaned towards the Triple Alliance—Austria-Hungary, Germany, and Italy—because of a defensive agreement with Austria-Hungary, directed against Russia, signed in 1883 and renewed in 1892 and 1913.

The situation began to change following the First Balkan War, when the Balkan League (Bulgaria, Serbia, Greece, and Montenegro) conquered most of the Ottoman Empire’s European territory—triggering serious alarm in Austria-Hungary, which feared Serbia’s destabilizing influence on its restive Slavic population. To cut Serbia down to size, Austria-Hungary’s foreign minister, Count Berchtold, forced the Serbs to give up their recent conquests in Albania, thus preventing them from gaining access to the sea.

This set in motion a chain reaction of unexpected consequences. Deprived of their Albanian conquests, the Serbs resolved to compensate themselves by holding on to neighboring Macedonia—even though this was supposed to go to Bulgaria under the terms of their secret treaty dividing up the Turkish provinces. The Bulgarians called on their Slavic patron, Russia, to mediate the dispute, but in typical fashion Russian foreign minister Sergei Sazonov ducked responsibility for any hard decisions.

Left in the lurch by Russia, Bulgaria’s Tsar Ferdinand foolishly attacked Serbia and Greece (which was also occupying territory claimed by Bulgaria) in the Second Balkan War. This was an unmitigated disaster: the Serbs and Greeks scored major victories and Romania and Turkey, seeing a chance to grab some Bulgarian territory for themselves, attacked from the rear (Romania’s intervention is depicted in the cartoon above). Meanwhile Russia did nothing to stop them. Surrounded and overwhelmed, the Bulgarians begged for peace—and plotted revenge.

Understandably embittered by Russia’s repeated refusals to come to their aid, the Bulgarians needed a new patron among the Great Powers—preferably one that hated its treacherous former friends, Serbia and Russia. Following the age-old rule, “the enemy of my enemy is my friend,” the natural choice was Austria-Hungary, backed by the powerful German Empire. The new alliance began to take shape in July 1913, when Tsar Ferdinand dismissed Bulgaria’s pro-Russian government and appointed a pro-Austrian liberal politician, Vasil Radoslavov, to form a new cabinet. Although this move came too late to help Bulgaria in the Second Balkan War, the Bulgarians counted on Austrian and German help in a future war of revenge against their shared enemies.

The dilemma facing Austria-Hungary’s Berchtold was how to balance this new Bulgarian alliance with Austria-Hungary’s existing alliance with Romania, which had fought against Bulgaria in the Second Balkan War. In the end this task proved impossible, and a concerted diplomatic push by the Triple Entente succeeded in luring Romania away.

The Romanians already had grievances against Austria-Hungary, including discrimination against ethnic Romanians in the Hungarian half of the Dual Monarchy; they also believed the Austrians hadn’t supported their claims against Bulgaria during the Second Balkan War. On the other hand Russia supported these claims, while France exerted its powerful financial influence, maneuvering to replace Germany as Romania’s chief lender. These efforts paid off on January 16, 1914, when a “Francophile” Romanian politician, Ion Bratianu, came to power (against the wishes of Romania’s pro-German King Carol). In January the French ambassador to Romania, Blondel, reported “there is a sincere desire of closer relations with France in Romania.”

Similarly the new Russian ambassador to Romania, Poklevski, summed up the new situation in a letter to Sazonov on January 24, 1914: “Again and again, sentiments of genuine friendship for Russia have been expressed to me… an important and perhaps decisive change in public opinion has been brought about here in favor of Russia.” He added that the Romanian nationalists were gaining strength and focusing their efforts on freeing the three million ethnic Romanians living in Hungary, noting, “This latter circumstance also naturally tends to enhance Rumania’s sympathy for Russia.”

In just a few months the Balkan strategic landscape had been totally up-ended, in a way unlikely to encourage long-term stability. As Austrian chief of staff Conrad von Hötzendorf pointed out, if Romania joined Russia, Serbia, and Montenegro in a war against Austria-Hungary, the Dual Monarchy would face an unbroken wall of enemies along its southern and eastern flanks, allowing the Russians to send soldiers all the way to the Adriatic. This made it even more important to crush Serbia and break through the Balkan encirclement before it was too late.

See the previous installment or all entries

Original image
iStock // Ekaterina Minaeva
Man Buys Two Metric Tons of LEGO Bricks; Sorts Them Via Machine Learning
May 21, 2017
Original image
iStock // Ekaterina Minaeva

Jacques Mattheij made a small, but awesome, mistake. He went on eBay one evening and bid on a bunch of bulk LEGO brick auctions, then went to sleep. Upon waking, he discovered that he was the high bidder on many, and was now the proud owner of two tons of LEGO bricks. (This is about 4400 pounds.) He wrote, "[L]esson 1: if you win almost all bids you are bidding too high."

Mattheij had noticed that bulk, unsorted bricks sell for something like €10/kilogram, whereas sets are roughly €40/kg and rare parts go for up to €100/kg. Much of the value of the bricks is in their sorting. If he could reduce the entropy of these bins of unsorted bricks, he could make a tidy profit. While many people do this work by hand, the problem is enormous—just the kind of challenge for a computer. Mattheij writes:

There are 38000+ shapes and there are 100+ possible shades of color (you can roughly tell how old someone is by asking them what lego colors they remember from their youth).

In the following months, Mattheij built a proof-of-concept sorting system using, of course, LEGO. He broke the problem down into a series of sub-problems (including "feeding LEGO reliably from a hopper is surprisingly hard," one of those facts of nature that will stymie even the best system design). After tinkering with the prototype at length, he expanded the system to a surprisingly complex system of conveyer belts (powered by a home treadmill), various pieces of cabinetry, and "copious quantities of crazy glue."

Here's a video showing the current system running at low speed:

The key part of the system was running the bricks past a camera paired with a computer running a neural net-based image classifier. That allows the computer (when sufficiently trained on brick images) to recognize bricks and thus categorize them by color, shape, or other parameters. Remember that as bricks pass by, they can be in any orientation, can be dirty, can even be stuck to other pieces. So having a flexible software system is key to recognizing—in a fraction of a second—what a given brick is, in order to sort it out. When a match is found, a jet of compressed air pops the piece off the conveyer belt and into a waiting bin.

After much experimentation, Mattheij rewrote the software (several times in fact) to accomplish a variety of basic tasks. At its core, the system takes images from a webcam and feeds them to a neural network to do the classification. Of course, the neural net needs to be "trained" by showing it lots of images, and telling it what those images represent. Mattheij's breakthrough was allowing the machine to effectively train itself, with guidance: Running pieces through allows the system to take its own photos, make a guess, and build on that guess. As long as Mattheij corrects the incorrect guesses, he ends up with a decent (and self-reinforcing) corpus of training data. As the machine continues running, it can rack up more training, allowing it to recognize a broad variety of pieces on the fly.

Here's another video, focusing on how the pieces move on conveyer belts (running at slow speed so puny humans can follow). You can also see the air jets in action:

In an email interview, Mattheij told Mental Floss that the system currently sorts LEGO bricks into more than 50 categories. It can also be run in a color-sorting mode to bin the parts across 12 color groups. (Thus at present you'd likely do a two-pass sort on the bricks: once for shape, then a separate pass for color.) He continues to refine the system, with a focus on making its recognition abilities faster. At some point down the line, he plans to make the software portion open source. You're on your own as far as building conveyer belts, bins, and so forth.

Check out Mattheij's writeup in two parts for more information. It starts with an overview of the story, followed up with a deep dive on the software. He's also tweeting about the project (among other things). And if you look around a bit, you'll find bulk LEGO brick auctions online—it's definitely a thing!

Original image
Name the Author Based on the Character
May 23, 2017
Original image