X-Git-Url: https://troll.desast.re/troll.git/blobdiff_plain/a78210b2e4295eaf8dee8215d4ffe5e062b4efb3..b327ce8704f1585747bbb5b206cc357b6fbfef51:/config/statement_en.html?ds=inline diff --git a/config/statement_en.html b/config/statement_en.html index edffecf..f6afd2d 100644 --- a/config/statement_en.html +++ b/config/statement_en.html @@ -111,9 +111,17 @@
Map Input

- Your first line of input contains three space-separated + This section's HTML gets messed up somewhere in the SDK + pipeline. I reported it there; and there + you'll be able to find a readable representation of this + block. Sorry about the inconvenience… +

+

+ Your first line of input contains five space-separated parameters: - roadLength initialStones seed + roadLength initialStones + gameSeed gameSide + reserved

roadLength
@@ -133,6 +141,19 @@ algorithms, and you're encouraged to do the same! See examples section below for simple ways to achieve that. +
gameSide
+
+ which side you're on, as -1 + or 1. It's not supposed to make a + difference to how you handle the rest of the game, but + you can XOR it to your gameSeed to have a + (reproducible) random that doesn't mecessarily draw + when it plays against itself. +
+
reserved
+
+ reserved for future use, ignore for now +
@@ -192,6 +213,37 @@ +
+

+   + Proper RNG seeding examples +

+ + + + + + + + + + + + + + + + + +
Language FamilySample
JVM + long mySecretSalt = 0x4242424242424242L;
+ Random random = new Random(gameSeed ^ gameSide ^ mySecretSalt); +
C, C++, Perl… + srand(gameSeed ^ gameSide ^ 0xdeadb33f);
+ std::srand(gameSeed ^ gameSide ^ 12345);
+ srand( $gameSeed ^ $gameSide ^ 0xCAFE_BABE ); +
OtherUnachievable until proven otherwise
+