Imagine the scene: You’re puttering along in your vehicle when, at least an hour from the nearest help, one of your tires starts losing air. Not to worry! You’ve got a spare tire along with the tools and knowhow to change it. And if that fails, you can call roadside assistance. But what if your car isn’t a car, has metal wheels for which no spares are available, and the nearest help is 200 million miles away? You just might be a Jet Propulsion Laboratory Engineer on the Curiosity Mars Rover mission, who in 2017 was charged with creating a new driving algorithm designed to extend the life of the wheels.
You could say that the Curiosity Mars rover is the ultimate off-road vehicle, and as such it has to deal with conditions that are in some ways not that different from some locations here on Earth. Earth bound rock crawlers use long travel suspensions, specialized drivetrains, and locking differentials to keep the tires on the ground and prevent a loss of traction.
On Mars, sand and rocks dominate the landscape, and a rover must navigate around the worst of it. It’s inevitable that, just like a terrestrial off-roader, the Mars rovers will spin a tire now and then when a wheel loses traction. The Mars rovers also have a specialized drivetrain and long travel suspensions. They don’t employ differentials, though, so how are they to prevent a loss of traction and the damaging wheel spin that ensues? This where the aforementioned traction control algorithm comes in.
By controlling the rotation of the wheels with less traction, they can still contribute to the motion of the vehicle while avoiding rock rash. Be sure to check out the excellent article at JPL’s website for a full explanation of their methodology and the added benefits of uploading new traction control algorithms from 200 million miles away! No doubt the Perseverance Mars rover has also benefited from this research.
Measuring air quality at any particular location isn’t too complicated. Just a sensor or two and a small microcontroller is generally all that’s needed. Predicting the upcoming air quality is a little more complicated, though, since so many factors determine how safe it will be to breathe the air outside. Luckily, though, we don’t need to know all of these factors and their complex interactions in order to predict air quality. We can train a computer to do that for us as [kutluhan_aktar] demonstrates with a machine learning-capable air quality meter.
The build is based around an Arduino Nano 33 BLE which is connected to a small weather station outside. It specifically monitors ozone concentration as a benchmark for overall air quality but also uses an anemometer and a BMP180 precision pressure and temperature sensor to assist in training the algorithm. The weather data is sent over Bluetooth to a Raspberry Pi which is running TensorFlow. Once the neural network was trained, the model was sent back to the Arduino which is now capable of using it to make much more accurate predictions of future air quality.
The build goes into quite a bit of detail on setting up the models, training them, and then using them on the Arduino. It’s an impressive build capped off with a fun 3D-printed case that resembles an old windmill. Using machine learning to help predict the weather is starting to become more commonplace as well, as we have seen before with this weather station that can predict rainfall intensity.
[Rostislav Persion] wrote a simple Morse Code decoder to run on his Arduino and display the text on an LCD shield. This is probably the simplest decoder possible, and thus its logic is pretty straightforward to follow. Simplicity comes at a price — changing the speed requires changing constants in the code. We would like to see this hooked up to a proper Morse code key, and see how fast [Rostislav] could drive it before it conks out.
In an earlier era of Morse code decoders, one tough part was dealing with the idiosyncrasies of each sender. Every operator’s style, or “fist”, has subtle variations in the timings of the dots, dashes, and the pauses between these elements, the letters, and the words. In fact, trained operators can recognize each other because of this, much like we can often recognize who is speaking on the phone just by hearing their voice. The other difficulty these decoders faced was detecting the signal in low signal-to-noise ratio environments — pulling the signal out of the noise.
A Morse decoder built today is more likely to be used to decode machine-generated signals, for example, debugging information or telemetry. This would more than likely be sent at fixed, known speeds over directly connected links with very high S/N ratios (a wire, perhaps). In these situations, a simple decoder like [Rostislav]’s is completely sufficient.
We wrote about a couple of Morse code algorithms back in 2014, the MorseDetector and the Magic Morse algorithm. While Morse code operators usually rank their skills by speed — the faster the better — this Morse code project for very low power transmitters turns that notion on its head by using speeds more suitably measured in minutes per word (77 MPW for that project). Have you used Morse code in any of your projects before? Let us know in the comments below.
The quantum-inspired algorithm in question is known as the wavefunction collapse function. In a nutshell, you have a cube of voxels, a graph of nodes, or simply a grid of tiles as well as a list of detailed rules to determine the state of a node or tile. At the start of the algorithm, each node or point is considered in a state of superposition, which means it is considered to be in every possible state. Looking at the list of rules, the algorithm then begins to collapse the states. Unlike a quantum computer, states of superposition is not an intrinsic part of a classic computer, so this solving must be done iteratively. In order to reduce possible conflicts and contradictions later down the line, the nodes with the least entropy (the smallest number of possible states) are solved first. At first, random states are assigned, with the changes propagating through the system. This process is continued until the waveform is ultimately collapsed to a stable state or a contradiction is reached.
What’s interesting is that the ruleset doesn’t need to be coded, it can be inferred from an example. A classic use case of this algorithm is 2D pixel-art level design. By providing a small sample level, the algorithm churns and produces similar but wholly unique output. This makes it easy to provide thousands of unique and beautiful levels from an easy source image, however it comes at a price. Even a small level can take hours to fully collapse. In theory, a quantum computer should be able to do this much faster, since after all, it was the inspiration for this algorithm in the first place.
[Jabrils] spent weeks trying to get things running but ultimately didn’t succeed. However, his efforts give us a peek into the world of quantum computing and this amazing algorithm. We look forward to hearing more about this project from [Jabrils] who is continuing to work on it in his spare time. Maybe give it a shot yourself by learning the basics of quantum computing for yourself.
With social media and online services are now huge parts of daily life to the point that our entire world is being shaped by algorithms. Arcane in their workings, they are responsible for the content we see and the adverts we’re shown. Just as importantly, they decide what is hidden from view as well.
Important: Much of this post discusses the performance of a live website algorithm. Some of the links in this post may not perform as reported if viewed at a later date.
Recently, [Colin Madland] posted some screenshots of a Zoom meeting to Twitter, pointing out how Zoom’s background detection algorithm had improperly erased the head of a colleague with darker skin. In doing so, [Colin] noticed a strange effect — although the screenshot he submitted shows both of their faces, Twitter would always crop the image to show just his light-skinned face, no matter the image orientation. The Twitter community raced to explore the problem, and the fallout was swift.
When you’re trying to learn how an algorithm works, it’s not always easy to visualize what’s going on. Well, except for maybe binary sort, thanks to the phone book. Professor [thatguyer] is a computer science teacher who wanted a way to help his students visualize the process of algorithms and at the same time, get a grasp on their resource cost.
The Algorithm Machine can demonstrate 8 different search and sort algorithms using two 100-count strips of RGB LEDs — one to represent an array of integers, and one to create indicators pointing to the integers under scrutiny.
This functional beauty is totally interactive, too. Once the user chooses the values and the algorithm and starts the process, they can speed it up or slow it down with the rotary encoder, or pause to discuss and start again with that slick triangular play button. We particularly like the control button wiring harness [thatguyer] created to keep everything neat and hot-swappable.
This iteration uses 3D printed face plates to give the LEDs shape, but in an early version, [thatguyer] cut and sanded a ton of circles out of brass tubing, and folded as many triangles cut from disposable baking pans. The world could use more teachers as committed as [thatguyer]. This really seems like a handy teaching aid for these concepts, and we wish we’d had one in class to play around with. Here’s your algorithm for watching the demo: click break, press play, enjoy.
Asking machines to make music by themselves is kind of a strange notion. They’re machines, after all. They don’t feel happy or hurt, and as far as we know, they don’t long for the affections of other machines. Humans like to think of music as being a strictly human thing, a passionate undertaking so nuanced and emotion-based that a machine could never begin to understand the feeling that goes into the process of making music, or even the simple enjoyment of it.
The idea of humans and machines having a jam session together is even stranger. But oddly enough, the principles of the jam session may be exactly what machines need to begin to understand musical expression. As Sara Adkins explains in her enlightening 2019 Hackaday Superconference talk, Creating with the Machine, humans and machines have a lot to learn from each other.
To a human musician, a machine’s speed and accuracy are enviable. So is its ability to make instant transitions between notes and chords. Humans are slow to learn these transitions and have to practice going back and forth repeatedly to build muscle memory. If the machine were capable, it would likely envy the human in terms of passionate performance and musical expression.