Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix WordLadder (extension of [https://github.com/LeonGuertler/TextArena/pull/59](old pr)) #63

Open
wants to merge 1 commit into
base: remove_enchant
Choose a base branch
from

Conversation

DylanASHillier
Copy link
Contributor

WordLadder but more efficient and harder words

  • depends slightly on the changes in env.utils.word_lists but a more general change

  • fixes the graph algorithm to work better for hard words

  • The old hard mode was actually easier than the easy mode because the adjacencies were found in the adjacency graph made from basic words only (thus more sparse)

  • New mode uses larger list of words to determine adjacency...

  • To do so uses more efficient algorithms

Examples before / after
Easy [before] gold -> band
['gold', 'cold', 'cord', 'card', 'hard', 'hand', 'band'] ❌ (intended)
['gold', 'bold', 'bond', 'band'] ✅ (easily found)
Easy [after] page -> mass
['page', 'pate', 'bate', 'bats', 'bass', 'mass']
Medium [before] sky -> law
['sky', 'say', 'ray', 'rat', 'cat', 'cut', 'nut', 'not', 'now', 'low', 'law'] ❌
['sky', 'say', 'lay', 'law'] ✅
Medium [after] work from ['work', 'cork', 'corp', 'coop', 'clop', 'flop', 'flog', 'frog', 'from']
Hard [before] rod -> cow
['rod', 'red', 'bed', 'bad', 'sad', 'say', 'ray', 'rat', 'cat', 'cut', 'nut', 'not', 'now', 'cow']❌
['rod', 'cod', 'cow'] ✅
Hard [after] shame -> loose
['shame', 'shale', 'stale', 'stile', 'stilt', 'stint', 'saint', 'paint', 'point', 'joint', 'joist', 'joust', 'roust', 'rouse', 'louse', 'loose']

Make sure the game is understandable without knowing it in advance (still hard without seeing it once or twice)
@DylanASHillier
Copy link
Contributor Author

Big question remains? should move the target path, start state, target state into the game state object right?

@DylanASHillier DylanASHillier changed the title Fix WordLadder (extension of https://github.com/LeonGuertler/TextArena/pull/59) Fix WordLadder (extension of [https://github.com/LeonGuertler/TextArena/pull/59](old pr)) Feb 21, 2025
@bobbycxy bobbycxy self-assigned this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants