from Hacker News

Automatically finding Codenames clues with GloVe vectors

by jsomers on 12/19/19, 12:26 AM with 8 comments

  • by Gullesnuffs on 12/19/19, 8:51 PM

    I also tried writing an AI for Codenames a couple of years ago, with the help from some friends. Interestingly, we also found out the hard way that the word "round" aren't used in the same contexts as things that actually are round, so our AI also struggled to connect "round" with words like "Jupiter" or even "Sphere". I'm not sure how to fix that, but maybe knowledge graphs could help?

    But I also thought it was surprising how well it worked most of the time! It wasn't quite as good as a human spymaster, but with the right choice of scoring function we could actually get a model based on word embeddings to play a pretty reasonable game of Codenames.

    https://github.com/Gullesnuffs/Codenames

  • by chmullig on 12/19/19, 7:29 PM

    This is a cool article, and I appreciate the actual testing.

    I also heartily recommend this implementation using conceptnet embeddings.

    https://github.com/commonsense/codenames

    Grab the latest mini.h5 and go. https://github.com/commonsense/conceptnet-numberbatch/blob/m...

  • by bravura on 12/19/19, 7:42 PM

    This is cool. With a 300-dimensional word representation, there are a lot of degrees of freedom to play with to achieve sharing meaning axes with the good words and diverging along meaning axes with the bad words.

    There's an over-indexing problem: words that happen to be very close to one or two of the targets will rank highly even when they're far away from the third. Minimizing the maximum distance from any target helps mitigate but doesn't entirely solve this problem.

    This is because they combine the distances using something like more like OR-gate (are any of these very good) and should be using AND (are all of these very good).

  • by kbenson on 12/19/19, 7:04 PM

    Interesting, but in the first example I would be worried that Wok would be misheard as "walk", which might entice people to pick the instant fail card of "fall". That's a meta-level of the game (which I've played with friends and family) that you have to be aware of, and sometimes you can use to your advantage. Because of that, using a program that can perfectly disambiguate between the word and associations will probably lead to some non-intuitive results sometimes.