Machine Learning: the Gathering

In Magic: the Gathering, a collectible card game, competitive players tend to gravitate towards a few dozen of the best decks made up out of a subset of all available cards. For instance in the Legacy format nearly all 18000 cards can be played, yet you’ll only see about 500 show up in tournaments with some cards (e.g. Brainstorm and Force of Will) showing up in > 50% of all high-ranking decks. When playing in such an event it is key to quickly identify your opponent’s deck and adapt your own game plan accordingly. Top players are able to very quickly do this, bad ones like myself need a few more turns. Here we’ll see if we can train a model that takes in a few known cards and outputs a prediction which deck is being played. In this blog-post I’ll show you how I made a classifier that can take a list of known cards in your opponent’s deck and return a list of possible decks they are playing. But let’s start with two examples of what it can do first. Imagine this scenario, on the first turn your opponent leads with Wasteland, on his second turn he plays Read more…

COVID-19 impact on KeyForge

All our lives were impacted by COVID-19, but what was the impact on KeyForge sales? There was a very technical post last month, this one is intended for everyone that cares about KeyForge, but not the details of how to create models. 500 000 fewer decks registered during COVID This shouldn鈥檛 come as a surprise to anyone, during COVID, with the world going in lockdown there were fewer decks registered. With local game stores closed, in person games were hard if not impossible at times and the competitive scene died out entirely. So no decks are being purchased for sealed play and there was no need to buy a bunch of deck to find that one with the combo that could take you to the top of the leaderboards. With people unable to get together and play, they play less and the decks they do purchase will last longer as the novelty doesn鈥檛 wear off nearly as fast. The graph below shows, in blue, how many decks were registered in the master vault since the release up until this article was posted. The gray line indicates how many decks the model predicts would have been registered had COVID-19 never happened. Read more…

Smart Air Quality Monitoring using an IKEA Vindriktning with ESP8266 & BME680

Effective insulation is key in modern homes, offering comfort and energy efficiency. However, it often comes with a need for better ventilation to maintain a healthy air quality. In this guide, we’re focusing on an innovative, cost-effective way to enhance your home’s air quality using some clever technology. We’ll show you how to combine the IKEA Vindriktning air quality monitor with an ESP8266 microcontroller and a BME680 Volatile Organic Compounds (VOC) sensor (which includes CO2). With this IKEA-hack, you’ll be able to make informed decisions about when to open windows, increase ventilation, or change filters, all based on accurate data. Plus, it integrates smoothly with smart home systems like Home Assistant using ESPHome. In this guide, we’re diving deep into every nook and cranny of this project. We’ll start from the ground up with the electronics, smoothly sail through the integration with Home Assistant (HA), and even sprinkle in some savvy tips on how to interpret the results. What you need? While this concept of enhancing the IKEA Vindriktning isn’t exactly breaking new ground – there’s already a plethora of information and various hacks out there – the advantage of being late to the party is that I can cherry-pick Read more…

Faster Mixture Models in PyMC3

In a previous post about clustering the palmer penguins using PyMC3, the mixture model was implemented in the model itself. Though this is great for understanding what is going on, it isn’t very efficient when sampling the model. Furthermore, observations (here penguins) were assigned to groups (here the species of penguin) using only one of the samples taken from the model, since we sample the model thousands of times it is a shame not to take all that data into account. When acquiring more observations, you typically don’t want to re-run the entire sampling step (here it takes minutes but this could be hours or days for more complex mixtures or larger datasets). Ideally you can fit the model on some initial data and then predict the group using new, previously unseen, data. With the code in the previous post this was not possible, in the code below we’ll explore how this can be done using PyMC3. So while we had a great model already, a few trick can still be used to further improve upon it. This GitHub repository contains all the code, which is based on the code discussed on the PyMC3 forums here and here. Both threads Read more…

Making an iBeacon App

First things first Beacon technology provides location data much like GPS. But beacons are not a replacement for GPS technology. While the actual workings of the two technologies vary drastically, the end result is similar. The main selling point of beacons is their ability to provide a user’s location at a more granular level and in areas that GPS can’t reach. iBeacon apps actually benefit greatly from integrating GPS functionality, more on that later.I recently finished working on “The Manifest Experience”, an iBeacon app for the digital agency I work at. The app’s purpose centers around welcoming guests to our office. It also gives them access to location specific details about our space. We built the app as a way to explore the technology and become more familiar with it’s strengths and weaknesses. During the development process I was able to freely experiment with iBeacons. We experimented with new ways to utilize the technology and ended up providing a pretty unique end-user experience. You can find the app on the AppStore here: https://itunes.apple.com/us/app/manifest-experience-st.-louis/id929868569?mt=8 NOTE: I’m linking to provide additional context, no need to download it. The app isn’t useful to people that aren’t around our STL office. Quick Look into The Manifest Read more…

CodeForces: Trying on Competitive Coding

How well do you know your algorithms? If you are a self-taught coder (like me), this might be a gap in your knowledge! This post is my attempt to get some extra practise under my belt writing algorithms to solve a few coding problems. On CodeForces, a site where there are programming competitions, the assignments from previous competitions are all available as well as the infrastructure to check your solution. So let’s use this resource to level up our programming a little. Getting Started On CodeForces all problems have a difficulty ranging from 800 to 3500. The lower the difficulty the easier to problem is to solve. To get started I recommend picking an easy problem to tackle to get familiar with the platform, how to get the input, how to submit a solution, … I picked problem 119A titled “Epic Game”, with the lowest difficulty of 800, to dip my toes in the water. The goal is to write a problem solve this issue: Simon and Antisimon play a game. Initially each player receives one fixed positive integer that doesn’t change throughout the game. Simon receives number a and Antisimon receives number b. They also have a heap of Read more…

Unveiling the Mysteries of BLE GATT: A Comprehensive Guide for Computer Savvy

As a seasoned computer professional, you’re likely no stranger to the world of wireless communication. With the proliferation of IoT devices, Bluetooth Low Energy (BLE) has emerged as a popular choice for device connectivity. At the heart of BLE lies the Generic Attribute Profile (GATT), a crucial component that enables seamless data exchange between devices. In this article, we’ll delve into the intricacies of BLE GATT, exploring its architecture, key concepts, and practical applications. What is BLE GATT? BLE GATT is a protocol that defines how devices interact with each other over BLE. It’s a hierarchical structure that facilitates the exchange of data between a peripheral device (e.g., a smart sensor) and a central device (e.g., a smartphone). GATT is built on top of the Attribute Protocol (ATT), which provides a way for devices to read and write attributes, such as device names and services. GATT Architecture The GATT architecture consists of three primary components: Services: These are logical groupings of attributes that define a specific function or feature of a device. Services are used to categorize attributes into meaningful categories, making it easier for devices to discover and interact with each other.Characteristics: These are individual attributes that contain specific Read more…

Gwent Popularity Article on TBG!

Recently Team Bandit Gang鈥檚 very own Babyjosus has been very active pushing out new Gwent content! He has been interviewing people of the community (including me) about the decks they play and why in the series Whats in my Deckbuilder. Their PodCast, the Iron Falcon Report, even got a shout out from the man, Pawel Burza, himself. I鈥檓 happy to have been able to contribute to this by writing an article discussing the results from my post on the number of players in Gwent鈥檚 Pro Ladder. For technical details check out the original post here. For the discussion about the past and current popularity of Gwent and whether it is dead, dying or very much alive, head over to my article on Team Bandit Gang鈥檚 website.

Gwent: How Many Pro Players Are Out There ?

I noticed that some people ended up on my blog by searching Google for “gwent how many players in pro rank”. They would have been disappointed as there is no answer to that question yet, let’s see if we can change that! In this post using data science and web scraping, we’ll try to figure that out exactly how many people can be found on Gwent’s Pro Ladder. In-game Gwent only shows the top 1144 players for the current season, which is convenient but nowhere near the complete list. On the Gwent Masters website you can pull up the rankings of all Pro Players up to rank 2860, … more but still not complete … so I’ll explore three ways to get an idea of the total number of Pro Players out there. If you are just interested in the number of players, click here to jump right to the numbers you are looking for. Method 1: Being the Lowest Ranked Player One trick you could use is ending in the top 500 one season, so you won’t drop out of Pro Rank. During the next season you play and lose one game, only one! This way you will have Read more…

2013: A Year of Growth and Achievement

As I reflect on the past year, I am filled with a sense of pride and accomplishment. In 2013, I had the opportunity to work as a Communication and Software R&D Engineer, focusing on researching and developing innovative products related to near-field communication technology, with a particular emphasis on Bluetooth Low Energy (BLE). Throughout the year, I had the privilege of delving deeper into the realm of near-field communication, gaining a profound understanding of its underlying principles and mechanisms. My research and development efforts culminated in the successful application of BLE technology to create smart lock products that showcased enhanced user experience and security features. While the journey was not without its challenges, I persevered and overcame numerous obstacles, ultimately yielding substantial results. I am thrilled to have made meaningful contributions to the development of smart locks, which have the potential to revolutionize the industry. As I look back on 2013, I am reminded of the importance of continuous learning and growth. My experience has taught me that staying at the forefront of technological advancements requires dedication, passion, and a willingness to adapt to emerging trends and innovations. In conclusion, 2013 was a pivotal year in my career as a Read more…