Teaching A Machine To Be Worse At A Video Game Than You Are

Is it really cheating if the aimbot you’ve built plays the game worse than you do?

We vote no, and while we take a dim view on cheating in general, there are still some interesting hacks in this AI-powered bot for Valorant. This is a first-person shooter, team-based game that has a lot of action and a Counter-Strike vibe. As [River] points out, most cheat-bots have direct access to the memory of the computer which is playing the game, which gives it an unfair advantage over human players, who have to visually process the game field and make their moves in meatspace. To make the Valorant-bot more of a challenge, he decided to feed video of the game from one computer to another over an HDMI-to-USB capture device.

The second machine has a YOLOv5 model which was trained against two hours of gameplay, enough to identify friend from foe — most of the time. Navigation around the map was done by analyzing the game’s on-screen minimap with OpenCV and doing some rudimentary path-finding. Actually controlling the player on the game machine was particularly hacky; rather than rely on an API to send keyboard sequences, [River] used a wireless mouse dongle on the game machine and a USB transmitter on the second machine.

The results are — iffy, to say the least. The system tends to get the player stuck in corners, and doesn’t recognize enemies that pop up at close range. The former is a function of the low-res minimap, while the latter has to do with the training data set — most human players engage enemies at distance, so there’s a dearth of “bad breath range” encounters to train to. Still, we’re impressed that it’s possible to train a machine to play a complex FPS game at all, let alone this well.

Thin Coatings Require An Impressive Collection Of Equipment And Know-How

Let’s be honest — not too many of us have a need to deposit nanometer-thick films onto substrates in a controlled manner. But if you do find yourself in such a situation, you could do worse than following [Jeroen Vleggaar]’s lead as he builds out a physical vapor deposition apparatus to do just that.

Thankfully, [Jeroen] has particular expertise in this area, and is willing to share it. PVD is used to apply an exceedingly thin layer of metal or organic material to a substrate — think lens coatings or mirror silvering, as well as semiconductor manufacturing. The method involves heating the coating material in a vacuum such that it vaporizes and accumulates on a substrate in a controlled fashion. Sounds simple, but the equipment and know-how needed to actually accomplish it are daunting. [Jeroen]’s shopping list included high-current power supplies to heat the coating material, turbomolecular pumps to evacuate the coating chamber, and instruments to monitor the conditions inside the chamber. Most of the chamber itself was homemade, a gutsy move for a novice TIG welder. Highlights from the build are in the video below, which also shows the PVD setup coating a glass disc with a thin layer of silver.

This build is chock full of nice details; we especially liked the technique of monitoring deposition progress by measuring the frequency change of an oscillator connected to a crystal inside the chamber as it accumulates costing material. We’re not sure where [Jeroen] is going with this, but we suspect it has something to do with some hints he dropped while talking about his experiments with optical logic gates. We’re looking forward to seeing if that’s true.

Continue reading “Thin Coatings Require An Impressive Collection Of Equipment And Know-How”

Better Solvents Could Lead To Cleaner, Greener Perovskite Solar Cells

Regardless of appearances, almost all scientific progress comes at a price. That which is hailed as a breakthrough technology that will save the planet or improve the lots of those living upon it almost always comes at a cost, which sometimes greatly outweighs the purported benefits of the advancement.

Luckily, though, solving these kinds of problems is what scientists and engineers live for, and in the case of the potentially breakthrough technology behind perovskite solar cells (PSCs), that diligence has resulted in a cleaner and safer way to manufacture them. We’ve covered the technology of perovskites in the past, but briefly, as related to photovoltaic cells, they’re synthetic crystals of organometallic cations bonded to a halide anion, so something like methylammonium lead tribromide. These materials have a large direct bandgap, which means a thin layer of the stuff can absorb as much solar energy as a much thicker layer of monocrystalline silicon — hence the intense interest in perovskites for cheap, easily manufactured solar cells.

The problem with scaling up PSC manufacturing has been the need for volatile and dangerous solvents to dissolve the perovskites. One such solvent, dimethylformamide (DMF), commonly used in pharmaceutical manufacturing and often a component of paint strippers, is easily absorbed through the skin and toxic to the liver in relatively low concentrations. Another common solvent, γ-butyrolactone (GBL), is a precursor to γ-hydroxybutyric acid (GHB), a common recreational club-drug known as “liquid ecstasy”.

In a recent paper, [Carys Wrosley] and colleagues at Swansea University showed that γ-valerolactone (GVL), a far less toxic and volatile solvent, could be effectively substituted for DMF and GBL in perovskite manufacturing processes. One of the most promising features of perovskites for solar cells is that the solution can be easily applied to transparent conductive substrates; the use of GVL as a solvent resulted in solar cells that were comparably efficient to cells made with the more dangerous solvents.

Continue reading “Better Solvents Could Lead To Cleaner, Greener Perovskite Solar Cells”

Hackaday Links Column Banner

Hackaday Links: May 30, 2021

That collective “Phew!” you heard this week was probably everyone on the Mars Ingenuity helicopter team letting out a sigh of relief while watching telemetry from the sixth and somewhat shaky flight of the UAV above Jezero crater. With Ingenuity now in an “operations demonstration” phase, the sixth flight was to stretch the limits of what the craft can do and learn how it can be used to scout out potential sites to explore for its robot buddy on the surface, Perseverance.

While the aircraft was performing its 150 m move to the southwest, the stream from the downward-looking navigation camera dropped a single frame. By itself, that wouldn’t have been so bad, but the glitch caused subsequent frames to come in with the wrong timestamps. This apparently confused the hell out of the flight controller, which commanded some pretty dramatic moves in the roll and pitch axes — up to 20° off normal. Thankfully, the flight controller was designed to handle just such an anomaly, and the aircraft was able to land safely within five meters of its planned touchdown. As pilots say, any landing you can walk away from is a good landing, so we’ll chalk this one up as a win for the Ingenuity team, who we’re sure are busily writing code to prevent this from happening again.

If wobbling UAVs on another planet aren’t enough cringe for you, how about a blind mechanical demi-ostrich drunk-walking up and down a flight of stairs? The work comes from the Oregon State University and Agility Robotics, and the robot in question is called Cassie, an autonomous bipedal bot with a curious, bird-like gait. Without cameras or lidar for this test, the robot relied on proprioception, which detects the angle of joints and the feedback from motors when the robot touches a solid surface. And for ten tries up and down the stairs, Cassie did pretty well — she only failed twice, with only one counting as a face-plant, if indeed she had a face. We noticed that the robot often did that little move where you misjudge the step and land with the instep of your foot hanging over the tread; that one always has us grabbing for the handrail, but Cassie was able to power through it every time. The paper describing how Cassie was trained is pretty interesting — too bad ED-209’s designers couldn’t have read it.

So this is what it has come to: NVIDIA is now purposely crippling its flagship GPU cards to make them less attractive to cryptocurrency miners. The LHR, or “Lite Hash Rate” cards include new-manufactured GeForce RTX 3080, 3070, and 3060 Ti cards, which will now have reduced Ethereum hash rates baked into the chip from the factory. When we first heard about this a few months ago, we puzzled a bit — why would a GPU card manufacturer care how its cards are used, especially if they’re selling a ton of them. But it makes sense that NVIDIA would like to protect their brand with their core demographic — gamers — and having miners snarf up all the cards and leaving none for gamers is probably a bad practice. So while it makes sense, we’ll have to wait and see how the semi-lobotomized cards are received by the market, and how the changes impact other non-standard uses for them, like weather modeling and genetic analysis.

Speaking of crypto, we found it interesting that police in the UK accidentally found a Bitcoin mine this week while searching for an illegal cannabis growing operation. It turns out that something that uses a lot of electricity, gives off a lot of heat, and has people going in and out of a small storage unit at all hours of the day and night usually is a cannabis farm, but in this case it turned out to be about 100 Antminer S9s set up on janky looking shelves. The whole rig was confiscated and hauled away; while Bitcoin mining is not illegal in the UK, stealing the electricity to run the mine is, which the miners allegedly did.

And finally, we have no idea what useful purpose this information serves, but we do know that it’s vitally important to relate to our dear readers that yellow LEDs change color when immersed in liquid nitrogen. There’s obviously some deep principle of quantum mechanics at play here, and we’re sure someone will adequately explain it in the comments. But for now, it’s just a super interesting phenomenon that has us keen to buy some liquid nitrogen to try out. Or maybe dry ice — that’s a lot easier to source.

Retrotechtacular: The Drama Of Metal Forming

It may seem overwrought, but The Drama of Metal Forming actually is pretty dramatic.

This film is another classic of mid-century corporate communications that was typically shown in schools, which the sponsor — in this case Shell Oil — seeks to make a point about the inevitable march of progress, and succeeds mainly in showing children and young adults what lay in store for them as they entered a working world that needed strong backs more than anything.

Despite the narrator’s accent, the factories shown appear to be in England, and the work performed therein is a brutal yet beautiful ballet of carefully coordinated moves. The sheer power of the slabbing mills at the start of the film is staggering, especially when we’re told that the ingots the mill is slinging about effortlessly weigh in at 14 tons apiece. Seeing metal from the same ingots shooting through the last section of a roller mill at high speed before being rolled into coils gives one pause, too; the catastrophe that would result if that razor-sharp and red-hot metal somehow escaped the mill doesn’t bear imagining. Similarly, the wire drawing process that’s shown later even sounds dangerous, with the sound increasing in pitch to a malignant whine as the die diameter steps down and the velocity of the wire increases.

There are the usual charming anachronisms, such as the complete lack of safety gear and the wanton disregard for any of a hundred things that could instantly kill you. One thing that impressed us was the lack of hearing protection, which no doubt led to widespread hearing damage. Those were simpler times, though, and the march of progress couldn’t stop for safety gear. Continue reading “Retrotechtacular: The Drama Of Metal Forming”

Reviving Old Recipe For Faraday Wax Keeps Vacuum Experiments Going

Science today seems to be dominated by big budgets and exotics supplies and materials, the likes of which the home gamer has trouble procuring. But back in the day, science was once done very much by the seats of the pants, using whatever was available for the job. And as it turns out, some of the materials the old-timers used are actually still pretty useful.

An example of this is a homemade version of “Faraday Wax”, which [ChristofferB] is using for his high vacuum experiments. As you can imagine, getting a tight seal on fittings is critical to maintaining a vacuum, a job that’s usually left to expensive synthetic epoxy compounds. Realizing that a lot of scientific progress was made well before these compounds were commercially available, [ChristofferB] trolled through old scientific literature to find out how it used to be done.

This led to a recipe for “Faraday Wax”, first described by the great scientist himself in 1827. The ingredients seem a little archaic, but are actually pretty easy to source. Beeswax is easy to come by; the primary ingredient, “colophony”, is really just rosin, pretty much the same kind used as solder flux; and “Venetian red” is a natural pigment made from clay and iron oxide that can be had from art suppliers. Melted and blended together, [ChristofferB] poured it out onto wax paper to make thin strips that are easily melted onto joints in vacuum systems, and reports are that the stuff works well, even down to 10-7 mbar.

We love this one — it’s the perfect example of the hacker credo, which has been driving progress for centuries. It also reminds us of some of the work by [Simplifier], who looks for similar old-time recipes to push his work in DIY semiconductors and backyard inductors forward.

[David Gustafik] dropped us the tip on this one. Thanks!

Put APIs To Work Wth This ArduinoJson Walkthrough

One of the things this community is famous for is the degree to which people will pitch in to fill an obvious need. Look at the vast array of libraries available for Arduino as an example of how people are willing to devote their time to making difficult tasks easier, often for little more than a virtual pat on the back.

One level up from the library writers are those who go through the trouble of explaining how all these libraries work in real-world applications. [Brian Lough] recently rose to that challenge with a thorough explanation of the use of the ArduinoJSON library, a very useful but often confusing library that makes IoT projects easier.

The need for an ArduinoJSON explainer no knock on its author, [Benoît Blanchon], who has done excellent work documenting the library; it’s more of a realization that the nature of JSON itself means a library that works with it is going to be complex. [Brian]’s contribution here is sharing his insights into getting ArduinoJSON up and running in a real-world ESP32 example, and dealing with the potential pitfalls of parsing a human-readable text file that can be used to represent almost any data object using the limited resources of a microcontroller. Along with the basics, we found the warning about how pointers refer back to the dynamic JSON document object particularly helpful; the bit about using filters to winnow down a large data set was useful too.

Thanks to [Brian] for taking the time to put this valuable information out there. Here’s hoping this encourages others to share the wealth of hard-earned knowledge in a similarly clear and concise manner.

Continue reading “Put APIs To Work Wth This ArduinoJson Walkthrough”