X-Git-Url: https://troll.desast.re/troll.git/blobdiff_plain/83de865a87657f62bc949433539351945bd04314..734e04c8106926949ce97c993e065c98f0fd25ed:/config/statement_en.html?ds=inline diff --git a/config/statement_en.html b/config/statement_en.html index 89a0e27..a63199a 100644 --- a/config/statement_en.html +++ b/config/statement_en.html @@ -16,55 +16,10 @@ Rules
- You have to shoot at least 1 stone per - turn if you have any left. -
- -
-

-   - Breaking Change -

-

- The roadLength game input variable used to be the - cardinal number of positions the troll could be in. That's the - way it was presented in the original game, but I leaned more - towards distances to make the I/O protocol easier on beginners. - So it's currently inconsistent. -

-

- This is going to change in the following days to be a distance - everywhere, more in line with the protocol's other measures. - Not to mention being somewhat more consistent with the variable - name. Thanks - - @Snef - - for reminding me of this. -

-

- If you used this variable, I suggest you temporarily used one - of these workarounds so you don't get bit by the upcoming - change: -

- - - - - - - - - - - - - - - - - -
Former useAs aTry this
roadLength - 1
distance to opponent
roadLength & (~1)
roadLength
number of troll states
roadLength | 1
roadLength + 1
I have no idea
(roadLength + 1) & (-1)
+ If you have stones, shoot 1 or more of them. +
+ If you don't have stones, shoot 0 exactly. +

@@ -74,37 +29,49 @@
The following ideas are still in flux, waiting for some opinions. Please drop a word on the - - contribution's page - + contribution's page or on the forum
    -
  • +
  • Is it even worth publishing? can the problem be totally solved? -
  • +
  • More maps? (a map is a {road length} × {initial stone count} pair) + → Yes, there will be more maps.
  • - Leagues? I could conceive the referee being permissive - (allow 0 stones thrown) in the first one, and then strict. -
  • -
  • - Fog of war? (see only troll position, not enemy throw/stones left) + Leagues +
      +
    1. + single small map, cheating is tolerated, boss plays tit + for tat (9/10) or cheats (1/10) +
    2. +
    3. + rock troll and ice troll unlocked; multiple rounds; + four maps available; no cheating; boss plays well but + not perfect +
    4. +
    5. + all races unlocked; map continuum, no boss but default + AI doesn't lose. + +
    6. +
    + For the WIP phase of this draft, I'll likely merge the last + two leagues into one because we need data on what makes the + games interesting.
  • - variable for of war? (seeing enemy stones - is a boolean decided randomly as part of the map? + Fog of war? Cancelled. Not in this game.
  • - alternative fog of war? (seeing enemy stones only when - troll is close to us?) -
  • -
  • - Praise for my artistic skillz + Praise for my artistic skillz. There can never be enough + of that.
  • Other remarks? @@ -135,31 +102,181 @@ I/O Protocol

- Just read the sample code. You can figure this out. +

+ This place used to read: “Just read the sample code. You can + figure this out.” Here are the formalities for that + other part of the audience. +

+
+
Map Input
+
+

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

+
+
roadLength
+
+ distance between both castles, between 6 + and 14. +
+
initialStones
+
+ number of stones a castle starts the day with, + between 0 and 50. +
+
gameSeed
+
+ the game's seed. The game AIs use it to provide you + with reproducible matches even when they use stochastic + 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. +
+
reservedN
+
+ one or more parameters, reserved for future use +
+
+
+
+
+
Turn Input
+
+

+ At each turn, you are provided with the following three + space-separated values: + trollDistance + stones + opponentStones +

+
+
trollDistance
+
+ distance between the troll and your castle +
+
stones
+
+ number of stones you have left +
+
opponentStones
+
+ number of stones your opponent has left +
+
+
+
+
+
Turn Output
+
+

+ After having received your turn input, you are to output + a single integer stones: the number of stones + you wish to throw at the troll. +

+

+ You may optionally provide a message you wish + your castle to yell at the troll or at your opponent. + Just append it to your output, being sure to separate it + with at least one space. + +

+
+
+
+
Timing Considerations
+
+

+ You're currently allowed the default SDK timings. I + think it's one second for the first turn and 50 ms + then, but don't quote me on this. +

+
+
+
+

+   + 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
+

  - Maps + Expert rules

- The following maps are currently available and randomly yet - extremely fairly (you wouldn't believe the effort that went - into this) chosen uniformly at random among the following: + In the lower leagues, the following maps are currently + available and randomly yet extremely fairly (you wouldn't + believe the effort that went into this) chosen uniformly at + random among the following:

- - - - - - +
Road lengthStones
715
730
1530
1550
+ + + + + + + + + + + + + + + + + + + +
Road lengthStones
615
630
1430
1450

- As with anything in this draft statement, this - is subject to change without notice. Why do - you think they're provided in the game input? + You can also override them via game + settings roadLength and initialStones, + so long as you remember you won't be choosing them for + ranking play.

@@ -168,47 +285,45 @@   Change Log - +

+ I'm not maintaining the full changelog here anymore as the + game's source + repository is now publicly available. I'll just make note + of the single latest change, so you can know how far behind you + were lagging. Patches welcome, BTW. +

+

+ This draft's last change is: + + game seed is sent in inputs. + +

- Based on an involuntary suggestion by - - Zaap38 - - on the #Fr channel. The original appears to be by - - Romain André-Lovichi - . +
+ “Trolls simply detest the very sight of dwarves (uncooked).” +
+
+ — J.R.R. Tolkien, The Hobbit +
+
+
+

+ Based on an involuntary suggestion by + + Zaap38 + + on the #Fr channel. The original appears to be by + + Romain André-Lovichi + . +