AVI-SPL Challenge at Crestron Masters 2019

Jeremy Weatherford
7 min readApr 12, 2019

New for this year at Crestron Masters was a contest called the AVI-SPL Challenge. I didn’t know anything about it, but there were prizes to be won as well as bragging rights, so I signed up and waited for the announced 10:30am start time on Tuesday.

From Rich’s intro speech I gathered that participation in classes would be rewarded, and that the new Partner Pavilion would play a role. No other information seemed to be forthcoming. After getting settled into my first class, I pulled up the site and started tackling the overwhelming number of challenges available. I’m not sure I paid much attention in that first class as I started knocking out trivia challenges.

I was somewhat hesitant at first since I wasn’t sure how the scoring worked, or how wrong answers might be penalized. However, it was quickly apparent that the questions would cycle back around until you got all of them right, and there was no penalty for wrong answers. That made it just a matter of time to complete the multiple-choice ones, especially the Partner ones where you could count on the most superlative answer to be the right one every time. (Thanks, marketing!)

The CSS challenge confused me a bit. I wound up only changing the width of the image to get something that looked like a picture, although my solution was not accepted (670 maybe?) I noodled around for a bit until I found 675 also worked and was accepted — seems like there should be a range of acceptable values, or some other way to constrain the problem to a single acceptable value. Not sure I understood the point of the other CSS settings since I didn’t touch them as I recall.

For me, Name That Function was where the fun started — I enjoyed deconstructing the code given to figure out what it was doing, and learned some new mathematical terms in the process. There were too many options to just spray-and-pray. The only one that slowed me down was prime numbers, because I incorrectly interpreted the code as checking for numbers not divisible by squares. It turns out there is such a class of numbers, called squarefree numbers, but I couldn’t find that or any synonyms for it in the list of options. After staring at the code for far too long I realized that while the loop was bounded by i*i, it was testing for divisibility by i — just a plain old prime number.

The first part of the Memory Challenge looked interesting — some sort of interactive fiction? — but it turned out to only have one ending, in a Simon game. Here I lucked out (or you could credit the Diet Coke and adrenaline of climbing the leaderboard) and beat Simon on the first try (12 rounds). I had no idea what the stakes were on this puzzle, but it turned out to only allow a single attempt, and no opportunity to better your score later. While this didn’t affect the final score difference between 1st and 2nd, it would have resulted in 3-way tie for 2nd if everyone had maxed their score on it.

After several hundred more mind-numbing trivia questions, it was on to the much more interesting Math section with its short-form answers — no brute forcing here. Two of the questions here gave me serious pause — it’s been a long time since I did any geometry more complicated than using aspect ratios, and I was pretty proud of myself for figuring out the circle packing and marshmallow problems. I sent them to my son, who does these kinds of problems for fun as part of the MathCounts competition (he went to state this year!) Here’s his notes on the circle-packing problem, shown here as proof that he did it himself.

He solved those and asked if there were more, so I set up a login for him. He went kind of nuts on the trivia questions Wednesday morning and wound up topping out at about 14th on the leaderboard. He even puzzled out the Name That Function questions in SIMPL+, although he admitted to using some brute force. He was mad I wouldn’t send him any vendor codes or SSIDs, but I didn’t want to get in trouble for him being near the top of the leaderboard.

In between classes I walked around hunting for the SSID clues on my phone like a chump. Later I set up a wireless scanner on my laptop and left it running so I wouldn’t miss any — should have done that the first time. As it turned out I never did find the 5th original SSID, my only miss on the challenge.

The Computer Science questions were challenging, but not all for good reasons. It turns out I don’t remember anything about Big O notation from CS classes. Yes, I know that nesting three for loops will give the processor a bad time with any sizable number of iterations, but I don’t spend much time comparing sorting algorithms these days. The difficulty was compounded by the free-form answer format and not knowing if N should be capitalized in the answer, how subscripts should be written, etc.

I got sidetracked by thinking i=N to 0 by i=i/2 was logarithmic, and thought with the inner loop from 0 to i the whole thing was maybe log n² or n log n, but couldn’t get it to accept anything like that. Finally, I went ahead and implemented the algorithm in a quick C# program and printed out a table of N vs. iteration counts for several values. Graphing these revealed a pretty obvious linear progression. I didn’t have time to figure out why at the time, but while writing this I realized the outer loop is O(sqrt(n)), and so is the inner loop, making the whole thing O(n) and significantly clarifying the formatting issues.

The Partner codes were an interesting part of the scavenger hunt this year. Some of the manufacturers took it more seriously than others. About half of the 12 cards were sitting out on unmanned tables. The rest were only handed out after chatting with the reps for a few minutes. Some conversations were more useful than others — I personally use a ton of Middle Atlantic products, but won’t ever have a need for a Josh.ai system. I took about an hour to pick up 11 of the 12, then settled in for the Crestron Hackathon. Participation was rewarded via points in the Challenge, which I thought was an awesome tie-in. The winning team was also rewarded. While that was beneficial to me, I’m not convinced it was a good idea to tie the two contests together like that, especially when it was one of the few differentiators between the top scores.

Wednesday night I built some tools to compare my scores against the other top scores to see what I had missed, which revealed something I didn’t even know existed — a Code: Bonus reward. I also decided to get serious about finding the 5th hidden SSID, and set up my laptop to log SSIDs while in my backpack. I planned to walk around Thursday morning until I found it.

Instead, at breakfast I found a new SSID that wasn’t accepted as #5 on the original challenge. Confused, I decided somebody else was being funny and spoofing an AVISPL SSID. To join in on the fun, I set my phone’s hotspot to AVISPL It’s A Trap. Later that morning I found out the new SSIDs were part of the new challenge. So I guess I was the only one spoofing them… sorrynotsorry. I had already gathered 6 of the 7 legitimate SSIDs, and thought about skipping out on my class to find the 7th. I waited patiently and did my lap from Uncas to Earth Expo and back during the break between classes, picking up the 7th SSID as well as scoring a Bonus card from the instructor’s table. I had looked for something like that previously, but the instructors I had talked to on Tuesday didn’t know anything about them.

The contest closed at noon on Thursday, so I spent the rest of the afternoon making a fun visualization of the score histories over the three-day contest. This was accomplished by scraping the webpages for the users on the leaderboard, parsing the HTML to extract individual score events with timestamps, and running the whole thing through phantom-chartjs to produce some pretty pictures. Add ffmpeg and gifsicle to taste, and you have an animated bar chart:

I just noticed the timestamps are wrong — the title should say UTC

I wanted to thank AVI-SPL, and especially David Thorson and Larry Kuehner for putting this together. It was lots of fun to participate (if a little distracting during classes) and I’m looking forward to seeing next year’s version.

My daughter has already spent the prize money — she wants me to get a drone big enough to lift her teddy bear:

--

--