Webcam Eye Tracker: Eye Tracking Video Games

Now that we have a working predictive model, we can deploy it to a simple application to test how well the eye tracker works. The plan is three-fold: Create a Predictor class that can load a trained model and make predictionsAdd a "tracking" mode to the data collector as a quick way to test the PredictorCreate a simple screen recorder that can save videos of eye tracking while playing video games Predictor class We want to create a predictor class that can handle all of the model loading and predicting. PyTorch models can be saved either as checkpoint files or…

0 Comments

Webcam Eye Tracker: An End-to-end Deep Learning Project

Recently, I wanted to learn PyTorch and needed to find a project to help focus my learning. I have always been interested in the idea of creating a webcam eye tracker, so that seemed like a good project for this. Eye trackers typically rely on infrared for accurate tracking, but performing the same task using purely vision techniques seemed like an interesting challenge. What follows is a series of posts on the process of creating a webcam eye tracker from scratch. As always, we should start by clarifying the main problems we're trying to address by going through this process.…

0 Comments

Rise of Kingdoms: Talent Builder

We all know it's difficult to play around with talents in Rise of Kingdoms (RoK) because of the gem cost for talent resets. So, I spent the last little while working on an online Rise of Kingdoms talent builder where you can create, tweak, and share talent builds without worrying about talent resets. Here is the link to the Rise of Kingdoms talent builder: roktalents.com Note: The site is currently best viewed on PC or laptop. Functionality is limited on mobile/tablet and more work needs to be done to optimize the experience for mobile devices. Check your stats One feature…

5 Comments

Rise of Kingdoms: Equipment Calculator

I have a long history of playing RPG games, where min-maxing and character planning were a huge part of the appeal. With the recent release of the equipment system in Rise of Kingdoms, I figured it might be useful to create an equipment calculator/planner. The goal was to create a system where you could mix and match equipment, with the total stat values displayed on the side. This would hopefully make it easier to fine tune your overall set to fit your play style. I threw together a rough version using Google Sheets. A standalone web app would probably be…

1 Comment

Rise of Kingdoms: Saving gold keys

Here it is. The answer to the age-old question. The question that shows up at least once a day on Reddit and Discord: "should I save my gold keys and open them all at once?". The assumption being that opening gold keys together in a batch gives more/better rewards than opening them one at a time. Therefore, in this post we will test whether that is true. As always, you can find the code and dataset for this analysis in my GitHub repo here. Samples and expected distributions We'll begin with a quick primer on expected/population distributions and how they…

18 Comments

Rise of Kingdoms: Show Your Love Event

In a previous post I discussed the point requirements of the last holiday event (Valentine's Day - Pledge of Thorns). Here, I will do the same analysis with the new holiday event (Show Your Love) to confirm those findings. I'll be drawing comparisons between the two events throughout. The supporting code and data for this analysis can be found here. Data collection for event I began by using 800 items (Carnations) and recorded how many points each item provided. Below (left) you can see the frequency distribution of the points provided for each item, as well as the distribution from…

2 Comments

Rise of Kingdoms: Master’s Blueprints

In order to unlock Tier 5 research in Rise of Kingdoms you need a level 25 Academy. However, the upgrade to Academy level 25 has a number of nested building requirements, with the majority of those buildings needing a Master's Blueprint. So, what is the minimum number of Master's Blueprints required to unlock Tier 5 research? Here are the building requirements for a level 25 Academy and unlocking Tier 5: City hallAcademyTrading postGoldmineScout camp (no blueprint)Watchtower (no blueprint)WallTavernQuarryStorehouseHospitalCastle (no blueprint)Alliance centerSiege workshopBarracksFarmArchery rangeLumber MillStable(requires a Quarry but is already listed above) At minimum, you will need 16 Master's Blueprints, which…

0 Comments

Rise of Kingdoms: Holiday Events

Rise of Kingdoms holiday events come around every few months. The last one involved collecting ornaments for the Christmas tree, and the current Valentine's Day event requires collection of roses. Using a rose gives you points, and you need a certain number of points to complete the event. We know how many points are needed in total to complete the event (2888 in the case of Valentine's Day), but the problem is that each rose gives you a varying number of points due to critical hits. For example, using one rose could give you 1 point or it could give…

1 Comment

Rise of Kingdoms: Commander Pairings

Rise of Kingdoms (iOS, Android) has many possible primary/secondary commander pairings, some of which are amazing, while others are absolutely terrible. Tier lists for commander pairings have been discussed by many people on YouTube, but I wanted to find a way to condense the information in those lengthy videos into a more digestible form. The goal was to create a quick and easy-to-use resource that could answer the question: "which commander works best with ____?" I ended up creating D3.js force-directed graphs to show viable pairings between primary and secondary commanders, along with the rank for each pairing. One neat thing about…

19 Comments

Overwatch Data Visualization

In a previous post I talked about an Overwatch dataset I've been collecting from my ranked games. Before running any statistical analysis on the Overwatch data, it is usually a good idea to explore and visualize the dataset. This helps us get a general sense of data patterns, which can help generate hypotheses that can then be tested with more formal statistical models. My own personal philosophy about data visualization/exploration is to approach it with targeted questions of interest. It is all too easy to fall down the rabbit hole of plotting absolutely everything, without a sense of what the…

1 Comment