Anagrams

Post gaming related scripts
wolf_II
Posts: 1579
Joined: 08 Feb 2015, 20:55

Re: Anagrams

23 Jul 2017, 18:29

version 2.10

Anagrams v2.10.zip
(14.77 KiB) Downloaded 30 times
Helgef
Posts: 2240
Joined: 17 Jul 2016, 01:02
Contact:

Re: Anagrams

23 Jul 2017, 18:58

Perfect :thumbup:
littlegandhi1199
Posts: 43
Joined: 29 Aug 2016, 23:58

Re: Anagrams

25 Jul 2017, 11:43

wolf_II wrote:
Helgef wrote:If you feel that it is finished

I don't feel that the project is finished in a good way. More like: I am finished as I can not improve it further.
There still are some multi-word anagrams missing for sufficiently large inputs like eleven plus two.
There are plenty multi-word anagrams found and displayed, so that's a partial success.

More importantly: I feel like I should not be wasting any more of your precious time on this.
I can't thank you enough for your teaching, guidance and patience with me. And of course the time you spent. :beer:

I thoroughly enjoyed the experience. :dance: :superhappy: :wave:


So earlier you were saying that it was generating duplicates and you wanted to avoid that with your new version which supports multiple words?
Or did you notice that it only generates multiples in the scenario that the input has repeat letters?
wolf_II
Posts: 1579
Joined: 08 Feb 2015, 20:55

Re: Anagrams

25 Jul 2017, 11:48

version 2.13
  • Contains Helgef's new Taskbar Ornaments https://autohotkey.com/boards/viewtopic ... 76#p162976
  • Taskbar Ornaments used and distributed with the author's permission.
  • hover over the script's taskbar button and notice the extra buttons at the bottom of the "Preview Popup": "Change word list" and "Save anagrams..."

Enjoy :D

Anagrams v2.13.zip
(19.14 KiB) Downloaded 27 times
Last edited by wolf_II on 02 Aug 2017, 15:34, edited 1 time in total.
wolf_II
Posts: 1579
Joined: 08 Feb 2015, 20:55

Re: Anagrams

25 Jul 2017, 12:31

littlegandhi1199 wrote:So earlier you were saying that it was generating duplicates and you wanted to avoid that with your new version which supports multiple words?
Or did you notice that it only generates multiples in the scenario that the input has repeat letters?


If I understand the question correctly, we decided to regard eg. "Donald Duck" and "Duck Donald" as one being a permutation of the other and avoid those permutations in the main output. Later we implemented to show all permutations in a popup window, for which you can select each line ("sentence") you want to see the perms for, or all sentences. -> Right click on the ListView control to get a context menu and go from there.

In the case of duplicates for single-word anagrams: I think I/you/one always gets duplicates when there are repeated letters.
The reason for the new version to exist was, as far as I remember, to explore a can of worms.

The current state of "correctly" finding anagrams is satisfactory, we don't get duplicates for single-word anagrams, and no surplus perms for multi-word anagrams.
Satisfactory is less than perfect as I am missing expected output for certain input. E.g.:
(Notice the deliberate switch from "we" to "I" here, as the responsible piece of code was written by myself, and that's where the project is somewhat stuck).

Input = "the quick brown fox" does not produce the expected sentence "brown fox quick the".
Input = "brown fox quick the" does not produce the expected sentence "brown fox quick the".
wolf_II
Posts: 1579
Joined: 08 Feb 2015, 20:55

Re: Anagrams

25 Jul 2017, 23:55

version 2.14

Anagrams v2.14.zip
(25.51 KiB) Downloaded 25 times
wolf_II
Posts: 1579
Joined: 08 Feb 2015, 20:55

Re: Anagrams

27 Jul 2017, 04:31

version 2.15

Anagrams v2.15.zip
(25.73 KiB) Downloaded 28 times
Helgef
Posts: 2240
Joined: 17 Jul 2016, 01:02
Contact:

Re: Anagrams

28 Jul 2017, 17:55

Very nice with the help file :)

I would move the tbi.setOverlayIcon(tbi.hOverlayLoading) from end of setupTaskbar.ahk to top of the Make_DICT() function, for consistency.
wolf_II
Posts: 1579
Joined: 08 Feb 2015, 20:55

Re: Anagrams

28 Jul 2017, 18:53

version 2.16

Anagrams v2.16.zip
(25.72 KiB) Downloaded 30 times
wolf_II
Posts: 1579
Joined: 08 Feb 2015, 20:55

Re: Anagrams

02 Aug 2017, 15:45

version 2.17

Anagrams v2.17.zip
(25.78 KiB) Downloaded 36 times
Helgef
Posts: 2240
Joined: 17 Jul 2016, 01:02
Contact:

Re: Anagrams

02 Aug 2017, 17:44

@v2.17 :thumbup:

The EditBox and RadioBox functions are really nice. :)
Helgef
Posts: 2240
Joined: 17 Jul 2016, 01:02
Contact:

Re: Anagrams

15 Aug 2017, 05:48

Helgef wrote:

Code: [Select all] [Download] GeSHi © Codebox Plus

GuiControl, hide, LBox
GuiControl,, LBox, % "|" (WordList ? WordList : "no anagrams for " String)
GuiControl, show, LBox


I just found that the manual gives the correct way to do it,

Code: [Select all] [Download] GeSHi © Codebox Plus

GuiControl, -Redraw, LBox
GuiControl,, LBox, % "|" (WordList ? WordList : "no anagrams for " String)
GuiControl, +Redraw, LBox

:oops:
wolf_II
Posts: 1579
Joined: 08 Feb 2015, 20:55

Re: Anagrams

15 Aug 2017, 09:20

Thanks! Looks similar to populating a ListView control. :thumbup:

I have experimented with more word lists, and I find that replacing the RadioBox with the ListBox function (both available from CustomBoxes: a collection of helper functions) has two benefits: Its style looks more conform with Anagrams and it does not run out of space for long lists.

(used in Include\setupTaskbar.ahk, line 65, relace RadioBox with ListBox, and have ListBox.ahk in one of the Lib folders, e.g.the local Anagrams\Lib)
Helgef
Posts: 2240
Joined: 17 Jul 2016, 01:02
Contact:

Re: Anagrams

15 Aug 2017, 10:26

ListBox

Yeah that looks nice :)
I was reminded how much fun this is, just spent ten minutes typing random words... :lol:

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 6 guests