5
$\begingroup$

Wolfram Challenges has a leaderboard that features users that have completed the challenges in the 'best' way, according to specified criteria like efficiency or shortness of code.

Can I use Mathematica to see which user appears the most in the leaderboard? Or tally who is the best at for example Memory Efficiency or Speed Score, according to the most times they appear in that criterion for a challenge?

I tried looking at the page source, but was stumped by the HTML and Javascript obfuscation. So, even a hint on how to start would be welcomed.

$\endgroup$
8
$\begingroup$

After digging through here: https://challenges.wolfram.com/static/js/main.c80ec588.js I found the data:

challengeData = 
  Dataset@Import[
    "https://www.wolframcloud.com/objects/wolframchallenges/public/site/leaderboard.json",
    "RawJSON"];

there's also potentially an API you can query, as this exists:

CloudObjects["user:wolframchallenges/public/api"]

CloudObjects::notperm: Unable to perform the requested operation. Permission denied.

$Failed

but you need authentication and I didn't want to dig and see what cookies and things I'd need to send to get it to work.

Finally, here's another set of data that provides tracking info like solve counts:

trackData = 
  Dataset@Import[
    "https://www.wolframcloud.com/objects/wolframchallenges/public/site/tracks.json",
        "RawJSON"];

Here's some fun stuff to do with that data:

Histogram of solution times:

Internal`StringToDouble@*First /@ 
  StringSplit[
   Normal@challengeData[All, "Data", "Timing", "Value"]] // Histogram

enter image description here

you can see that most challenges can be done very quickly according to Wolfram's Timing data

WordCloud of users

Counts@Flatten@
   Normal@Values@
     challengeData[All, "Data", All, "User", "UserID"] // WordCloud

enter image description here

and here you see that potentially only a small number of people are really trying to get on the leaderboard, as it's so dominated by a few people

WordCloud of solution counts

solvedCounts = 
  AssociationThread @@ 
   Transpose@
    Flatten[Normal@
      Values@trackData[All, "Data", All, {"Title", "Count"}], 1];

solvedCounts // WordCloud

enter image description here

it seems like there are a few popular challenges, but most are largely ignored. We can also Histogram this:

solvedCounts // Histogram[#, 200, PlotRange -> All] &

enter image description here

and it seems that most are barely looked at

$\endgroup$
  • $\begingroup$ Hi thank you for answer! I thought data for how many times a problem has been solved would be somewhere there because it will help with normalizing the difficulty of a problem, but it seems that is only available on a particular problem's page. But this is still great! $\endgroup$ – 小早川美可子 Oct 14 '18 at 15:45
  • $\begingroup$ @小早川美可子 if you want the number of solutions I can dig that up too $\endgroup$ – b3m2a1 Oct 14 '18 at 15:46
  • $\begingroup$ Only if not too much trouble! $\endgroup$ – 小早川美可子 Oct 14 '18 at 15:48
  • $\begingroup$ @小早川美可子 it's done $\endgroup$ – b3m2a1 Oct 14 '18 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.