• Lawrence Phillips - Personal Projects

Chromatic Orb Calculator:
Path of Exile is a free-to-play action RPG in the style of Diablo. Acquiring good items is a huge part of the game and players spend large amounts of currency to improve the properties of an item. Changing items is a stochastic process, but how these processes work is often poorly understood.

One such currency is the chromatic orb. Items in Path of Exile have 1 to 6 sockets where players insert and combine abilities to create new and powerful attacks. Sockets can be red, blue, or green (and through special means, sometimes white). Each of the primary colors is associated with an in-game attribute, strength, intelligence, and dexterity respectively. When a player uses a chromatic orb on an item the colors of the sockets are re-rolled. Players often spend dozens or even hundreds of chromatic orbs to achieve useful and sometimes rare socket color combinations. I noticed that players made these economic decisions without even knowing how likely their desired outcome might be.

To combat this, I decided to gather data on chromatic orbs, model the process, and create a tool players could use to help inform their decisions. To start though, we only knew two things about the process:

  1. A chromatic orb never returns the exact same permutation of colors (i.e. the item always changes at least a little).
  2. The higher a stat requirement on an item, the higher the probability of getting the associated color.

To model the process, I assume each socket is rolled independently of the others and that the color of a socket is proportional to the associated stat requirement plus a smoothing parameter, X. To test the theory, I needed more data than I could possibly collect myself. To fix that problem, I started posting about the project on the official Path of Exile forums and on the Path of Exile subreddit. Many community members helped to contribute data and altogether we accumulated detailed information on 6,000 chromatic orb rolls.

I analyzed the data in MATLAB and found the model did a pretty good job of fitting the collected data. It's one thing to give the community an equation and let them sort it out themselves, so instead I decided to create a tool for users. Forging ahead in spite of my lack of HTML kung-fu skills, I created Should I Chrome It?, a Heroku-based website where users can enter their desired socket colors and get an estimate of how many chromatic orbs might be required. I used Python to model the chromatic orb process as an absorbing Markov chain.

Since release, I was contacted on Reddit by /u/siveran who wanted to help contribute. His updated calculator has seen widespread adoption by the community.

Project Euler:
Project Euler hosts a number of mathematics problems which can be solved through coding. Each problem should be able to be solved with 1 minute of runtime on a modest computer. I've been solving the problems in R to better familiarize myself with the language and learn about optimization in R. You can find my solutions on GitHub.