Tuesday, August 13, 2013

NWO in MtG and Twitter Sentiment Analysis 1: The Plan

The New World Order:

For those of you unfamiliar, NWO is synonymous in Magic: the Gathering with dumbing the game down. For older players, NWO is the winds of change chapping our faces in near mockery.

Here is the MaRo article that started it all: http://www.wizards.com/magic/magazine/article.aspx?x=mtg/daily/mm/172 .

In MaRo's article we see a fantastically ad-hoc graphs:

Enlightening eh?

We see some gedanken experiments:
For those that are worried that this is boring, I ask you to simply try the following experiment. Make two decks of just vanilla creatures and common sorceries. Find a player of a similar skill level to your own and play the decks against each other. What you will find is that these games are actually quite interesting.

And in general the article has a strong flavor of "we're doing it, deal with it."

My experience is that players I speak with hate NWO, and don't necessarily have anything to back up if it is actually good or not. The mothership surely hasn't provided us with any resources to see what analysis they've actually done on card enjoyment. That's where sentiment analysis comes in.

Twitter and Sentiment Analysis:

Sentiment analysis is exactly what it sounds like. You use text mining techniques to analyze the positivity or negativity of a statement by giving values to each word. This technique is extremely popular for quickly analyzing huge text data sets to try to extract insights about a particular subject.

This past summer I did some sentiment analysis on tweets for fun, and realized how powerful and efficient this technique is.

Here's why it is a good fit for Twitter and Magic:
  1. Tweets are short and numerous, they are also very concise on a topic due to character limit. 
  2. The MtG Twitter community is fairly large, including pro level, in house, and casual players.
  3. The Twitter API makes it easy to search for specific card names.
The Plan:

It seems invaluable to know what cards from the new sets players like. We can start to think about the strengths and weaknesses of NWO if we can see what people are saying about each new card. Like all NLP(or anything really), its not a perfect model, but we can see in a broad sense, what cards people are enjoying.

Here is an outline:
  1. Beginning with Theros' spoilers, follow the daily tweets using new card names.
  2. Compile these tweets based on individual card names
  3. After release, roughly group cards into categories by card function
  4. Run sentiment analysis on card groups and new keywords.


To roughly evaluate the hits and misses in Theros' based on Twitter chatter.

Check back here for updates on how this is done, and what we can learn about new cards in Theros'.

Suggestions Welcome!

Monday, August 12, 2013

My text editor of choice, and why general questions are bad.

J: "What is your text editor of choice?"
B: "LaTeX."
"That's not a text editor."
B: "I know, but your question was so general, this was the only reasonable answer."

Why the question above is terrible:

The question above fails to identify the motivation for asking. Here are some better questions:

  • What text editor do you code in?
  • What text editor do you write academic papers in?
  • What text editor do you due warp-speed text editing in?
  • What text editor do you blog in?
  • What text editor do you leave open for your cat to type silly nonsense that you can post on Facebook?
  • What is the absolute best text editor?
Hopefully this clears up the issues with the question.
BTW: ʇxǝʇ ǝɯıןqns (ɟ ʇxǝʇ ǝɯıןqns (ǝ ɹǝƃƃoןq (p ʇıpǝƃ (ɔ ǝʌıןxǝʇ (q  ǝuıן puɐɯɯoɔ puɐ 'ʇıpǝƃ (ɐ

Some thoughts on text editors:

Long ago I was introduced to Emacs and Vim, and I'll admit I had a torrent love affair with Vim for a while as an undergraduate. I eventually had a falling out with Vim and reverted back to gedit(coinciding with my hiatus from coding). Sometime last year I was introduced by Kevin Lin to Sublime Text. Since, I've been dying to get familiar with it but haven't had a good opportunity. I'm looking forward to the upcoming Kaggle project to force myself to use it. But this is a super high level editor, and far too serious-business for  normal everyday text editing...

Why Gedit is my most commonly used editor:

Two days ago, a friend sent me a data set that she needed cleaned up in about 5 minutes. She(a biologist) was having Excel issues and really needed an 11'th hour data cleanup. The data had some real issues. Some percentages were integers, others were decimals, some were even written as ratios, and a couple entries even were written in words because excel was autocorrecting them as dates and she was in such a hurry this was the fastest solution(I had to fight the urge to send her this link: http://lmgtfy.com/?q=how+to+make+excel+not+autocorrect+ratios+to+dates).

How long did it take me to clean the data set? About two minutes. Because "I learned to stop worrying and learn to love plaintext editors".

Find/replace is powerful, fast, and if you're clever, can more than likely perform that little regex you know awk can do so nicely. 

Coding, and pretty colors:

I'm not ashamed to admit, that as a CS minor, I learned how to program in Java, using Eclipse. Now-a-days, coder friends give me a look of scorn when I mention this, but as someone who was already reindexing his music collection folder structure using awk in Sophomore year, I don't feel like this requires me to turn in my nerd badge. When looking at Sublime text, I like that it strikes a balance between the two extremes, it has the pretty colors and language specific capabilities, but still preserves that narcissistic love of masturbatory-keyboard-shortcutting. Additionally, green-text-black-background-what! A notable exclusion from Sublime text is the incredible testing suite that comes with Eclipse, but maybe this is a crutch anyhow(get off my lawn).


The point of all this is to say, aggressively pursue getting the damn problem done and try new text editors in your own time.

Friday, August 9, 2013

What is reconstruction?

Reconstruction is the act of rebuilding the whole from pieces. 

Given sheaf data on patches of a covering on some space we reconstruct the space.

Given usage data of some system we reconstruct users habits.

Given snippets of information we reconstruct the causal narrative.

Reconstruction codifies the essential characteristics.

Reconstructing a space from sheaf data on a covering identifies the preserved the topological properties.

Reconstructing a users habits from usage data identifies the telling characteristics of user experience.

Reconstructing a story from multiple sources' tellings identifies the essential details.

When life gives you observational data of an object with color, texture, and taste complying with what you know about lemons, go ahead and make some lemonade.