Jump to content
IGNORED

Word Scramble Hint Program


Ed in SoDak

Recommended Posts

My wife's gotten hooked on some online FB word scramble game. You get 6 letters and fill in the crossword puzzle with words using those letters. Most of the words use fewer than all 6 letters. Score points or when you hit a wall you can buy hints (with real $$) to help solve it. It's fun to look over her shoulder while I'm enroute to grab a beer and offer any suggestions that I happen to see. You can stare at those letters and simply draw a blank, but rearrange them and bingo!

 

I remember somewhere in my dusty TI disk collection I have a program that gave you every possible combination of letters fed to it. It was either a cheat program or one that helped you create scramble puzzles. That would be perfect for hints with this FB game. Only problem is I don't recall its name or which of 200-some disks it might be on. And my TI is boxed up anyway. Searching through the emulator programs I have on the Mac, the only "Scramble" games I show are all versions of the same shoot'emup arcade spinoff.

 

Anyone familiar with such a program? One strategy she uses is to just pick 'em out at random and that will often help. The program I'm thinking of would automate that and give a list to pick from. Thanks!

-Ed

Edited by Ed in SoDak
Link to comment
Share on other sites

Thanks! I'll check it out. Typing might still be easier than coding one up myself, rusty as I is! :)

 

Edit: The one you link to is a word search, that "hides" correctly spelled words amongst gibberish letters.

 

I seek one that makes a list of all the possible combinations made of just 6 letters. Here's a poor attempt at showing how the FB word scramble game is played.

 

Puzzle: ETKEIS

 

Answers: (Imagine it as a crossword using the letters above to form different words going across and down, the puzzle shows how many letters you have space for. The hard ones use all six letters, usually the words are three letters or longer.)

 

SEEK

E ITS

K I T

EKES

I

SKEET and so on!

 

-Ed

Edited by Ed in SoDak
Link to comment
Share on other sites

Hey, Spark, that's a lot closer! So it's called an Anagram, eh? Who knew? :) I guess it's bigger than a 6-letter word, so beyond my vocabulary. :dunce: Looks like there's around 720 combinations of any 6-letters. Of course, the majority of those are not words or would not fit into their crossword. But I could sure hack this into something that might help with hints.

 

-Ed

 

She's playing it now, so I grabbed a screenshot. And no, "dirty" words not allowed for the otherwise obvious answer to the last word in this puzzle. :o

post-38786-0-08591200-1517618762.jpg

Edited by Ed in SoDak
  • Like 2
Link to comment
Share on other sites

You may have already thought about what I am about to say and I don't want to insult anyone's intelligence, but here goes. I can't tell whether any of the above suggestions do this, but how about a program that gives you a list of all the possible words that include the known letters and the blanks filled in? The above example shows “S _ _ _ S”, which means there are 4 unused letters and 3 spaces for them, a permutation of 4 things taken 3 at a time, which is 4!/(4-3)! = 4 x 3 x 2 x 1 / 1 = 24 possibilities, many (most?) of them nonsense, of course. The program could be written to eliminate duplicates before display, among other options we could imagine. This could be fun.

 

...lee

Link to comment
Share on other sites

Lee, that's a lot like what I had in mind to whittle down the field. Tigercub's program will eventually chance upon SITES, but it would be found soonest within the other two letters, or wait till it happens to be the first 4 characters to make it stand out among the nonsense.

 

I don't really recall any specifics of the program in my distant memory. What I sorta had in mind as useful would be a list of all three-letter combos, next all 4-letter,,, rinse repeat, but that would be a huge list. Probably closer to the 720 possibles I mention above, while Tigercub claims to have show 360 in my test run of it with the same letters THESIS.

 

So yeah, waiting till you hit a snag, then enter the subsets of what's left to choose from and the space allowed. It would fit on one screen if two letters were known, only 24 results using the 4 letters available. A 5 letter hunt results in 120 possibles.

 

It's cheating in a way, but I think writing and honing the program will be more of a mental exercise than simply guessing till you hit it.

post-38786-0-88678000-1517631157.jpg

post-38786-0-57330700-1517631246.jpg

Link to comment
Share on other sites

Lee, that's a lot like what I had in mind to whittle down the field. Tigercub's program will eventually chance upon SITES, but it would be found soonest within the other two letters, or wait till it happens to be the first 4 characters to make it stand out among the nonsense.

 

I don't really recall any specifics of the program in my distant memory. What I sorta had in mind as useful would be a list of all three-letter combos, next all 4-letter,,, rinse repeat, but that would be a huge list. Probably closer to the 720 possibles I mention above, while Tigercub claims to have show 360 in my test run of it with the same letters THESIS.

 

So yeah, waiting till you hit a snag, then enter the subsets of what's left to choose from and the space allowed. It would fit on one screen if two letters were known, only 24 results using the 4 letters available. A 5 letter hunt results in 120 possibles.

 

It's cheating in a way, but I think writing and honing the program will be more of a mental exercise than simply guessing till you hit it.

 

Well, the 720 possibilities are with unique letters. The number of possibilities is reduced when there are duplicate letters. The program I have in mind would do that, but would let the user also place known or guessed letters where desired and generate the list with permutations for the remaining letters filling in the blank spaces.

 

...lee

Link to comment
Share on other sites

I was just picturing the same thing. Display S***S or T***** or whatever the combo happened to be and fill in the blanks for me to pick a winner from. Pop up each possible in the same spot to see one at a time or display a columnar list, paged if needed with forward/back keys. Great minds do think alike! :)

 

After you get the easy ones, the few left can be staring you in the face but you just don't see 'em.

 

Taking the easy way out buying hints a letter at a time adds up. FB is cleaning up a few bucks at a time and this is just one of the games wifey enjoys playing. I admit to having a minor fiduciary interest in reducing her need for in-game hints!

-Ed

Edited by Ed in SoDak
  • Like 2
Link to comment
Share on other sites

My thesis is based on the fact it's easier to search around than it is to actually write something new.

 

Here's something from Macintosh Garden from '95. Might be fun, but not what we're looking for: http://macintoshgarden.org/apps/david-pogues-premium-utilities-macworld

 

"• KARMA MANAGER
 An anagram is a phrase created by scrambling the letters of another phrase. We at “Macworld magazine,” for example, are either an “amazing lame crowd” or a “magical warm dozen,” depending on how you scramble it. Or you might discover the secret sub-message in the term ‘information superhighway:’— “New utopia? Horrifying sham!”
With Karma Manager (which itself is an anagram), you can create your own anagrams — of your own name, for example. You may have to hunt through the program’s thousands of candidates before finding the really funny ones — but be persistent. It’s worth it!
--> Installation and Setup: Open the Karma Manager folder; double-click the Karma Manager program icon. Choose “Capture to file” from the File menu, type a name like “my anagrams,” click Desktop; click Save. Finally, choose New from the File menu and type in whatever phrase you want to anagram-ize. Click OK, and stand back! (When it’s all over, open your “my anagrams” text file in your word processor.)"

 

And a dedicated anagram website, designed more for Scrabble players, but somewhere in the options might be the answer: https://www.anagrammer.com/

Link to comment
Share on other sites

I dont know if this would help, but the December 1990 Chicago TImes newsletter talks about a program called *SPELL IT!!!* which has a similar functionality. It is actually a spell-checker with over 250,000 words in the dictionary. I dont know if it does word jumble, but the way it is talked about in the article, it is completely packed with features. Might be worth a look?

Link to comment
Share on other sites

From the LIMA UG Disk #21

 

 

 

100 CALL CLEAR :: PRINT TAB(10);"ANAGRAMMER": : : : : : : : : :
110 PRINT "TYPE A 3_,4_,5_ OR 6 LETTER WORD (TYPE 'END' TO STOP)": : : :
111 INPUT A$ :: W=LEN(A$) :: IF(W<3)+(W>6)THEN 110 :: IF A$="END" THEN 370
120 PRINT :: FOR J=1 TO W :: B$(J)=SEG$(A$,J,1) :: NEXT J :: FOR J=2 TO W :: IF B$(J)>=B$(J-1)THEN 160
130 T$=B$(J) :: FOR L=J-1 TO 1 STEP-1 :: B$(L+1)=B$(L)
140 IF B$(L-1)>=T$ THEN 150 :: B$(L)=T$ :: GOTO 160
150 NEXT L
160 NEXT J
170 FOR A=1 TO W :: FOR B=1 TO W :: IF B=A THEN 340
180 FOR C=1 TO W :: IF(C=A)+(C=B)THEN 330
190 IF W=3 THEN 250
200 FOR D=1 TO W :: IF(D=A)+(D=B)+(D=C)THEN 320
210 IF W=4 THEN 260
220 FOR E=1 TO W :: IF(E=A)+(E=B)+(E=C)+(E=D)THEN 310
230 IF W=5 THEN 270
240 FOR F=1 TO W :: IF(F=A)+(F=B)+(F=C)+(F=D)+(F=E)THEN 300 ELSE 280
250 W$=B$(A)&B$(B)&B$(C) :: IF W$<=V$ THEN 330 ELSE 290
260 W$=B$(A)&B$(B)&B$(C)&B$(D) :: IF W$<=V$ THEN 320 ELSE 290
270 W$=B$(A)&B$(B)&B$(C)&B$(D)&B$(E) :: IF W$<=V$ THEN 310 ELSE 290
280 W$=B$(A)&B$(B)&B$(C)&B$(D)&B$(E)&B$(F) :: IF W$<=V$ THEN 310
290 PRINT W$&" "; :: G=G+1 :: V$=W$ :: ON W-2 GOTO 330,320,310,300
300 NEXT F
310 NEXT E
320 NEXT D
330 NEXT C
340 NEXT B
350 NEXT A
360 PRINT: :"  ";G;"TOTAL COMBINATIONS.": : :: G=0 :: V$="" :: GOTO 110
370 RUN "DSK1.LOAD"
Link to comment
Share on other sites

Other than dropping the Tigercub byline and adding an exit to DSK1.LOAD, it appears the same. Who knows who copied whom, it was likely submitted by a member who made one small change and submitted it to the Lima library. Or just found online or on a disk and added to the endless other "anonymous" routines that are in everyone's collections.

 

I added my own sub to the mix to add a space between lines and pause after 20 "words" to stop the endless scrolling. It can be added to either version. Hardly as elegant as the logic of the letter sorts, but at least I can better peruse the list to spot any possible hints.

 

It's been more than awhile since I did much TI EXB programming. I'd even forgot there is no keyword for PAUSE! Took me awhile to deduce that "SYNTAX ERROR in 410" I kept getting. Or putting SUBEND on its own line, and getting PRINT to actually insert the blank line, etc... :lol:

 

I tried to guess where I could insert something to begin the list at a given start letter, rather than having to wait for the program to get there a page at a time. Usually I add in some code to display the variables onscreen as the program runs to help understand the flow. I'd probably have to rewrite it a bit to use Display At for everything instead of Print statements to control the display and stop the scrolling.

 

At least I can speed up MacV9T9 to make it run a lot quicker.

 

Meanwhile she keeps dropping coins in the slot when she hits a wall. I don't expect this "cheater's" solution to solve the whole puzzle for her, but helping on the tough ones would be enough to pay for the effort.

post-38786-0-66769100-1518247989.jpg

  • Like 1
Link to comment
Share on other sites

The ante has been upped! Now there's a game with 7 letters, that's 1680 scrambles. I've been messing with Tigercub's version so it lets the user navigate the screen display and options a bit better. You can choose which letter to start the listing with and go back to edit that or use a new word. I even have seven letters displaying... sort of.

 

It's easiest to see if you type in numbers instead of letters. Makes no difference to the program as it's written. It will sort and scramble up 7 numbers as easily as letters, but it's easier for me to see how well it's working if I type numbers in.

 

With a "word" length of 7, the first two iterations repeat characters, which I haven't figured out why yet.

 

If you type in 1234567 and start it out at 1, every combo has the number 1 repeated and one of the seven is skipped, which changes as it goes. When 2 begins to list to the screen, now, every other set has two 2s. The others are correct, so far as I can tell.

 

Once it moves into the 3rd go-around, all seems well. How odd! I'm sure I just have the entry into the many loops wrong in one my edits. I spent most of time making the program display better and provide more options.

 

Another glitch that popped up at the same time, when I added the 7th place, is the program no longer works with words of three. Since that's only a dozen results, is just skipped that as an entry option, so the minimum number is 4, on up to 7.

 

So, for what's it's worth, here's my humble modification of Jim Peterson's original Anagrammer. It's in V9T9 format. I tried to create a text listing but I failed to get the DOS V9T9 utils to give me results.

 

Heck, I can't even get the V9t9 file to attach! "Error, you're not permitted to upload this kind of file." Here's a workaround, I added ".txt" to the end of ANA7. You'll have to delete the .txt and then put the file in your V9t9 folder or convert it to TIFILES format. Best I can do at 1:30 AM! :)

 

-Ed

 

 

ANA7.txt

Edited by Ed in SoDak
  • Like 1
Link to comment
Share on other sites

100 CALL CLEAR :: PRINT TAB(5);"TIGERCUB ANAGRAMMER": : :"      by Jim Peterson": : : :"   Mod by Ed G 2/10/2018

101 PRINT : :" Gives all possible combin- ations of any 4- to 7-letterword, without duplication*":;:;:;:"(*Once the bugs are fixed!)": : :

105 INPUT "Press Enter ":YEAHBABY$

110 CALL CLEAR :: INPUT "Type 4-7 Letters: ":A$ :: W=LEN(A$):: IF (W<4)+(W>7)THEN 110 :: PRINT :

120 PRINT :: FOR J=1 TO W :: B$(J)=SEG$(A$,J,1):: NEXT J :: FOR J=2 TO W :: IF B$(J)>=B$(J-1)THEN 160

130 T$=B$(J):: FOR L=J-1 TO 1 STEP -1 :: B$(L+1)=B$(L)

140 IF B$(L-1)>=T$ THEN 150 :: B$(L)=T$ :: GOTO 160

150 NEXT L

160 NEXT J

165 INPUT "0=New Word or Start at 1-7? ":Z :: IF Z=0 THEN 110 :: IF Z>W THEN 165 :: 	PRINT : :

170 FOR A=Z TO W :: FOR B=1 TO W :: IF B=A THEN 340

180 FOR C=1 TO W :: IF (C=A)+(C=B)THEN 330

190 IF W=3 THEN 247

200 FOR D=1 TO W :: IF (D=A)+(D=B)+(D=C)THEN 320

210 IF W=4 THEN 260

220 FOR E=1 TO W :: IF (E=A)+(E=B)+(E=C)+(E=D)THEN 310

230 IF W=5 THEN 270

240 FOR F=1 TO W :: IF (F=A)+(F=B)+(F=C)+(F=D)+(F=E)THEN 300 ! ELSE 280

243 IF W=6 THEN 280

247 FOR G=1 TO W :: IF (G=A)+(G=B)+(G=C)+(G=D)+(G=E)+(G=F)THEN 300 ELSE 285

250 W$=B$(A)&B$(B)&B$(C):: IF W$<=V$ THEN 330 ELSE 290

260 W$=B$(A)&B$(B)&B$(C)&B$(D):: IF W$<=V$ THEN 320 ELSE 290

270 W$=B$(A)&B$(B)&B$(C)&B$(D)&B$(E):: IF W$<=V$ THEN 310 ELSE 290

280 W$=B$(A)&B$(B)&B$(C)&B$(D)&B$(E)&B$(F):: IF W$<=V$ THEN 295 ELSE 290

285 W$=B$(A)&B$(B)&B$(C)&B$(D)&B$(E)&B$(F)&B$(G):: IF W$<=V$ THEN 290

290 PRINT W$&" ";:: H=H+1 :: V$=W$ :: GOSUB 400 :: ON W-2 GOTO 330,320,310,300,295

295 NEXT G

300 NEXT F

310 NEXT E

320 NEXT D

330 NEXT C

340 NEXT B

350 NEXT A

360 PRINT : :"  ";H;"TOTAL COMBINATIONS.": : :: H=0 :: V$=""

365 INPUT "Z=Repeat  N=New Word  ? ":GO$ :: IF GO$="N" OR GO$="n" THEN 110 ELSE 165

400 PN=PN+1 :: ZN=ZN+1 :: IF ZN=3 THEN PRINT "   ": :

410 IF ZN=3 THEN ZN=0 :: IF PN=15 THEN INPUT "Enter or eXit ":Z$ :: PRINT : :: IF PN=15 THEN PN=0 :: IF Z$="x" OR Z$="X" THEN GOTO 165 

420 PRINT : : :: RETURN


Today's efforts. Found a typo in line 247 which changed the bug. It works with 6 characters, but something's still wrong with 7.

Link to comment
Share on other sites

Yeah, hmmm is all I got, too. Maybe this thread could be moved to the development sub, since I'm about out of ideas on altering the program to accept and properly sort 7 places. It works fine with the original six. I tried to emulate/modify the original code to add the seventh character, but at this point, it thinks awhile, then skips over the first sort level and just prints duplicate characters.

 

-Ed

Link to comment
Share on other sites

Success! The wife and I declared it a Snow Day and I spent the better part of it finding my errors and cleaning up the code a bit. Looks like it will help the wife find the tough words in her puzzles, which was the whole reason for this thread.

 

Anagram2 will now allow three up to seven characters. You may begin the sort on any of the seven. The display pauses to let you view it and either continue, change the start position or enter a new word.

 

Plain and simple, it doesn't let you fill in known letters or do subsets. In use, it's fairly easy to spot a likely word in the groups. MacV9T9 lets it run at a decent clip by upping the speed ratio and clock frequency. Thanks to everyone who chipped in!

 

Zip file with TIFILE and V9T9 formats and the text listing. Enjoy!

-Ed

100 CALL CLEAR :: PRINT TAB(5);"TIGERCUB ANAGRAMMER": : :"      by Jim Peterson": : : :"  Modified for 7 characters       by Ed G 2/21/2018"
110 PRINT : :" Gives all possible combin- ations of any 3- to 7-letterword, without duplication":;:;:;:ˇ:ˇ
130 PRINT : : :: INPUT "Type 3-7 Letters: ":A$ :: W=LEN(A$):: IF (W<3)+(W>7)THEN 130 :: PRINT : :: V$=""
140 PRINT :: FOR J=1 TO W :: B$(J)=SEG$(A$,J,1):: NEXT J :: FOR J=2 TO W :: IF B$(J)>=B$(J-1)THEN 180
150 T$=B$(J):: FOR L=J-1 TO 1 STEP -1 :: B$(L+1)=B$(L)
160 IF B$(L-1)>=T$ THEN 170 :: B$(L)=T$ :: GOTO 180
170 NEXT L
180 NEXT J
190 PRINT "Start Position 1-";W:" or type 0 for New Word " :: INPUT "?":Z :: IF Z=0 THEN 130 :: IF Z>W THEN 190 
200 FOR A=Z TO W :: FOR B=1 TO W :: IF B=A THEN 410210 FOR C=1 TO W :: IF (C=A)+(C=B)THEN 400
220 IF W=3 THEN 300
230 FOR D=1 TO W :: IF (D=A)+(D=B)+(D=C)THEN 390
240 IF W=4 THEN 310
250 FOR E=1 TO W :: IF (E=A)+(E=B)+(E=C)+(E=D)THEN 380
260 IF W=5 THEN 320
270 FOR F=1 TO W :: IF (F=A)+(F=B)+(F=C)+(F=D)+(F=E)THEN 370
280 IF W=6 THEN 330
290 FOR G=1 TO W :: IF (G=A)+(G=B)+(G=C)+(G=D)+(G=E)+(G=F)THEN 360 ELSE 340
300 W$=B$(A)&B$(B)&B$(C):: IF W$<=V$ THEN 400 ELSE 350
310 W$=B$(A)&B$(B)&B$(C)&B$(D):: IF W$<=V$ THEN 390 ELSE 350
320 W$=B$(A)&B$(B)&B$(C)&B$(D)&B$(E):: IF W$<=V$ THEN 380 ELSE 350
330 W$=B$(A)&B$(B)&B$(C)&B$(D)&B$(E)&B$(F):: IF W$<=V$ THEN 360 ELSE 350
340 W$=B$(A)&B$(B)&B$(C)&B$(D)&B$(E)&B$(F)&B$(G):: IF W$<=V$ THEN 350
350 PRINT W$&" ";:: H=H+1 :: V$=W$ :: GOSUB 450 :: ON W-2 GOTO 400,390,380,370,360
360 NEXT G
370 NEXT F
380 NEXT E
390 NEXT D
400 NEXT C
410 NEXT B
420 NEXT A
430 PRINT : :"  ";H;"TOTAL COMBINATIONS.": : :: H=0 :: V$=""
440 INPUT "Z=Repeat  N=New Word  ? ":GO$ :: IF GO$="N" OR GO$="n" THEN 130 ELSE 190
450 PN=PN+1 :: ZN=ZN+1 :: IF ZN=3 THEN PRINT "   ": :
460 IF ZN=3 THEN ZN=0 :: IF PN=15 THEN INPUT "Enter or eXit ":Z$ :: PRINT : :: IF PN=15 THEN PN=0 :: IF Z$="x" OR Z$="X" THEN GOTO 190 ::
470 RETURN

anagram2.zip

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...