[FAQ] (Really) Frequently Asked Questions


#45

Any time you play your code in the IDE, it is saved. Does it answer your question?


#46

Oh I thought it didn’t save since whenever I tried to quit the webpage it says “your progress will be lost” ! I tried it and it saved anyways so thank you :slight_smile:


#47

Will fantastic bits be released after it ends?


#48

yes it will


#49

Hello,

It seems my old account was deleted and every achievements I ever made was forgotten and I cannot find the site chan either.

That’s a problem :wink:


#50

what was the username of your old account? You can PM me the associated email address


#51

Is there any way to access old clash of code battles so that we can try them again? Or at least see our old code?

What is autopublish solutions? It’s an option in my account settings.

At the end of every clash of code/any battle I am given the option to share my code. Where is it being shared to? How do I see it?


#52

oh, I just replied to your email. I thought you were talking about another type of multiplayer game.

There is no way to access again a CoC (Clash of Code) battle once you have submitted your code. You can always see your code from the CoC result page. You can also share it. It means that other players of the same CoC will be able to see what you submitted once they submit as well. No other people can see it.

The option to autopublish solutions in your settings is actually for something else.


#53

Hello,

Does each test have a particular solution, or do we have to suggest a code for each question?
Because it seems that the entries change according to each test.

Edit : For a same game.

Thanks


#54

If your program does what the problem statement describes, it will solve all testcases.


#55

That’s what i was thinking. Thank you chr-m :slight_smile:


#56

Apparently it happend again.

All my records have been lost.


#57

While this statement is well-intentioned, it should be noted that you can indeed print all your solution at once, it will be read by the arbiter as if you are committing the moves seperately every turn, since it reads as you feed it and handles them as it wants to. For example, if you are expected to print 3 lines per turn, and you print 6 lines:

  1. The first 3 lines of the input will be treated as your decisions for the current turn.
  2. The next 3 lines of the input will be treated as your decisions for your next turn, and the arbiter will continue to feed you new turn information only taking account having seen the first 3 lines.

This means you’d be “ahead” of the arbiter by 1 turn the entire time, so you could for example program in a logic to skip a turn every time you decide to print multiple turns worth of actions. If you know for sure that your code has reached the final state you can indeed “solve” the game by printing all the moves you need (for a path finding algorithm to a 100% certain win state for example).


#58

Huge warnings necessary. This might be valid in practice, but be aware that in theory, it could fail, most likely for large referee->AI transfers (in terms of problem solving: large inputs).

The referee loop is some expansion over:

GameState gs(initState);
gs.sendGlobalsToPlayer();
while ( !gs.done() ) {
  gs.sendInputToPlayer();
  Command c = getPlayerOutput();
  gs.update(c);
}

Writing ahead of the referee means that no one will read the data in the sendInputToPLayer() line. But that data won’t be lost: it will stay in some queue until it’s read (OS or process or some hybrid, who knows, the point is I’m not aware of any policy that could work in all cases), since it has to be available should the process ever want to read it. The more you wait, the more you push the risk that the referee process would block on output.

I’d be very pleasantly surprised if CG chimed in and retorted their I/O system is nonblocking full-duplex, but I wouldn’t bet on it, and even less publicly recommend to push it unless the I/O volume is reasonably constrained.

Examples and counterexamples (in both directions of the argument) welcome.


#59

Hi I am new to CodinGames. Does CodinGames have something like editorials ? What do I do if I am unable to solve a particular puzzle ? I can’t see the solution since I haven’t solved it, then what do I do ?


#60

I think you meant “tutorials”. Some puzzles have a hint section on the left menu. All puzzles have a related forum thread where someone else most probably has had the same issue as you currently have. Else you can ask on the chat for a tip or explaining your issue.
If that doesn’t work, I suggest carefully reading the statement another time and checking what the puzzle is about on the details page of the puzzle (the page before entering the IDE).


#63

Excuse me if I’m asking an already answered question, but how do I incorporate variables into printed text/outputs?


#64

depends what language. In Java, I usually build the String first but you can do something like that:
System.err.println("MOVE “+x+” "+y); where x,y are integer coordinates of a position. Does it help?


#65

Can we have C# 7.3 (.NET Core SDK 2.1), please?


#66

Hello :slight_smile:
You want to know the real validator to make a code that passes the validator.
And not the good code towards the problem.
This is precisely why the final validators differ from the tests.
Good luck.