Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Weekly Challenges

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

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #75: Scrabble Word Finder

Phil_L57
7 - Meteor

Solution for the 7 provided letters. Append, append, append...!!

SeanAdams
17 - Castor
17 - Castor

@MarqueeCrew wrote:

Congrats @SeanAdams on your new shiny badge!

 

wc_75_bergschrundcrevasse.png

 

Climbing to the summit alone however could lead to a dangerous selfie situation.  Hopefully your team will catch you soon.

 

Cheers,

Mark


Thank you Mark! 

I'm eagerly awaiting your 350 solutions milestone - that's the true definition of a peak that will be difficult for anyone else to scale!  @MarqueeCrew

 

Not too long now until Inspire EU!

nick_ceneviva
11 - Bolide

Attached solution for the simplest case with no blanks

MinaGO
7 - Meteor

Forgot to upload this last week, haven't done the bonus rounds yet. Prepped the letters beforehand (except the casing).

Spoiler
Screenshot (58).png
estherb47
15 - Aurora
15 - Aurora

My approach. Since I wasn't able to jump on this quickly to win the first 75th badge, decided to take my time and work towards developing a Scrabble word app (which will let you include letters already on the board). Not there yet, but almost. Congratulations to everyone, with a special shout out to @SeanAdams@NicoleJohnson, @LordNeilLord, and so many others who have contributed to our collective success in these challenges!!!!

Took a similar approach to many at the start, and then went a little macro-crazy. Started with cleaning up the word list to include words that are only 7 characters long (since the objective is a high scoring first word). Wrote the output to a yxdb for fastest processing.

Also cleaned up the letters/points/number tiles and wrote that output to a yxdb too.

Here's where I diverge. Then I designed a few macros:

This one generates all possible words from the letters in the hand:

Spoiler
Spoiler:

It's a convoluted iterative macros with cross-joins to generate combinations, and steps to cleanse repeated combinations, and illegal combinations (e.g., if there were 2 a's in the hand, and 3 a's in the combination as a result of the cross joining)

But it works. And I think I finally mostly understand iterative macros.

ScrabbleIterativeMacro.JPG


This one generates point values per word:

Spoiler
Spoiler:

The input is the possible words based on the letters in hand (each word already has a unique record ID). That's parsed into rows. Letters are matched to point values, then summarized per record ID, and output back to the workflow
scrabbleGeneratePointsMacro.JPG

This one generates possible words, taking into account one or two blank tiles:

Spoiler
Spoiler:

This one takes in words from the word list that didn't match to the exact letters, and every time a letter from the hand matches, it's taken away from the word. If one or two letters are left over after processing, then that word is possible with a wildcard. Multi-row formula is definitely your friend for this kind of approach!
image.png

And finally, my workflow that uses all of these macros:

Spoiler
Spoiler:

image.png

Hopefully I packaged all of my macros with the workflow. When the app is finished, I'll post it too!

lminors
9 - Comet

Here’s my solution to the 7 letters. Still working on the nasty bonus blank tiles (probably a project for a rainy day). I wanted to build an iterative macro to deal with it all but there are some seriously nice and simple solutions on here.

 

justin_winter
8 - Asteroid

Guess I'm late to the party, but my first pass worked backward from the words to compare against a bank of letters, find the count and points for each letter, then compared that to a match on the input letters. Very little regex, all formula tool and append. 3.5s runtime. 

PhilipMannering
16 - Nebula
16 - Nebula

Think I found a reasonably elegant solution using only 16 tools that do all three cases.

 

WC75.png

Also went further and created an app where you input your own letters (0 or more including repeats) and the number of blanks (with the choice of whether or not blanks have value). See attachment.

App (left) and PDF output (right)

samjohnson
7 - Meteor

Not being a RegEx expert I wanted to figure out if I could do this the old-fashioned way: raw inexperience. And I did. This is, to an Alteryx Ace, probably an example of terribly inefficient workflow development. But what the hey? It works and I understand every step.

 

This doesn't run in sub-1 second times, either, but 1.4 seconds ain't bad.

 

The most fun was writing the step-by-step, letter-by-letter checks for each word between 2-7 letters long in the "Finding matches based on word length" Tool Container.

 

Alteryx is quite simply the most fun I've had coding in a long time.

Ken_Black
9 - Comet
9 - Comet

Philip,

 

That is a beautiful solution. Now, all we have to do is set up a secret data transmission system that can allow us to participate in and win the Scrabble world championships! Of course, I'm kidding because we are not cheaters, but I bet there are plenty of unscrupulous people out there that would love to take the chance. Thanks for sharing this because I really enjoyed the quality of the solution, the awesome documentation, and layout.

 

Ken

 

Ken Black
General Motors
https://datablends.us