BreakPoint

cancel
Showing results for 
Search instead for 
Did you mean: 

Challenge! (Endigit Wordbattle)

I have not seen it posted here, but for those interested in some recreational LabVIEW programming, endigit has posted a coding challenge with the winner to be announced at the upcoming NI-Week 2018.

 

Looks like a fun little challenge. 😄 So far there is a ~2 order of magnitude difference between fastest (43ms) and slowest (3391ms). Of course we don't know the times of the endigit team ... 🐵

 

endigitwordbattle.png

 

(Personally, I would have written the puzzle generator (see image below) and benchmarker a bit more efficiently, but the code is sound otherwise. Not sure if I have time to submit something).

 

GeneratePuzz.png

 

 

(I don't like slicing and dicing arrays inside loops :D)

Message 1 of 3
(5,117 Views)

I think I have an idea or two worthy of exploration.

 

I'm falling down on the bit manipulation to pre-generate a constant array of "Valid Paths" there are only so many ways to take a subset of 3-16 from a field of 16, most are not valid for this challenge.   B0 and B2 are key and... it does not matter how long it takes to generate that list (the compiler will just need to add a bit of memory for that constant...)

 

PM for another tip if you can solve what I'm failing atSmiley Very Happy


"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 3
(5,048 Views)

The longest word is almost 30 characters and thers is no upper limit defined, so pre-calculating the search tree will probably be a gigantic data structure. My guess is that the secret is not in the tree generation, but in efficient pruning of it. I don't think we should discuss details until after NI week, when the challenge is over. Everybody interested should use their own ideas. I would like to see a vast variety of approaches, so let's not bias the ideas of participants. 🙂

 

(Please note that I intentionally give some misdirection above 🐵

0 Kudos
Message 3 of 3
(5,036 Views)