You are quite right that :
The program doesn't know it. The idea is to check what words CHINK produces, then try the next word that is of the same generation/level that CHINK is part of, which you did, with the THANK= SHANK THANE. Then you tried Thick which gave you TRICK. If after each new generated word you were doing some sort of matching at the time you reached TRICK your program would know that it had matched the second letter of the target word. If you were doing a different word chain, you might not find a word for three or four levels that match a letter from the target word and your program is going to be have to be able to handle that scenario. Back to this chain. On finding a letter that matches a letter by position in the target word, you should bring your searching to a screeching halt, then go to your target word. At this point you only have to generate words that replace four positions of the target word. The first, third, fourth, and fifth letters can be changed to form words. Leave the second letter alone because you already have a match for it. As luck(design) would have it, changing the B in BRAIN to some other letter is going to give you your second match.There are other words besides TRAIN, like DRAIN, GRAIN but only TRAIN will give you that second match.
Those two matches(first the R, then the T) are telling you, and you should be getting the computer to take advantage of those matches, that it is on the right track.
If you switch back and forth from the Start word to the Target word( or their parent/child) your next step would be to go back to the word TRICK and generate the list of words from TRICK that do not remove the T or the R, if possible. There is no need, in this instance, at this point to check the other words from THICK's generation. The THINE THING and THINS can be latered.
So how did we get past the A in THANK which matches the A in BRAIN. Well your program should have taken you to a dead end, or another CHAIN.(I just noticed it.) I'll bring up POINT B later.
Where we are in our current train of thought hopefully is as follows
The trick to moving on to the next level is making a match, or failing that, exhausting all possibles.
POINT B
What if there is more than one chain? Do you want the shortest. The first chain you find may not be the shortest. It may even that there is no chain. Is there a maximum number of chains. Is there a maximum number of words twixt the Start word and the Target word?
Rod
Now solving for "CHINK" (the first possibility) yields 8 possible steps (CHINK = CLINK CHUNK CHICK CHIRK CHINA CHINE CHINO CHINS) for the next step. None of those possibles can lead to the answer (because we already know the answer but the program doesn't). How does the program know that? The possibilities *seem* almost infinite.
Those two matches(first the R, then the T) are telling you, and you should be getting the computer to take advantage of those matches, that it is on the right track.
If you switch back and forth from the Start word to the Target word( or their parent/child) your next step would be to go back to the word TRICK and generate the list of words from TRICK that do not remove the T or the R, if possible. There is no need, in this instance, at this point to check the other words from THICK's generation. The THINE THING and THINS can be latered.
So how did we get past the A in THANK which matches the A in BRAIN. Well your program should have taken you to a dead end, or another CHAIN.(I just noticed it.) I'll bring up POINT B later.
THINK = CHINK THANK THICK THINE THING THINS
CHINK = CLINK CHUNK CHICK CHIRK CHINA CHINE CHINO CHINS
THANK = SHANK THANE
THICK = TRICK
THINE = RHINE SHINE WHINE TRINE TWINE
THING = OHING TYING THONG
THINS = SHINS TWINS THENS
CHINK = CLINK CHUNK CHICK CHIRK CHINA CHINE CHINO CHINS
THANK = SHANK THANE
THICK = TRICK
THINE = RHINE SHINE WHINE TRINE TWINE
THING = OHING TYING THONG
THINS = SHINS TWINS THENS
THINK
--THICK 'should have gone on a wild goose chase? with THANK first
----TRICK 'match second letter of target word
------ 'searching for words that match the last three letters
--------
----------
------------TRAIN 'match first letter of start word
--------------BRAIN
--THICK 'should have gone on a wild goose chase? with THANK first
----TRICK 'match second letter of target word
------ 'searching for words that match the last three letters
--------
----------
------------TRAIN 'match first letter of start word
--------------BRAIN
POINT B
What if there is more than one chain? Do you want the shortest. The first chain you find may not be the shortest. It may even that there is no chain. Is there a maximum number of chains. Is there a maximum number of words twixt the Start word and the Target word?
Rod
Comment