Welcome to the repository of our Codenames agents! This repository is the official implementation of Codenames as a Game of Co-occurrence Counting.
To be able to play with our agents, you first need to create or download distance matrices:
Resources for playing in English:
Small matrices containing relatedness to possible board words
Resources for playing in Hungarian:
Small matrices containing relatedness to possible board words
PMI file, inverse PMI matrix, distances in PMI-graph (Described in Hungarian here)
To play the game, run CodeNamesAgent/src/MainCMCL_from_matrix.java
with the following parameters:
- path to the distance matrix, e.g.
codenames_fasttext_sim_small.csv
- the clue scoring function (options:
scoreKoyyalagunta
,scoreKoyyalaguntaRestrict
,scoreHarmonic
,scoreHarmonicDivide
) - the number of targeted words as an integer (e.g.
2
)
To generate the clues we used for evaluation, run CodeNamesAgent/src/MainAgentClueTargets.java
with the following parameters:
data/english/boards_en.csv
ordata/hungarian/cmcl/boards_hu.csv
data/english/board_colors.csv
- one of the distance matrices, e.g.
codenames_fasttext_sim_small.csv
To evaluate our clues on the user data we collected, use eval/eval_codenames.py
.
Example usage:
python eval/eval_codenames.py codenames_fasttext_sim_small.csv data/english/eval_data/fasttext_en.csv data/english/eval_data/dataclips_userdata_en.csv data/english/clues.csv data/english/boards_en.csv data/english/board_colors.csv
@inproceedings{cserhati-etal-2022-codenames,
title = "Codenames as a Game of Co-occurrence Counting",
author = "Cserh{\'a}ti, R{\'e}ka and
Kollath, Istvan and
Kicsi, Andr{\'a}s and
Berend, G{\'a}bor",
booktitle = "Proceedings of the Workshop on Cognitive Modeling and Computational Linguistics",
month = may,
year = "2022",
address = "Dublin, Ireland",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2022.cmcl-1.5",
pages = "43--53",
}