Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 src
Octocat-spinner-32 .gitignore
Octocat-spinner-32 README.md
Octocat-spinner-32 four_letter_words.txt
Octocat-spinner-32 rebar
Octocat-spinner-32 rebar.config
Octocat-spinner-32 start.sh
README.md

word-ladder

http://en.wikipedia.org/wiki/Word_ladder

implementation creates process for each word in dictionary, sends lookup to start word and each process sends out messages to others as candidates in the chain/ladder, not knowing if it is a word or not

hacked together a a discussion piece and not as an example of fine code. only supports 4 letter words

currently, to run

from shell, will get dependencies (gproc), clean, compile and run erl with your binaries ./start.sh

in erl word_ladder_app:start(). word_ladder_app:initialize(). word_ladder_app:find("cold", "warm").

currently when a process finds a solution, it kills the spawning process (erl shell I believe) which kills all other word processes. this means that the system doesn't run forever (using a fair bit of memory as it constructs some LONG chains) but also means that initialize needs to be called before each "find".

produce dictionary file of 4 letter words: cat /usr/share/dict/words | grep -e '^....$' > four_letter_words.txt

Something went wrong with that request. Please try again.