Suggestion: leaderboard of Languages


#1

Okay, we have leaderboard of players. There is even an external page which acts as a leaderboard of puzzles.
I suggest to also have a “leaderboard” of programming languages. Ranking could show for example:

  • total # of submitted bot code in puzzles / contests / solos for given language (overall popularity)
  • total # of bot code that achieved #1 ranking in a contest / multi for a given language (popularity among champions)
  • total # of bot code that achieved top 10 ranking in a contest / multi for a given language (language is fast/good enough to achieve well with it)

It does not mean that one is really better than the other, but CG usage data can be interesting.

We just think, that we human players compete and our weapons are our bots… In reality, the Language Creators who are competing - and their ‘bots’ are we, human players… :slight_smile:


#2

Theoretically, it’s already possible to do this for multis since the leaderboard has language info (my bot does this for individual puzzles). For stats on all multis, however, you would need to get the leaderboard for every puzzle, which is kind of spammy.


#3

I see there are some guys who have access to CG API and master the right skills and already created some very nice statistics pages in the past. (@dbdr, @_Royale, @Magus, @Azkellas comes to my mind plus who is behind https://chadok.info/codingame/ )

Let me suggest (ask for) another page, based on contest+multi leaderboard API.

  • selection dropdown: league (legend/gold/silver/all) - leads to refreshing the following table with data for that league only:
  • rows: name of contest or multi
  • columns: languages
  • data cell: percentage (# of the submissions in the given language / # submission - in that league

I think it is not a big problem if API is limited to top 1000 submissions.

I suspect the resulting table is a good sign of both language popularity but also on how much ‘heuristic-
friendly’ the given multi is.

To prevent spamming the API by each viewer, a ‘once-per-day’ query and local DB storage might be good, I suspect this is how for example https://chadok.info/codingame/leaderboard_xp.html works.
Finished contest actually do not change.

Why asking for it and not doing it? :slight_smile: Cause I am lacking the API definition. (I could manage the DB and web page part though not as nice one as for example https://dbdr.github.io/cg/ )


#4

In fact, every one have access to this. It’s not an “official” API, we just looked at the website ajax/websocket requests.


#5

I quickly checked the html source of a multi leaderboard page, but no way I will be able to reverse engineer from these bunch of javascript files exactly what query is used to fetch the tabular data from the server (probably a HTTP GET but what?), and what format the data is is received (probably some JSON but what?), that is used to populate the initially empty DOM. :frowning: Maybe someone can help me out in a PM, please? … I promise not to flood this API.


#6

CG Community is AWESOME. I got help in 5 mins.

I might make myself a small ‘language leaderboard’ page, with a local DB used to cache data. A nice challenge to improve my PHP. (Some areas I never used in PHP such as json handling).
Too bad, today is the last day of my holiday…


#7

Feel free to ask on the discord or the chat, you’ll probably always find some help.

I never checked the html source code of any codingame page. I just use my browser debug tools.


#8

Then you miss the list of redirects to internal contests like the EA version of Tron, which you can find in the HTML directly.


#9

Oooh, nasty :smiley:


#10

Here are some statistics on the language popularity and performance.
This is based on the “top-1000” leaderboards of 69 competitions (multis and past contests), retrieved today through API (over 55k leaderboard entries)

% distribution of the programming languages used - PER LEAGUE

As you can see, Python3 is the most popular in Wood and Bronze. Silver is fairly balanced among the top 4 languages (Python3, Java, C++ and C#). Not surprisingly, C++ takes over in the top two leagues where speed counts the most. 40% of all Legend bots is written in C++.
Notes: old Python 2 version is reported in separate line. League = none column shows the contests that don’t use the league system.

Medal table (total number of #1, #2 and #3 rankings achieved per language)

cg_stats_lang_medals

C++ dominance is even more dramatic at the very top level - 75% of wins was achieved by using C++.
Note: data included also for some contests where code speed did not count at all, e.g. Detective Pikaptcha.


#11

And some PER COMPETITION statistics

% of submissions per language (LEGEND league only)

Note: some community puzzles with very low number of gamers are excluded. Languages below 1% are excluded.

Here the % ratio of C++ is hinting how much computation-heavy or heuristics-friendly the given puzzle is (we talk about Legend league!)
Ultimate Tic-Tac-Toe with 74% is clearly C++ territory, while for example in Ghost-in-the-Cell even a Python bot has decent chance to reach the top league.