File Access

To what extent does CodinGame provide file access for multiplayer games and contests?

I’ve been experimenting in Java, and it appears I am able to successfully create/write/read files. If I close and reopen a file between rounds of a game, I am able to successfully reopen and read the content from it. However, when I start a new game, the file no longer appears to exist.

Are files garbage collected between games? Is it possible to save information or state between games at all?

I am asking because I have been experimenting with machine learning algorithms, and would be interested in trying to apply what I’ve been learning in some of the challenges, but I would need some sort of way to maintain state between games in order to do that.

Does anyone know of a way to save state between games? Would this be a desirable feature for CodinGame to have?

1 Like

+1
I wanted to experiment something like that too.

Maybe each player could have access to its own limited size directory ?

I guess it’s to prevent hardcoding or cheat.
And also, if everyone had who knows how many files saved for each puzzle, CG will eventually need bigger servers :slight_smile:

But yeah, smart implementation could be nice, but it had to be smart, which doesn’t seems easy (to me at least).

I completely agree, it seems like a potential security issue and a non-trivial problem to solve. But I think it would be really cool if each player had a limited amount of file space for their program or something of the sort.

I imagine it’s also more difficult of a problem than it would appear at first glance. My guess is that our programs aren’t consistently run on the same server - so there would have to be some way of storing and retrieving our program’s files from a central server, or whichever server they were saved to originally…