Daily Tier1 Tourney Decks and the Bots of Aetherhub

andreliverod February 19, 2019 3 min

Let me introduce you to our newest automated Bot, his task is an important one. Gather the latest decklists from the current meta on a daily basis! You can find these lists Here

He has no name yet but will be joining the ranks together with our two other bots, Value Jeff and Bob The Legality Checker. The task of gathering the latest tourney decks is quite the undertaking and something we have been wanting to do for a long time. The bot will be running on a daily basis, fetch the newest decks and import them as full decks on the AetherHub user. The beauty of this is that not only do you get access to easy exports, commenting and simulations of the decks but our other bot Bob will also perform deck checks and verify that the lists are correct. Often we have found small errors in decks, cards missing from mainboard or typos and Bob will mark these decks as illegal. This makes it easy for us to spot errors and the decks will also be hidden from the view until the errors are fixed. 

image source: Terminator

The Bots of AetherHub - Bob the Legality Checker

So the new bot fetches decks, and as you have guessed Bob is checking legalities, but how does he work? Let me reveal to you some more technical details about Bob and how he operates in the background. After importing all the card legalities and getting the database up and running we played with the idea of why not make a way to automatically check decks users post. Initially, we made a function that checked your deck after you added new cards to the deck. Needless to say, this is a heavy operation. Not only do you need to fetch all the legalities, but you also have to compare the legalities to the full deck every time the user adds a card. A heavy workload that worked in our test environment but would not work in a real-life scenario with hundreds of users.

We have been through many iterations of the legality checker, after moving all legalities over to a cache we were starting to play more with the idea and deployed it live with some AJAX async functionality. It worked but we were not getting the performance we wanted it had to get better. It was then we started playing with the idea of letting users manually check the deck and also have an automated bot in the background checking new decks every 5minutes. This worked well!

There was still some rare issues where a deck would be marked illegal now and then and we could not really put our finger on what the problem was. It was hard to replicate the problem and also hard to log what happened. We started tweaking and speculated that the bot might trigger at the same time users clicked the manual button or the deck was changed at the same time it was checked. And after a while, we have now arrived at the current version of Bob. Todays Bob Checks 200 unchecked decks every x minutes but he only checks decks that have not been updated the last y minutes. He then sleeps for z minutes and then starts over again. We have also taken away the Manual Check button, Bob now checks on his own leisure.

image source: Cash Robot

Value Jeff

Now, this greedy bot is our Card Price fetcher. He has gotten TCGPlayers permission to fetch card prices of over 40.000 cards on a daily basis! Not only does this guy give us an up to date view of card prices but he also gives us historic statistics of card prices over time. As Bob, he has a set schedule of when he fetches, we found that doing this every 24 hours would be the best. It is a lot of data that gets pulled down so he segments this by taking small breaks within the fetches to ease the load on both TCGPlayer and our own servers. He will need to learn to talk to the European market soon too see we can get some Euro pricing on our site!

The Future of our Bots

While these three makes up our current army we are always looking for more useful stuff bots can do for us. We also have more tasks for our current bots. As we are looking at a quite polished Tourney system now we also want to make it possible to submit decklists to the tourney you are attending in. Well, wouldn't it be useful if there was a robot dude called Bob that could automatically check all the posted decks? We have the tools and we for sure are going to make it.

So Any suggestions for a name to our new bot? Get in the Discord and let us know!

About andreliverod:

Founder and CEO of AetherHub.com, he likes to play with fire and also has a Twitter account he posts his stuff on. If you are interested in supporting him on Patreon you will also receive an AetherHub.com premium subscription!

"Nuts & Bolts Spike spends his energy looking within. He tries to understand his own internal flaws and works to improve them"

Comments

Login to comment

1 comments

DJkidinfinite13
ooo really?
Search Articles

Enter The Battlefield Prepared

With the MTGA Assistant deck tracker MTGA Assistant