Welcome to the codenames
GitHub page!
This package culminates from an introductory exercise in game AI. As an avid fan of the board game Codenames by Vlaada Chvatil, I sought to develop a simple AI that would, at each state in the game, proffer a word that is maximally suggestive of one set of words while minimally suggestive of another set of words. To accomplish this, I used the Edinburgh Associative Thesaurus (EAT) in conjunction with a custom feature selection function to prioritize word clues from a database of several thousand words. You can get started with this implementation of codenames
, complete with AI, by installing the most up-to-date version of this package directly from GitHub.
library(devtools)
devtools::install_github("tpq/codenames")
library(codenames)
This package includes everything needed to play a Codenames-like word association game from within the R console. To launch the game, users simply need to call the codenames
function from this package. Players can select 0, 1, or 2 AI "spy masters" by toggling the function arguments sm1
and sm2
between "human"
and cpu
. I refer those unfamiliar with the rules to the excellent tutorial video here.
codenames(sm1 = "human", sm2 = "cpu")
By default, each executed game will continue to run until completed. To terminate the game early, enter kill
or quit
during a user prompt. To pass on a turn, enter pass
during a user prompt. Otherwise, follow all directions provided within the console, and have fun!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.