I can see it seems to say that I’m exceeding the limit of 1,000,000 executions. Can someone tell me what constitutes one execution? Is it running a single line of code? Do I need to make a bid within one million lines of code run? This error doesn’t really tell me anything and it’s not clear what I’m violating. I know my code as it stands is going to take a long time to run. This is on Criss Cross.
Each time that it calls makeBid()
, it needs to return within 1,000,000 statements. It’s not exactly clear how many statements your program is transpiled into, though, and especially if it’s not JavaScript, it may be several times more than you might expect. Hopefully soon we can restore the interface that helps you see how many statements things take, and at some point we’ll normalize the statement limits so that the transpiled languages have equal footing with JS.
The million-statement limit here is one important way for us to prevent infinite loops, and to keep the simulation time bounded so that it’s fair for other players. But we are trying to let you run a lot of code for Criss-Cross.
Yeah, I ended up breaking down and going back to JavaScript because the Python wasn’t working nicely. And I’ve also optimized my algorithm a lot so it’s not hitting that million line limit. I do feel like a million is rather small given the value of 7^7. I understand wanting to prevent infinite loops but naive iterations will definitely be larger than the limit.
Ah but where is the challenge in that? Now we need to invent interesting algorithms that are more efficient.
I would even suggest to add a memory limit, (my browser now hits 1.8gb of memory for certain games) as an extra challenge.
I do wish though that your current number of statements was visible somehow.
tip: I now have a debug for loop with var debug = 1 +1; x100.000 or something to trigger the soft cap (500.000) pop up. That popup does show the current number of your statements, then you can get an indication of how many statements you are using and compare certain code adjustments to see if the the nr of statements used was reduced
Note that it’s currently buggy as well (in Criss-Cross), sometimes the 1.000.000 is reached but nothing happens (your turn will be a no bid). I also get the soft limit (5101010/500000) popup only once, I need to refresh the site to get it again (re-cast doesn’t work).