That Coin Toss Isn’t Actually 50/50

A coin flip is considered by many to be the perfect 50/50 random event, even though — being an event subject to Newtonian physics — the results are in fact anything but random. But that’s okay, because what we really want when we flip a coin is an unpredictable but fair outcome. But what if that’s not actually what happens?

There’s new research claiming that coin tosses demonstrate a slight but measurable bias toward landing on the same side they started. At least, this is true of coin flips done in a particular (but common) way. Coins flipped with the thumb and caught in the hand land with the same side facing up 50.8 percent of the time.

The new research builds on earlier work proposing that because of human anatomy, when a human flips a coin with their thumb, the motion introduces a slight off-axis tilt that biases the results. Some people do it less (biasing the results less) and some do it more, but while the impact is small it is measurable. As long as the coin is caught in the hand, anyway. Allowing the coin to fall on surfaces introduces outside variables.

Therefore, one can gain a slight advantage in coin flips by looking at which side is facing up, and calling that same side. Remember that the flipping method used must be that of flipping the coin with the thumb, and catching it with the hand. The type of coin does not matter.

Does this mean a coin flip isn’t fair? Not really. Just allow the coin to fall on a surface instead of catching it in the hand, or simply conceal which side is “up” when the coin is called. It’s one more thing that invites us all to ask just how random is random, anyway?

Math Reveals How Many Shuffles Randomizes A Deck

Math — and some clever simulations — have revealed how many shuffles are required to randomize a deck of 52 cards, but there’s a bit more to it than that. There are different shuffling methods, and dealing methods can matter, too. [Jason Fulman] and [Persi Diaconis] are behind the research that will be detailed in an upcoming book, The Mathematics of Shuffling Cards, but the main points are easy to cover.

A riffle shuffle (pictured above) requires seven shuffles to randomize a 52-card deck. Laying cards face-down on a table and mixing them by pushing them around (a technique researchers dubbed “smooshing”) requires 30 to 60 seconds to randomize the cards. An overhand shuffle — taking sections from a deck and moving them to new positions — is a staggeringly poor method of randomizing, requiring some 10,000-11,000 iterations.

The method of dealing cards can matter as well. Back-and-forth dealing (alternating directions while dealing, such as pattern A, B, C, C, B, A) yields improved randomness compared to the more common cyclic dealing (dealing to positions in a circular repeating pattern A, B, C, A, B, C). It’s interesting to see different dealing methods shown to have an effect on randomness.

This brings up a good point: there is not really any such a thing as “more” random. A deck of cards is either randomized, or it isn’t. If even two cards have remained in the same relative positions (next to one another, for example) after shuffling, then a deck has not yet been randomized. Similarly, if seven proper riffle shuffles are sufficient to randomize a 52-card deck, there is not really any point in doing eight or nine (or more) because there isn’t any such thing as “more” random.

You can watch these different methods demonstrated in the video embedded just under the page break. Now we know there’s no need for a complicated Rube Goldberg-style shuffling solution just to randomize a deck of cards (well, no mathematical reason for one, anyway.)

Continue reading “Math Reveals How Many Shuffles Randomizes A Deck”

Automated musical instrument with LED array

ESP32 Is The Brains Behind This Art Installation

The ESP32 has enabled an uncountable number of small electronics projects and even some commercial products, thanks to its small size, low price point, and wireless capabilities. Plenty of remote sensors, lighting setups, and even home automation projects now run on this small faithful chip. But being relegated to an electronics enclosure controlling a small electrical setup isn’t all that these tiny chips can do as [Eirik Brandal] shows us with this unique piece of audio and visual art.

The project is essentially a small, automated synthesizer that has a series of arrays programmed into it that correspond to various musical scales. Any of these can be selected for the instrument to play through. The notes of the scale are shuffled through with some random variations, allowing for a completely automated musical instrument. The musical generation is entirely analog as well, created by some oscillators, amplifiers, and other filtering and effects. The ESP32 also controls a lighting sculpture that illuminates a series of LEDs as the music plays.

The art installation itself creates quite haunting, mesmerizing tunes that are illustrated in the video linked after the break. While it’s not quite to the realm of artificial intelligence since it uses pre-programmed patterns with some randomness mixed in, it does give us hints of some other projects that have used AI in order to compose new music.

Continue reading “ESP32 Is The Brains Behind This Art Installation”

Hamster Trades Crypto Better Than You

The inner machinations of the mind of cryptocurrency markets are an enigma. Even traditional stock markets often seem to behave at random, to the point that several economists seriously suggest that various non-human animals might outperform one market or another just by random chance alone. The classic example is a monkey picking stocks at random, but in the modern world the hamster [Mr Goxx] actively trades crypto from inside his hamster cage.

[Mr Goxx]’s home comprises a normal apartment and a separate office where he can make his trades. The office contains an “intention wheel” where he can run in order to select a currency to trade, and two tunnels that [Mr Goxx] can use to declare his intention to buy or sell the currency he selected with the wheel. The wheel is connected to an Arduino Nano with an optical encoder, and the Nano also detects the hamster’s presence in the “buy” or “sell” tunnel and lights up status LEDs when he wants to execute a trade. The Nano also communicates with an intricate Java program which overlays information on the live video feed and also executes the trades in real life with real money.

Live updates are sent directly both on Twitter and Reddit, besides the live Twitch stream of [Mr Goxx] we linked above. The stream only shows his office and not his apartment, and he’s mostly active at night (Berlin time). But we can’t wait for his random walks to yield long-term results which can be analyzed for years to come. In the meantime we’ll see if others have been able to make any profits in crypto with any less-random methods.

Random Robot Makes Random Art

For the price of a toothbrush and a small motor with an offset weight, a bristlebot is essentially the cheapest robot that can be built. The motor shakes the toothbrush and the bristle pattern allows the robot to move, albeit in a completely random pattern. While this might not seem like a true robot that can interact with its environment in any meaningful way, [scanlime] shows just how versatile this robot – which appears to only move randomly – can actually be used to make art in non-random ways.

Instead of using a single bristlebot for the project, three of them are built into one 3D printed flexible case where each are offset by 120°, and which can hold a pen in the opening in the center. This allows them to have some control on the robot’s direction of movement. From there, custom software attempts to wrangle the randomness of the bristlebot to produce a given image. Of course, as a bristlebot it is easily subjected to the whims of its external environment such as the leveling of the table and even the small force exerted by the power/communications tether.

With some iterations of the design such as modifying the arms and control systems, she has an interesting art-producing robot that is fairly reliable for its inherently random movements. For those who want to give something like this a try, the code for running the robot and CAD files for 3D printing the parts are all available on the project’s GitHub page. If you’re looking for other bristlebot-style robots that do more than wander around a desktop, be sure to take a look at this line-following bristlebot too.

Thanks to [johnowhitaker] for the tip!

Continue reading “Random Robot Makes Random Art”

This Classy But Chaotic Gear Clock Keeps You Guessing

There are a lot of ways to tell time, but pretty much all of them involve some sort of sequential scale — the hands sweeping across the face of an analog clock comes to mind, as does the incremental changes of a digital clock. Clocks are predictable by their very nature, and therefore somewhat boring.

This nonsequential gear clock aims to break that predictability and make for a timepiece that’s just a little bit different. It’s the work of [Tony Goacher], who clearly put a lot of work into it and pulled out nearly every tool in the shop while doing it. He started with a laser-cut plywood prototype to get the basics worked out — a pair of nested rings with internal gear teeth, each hanging on a stepper-driven pinion. The inner ring represents hours and the outer minutes, with the numbers on each randomly distributed — more or less, since no two sequential numbers are positioned more than five seconds of rotation apart.

The finished version of the clock is rendered in brass, acrylic, hardwood, and a smattering of aluminum, with a case reminiscent of the cathedral radios of yore. There are some really nice touches, like custom-made brass screws, a CNC-engraved brass faceplate with traditional clock art, and a Latin inscription on the drive cog for the hours ring that translates roughly to “Time rules all.” When we looked that up we found that “tempus rerum imperator” is the motto of the Worshipful Company of Clockmakers, the very existence of which we find pleasing in the extreme.

The clock runs through its initialization routine in the brief video below. We’re not sure we’d want this on our nightstand, but it’s certainly a unique and enjoyable way to show the passage of time. It sort of reminds us of this three-ringed perpetual calendar, but just a bit more stochastic.

Continue reading “This Classy But Chaotic Gear Clock Keeps You Guessing”

Chaotic Oscillator From Antique Logic

While working on recreating an “ancient” (read: 60-year-old) logic circuit type known as resistor-transistor logic, [Tim] stumbled across a circuit with an unexpected oscillation. The oscillation appeared to be random and had a wide range of frequency values. Not one to miss out on a serendipitous moment, he realized that the circuit he built could be used as a chaotic oscillator.

Chaotic systems can be used for, among other things, random number generation, so making sure that they do not repeat in a reliable way is a valuable property of a circuit. [Tim]’s design uses LEDs in series with the base of each of three transistors, with the output of each transistor feeding into the input of the next transistor in line, forming a ring. At certain voltages close to the switching voltages of the transistors, the behavior of the circuit changes unpredictably both in magnitude and frequency.

Building real-life systems that exhibit true randomness or chaotic behavior are surprisingly rare, and even things which seem random are often not random enough for certain applications. [Tim]’s design benefits from being relatively simple and inexpensive for how chaotic it behaves, and if you want to see his detailed analysis of the circuit be sure to visit his project’s page.

If you want to get your chaos the old fashioned way, with a Chua circuit, look out for counterfeit multipliers.