Winning Game-App Contests With Computer Vision

[Gadget Addict] found out about a contest being held by a shoe seller. Their mobile app has a game very much like Bejeweled. The high scorer each month gets £500. His choices were to be better at the game than everyone else, or to be smarter. He chose the latter by writing a computer vision program to play the game.

There are two distinct parts of a hack like this one. The first is just figuring out a way to programmatically detect the game board and correctly identify each icon on it. This is an iPad game. [Gadget Addict] is mirroring the screen on his laptop, which gives him easy access to the game board and also allows for simulated swipes for automatic play. Above you can see two examples where black pixels may be counted in order to identify the icon. A set of secondary checks differentiates similar entries after the first filtering. The other part of the hack involves writing the algorithms to solve for the best move.

If you liked this one, check out a super-fast Bejeweled solver from several years back. We should also mention that this was just a proof of concept and [GA] never actually entered the contest.

Blinky LED Necklace That Actually Looks Chic

LED bib necklace by Agy

[Agy] a fabric hacker in Singapore has made a chic light sensitive LED necklace, and written up the tutorial on her blog  Green Issues by Agy. The lovely thing about this hack is that it doesn’t look like a breadboard round her neck, and most of the non-electronic components have been upcycled. [Agy] even used Swarovski crystals as LED diffusers for extra bling.

Using a LilyPad Arduino with a light sensor and a few LEDs, [Agy’s] circuit is not complicated. She seems to be just branching out in to wearable tech, so it is nice that she learnt to program different modes for bright and low light (see video below). Her background in sewing, refashioning and upcycling does show through in her crafty use of an old pair of jeans and lace scraps for this project.

We love tech focused jewelry like [TigerUp’s] LED matrix pendants or [Armilar’s] Nixie-ify Me Necklace, but they do scream Geek. DIY electronically enhanced accessories are becoming more commonplace with the variety of micro-controller platforms expanding rapidly. Low energy wearable boards like MetaWear are making it easy for the tech to be discreet and easily connected to your smartphone.  3D printing is enabling us to create durable enclosures, settings and diffusers like the ones used for LED Stegosaurus Spikes. With all these things, hobby wearable projects can not only be functional and durable, but can also look great too.

Do you think this necklace would look out of place in a non-geeky gathering? Have you got any helpful tips for [Agy’s] code? Have you tried using gems or crystals as diffusers and what were the results? Let us know in the comments below.

Continue reading “Blinky LED Necklace That Actually Looks Chic”

Bejeweled Blitz Bot Makes Your High Score Look Just Sad

Programmers don’t need to get good at a game to achieve a high score, they code a bot for that instead. Take [hypnotizd] for instance. He was learning to write in the C# language and decided to make a bot that plays Bejeweled Blitz on Facebook. He figures he took between 48 and 72 hours of coding over a couple of weeks, but remember, he was learning the language at the same time. We think you’d be hard pressed to achieve a 1.5 million range score by yourself, even with that amount of practice time.

We spoke with [hypnotizd] yesterday afternoon to get a bit of background on how he made this happen. His code (he’s not releasing it so you’ll have to write your own) scrapes the screen image as input. You can see at the beginning of the video after the break that he sizes his app to properly align each jewel in its grid. The program then identifies each game piece by finding the center of the cell and taking a 25 square-pixel average color. Many of the jewels are easily recognized in this first pass, but some are harder and require several different tests to identify. That’s the difficult part, choosing the best move is just a matter of coming up with your own rules on how the bot should play the game.

Continue reading “Bejeweled Blitz Bot Makes Your High Score Look Just Sad”