TTHsieh wrote:I have other 2 new ratings.
I modelled the game as a state machine with state transitions controlled by time and valid entries
here are the states and the time until the next state
(the times are all parameterized in one place so suggested changes can be easily slipped in)
- closed no current game, no entries, 8 hours until starting
- starting start time announcement, 8 hours until open
- open new game announcement with initial challenge
- closing close time announcement, either 24 hours idle (no entries), or n-1 entraints for this game resigned
if idle then 2 hours until closing, if resigned then immediate close
between
closed and
open the last entrant in the previous game may post
- Code: Select all
::: more :::
81-char-grid se-rating
...
to empty any cached entries -- presumably that player was the last entrant because all
other participants ran out of entries
immediately before the
open post a final tally of the previous game will be posted
that final tally will also check for any edits -- during the game only the most recent
forum page is checked, the others are cached -- the final tally will refresh all pages for the game
of course at this point the
open<=>closing=>closed=>starting=>open transitions
are theory awaiting practice -- each one will probably produce a glitch
under the hood: g.r.emlin is a continuously running program (unix shell script) that polls the forum via wget(1)
it gets back html and parses that to delineate its own control posts (the states above),
entry posts from participants, and the chaff
it also posts to the forum via wget(1)
that last part makes the coding delicate
improper logic on that feedback loop could wreak havoc on the forum
the hardest part to this type of programming, for me, is continuity through crashes
a crash might be the program stopping, or, like today, the www conection going dark
once we make it through a few hands off games I'll introduce a way for a forum user
to add a challenge between
starting and
open, first come first served
the tricky part there is that everyone will see the dealer's hand before the
openneat stuff