I noticed that some single player games allow more time for Python than e.g. C or Go.
Is this an official feature?
Actually, I think it would be nice to have time allowance depending on type of your language, especially for AI battles.
Brute force or extensive check being an important part of many strategies, the competition between bots in e.g. Python and C++ is not quite fair. Interpreted languages could enjoy higher time limits. What do you think?
I think that CodinGame is nice because it reflect real life.
If you are a professional developper and you have to build a software where performances are the biggest feature, youāll never try to use anything else than C++.
Controlling a pod in a midiclorian field with varying degrees of physics satisfyingnessā¦ Writing a spell in forest runesā¦ Saving the world by grouping colors and skullsā¦ Fighting zombiesā¦
Yup, this totally reflects real life. Letās all use C++
What do you mean by ārealā? I donāt think many of CodingGamers could use tricks developed here in their real-life jobs and vice-versa.
Iāll hazard that CG is cool because itās somewhat different from everyday tasks. Problems are funny and algorithms are varying. Itās more likely that you saw some on them during your studies than in your job(s). For most part, youāve probably learned it yourself with google (I have ;)).
More specifically, have you been using genetic algos for real? Monte Carlo tree search? Serious machine learning in your CV? Neural nets? Fake physics simulators? Even mini-max or A* are not very likely.
CG is more like a game, kinda sport. And sport means fair play, equal footing. In this perspective, there is nothing wrong with different time allowances for different languages.
And yet, various languages exist for a reason. IRL, we do need different tools. In CG framework itās difficult to reflect all those real situations ā but itās pretty easy to put different tools on more equal footing.
I donāt agree with that. Codingame made me more āskilledā at coding. Itās hard to define but iām just faster and more efficient at coding something.
But you are right on one thing : Iāll never use the C++ tricks i use on codingame in real life. Because in real life we have -O3 in the compilation command line
Real world optimizations are forbidden (hello āThe Accountantā)
Contests are dominated by C++ (you can compute more per 100 ms, also hi to āSmash the Codeā)
I think the āreal lifeā argument is irrelevant and canāt be applied anymore.
Different languages need different time limits, so solutions on different languages can be truly competitive. And this is open opportunity to solve a contest on different language.
Examples: Java time = 2 * C++ time; Python time = 4 * C++ time.
Well, speaking LOUDLY doesnāt make an argument.
Basically youāre saying āOne can choose their weapon, so no problemā.
But thatās beside the point.
The point is, there is a poor selection of weapons in the first place and there is a simple way to make it much more interesting.
Recently, with the rise of genetic algorithms, a typical contest becomes more and more an exercice of ugly C++ speed optimisation. I think this is not necessarily where we want to get.
A variable time allowance, could attract more people and more ideas on the board.
Can you explain how gaming the efficiency metrics across languages would make things better? I canāt see. Hereās what I think is going to happen:
Letās assume Python is, in general, 7 times slower than C++ at doing the computation youāre thinking of (if only real life was that easy, but letās assume for the sake of discussion). But, arbitrarily, Python has been allowed 1000ms in CG, with C++ still at 100ms. So now instead of C++ being the de facto top language, itās Python. And then you have to figure this out across the 20 or so languages hosted at CG.
In my opinion, thatās such a pointless diversion. At least right now, it maps fairly well to what happens in real life: if you need realtime performance, you will go with C++ or an equivalent. And learning how to optimize it, which is far from trivial if you look at all the underperforming C++ solutions in the leaderboard, will teach you valuable skills you can apply in the right kind of job.
Itās not hard to get those metrics right, I think itās bordering the impossible. And personally, I wouldnāt want to be beaten by sloppy Python code after going hardcore optimization on my C++, just because it was arbitrarily given more processing time.
At least right now, I believe the rules are for the most part well known and fair. Could use more public information on the pragma stuff though.
Actually, it has been implemented in real life on some other site of this type. For example, python has been given 5 times C++ā allowance (there are many other languages for that matter). In this setting Iāve tried pretty many challenges both in python and in a fast compiled language (Go).
I think it works as expected. Still a bit easier to get the result in a compiled language. But, not surprisingly, at that point you can consider the advantage of rapid development in scripting languages. A very real life effect if you like. You choose your weapon, and this time the choice is real.
Just because they do it does not mean itās fair. My opinion is I donāt want to see this on CG. It will simply shift the attention to the language who happens to have the better arbitrary metrics instead. Maybe better for some people who canāt/donāt want to use low level languages, but worse for those who can.
You can argue itās possible to eventually achieve the right metrics. It might be possible, but I donāt believe it is.
I would argue you already have this rapid development advantage. Optimizing in C++ is already much more time consuming in contests. Why artificially make it worse? Imagine the code in Python being #1 with a large gap over C++ because of this arbitrary handicap? I donāt see the fairness.
If you want to go with as far as real life effects are concerned, programming includes choosing the right tool for the right job. And if you need realtime performance, you can bet C++ will not be far away, and you will get looks if you go with an interpreted language.
(No offense meant to Python users by the way, it is a great language, it is just also well known to be quite slow in general and makes an easy example).
Letās put it straight. You believe its hardly possible to achieve perfect balance.
Iāve seen a real thing and it worked for me.
And with this experience, Iād say the point is not to achieve the perfect balance (which is undefined BTW).
It would be enough to make the gap just less blatant.
And one can tweak it to their liking (as many other things here on CG).
Thatās simply not true. The current bias against interpreted languages is too strong. Just look at the leaderboards.
Speaking of performacesā¦ Well, the problem is that on CG one gets nearly full advantage of C++ (i.e. its speed and a modern compiler) and not so much of e.g. Python. I wish CG installed standard modern Python modules, say cython or numba or SciPy/scikit-learn or maybe PyPy.
I bet the C++ lovers would then start to argue they want more time.
Putting it further straight, those are both opinions, which are valid to discuss. Whether it works well or not for everyone on those other sites (mentioning them would be nice) or here on CG, is also a matter of opinion. I donāt see how it being implemented somewhere else somehow automatically invalidates the points I have mentioned. For all I know, it could be as bad as I have explained.
And in the end, we might just have to agree to disagree on whether artificial handicaps are a good thing or not.
I did not say it was an advantage on scoring well in current conditions, but on speed of development, of course. If the contest lasted 12 or 24 hours, then that advantage might probably translate better on the leaderboards. I have often seen solutions with interpreted languages topping the leaderboards in the beginning/middle of contests.
And I donāt think itās an arbitrary bias, itās the reality. If realtime levels of performance is an important factor to consider in a problem, then it definitely will impact the choice of language. If you donāt want that, I would rather argue like LBandy just did: design challenges promoting strategy over computation power, instead of going for artificial handicaps.
I am all with you on that. Anything that brings a language up to par to its full potential is a plus for everyone.
This is not a language war. I would love to code my solutions in C# in contests, this is by far my preferred language, but this will not happen if I judge performance will be too much an issue, so I just go with the best tool for the job. It just so happens most challenges are designed in a way that makes C++ be better suited for topping the leaderboards. If you want to argue to change that, I wonāt stop you.
Wouldnāt want to intrude in your debate, but let me try to lay out the kind of system Iād like.
By comparing with the free market. What price is fair for a loaf of bread? (or a bowl of rice, or adjust to whatever your realmās base food is)
All of those have influence on the matter: the value of money, the employeeās wages in the chain, the cost of production energy, buying the raw ingredientsā¦ Yet the price tends to stabilize (geographically). Because through supply and demand, all tend to balance, since any fluctuation is ādiscouragedā by the competition.
One way of reaching this that the C++ crowd is going to hate, is to give programs a time allowance in inverse relation with number of users in that language. You think you donāt have enough time? Itās your responsibility to find a language where the ratio between your estimated competence and the number of users. You think Python is allowed too much? You can get it reduced by using it.
What makes it hard to get right? I can think of this:
how stable should the time allowance be? realtime? hourly? daily? monthly? per-contest?
whatās a good inverse relation? proportional? capped? the CG-famous (N/P)^X?
how do you deal with the hordes of angry C++ coders?
While I think itās actually a really interesting idea for a single challenge, I think it would be a big mistake to apply this to the whole site. This is some meta-gamification that is massively distracting from the challenges themselves. This is fixing a ābiasā problem by introducing an even bigger one.
Also, since I read some comments suggesting so on the chat, I apologize if I somehow made this debate tense or unfriendly, my wording can probably use some work. Rest assured my intent is to be all friendly in debating this.