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?
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.
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.