When using an algo in the playground, the "time limit vastly exceeded" instantly appeares

I have just started doing this stuff so I don’t know how anything works

I just uploaded my algo, but all my algo does is crash :stuck_out_tongue: I don’t know why and It doesn’t tell me anywhere why.
Plus, When I set my algo against a boss for example, the only thing that happens is the yellow pop up screen saying the time limit vastly exceeded, before even the map loads

It seems very likely that your code has an infinte loop in it, as algos only have 3 seconds to submit a turn. Try using debut_write() in all your while loops. You can make sure the playground is working by uploading starter algo.

Hope this helps!

Is there more detail about the time the algorithm can take? Is it 3s from when whenever the game engine prints out a string with stateType 0?

I believe it is 3 seconds from when the algo proccess starts

My understanding is that there are 3 processes: 1 Java game engine, and 2 Python processes running the algorithms. They communicate through stdin/stdout. The Java engine prints out json strings with a field “turnInfo” being 0, 1, or 2, for beginning of turn, frame in the action phase, or end of game respectively. After printing a “turnInfo”=0 string, it waits for input from the Python processes. Is this where it sets a 3s timer?

Otherwise, the time spent serializing each action phase frame would be counted, and the time from the gamelib calling “on_turn” to the time that the engine needs a submission would change based on how many action phase frames took place.

so umm… turns out, its just a space in one of my folders…

1 Like