Spring Challenge 2021 - Bugs & Questions

Those starter kits are usually not very beginner friendly, it usually assumes that you know the basics of OOP, which is far from being granted if you just started programming.

1 Like

Is there a schedule of the planned streamings? And is it possible to watch them afterwards somewhere ?

you can type "/join #INSA_rouen to join it again

1 Like

In C# the Thread.Sleep(XX) was giving me timeouts. Even with 1ms steps.

You can also try

GCSettings.LatencyMode = GCLatencyMode.LowLatency;
GC.TryStartNoGCRegion(ā€¦);
{ā€¦ main loop ā€¦}
GC.EndNoGCRegion();

And avoid excesive object creation

Thanks, Iā€™ll try playing around with GCSettings more, though Iā€™ll have to be extremely careful about where to start and end the NoGCRegions, since Iā€™ve found that usually C# will run the GC for ~30 ms somewhere in my Rollout(), which is a recursive function.

I added an extra blurb in my skeleton code to mark where I read the input. I should technically move my sw.Restart() to directly after reading the game input but before trying to figure out my opponentā€™s move (it costs < 1 ms to do so, but theoretically GC can happen at this point). This might account for the one or two timeouts randomly in the middle of the game that I see in my arena submission.

Though itā€™s an unimportant point in the grand scheme of things, I still donā€™t understand why player 2 was being treated unfairly.

No schedule this time. Itā€™s quite difficult to put it in place. Depending on the streamers, their streams may be available afterwards.

Hi, Iā€™m confused why my opponentā€™s point become 122 from 101 even He has no trees left.
Is it some rule about points that Iā€™m missing?

Same problem here. I have tried to find information about this without success.
Can anyone point me to the full formula, or some documentation please ?

:no_entry: Game end
Players gain an extra 1 point for every 3 sun points they have at the end of the game.

Donā€™t forget to factor that in!

2 Likes

thank you, Iā€™m missing that part

Hi, I have a ā€œperformance problemā€ with C++ read entries.
I do that to mesure time for reading just the first input (day) :slight_smile: auto start = std::chrono::high_resolution_clock::now(); int day; // the game lasts 24 days: 0-23 std::cin >> day; std::cin.ignore(); std::cerr << "read day in " << std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - start).count() << std::endl;
It take more than 20ms.
and then (with other chrono like this) I got a timeout something like 50us (yes microseconds !!!) later.
Is it normal that I have only some microseconds to answer ? I suppose not. And I think I miss something but I canā€™t understand what.
Is there an known issue with std::chrono for this challenge ? (I use it in others challenges without problem)

Thanks for your help

Nevermind. It was my code (obviously)
Just for information, if you write (in C++) something like ā€œX % 0ā€, the code just freeze : no exception, no other information that can help you.
Itā€™s strange, but itā€™s fixed !!!

Thank you. Do you know if there is any streamer coding in Python ?

Is there a way to ask questions on github on one of the starter kit? I was looking at the python starter kit, and I was wondering the reason why an enumeration was used.

class ActionType(Enum):
WAIT = ā€œWAITā€
SEED = ā€œSEEDā€
GROW = ā€œGROWā€
COMPLETE = ā€œCOMPLETEā€

I was a bit skeptical about this ActionType class too.

I doubt many people will use this feature but I think it allows you to iterate over action types.

Hi,

image
I tried to output the variable oppIsWaiting and is value is always 0 ā€¦

Hi,
It seems that Iā€™ve lost my work in progress code in the IDE after join the Gold League. Is that a known bug ? How can I get my WIP code back ? Did I do something wrong ?

I just swiched and switched back language and my WIP code has returned !

1 Like

The starting boards are not fair.
The player having its 2 starting trees on the left gets an advantage. The first 12 days, each player mostly build itā€™s forest. And so, left Player will mostly plant on the left side while the right player plant on the right.
So, when we consider the shadows:
Left playerā€™s shadows are efficient on days: 0,1 (na) 5,6,7 (++) and 11,12,13 (++++)
And right player gets: 2,3,4 (+) and 8,9,10 (+++)
So, on the Left = ++++++ and on the right = ++++
In order to be really fair the starting T1 trees should be also symetric to the sun of day 0.
That could be an enhancement for the multi.

3 Likes

Hello, I try to give an output with multiple action for multiple rounds in one day,
Code is saying output should be like that in C++:
ā€œSEED | GROW | COMPLETE | WAITā€
Heres mine:
SEED 5 4 | GROW 6 | WAIT
code:
cout << action1 << " | " << action2 << " | " << ā€œWAITā€ << endl;

No error and only first action is launched.
rest of the command is displayed as character message: " | GROW 6 | WAIT"
Whereas for others i see there is an extra round in the same day for their other commands.

Bug or i did something wrong?
Thank you