Nearly all of my matches in greed ladder show that i have lost/tied the game but when viewing some of the matches, my units crush my enemies. My username is Vratislav and it happens with my code submitted for Human team.
Here is a reported ‘tie’ against player who does nothing named: (ノಠ益ಠ)ノ彡┻━┻
Or reported ‘loss’ against player named: asdlk;fj asd fas
I’m working on a fix now that would be causing this problem for a small subset of solutions.
Do either of you use for (var foo in arr) loops over arrays in your code? Those can be buggy right now, so if you use those, try to rework your loops to for (var i = 0; i < arr.length; ++i) loops instead to get around it until I can figure out how to fix the problem.
Yeah, that will be probably it! I am using the “for in” statement because I discovered that it is more efficient in terms of calls issued than for(;;; ) loop. Will rewrite and report back. Thanks @nick !
Cool! I’m also uploading a fix that should prevent other users’ builtin prototype extensions from bleeding over into your code which should stop the problem from happening as soon as all current simulators are restarted with the new code (which might take up to a couple days). Thanks for your patience on that one.
Generally, using for-in loops over arrays is not very good JavaScript, so I’ll have to update the statement counting to not favor it!
I have got the same issue as Vrastislav had I can not reproduce any of my loose on lader (always win). In fact I use for each for custom object not for array. But even if I remove it I will get the issue.
Could you suggest some workaround or fix the issue:) ?
Just an idea: when I try to improve my code in the editor, if I then click on a previous match, the simulation I get is for the new in development code, not the old submitted one. This can be confusing if you expect to watch the original match.
Isn’t this just a matter of a different random seed each time you (re)play a match? In order to view the original outcome, you’d have to force the replay to use the original random seed (as well as the original code that both sides used for that match) so that the coins/gems appear at the same locations/times. Right now, the URL to view a match only contains the opponent’s id hash, and you can’t use that to generate the random seed because that would result in all re-matches with the same opponent producing the same outcome.
Sorry that this issue is still prevalent. We’ll fix it before the end of the competition. Just focus on actually winning as many games as possible (the score on the leaderboards is merely an estimate, and we will calculate final rankings on numbers of wins/losses). Sorry for the inconvenience!