Page 1 of 1

(Scrabble) Standalone Anagram Solver N/4-15___v1.07 + Function

Posted: 10 Jul 2017, 15:54
by littlegandhi1199
IF YOU JUST WANT THE FUNCTION it's here
https://www.autohotkey.com/boards/viewtopic.php?f=6&t=77954&p=338947#p338947


At first, all possible combinations of an 11 letter word would give you 39.9 million words and that many queries into the dictionary.

That is until Helgef realized you can simply sort all the letters in your word alphabetically and then all entries under that same unique string in your dictionary are anagrams!
tea becomes eat
ate becomes eat
eat stays eat
you type in "tae" and it becomes eat and it will dump all anagrams with ONE QUERY!

Now, I had already built my script to generate permutations using again 11 letters taken at simple sizes of 4(3 or less is too boring ;) 5 6 up to 13.
His method wouldn't work or save you any time for any other length because you need all 11 letters accounted for with every other letter at least once in your 4 letter word queries.
To guarantee that, I thought I'd need all 87 billion queries for 13 letter words from a 14 letter input.
I like to mash my keyboard too to find words I'd be surprised were waiting in the soup of characters and when I put 15 letters in we're already talking 653 billion.

I examined the permutation outputs from "abcdef" and found that it started in regular order and ended in exactly reverse order which looks the same when we query the dictionary.
This is when I realized I needed to find the pattern that had to stop (I imagined) halfway through the queries.

*********************************************
So the pattern I discovered...
Spoiler
Script
*********************************************
http://wordlist.aspell.net/12dicts/
The 12dicts lists are oriented towards common words. If you're looking for myriads of archaic, scientific or computer jargon words, you should look elsewhere.
Here's another list of words that I like
https://github.com/dwyl/english-words
I combine all the American dictionaries from their website into "words.txt" which should be located in %A_ScriptDir%

v1.01 - Cleaned up code. Bugs reported and will be addressed in time
v1.02 - Made perfect wasteless permutation query loops (duplicates are never created and don't have to be queried) now 653bil=105
v1.03 - Culled some unnecessary code from script and combined my two scripts into one
v1.04 - Saved 1100ms from every solve and placed it at beginning of script load instead
v1.05 - Cleaned up presentation of anagrams
+++Added built-in definition button will work on text in the input field without interrupting any running anagram solves

6/28/20
v1.06 - Finally noticed the bug myself of previous input bleeding into following inputs.
v1.07 - more bugfixes

v1.07

Code: Select all

#MaxMem 4196
Process, Priority, , H
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ^^ Up to you
;;V1.05
If A_IsCompiled != 1
	Menu, Tray, Icon, C:\Program Files\AutoHotkey\AutoHotkey.exe, 2
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
Gui, Add, Tab2,, 4 letters|5 letters|6 letters|7 letters|8 letters|9 letters|10 letters|11 letters|12 letters|13 letters|14 letters|15 letters
gui, font, s16
Gui, Add, Edit, vMyEdit1 r7  ; r5 means 5 rows tall.
Gui, Tab, 2
Gui, Add, Edit, vMyEdit2 r7  ; r5 means 5 rows tall.
Gui, Tab, 3
Gui, Add, Edit, vMyEdit3 r7  ; r5 means 5 rows tall.
Gui, Tab, 4
Gui, Add, Edit, vMyEdit4 r7  ; r5 means 5 rows tall.
Gui, Tab, 5
Gui, Add, Edit, vMyEdit5 r7  ; r5 means 5 rows tall.
Gui, Tab, 6
Gui, Add, Edit, vMyEdit6 r7  ; r5 means 5 rows tall.
Gui, Tab, 7
Gui, Add, Edit, vMyEdit7 r7  ; r5 means 5 rows tall.
Gui, Tab, 8
Gui, Add, Edit, vMyEdit8 r7  ; r5 means 5 rows tall.
Gui, Tab, 9
Gui, Add, Edit, vMyEdit9 r7  ; r5 means 5 rows tall.
Gui, Tab, 10
Gui, Add, Edit, vMyEdit10 r7  ; r5 means 5 rows tall.
Gui, Tab, 11
Gui, Add, Edit, vMyEdit11 r7  ; r5 means 5 rows tall.
Gui, Tab, 12
Gui, Add, Edit, vMyEdit12 r7  ; r5 means 5 rows tall.

Gui, Tab  ; i.e. subsequently-added controls will not belong to the tab control.
gui, font, s10
Gui, Add, Edit, vFirstName ym  ; The ym option starts a new column of controls.
gui, font, s7
Gui, Add, Button, default, Define
Gui, Add, Button, default, OK
gui, font, s10
Gui, Add, Edit, vMyEditDef r9  ; r5 means 5 rows tall.
FileRead, Bin, words.txt
Sort, Bin, U
Stringlower, Bin, Bin
dict:=[]
Loop, Parse, Bin, `n
{
maxindexzz := A_Index
stringtrimright, field, A_LoopField, 1
newparse =
loop, parse, field
	newparse = %newparse%`n%A_loopfield%
sort, newparse
newparse := StrReplace(newparse, "`n", "")
if ObjHasKey(dict, newparse)
{
conten := dict[newparse]
conten = %conten%,%field%
dict[newparse] := conten
}
else
	dict[newparse] := field
}
sometzzzz := StrLen(maxindexzz)
sometzzzz /= 3
sometzzzz := Floor(sometzzzz)
loop
{
if (A_Index > sometzzzz)
{
if (StrLen(maxindexzz) > 0)
	lovesmax = %maxindexzz%,%lovesmax%
break
}
stringtrimleft, maxindexzze, maxindexzz, % StrLen(maxindexzz)-3
stringtrimright, maxindexzz, maxindexzz, 3
lovesmax = %maxindexzze%,%lovesmax%
}
stringtrimright, lovesmax, lovesmax, 1
GuiControl,, MyEditDef, Pulling from list of %lovesmax% unique words
Gui, Show,, Anagram Solver by Littlegandhi1199
return



GuiClose:
exitapp




ButtonDefine:
Gui, Submit
Gui, Show
FileDelete, tempish.txt
UrlDownloadToFile, https://www.google.com/search?q=define+%FirstName%&ie=utf-8&oe=utf-8, tempish.txt
If Errorlevel
	msgbox, fail to download definition
else
	FileRead, Sim, tempish.txt
Pos := InStr(Sim,"cached")
stringtrimleft, Sim, Sim, % Pos+5
Pos := InStr(Sim,"</span>")
stringtrimright, Sim, Sim, % StrLen(Sim)-Pos+1
loop
{
Pos := InStr(Sim,"<")
if (pos > 0)
	stringtrimright, temp1, Sim, % StrLen(Sim)-Pos+1
else
	break
Pos := InStr(Sim,">")
if (pos > 0)
	stringtrimleft, temp2, Sim, %Pos%
sim = %temp1%%temp2%
}
GuiControl,, MyEditDef, %sim%
return
















ButtonOK:
let := 1
stop = 1
add := 0
Array =
Array := Object()

Gui, Submit  ; Save the input from the user to each control's associated variable.
;;msgbox, submited OK with %FirstName%
if (last = FirstName)
{
stop = 1
Gui, Show
MsgBox, ,, SEARCH STOPPED, 1
return
}
else
{
loop, 15
	GuiControl,, MyEdit%A_Index%, ...
stop = 0
}
last = %FirstName%
Gui, Show
input = %FirstName%
loop
{
stringtrimright, zinput, input, % StrLen(input)-1
stringtrimleft, input, input, 1
cont := zinput
if (cont = "")
	break
Array[A_Index] := zinput
}







revpr := A_TickCount
yes := strlen(FirstName)
bet := yes-4
SendMessage, 0x1330, %bet%,, SysTabControl321
bet++
var = %FirstName%
newpar =
newparse =
loop, parse, var
	newparse = %newparse%`n%A_loopfield%
sort, newparse
newparse := StrReplace(newparse, "`n", "")

;;msgbox, Checking flat out "%newparse%"

newpar = %newpar%`n%newparse%
if ObjHasKey(dict, newparse)
{
cont := dict[newparse]
cont := StrReplace(cont, ",", "`n")
var2 = %var2%`n%cont%
;;msgbox, Direct anagram "%var2%"
}
Fix = `n%FirstName%
var2 := StrReplace(var2, Fix)
if (var2 != "")
	var2 = `n%var2%
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%bet%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%bet%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%bet%.txt
newpar =
loop, 15
{
bet++
GuiControl,, MyEdit%bet%, longer then input`n%tempvar%
}
;;;;;;;;;;;;;;;;;;;;;;;;;; 4
skip := Array.MaxIndex()
let1 := let+2
skip -= let1
;;msgbox, let=[%let%]`nlet1=[%let1%]`nskip=[%skip%]`n...on first 4 legnth run
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
Entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
z = %a%%b%%c%
let := 1
gosub themaster
if stop = 1
	return
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 5
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
z = %a%%b%%c%%d%
let := 2
gosub themaster
if stop = 1
	return
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 6
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
z = %a%%b%%c%%d%%e%
let := 3
gosub themaster
if stop = 1
	return
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;dif := A_TickCount-revpr
;;msgbox, %dif%ms to complete
;;;;;;;;;;;;;;;;;;;;;;;;;; 7
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
z = %a%%b%%c%%d%%e%%f%
let := 4
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 8
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
	continue
g := Array[A_Index]
entry[7] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%
let := 5
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 9
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
	continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
	continue
h := Array[A_Index]
entry[8] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%
let := 6
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 10
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
	continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
	continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
	continue
i := Array[A_Index]
entry[9] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%
let := 7
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
;;dif := A_TickCount-revpr
;;msgbox, %dif%ms to complete
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 11
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
	continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
	continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
	continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
	continue
j := Array[A_Index]
entry[10] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%
let := 8
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 12
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
	continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
	continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
	continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
	continue
j := Array[A_Index]
entry[10] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index))
	continue
k := Array[A_Index]
entry[11] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%
let := 9
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 13
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
	continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
	continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
	continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
	continue
j := Array[A_Index]
entry[10] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index))
	continue
k := Array[A_Index]
entry[11] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index))
	continue
l := Array[A_Index]
entry[12] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%
let := 10
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 14
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
	continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
	continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
	continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
	continue
j := Array[A_Index]
entry[10] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index))
	continue
k := Array[A_Index]
entry[11] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index))
	continue
l := Array[A_Index]
entry[12] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index) || (entry[12] >= A_Index))
	continue	
m := Array[A_Index]
entry[13] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%
let := 11
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =
bet := let+5
if (bet > strLen(FirstName))
	return
;;;;;;;;;;;;;;;;;;;;;;;;;; 15
skip := Array.MaxIndex()
let1 := let+3
skip -= let1
loop, % Array.MaxIndex()
{
if (A_Index > skip)
	break
entry =
Entry := Object()
a := Array[A_Index]
entry[1] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index))
	continue
b := Array[A_Index]
entry[2] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index))
	continue
c := Array[A_Index]
entry[3] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index))
	continue
d := Array[A_Index]
entry[4] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index))
	continue
e := Array[A_Index]
entry[5] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index))
	continue
f := Array[A_Index]
entry[6] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index))
	continue
g := Array[A_Index]
entry[7] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index))
	continue
h := Array[A_Index]
entry[8] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index))
	continue
i := Array[A_Index]
entry[9] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index))
	continue
j := Array[A_Index]
entry[10] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index))
	continue
k := Array[A_Index]
entry[11] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index))
	continue
l := Array[A_Index]
entry[12] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index) || (entry[12] >= A_Index))
	continue
m := Array[A_Index]
entry[13] := A_Index
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index) || (entry[12] >= A_Index) || (entry[13] >= A_Index))
	continue	
n := Array[A_Index]
entry[14] := A_Index
z = %a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%
let := 12
gosub themaster
if stop = 1
	return
}
}
}
}
}
}
}
}
}
}
}
}
}
}
tempvar := var2
Sort, tempvar, U
StrReplace(tempvar, "`n", "`n", OutputVarCount)
if (OutputVarCount < 1)
	GuiControl,, MyEdit%Let%, 0 anagrams`n%tempvar%
else
	GuiControl,, MyEdit%Let%, %OutputVarCount% anagrams!`n%tempvar%
tempvar =
var2 =
;;fileappend, %newpar%`n, test%let%.txt
newpar =




return
;;;;;;ButtonOK complete?

















themaster:
loop, % Array.MaxIndex()
{
if ((entry[1] >= A_Index) || (entry[2] >= A_Index) || (entry[3] >= A_Index) || (entry[4] >= A_Index) || (entry[5] >= A_Index) || (entry[6] >= A_Index) || (entry[7] >= A_Index) || (entry[8] >= A_Index) || (entry[9] >= A_Index) || (entry[10] >= A_Index) || (entry[11] >= A_Index) || (entry[12] >= A_Index) || (entry[13] >= A_Index) || (entry[14] >= A_Index) || (entry[15] >= A_Index))
	continue
what := Array[A_Index]
var = %z%%what%

newparse =
loop, parse, var
	newparse = %newparse%`n%A_loopfield%
sort, newparse
newparse := StrReplace(newparse, "`n", "")

;;newpar = %newpar%`n%newparse%
if ObjHasKey(dict, newparse)
{
cont := dict[newparse]
cont := StrReplace(cont, ",", "`n")
var2 = %var2%`n%cont%
}
}
return

Re: (Scrabble) Anagram Solver N/4-15

Posted: 10 Jul 2017, 16:47
by Helgef
Interesting post. Your script looks nice but sometimes anagrams disappear from the edit field, and sometimes the result from one query seems to be mixed with an earlier one. Searching for soup, also listed soap at one point, I had searched for something with an a before I think. Using code tags would be nice.

Thanks for sharing.

Cheers.

Re: (Scrabble) Anagram Solver N/4-15

Posted: 10 Jul 2017, 17:17
by littlegandhi1199
Helgef wrote:Interesting post. Your script looks nice but sometimes anagrams disappear from the edit field, and sometimes the result from one query seems to be mixed with an earlier one. Searching for soup, also listed soap at one point, I had searched for something with an a before I think. Using code tags would be nice.

Thanks for sharing.

Cheers.
Yeah I just spent a day and a half figuring out how to make it only generate holey unique permutations and nothing else...
It has to do with the buttons telling the main loop to return to the function to restart a new search though I'm sure.
I know it works at-least once per boot.

Re: (Scrabble) Anagram Solver N/4-15

Posted: 10 Jul 2017, 22:51
by littlegandhi1199
littlegandhi1199 wrote:
Helgef wrote:Interesting post. Your script looks nice but sometimes anagrams disappear from the edit field, and sometimes the result from one query seems to be mixed with an earlier one. Searching for soup, also listed soap at one point, I had searched for something with an a before I think. Using code tags would be nice.

Thanks for sharing.

Cheers.
Yeah I just spent a day and a half figuring out how to make it only generate holey unique permutations and nothing else...
It has to do with the buttons telling the main loop to return to the function to restart a new search though I'm sure.
I know it works at-least once per boot.
Wait I remember why I left that alone. I put a msgbox on everytime you hit the ok button and it doesn't always register that input. Are you sure it's really mixed two together?

Re: (Scrabble) Anagram Solver N/4-15___v1.01

Posted: 11 Jul 2017, 00:30
by wolf_II
I have tried your script version 1.01. BTW, thanks for sharing :)
I copied len#.txt files from zip.zip. (your earlier version containing an exe file)

I entered "countdown" - all good.
Next I entered "letters" - and I get "enters" as a possible 6-letters solution. All the 6-letters solutions are:

Code: Select all

21 anagrams!

enters
letter
nestle
nettle
newels
newest
relent
renews
resent
resewn
retest
setter
settle
street
strewn
tenets
tenser
tester
tweets
welter
wetter
Keep up the good work! Your script is very fast and uses little memory, impressive!

Edit: That might be the same problem reported again, sorry. But I post anyway to get notifications of new posts here.

Re: (Scrabble) Anagram Solver N/4-15___v1.01

Posted: 11 Jul 2017, 00:59
by littlegandhi1199
wolf_II wrote:I have tried your script version 1.01. BTW, thanks for sharing :)
I copied len#.txt files from zip.zip. (your earlier version containing an exe file)

I entered "countdown" - all good.
Next I entered "letters" - and I get "enters" as a possible 6-letters solution. All the 6-letters solutions are:

Code: Select all

21 anagrams!

enters
letter
nestle
nettle
newels
newest
relent
renews
resent
resewn
retest
setter
settle
street
strewn
tenets
tenser
tester
tweets
welter
wetter
Keep up the good work! Your script is very fast and uses little memory, impressive!

Edit: That might be the same problem reported again, sorry. But I post anyway to get notifications of new posts here.
Thank you!
Truly, 653billion is down to 105 now and not one more. I really hit the jackpot when I implemented the new scheme because there are no alphabetical repeats now and it doesn't have to check any previous loops (which would put the number of queries back up to 653 billion). I'll bet the memory has to do with that but also just because I split mine up into 15 parts too ;)

Re: (Scrabble) Standalone Anagram Solver N/4-15___v1.05

Posted: 29 Jun 2020, 00:41
by littlegandhi1199
Finally patched that input bleed that occured when going from a longer word to a shorter one.
V1.06

Also found a better english dictionary with almost 400k words too (no strange punctuation allowed!)
https://github.com/dwyl/english-words

Gonna be making a fun little anagram addon for family Scattegories game nights.
Let me know if anyone is interested when I'm finished.