Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #75: Scrabble Word Finder

Highlighted
7 - Meteor

Solution without wildcard
Got to thanks @patrick_digan for the logic for creating all possible letters combination (don't know why I was stuck!)

Highlighted
11 - Bolide

"The challenge this week is to find the best word (from a provided text file) that can be assembled from 7 provided letters"

 

I went down a different path than what I have seen posted so far.  No macros, finishes in under 2 sec on my laptop, Top 5 for the advanced version verified to @NicoleJohnson's list.  I tried verifying to others but had issues downloading or running the workflows.  For challenges that don't have answers posted, it would be helpful if others could post screenshots of thier results (like @LordNeilLord did), so we can compare our results without having to download and run everyone's workflows/macros. :>

 

Congrats to @SeanAdams and others on reaching 75!

 

Spoiler
week751.JPG
Eliminate words with more than 7 characters and split to rows.

I think folks got hung up trying to create every word possible from the hand they were dealt.  Since the word had to be in the list provided by @JoeM, I worked on filtering the list to words that contained the necessary tiles and wildcards.

week752.JPG
Split Hand to rows, assign point values, if letter not in hand then change value to 0, union workflow.
Join the 2 workflows above to assign points to each letter in the words
week753.JPG
Count letters in each word that have 0 points -these are wildcards, if a word contains more than 2 then filter it out.
week754.JPG
From the filtered list, now find words that do not contain more than 1 instance of the letters in the hand.
week755.JPG
For the records that passed the 2 tests, filter original list, calculate the point values, join original word to workflow, add hand detail, sort, done.
week756.JPG

week757.JPG
Entire workflow. 
With just a couple tweaks, it provides solutions for the other 2 scenarios as well.
week758.JPG
Solution for only 1 wildcard.



 

Highlighted
12 - Quasar

After a couple of false starts, the solution I came up with. Great challenge! Thanks, @JoeM !

 

In reference to @Ned, it runs in around 1.0 second (0.8 to 1.2 from several runs), pulling from the raw data. And it handles blank

 

Spoiler
ScrabbleProcess.png

 

Highlighted
16 - Nebula
16 - Nebula

Pretty sure @ned has a nicer solution but have a regex based one running in about 7 seconds (with no pre computes) will cope with blanks but not double letters...

 

Spoiler
scrabble.jpg

Now to cope with repeated letters

Highlighted
Founder
Founder

@Philip - that solution is beautiful!  Much simpler than mine and no pre-computing necessary.  And well documented!  Nice!

Highlighted
12 - Quasar

I hadn't considered repeated letters, @jdunkerley79. Had to update to handle them. Thanks for pointing out that need.

 

Spoiler
ScrabbleProcess.png

 

Highlighted
14 - Magnetar
14 - Magnetar

I KNEW there was another way to do this. Average of 0.8 seconds for any number of blanks. Now I can sleep again at night!! :)

 

NJ

 

Spoiler
1. Filter for <=7 letters
2. Text to Columns for Hand & Replace "blank" with Null
3. Count number of "blanks"
4. Append hand letters to each word, and then append the # of "blanks"
5. Series of nested ReplaceFirst formulas going through each hand letter column and replacing any letters it finds with "", then if there are fewer letters left in the word than the # of blanks, make the remaining letters in the word = ""
6. Filter for only words that have no letters left
7. RegEx_CountMatches to determine how many of each letter is in the chosen word
8. Append Points to the letters in hand
9. Join Points to Transposed count of letters in each position of hand
10. Calculate total points per letter, summarize points per word, sort descending, and voila.
Scrabble2.JPG
Highlighted
16 - Nebula
16 - Nebula

Just for pure obsessiveness got my version down to 1.0s for all 3 hands:

Spoiler
2017-06-27_21-47-57.jpg
Highlighted
Alteryx Certified Partner

Ok, this challenge was a quite hard brain game, but I think I got it... I spent 15 minutes trying to figure out what was wrong in my workflow when I finally saw in a regex I forgot to put the + after \d so it was cutting 10 points value into 1, so I was getting wrong results at the end when it was calculating the points for each word. 

 

Anyway, it was a great challenge, I did not think about generating words before with Alteryx, it is not very easy to do but it is possible and to be honest, I thought I would have spent more time on this, but it took me "only" 2 hours.. ahah

 

Thanks :)

Spoiler
Challenge75_Scarabeo.PNG
This is my workflow, I cannot wait to see the solution next week and see if there is a quicker/ faster way to do it :)
Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

This was a really fun one, thanks @Simona for pointing it to me!

 

Not quite Dunkerley speed, but I got all three hands in the same workflow (and will hopefully work for any hand and any number of blanks!).

 

Spoiler
2017-06-28_20-27-19.png