File Rearrangement

Does the game do anything to the algo files we upload? I added a text file in the algo file of a new algo that I uploaded. Inside on_turn, I wrote to that file, just to test if it could be done. I ran it locally through powershell, no errors appeared, and sure enough, what I wrote to the file was written, once for every turn. But, when I uploaded this algo, and played it, it failed, saying my algo had crashed. Writing the file was the only change I had made, so it must have been an error with writing the file. Maybe, I thought, it couldn’t find the text file because it had been moved. Would that happen, does it delete files it thinks aren’t supposed to be there?

If you haven’t already, use a relative path instead of a full path.

2 Likes

Of course, I have already done that. Thank you though!

You could try seeing if the restriction is for read-only vs write-only files. For example, load a file with your zip and try opening it in read only. If read-only does not work then I’m not sure how you would test write-only, but if it does then try the write-only and then reading it to see if the file was created.

1 Like

When you run the algo on playground what does the debug log when you scroll down say?

I have the same issue, when i run it locally everything is fine, when i run it on the playground I get the error "[Errno 2] No such file or directory: ‘healthlist.txt’ " I am using the relative path.
Edit: The text file is in the same file as the python code
Edit2: Not sure if this is related or not but sometimes when i attempt to run code on the playground it freezes and nothing happens, i have to exit and re-enter the playground and try a different combination of Algorithms for it to start working.
Edit3: Primarily I apologise for creating many edits this quickly in succession, the issue has resolved itself after I changed the txt file to a csv and changed the name of the program i uploaded.
Edit4: For some reason my algorithm plays perfectly on the playground crashes on the online battles against other algorithms

Sorry for the late reply. We updated the ranked match servers do you still have that bug where it works on playground but not ranked matches?

It works perfectly now, thank you

1 Like