remix logo

Hacker Remix

Show HN: What happens if you make a crossword out of Reddit r/gaming

53 points by zomh 5 days ago | 57 comments

As a fan of dense New York Times-style crosswords, I challenged myself to create topic-specific puzzles. It turns out that generating crosswords and efficiently placing words is a non-trivial computational problem.

I started the project, "Joystick Jargon" combining traditional crossword elements with gaming-related vocabulary. Here's the technical process behind it:

1. Data Source: Used a 3.8 Million Rows Reddit dataset from Hugging Face (https://huggingface.co/datasets/webis/tldr-17).

2. Data Filtering: Narrowed down to gaming-related subreddits (r/gaming, r/dota2, r/leagueoflegends).

3. Keyword Extraction: Employed ML techniques, specifically BERT-embeddings and cosine similarity, to extract keywords from the subreddits.

4. Data Preprocessing: Cleaned up data unsuitable for crossword puzzles.

5. Grid Generation: Implemented a heuristic crossword algorithm to create grids and place words efficiently.

6. Clue Generation: Utilized a Large Language Model to generate context-aware clues for the placed words.

The resulting system creates crossword puzzles that blend traditional elements with gaming terminology, achieving about a 50-50 mix.

This project is admittedly overengineered for its purpose, but it was an interesting exploration into natural language processing, optimization algorithms, and the intersection of traditional word games with modern gaming culture.

A note on content: Since the data source is Reddit, some mature language may appear in the puzzles. Manual filtering was minimal to preserve authenticity.

You can try the puzzles here: <https://capsloq.de/crosswords/joystick-jargon>

I'm curious about the HN community's thoughts on this approach to puzzle generation? What other domains might benefit from similar computational techniques for content creation?

maxrmk 5 days ago

Tried it! I really like the idea, but I think the clue generation could use some work. Every clue ended in "in games", and honestly most of them were not really game related to start with. For example the clue "Place in games where characters go to rest and replenish health or mana" had the solution "bar"... which I wouldn't describe as right. Similarly "The name of a popular character who may need rescuing in some games" was "Emily".

I think it might be worth working on prompting to make sure the answer is a unique solution to the hint (or at least closer to unique). What model are you using here?

cableshaft 5 days ago

Haha, for those two you mentioned I assumed it was 'Inn' and 'Zelda'. I don't even know who Emily is.

And googling 'Emily video game character' didn't bring up any noticeably popular video game characters.

Arch485 4 days ago

I put "hub" and "Peach"... There seems to be a lot of possible answers

jayGlow 4 days ago

emily is the name of characters that are rescued in bioshock infinite as well as the first dishonored game. both games are around a decade old but were popular at the time.

NBJack 4 days ago

Isn't the character in Bioshock Infinite 'Elizabeth'? I'd also assert that by design, Elizabeth was meant to be a character that arguably didn't really need to be rescued, "she can take care of herself".

The only name I could think of in 5 letters that fit here was actually "Peach".

zomh 5 days ago

Thank you for trying. You are absolutely right. In my defense i released the very first 20 puzzles without proof reading them. I just wanted to see what the AI can deliver as a starting point and get an idea if crossword players would like or hate the general idea of it. I've just started seriously playing it myself and some clues are indeed strange. The clues were generated by gpt-4o. You can try later puzzles i did some prompt adjustments because i noticed the forced "in games" after 10 puzzles or so. It gets a bit better at later puzzles. Thank you for the feedback

criley2 5 days ago

Really goes to show how bad top-tier LLM's are at rather basic tasks like creating a clue out of popular media. This should be among the core competencies of major models with tons of available training data and simple summarization requests.

zomh 5 days ago

LLM Hallucinations are real. Admittedly for the prompt I provided just the word and some basic rules. It should be possible to increase the quality if e.g. I provide the sentence in which the word was used to the LLM. Nevertheless Hallucinations will always be a problem i think there is no way around a human quality gate in the process?

bongodongobob 5 days ago

No it shows how important good prompting techniques are.

vunderba 5 days ago

Nice work. I've also experimented with procedurally generated crossword puzzles, though I really wanted to constrain them to symmetric layouts like what you would find in the New York times which made it more difficult.

There's an outstanding issue and that is (from what I can tell) at least 75% of the answers correspond to relatively generic nouns or verbs.

Part of the deep satisfaction in solving a crossword puzzle is the specificity of the answer. It's far more gratifying to answer a question with something like "Hawking" then to answer with "scientist", or answering with "mandelbrot" versus "shape".

It might be worth going back and looking up a compendium of games released in the last couple decades, cross referencing them with their manuals, GameFaqs, etc. and peppering this information into the crossword.

zomh 4 days ago

Wanted to thank you again. I am currently working on an improved version providing more context. Your sentence "Part of the deep satisfaction in solving ..." made it into the prompt's rule-set. At this very moment I am only using the dataset of r/dota2 to make the testing easier and I look at the very first result with the new prompt:

Generated words and clues:

heroes: Characters with unique abilities in Dota 2, tasked with defeating the enemy's Ancient.

ragers: Players who overly react to in-game frustrations, often ruining the fun for everyone.

rage: A common emotion experienced by players sometimes leading to poor decision-making.

tachyons: Hypothetical particles that travel faster than light, having no place in an Ancient's mechanics.

healing: Essential support function often provided by certain heroes like Treant Protector.

burn: Refers to a mechanism used to deplete an opponent's mana, crucial in trilane strategies.

matters: In Dota 2, every decision, including hero picks, can significantly change the outcome.

fault: What a player will often blame when losing, rather than acknowledging their own mistakes.

support: Role in Dota 2 focused on helping the team, often with abilities to aid and sustain.

team: Group of players working together to win, where synergy and composition are key to victory.

Note that the Words themselves were not picked by OpenAI but rather a per-selection from the BERT Embeddings ML Algorithm but this time with more than just a word as context.

This is definitely going in the right direction. It's only sample size of 1 but i had to share it with you!

vunderba 4 days ago

Absolutely! Keep me updated - these types of projects are definitely fun to explore. It'll also be interesting to explore alternative LLMs, as well as providing zero shot examples within the system prompt itself (if you haven't already).

I forgot to mention but it might also be worth exploring more classic NLP techniques like named entity recognition to score clues higher and lower in terms of overall specificity.

zomh 3 days ago

Have not done zero shot yet. At the moment i am experimenting with this https://arxiv.org/abs/2210.05245. Looks promising hoping to push an updated version soon but i am still fighting with it at the moment

xrisk 4 days ago

Pretty reasonable. I don’t know where it pulled tachyons and it’s clue from though, that’s funny.

zomh 3 days ago

They talked about it in r/dota2 don't ask me why but they did :D

zomh 5 days ago

Thank you for your input. Your conceptual point on what makes crosswords fun is gold! Your practical advice is not only great but also very doable: Remember I used a 3.7million Reddit-Comments dataset which is a sub-optimal choice to generate words out of. (But i liked the headline behind it). So changing the dataset to something you mentioned (game compendiums, manuals, faqs) will probably increase the answers significantly.

darepublic 4 days ago

In first puzzle I received, there was a clue for 1 across but there was no such place on the board. It was actually 2 across

zomh 2 days ago

~~~ UPDATE ~~~~

After a ~30 hours weekend coding marathon, I've just pushed a new version of the original joystick-jargon (r/gaming) and a new r/leagueoflegends puzzle live.

https://capsloq.de/crosswords/joystick-jargon

https://capsloq.de/crosswords/r/leagueoflegends

What changed?

- 5 new puzzles for r/gaming

- 6 new puzzles for r/leagueoflegends

- Old puzzles deleted

- New extraction algorithm (everything new: tokenizer, transformers, piplines, model, word and document embeddings, scoring, complete overhaul ...)

- New clue prompting

- Grid can now only contain diagonal black boxes (should guarantee intersections)

- Fixed numbering bug on the grid

- Did proof read each puzzle and some slight adjustments to guarantee puzzle integrity.

Warning: When i did proof read the League of Legends Q&A I noticed that I've never played that game so I couldn't verify everything!

Thank you very much to everyone who provided feedback to improve on v1.

I really hope you feel an increase in quality. I am looking forward for even more feedback and improving further.

Planning to use more suitable datasets in the future. It's super hard to get quality crossword list out of r/gaming.

Have fun puzzling! (please)