Inspiration

The inspiration came from looking at the data sets and reading about machine learning.

What it does

Takes as input a sequence of DOTA2 item IDs representing the past purchases of the player and produces the ID of the expected next purchase.

To start use the command "java -jar WindowShopping.jar" in your shell, it will then load the training data from the folder the jar file is in which should contain "players.csv" and "purchase_log.csv". After the training is done it will write the first expected purchase (an integer item id) to the standard output. You can then use the commands '+' ex. +65 to add an item to the sequence of purchases, '-reset' to clear the sequence, and '-exit' to exit the program. After each change to the sequence the next expected purchase will be written to the standard output.

You can also use the code as a library if you want.

How I built it

It's written in Java and uses a library called SPMF (http://www.philippe-fournier-viger.com/spmf/index.php) which has an implementation of the All-k Order Markov sequence prediction model found in this paper:

Pitkow, J., Pirolli, P.: Mining longest repeating subsequence to predict world wide web surng. In: Proc. 2nd USENIX Symposium on Internet Technologies and Systems, Boulder, CO, pp. 13–25 (1999)

I tried some of the other sequence prediction algorithms in the library and some more not sequence algorithms from a project called Weka but this one worked best.

Challenges I ran into

Finding a good machine learning algorithm, most of the ones I tried were not great at predicting the next purchase.

Accomplishments that I'm proud of

Finishing the project. Also I think it's pretty accurate for only using the past purchases as input.

What I learned

What machine learning is.

What's next for Window Shopping

I was planning on trying to produce two guesses for the next item instead of just one since I think that would improve the chance of the correct one being shown to the player. I also wanted to use more of the game state as input to the prediction model (for example the player's current gold) if I had time.

Built With

Share this project:
×

Updates