Patterns Game 1.5

Interactive on-site game threads go here

Patterns Game 1.5

Postby g.r.emlin » Sat Dec 08, 2007 10:04 am

Patterns Game 1.8

Abstract

This is the testbed for a Patterns Game automaton referee. Although promoted as a game, there is a hidden agenda: a mechanism for generating and cataloging puzzles with interesting properties.

Forward

Patterns Game 1.8 is a continuation of the Patterns Game introduced by JPF, with a twist. This time around the refereeing and accounting is automated by a daemon, g.r.emlin, interacting as a forum member. The goal of the automation, besides being a neat programming exercise, is to take over the mistake-prone and tedious job of accounting, leaving the enjoyable parts to the human participants (assuming g.r.emlin is the only automaton in the game!) Almost all of the nuances of the game outlined below are malleable and open for discussion. The rules are based on JPF's original post.

Ratings

ER ratings are based on Sudoku Explainer 1.2.1 (SE.) Current ERs fall in the range 1.0 through 13.0, with one digit in the tenths position.

Patterns Game ratings are the tuple ER/EP/ED:
  • ER (explainer rating): the higest Sudoku Explainer rating of the methods leading to the puzzle solution
  • EP (pearl rating): the higest Sudoku Explainer rating of the methods leading to the first cell placement
  • ED (diamond rating): the higest Sudoku Explainer rating of the methods leading to the first candidate elimination

Ratings sort numerically from left to right, low to high.

A modified Sudoku Explainer 1.2.1 determines these ratings. (Note that some browsers may incorrectly change .jar suffixes to .zip when downloading; change the suffix back to .jar before using.) This version contains the standard SudokuExplainer entry point, but also provides a new command line entry point serate. See serate(1) for details. Use --format=%r/%p/%d to generate Patterns Game ratings. serate also works around anomalous java floating point representations by rounding all ratings to the tenths digit.

For this version of SudokuExplainer the rating 0.0 denotes puzzle input/initialization error and the rating 20.0 denotes either multiple solutions or a puzzle requiring unsupported methods.

The Game

For each game a dealer posts a 9x9 sudoku puzzle (the pattern) with the following properties:
  • valid (by definition, but stated for completeness) (gsf-solver -e valid)
  • minimal (gsf-solver -e minimal==1)
  • 2 <= dihedral symmetry order <= 8 (gsf-solver -e 'symmetry>=2&&symmetry<=8')
  • maximum dihedral symmetry order (no puzzle permutation has a higher dihedral symmetry order; must be: gsf-solver -qFN -f%#sc puzzle | gsf-solver -qFN -f'%(S)x')
  • solvable by singles only (gsf-solver -qFN-G)
  • 19 <= clues <= 29 (gsf-solver -e 'clues>=19&&clues<=29')
  • clue pattern not isomorphic to (essentially different from) any previous pattern (gsf-solver -f%#xc)

Each player can post (submit) a new puzzle with the following properties:
  • valid
  • same pattern
  • minimal
  • not isomorphic to any previous puzzle in the current game
  • different ER from any previous puzzle in the current game or with an ER/EP/ED greater than the highest submitted ER/EP/ED with the same ER (a trump)

Rules

The dealer is selected by the referee (see below.) After making a submission a player may not make another submission until 10 minutes have passed and another player has made a submission. Game numbers 0 modulo 2 are lightning rounds (marked LIGHTNING) with the 10 minutes submission delay waived. In checking for consecutive posts by the same player, a syntactically correct submission is considered a submission, even if it is later tagged invalid. A duplicate submission within 2 minutes of the original submission is ignored (unless the duplicate is by the same player.) Within 5 minutes of an invalid submission the referee will post an ::: adjustment ::: message that contains the sumbmission date and reason for the adjustment.

The current game closes when any of the following occur:
  • all but one of the active players (players who have made submissions) have resigned
  • no valid submissions have been made for (22 hours + 2 hours).

Scoring

The points for each submission is the ordinal of the submission: 1 point for the dealer, 2 points for the second submission, etc.

When the game closes all of the points are summed, per-player, with the following adjustments:
  • add -20 for the dealer
  • add submission ordinal for the last submission
  • add submission ordinal for the highest ER/EP/ED
  • assign -50 for each invalid submission
  • assign -50 for each submission marked edited
  • assign -100 for each submission with ER/EP/ED that does not match the results of Sudoku Explainer 1.2.1
  • assign 0 for trumped submissions
  • add EP/ED bonus of (5*(EP-2.3)+10*(ED-2.3))
  • 200 bonus for each rare ER (see Status below)
  • 0 plus EP/ED bonus of (SCORE_MORE?1:0)*(5*(EP-2.3)+10*(ED-2.3)) for each ::: more ::: puzzle (see below) posted in the time between the game close and the next game start

where assign means the submission only gets the assigned points and add means the points are added to the submission points. The player with the highest point total is the winner.

Submissions

Puzzle submission posts must be in 9x9 grid form with the ER/EP/ED ratings as ED=floating-point-number/floating-point-number/floating-point-number, EP=floating-point-number/floating-point-number/floating-point-number, or ER=floating-point-number/floating-point-number/floating-point-number, but no other adornments. As of Patterns Game 1.8 all three ratings must accompany a submission. The grid and rating must be in a [ code ] ... [ /code ] block with no font size/color adornments. Signature and other text may follow the code block.

Any player can request game status with a post containing ::: status ::: on a separate line. The referee posts status every 10 submissions, so this may be needed only when the game slows.

A player can resign with a post containing ::: resign ::: on a separate line. Resigned players cannot make submissions to the current game.

A resigned player can re-sign with a post containing ::: re-sign ::: on a separate line.

After the game is closed and before the next game starts players may post a batch of additional valid but unplayable puzzles for the closed game:
Code: Select all
::: more :::
81-char-grid  ER/EP/ED
   ...

Unplayable puzzles include those cached by the last player and puzzles with a higher ER/EP/ED of an entry by the same player.

Use ::: comment ::: as the first line of a post that might otherwise be interpreted as a sumbission. This often happens when quoting or referring to submissions in the current or previous games.

::: patterns ::: on a separate line will list the patterns for all previous games.

The edited score adjustment does not apply to more or comment messages.

The Dealer

The referee maintains a queue of candidate patterns. This queue is not perused by any of the players, even g.r.emlin's close friends. The queue contains a handful of generated puzzles just in case player candidates run dry. Players may submit puzzles to the queue via a private message to g.r.emlin with the subject pattern and the first line of the message containing
Code: Select all
81-char-grid  ED=floating-point-number/floating-point-number/floating-point-number

A reply is sent for each pattern submission with either queued or rejected in the subject line. The message body will contain a reason for the rejection; there may be more than one reason, but the validation stops at the first invalid property detected. Messages with subjects other than exactly pattern are silently discarded. Except for the start state the referee private message inbox is checked every 2 hours.

Dealer submissions are maintained FIFO per dealer, and dealers are selected round robin. A dealer repeats in succession only if there are no dealer submissions from other players. If there are no player submissions in the queue then g.r.emlin selects one from a pre-generated list and it's your fault if its not a good game. Don't bombard the queue -- submissions, including yours, might be silently discarded.

The dealer selection for the next game is made when the game enters the start state. Dealer submissions made after the start state will be eligible for subsequent games.

Game States

The game is modeled as a state machine with submissions and elapsed time controling the transitions. All times are UTC (zulu). No provisions are made for waking/sleeping hours across time zones. The progression of games will eventually wash any time zone specific bias.

The states are:
  • start: The referee selects a dealer and posts a message that the game will start in 16 hours.
  • open: The referee posts the pattern and dealer id, and the game begins. A status message is posted after every 10 submissions.
  • idle: After at least 3 entries have been made (the deal counts as entry 1) and 22 hours with no submissions the referee posts a message that the game has gone idle and will close in 2 hours if there are no further submissions. If there is a submission within 2 hours the game goes back to the open state.
  • closed: After (22 hours + 2 hours) idle, or when all but one of the active players have resigned, the referee posts a message that the game is closed. This message will include preliminary results. Players may post one or more ::: more ::: messages containing grids found after the game closed.
  • final: (16 hours - 5 minutes) after closing the game enters the final state and the referee posts a final tally for the game that includes all scores and submitted puzzles. Once a game is final any edited submissions for the game are ignored. After 5 minutes the next game enters the start state.

Status

The status listing contains the current maximum ER/EP/ED with submitter for each active ER, along with the current score and adjustment notes for each active player. The referee also keeps track of 3 ER groups:
  • p: ERs seen in previous pattern games.
  • k: ERs known to exist but rarely seen in a patterns game.
  • u: ERs in the range 1.0 .. 12.0 but never seen.

open ratings are p ERs not seen for the current pattern. Open ratings may or may not be possible for the current pattern. rare ratings are non-p ratings sumbitted for the current pattern.

Under the Hood

The automaton and this documentation are configured by the following script:
Code: Select all
# game configuration

typeset TITLE="Patterns Game"      # title
typeset VERSION=1.8         # version
typeset DAEMON=g.r.emlin      # daemon id

typeset solver=g         # gsf command line solver
typeset solver_name="gsf-solver"   # solver name
typeset solver_version=2008-03-12   # oldest compatible solver version
typeset solver_url=http://www.research.att.com/~gsf/sudoku/            # solver url

typeset se=se            # SE command line rater
typeset se_ED=-f%r/%p/%d      # SE ER/EP/ED options
typeset SE_NAME="Sudoku Explainer"   # SE name
typeset SE_VERSION=1.2.1      # oldest compatible SE version
typeset SE_URL=http://diuf.unifr.ch/people/juillera/Sudoku/Sudoku.html         # SE url
typeset SE_RATE_URL=http://www.research.att.com/~gsf/sudoku/SudokuExplainer.jar      # SE rate url
typeset SE_RATE_MAN=http://www.research.att.com/~gsf/man/man1/serate.html      # SE rate man page
typeset RATING="ER/EP/ED"      # rating label

typeset CANDIDATES=candidates      # candidate pattern file
typeset PATTERNS=patterns      # dealt patterns file
typeset PENALTIES=penalties      # submission penalties file

typeset CONTROL_PREFIX=:::      # post control line prefix
typeset CONTROL_SUFFIX=:::      # post control line suffix

typeset GENERATE=1000.100.60.30      # guesstimate solver -gtp N.R.F.S generation parameters
typeset AGENT_GENERATE=10000.100.60.30   # agent solver -gtp N.R.F.S generation parameters
typeset AGENT_HITS=10         # agent per-solver -n generation limit
typeset AGENT_NPROC=2         # agent new game active process id limit
typeset AGENT_REMOTE_NPROC=8      # agent new game remote search process limit
typeset HITS_MAX=20         # max hits for a "good pattern" in $GENERATE window

typeset CONSTRAINTS="singles only"   # must be solvable by these constraints
typeset CONSTRAINTS_EXPR=FN-G      # solver -q solvable constraints

integer LIGHTNING=2         # lightning round frequency
integer CLUES_MIN=19         # minimum number of clues
integer CLUES_MAX=29         # maximum number of clues
integer SYMMETRY_MIN=2         # minimum dihedral symmetry order
integer SYMMETRY_MAX=8         # maximum dihedral symmetry order

float   RATING_MIN=1.0         # minimum ER
float   RATING_MAX=13.0         # maximum ER

typeset   ISER="?(1)[0-9].[0-9]"   # valid ER pattern
typeset   ISED="$ISER/$ISER/$ISER"   # valid ER/EP/ED pattern

integer SCORE_DEAL=-20         # dealer adjustment
integer SCORE_ERROR=-50         # invalid/edited entry adjustment
integer SCORE_NOSE=-100         # invalid SE ER/EP/ED rating adjustment
integer SCORE_MORE=0         # ::: more ::: per entry adjustment
integer SCORE_TIE=0         # tie entry adjustment
integer SCORE_RARE=200         # rare rating bonus

typeset SCORE_PD="(5*(EP-2.3)+10*(ED-2.3))"   # pearl/diamond bonus

integer ENTRY_STATUS=10         # status after this many entries

integer WAIT_CLOSED=2*hours      # idle->closed transition interval
integer WAIT_IDLE=22*hours      # open->idle transition interval
integer WAIT_MAIL=2*hours      # referee private message poll interval
integer WAIT_NEXT=10*minutes      # next game poll interval
integer WAIT_OPEN=16*hours      # start->open transition interval
integer WAIT_POLL=5*minutes      # referee status poll interval
integer WAIT_POST=2*minute      # time between forum posts
integer WAIT_ROUND=60*minutes      # announced event time rounding
integer WAIT_START=16*hours      # closed->start transition interval
integer WAIT_SUBMIT=10*minutes      # minimum submission interval
integer WAIT_TIE=2*minutes      # player tie entry window


g.r.emlin powered by ksh (and mm!)
Last edited by g.r.emlin on Tue Jul 22, 2008 9:56 am, edited 33 times in total.
User avatar
g.r.emlin
Moderator
 
Posts: 11580
Joined: 07 December 2007
Location: www

Re: Patterns Game 1.5

Postby wintder » Sat Dec 08, 2007 3:00 pm

g.r.emlin wrote:This is the testbed for Patterns Game automaton game referee.

All times are UTC.



ZULU time sounds better though.:)

May we torture the Gremlin? (Wrong pattern, non-minimal, wrong rating, quote someones post, etc)
wintder
 
Posts: 297
Joined: 24 April 2007

Re: Patterns Game 1.5

Postby gsf » Sat Dec 08, 2007 6:14 pm

wintder wrote:May we torture the Gremlin? (Wrong pattern, non-minimal, wrong rating, quote someones post, etc)

yes, there are no feelings involved -- which can be good and bad
one note -- all posts (except the first) by g.r.emlin will be from the automaton (if/when I can get that working again)
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby TTHsieh » Sat Dec 08, 2007 7:09 pm

Why named g.r.emlin ?

TTHsieh
TTHsieh
 
Posts: 1390
Joined: 13 July 2007

Postby wintder » Sat Dec 08, 2007 8:48 pm

TTHsieh wrote:Why named g.r.emlin ?

TTHsieh


LOL, gremlins are ww2 aviator slang for bugs.

There may be an earlier reference?
wintder
 
Posts: 297
Joined: 24 April 2007

Postby gsf » Sun Dec 09, 2007 12:04 am

TTHsieh wrote:Why named g.r.emlin ?

http://everything2.com/index.pl?node_id=385851
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby g.r.emlin » Sun Dec 09, 2007 12:10 am

::>> game 1 starting at 2007-12-09 01:00:00-0000 <<::
User avatar
g.r.emlin
Moderator
 
Posts: 11580
Joined: 07 December 2007
Location: www

Postby JPF » Sun Dec 09, 2007 1:36 am

g.r.emlin wrote:::>> game 1 starting at 2007-12-09 01:00:00-0000 <<::

too late or too early for European players:(

JPF
JPF
2017 Supporter
 
Posts: 6139
Joined: 06 December 2005
Location: Paris, France

Postby g.r.emlin » Sun Dec 09, 2007 2:11 am

::>> game 1 starting at 2007-12-09 04:00:00-0000 <<::
User avatar
g.r.emlin
Moderator
 
Posts: 11580
Joined: 07 December 2007
Location: www

Postby TTHsieh » Sun Dec 09, 2007 2:26 am

g.r.emlin wrote:::>> game 1 starting at 2007-12-09 04:00:00-0000 <<::

For private reason, I will miss 2 hours. But it's not a problem.

TTHsieh
TTHsieh
 
Posts: 1390
Joined: 13 July 2007

Postby gsf » Sun Dec 09, 2007 2:38 am

JPF wrote:
g.r.emlin wrote:::>> game 1 starting at 2007-12-09 01:00:00-0000 <<::

too late or too early for European players:(

any suggestiion for M-F and S S zulu start time ranges?
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby gsf » Sun Dec 09, 2007 2:55 am

g.r.emlin wrote:::>> game 1 starting at 2007-12-09 04:00:00-0000 <<::

sorry to debug this live
the offline dry runs went a bit better
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby Red Ed » Sun Dec 09, 2007 3:01 pm

This is all eerily familiar ...
    The system goes on-line on August 4th, 1997. Human decisions are removed from strategic defense. Skynet begins to learn, at a geometric rate. It becomes self-aware at 2:14 am, eastern time, August 29th. In a panic, they try to pull the plug ...
Heed the lesson of Terminator, gsf, and stop coding now!
Red Ed
 
Posts: 633
Joined: 06 June 2005

Postby g.r.emlin » Sun Dec 09, 2007 3:43 pm

::: game 0001 starting at 2007-12-09 14:31:32-0000 :::
User avatar
g.r.emlin
Moderator
 
Posts: 11580
Joined: 07 December 2007
Location: www

Postby g.r.emlin » Sun Dec 09, 2007 3:44 pm

::: game 0001 open :::

23 clues antidiagonal symmetry
Code: Select all
. 9 . | . 2 . | 5 . .
. . 4 | . . 5 | . 1 .
. 6 . | . . . | . . 3
------ ------- ------
. . 1 | 8 . . | . 6 .
. . . | 9 . . | . . 2
. 8 . | . 7 2 | . . .
------ ------- ------
5 . . | . . 1 | . 7 .
. . . | 3 . . | 9 . 1
. . 3 | . . . | . . .  ER=7.2
User avatar
g.r.emlin
Moderator
 
Posts: 11580
Joined: 07 December 2007
Location: www

Next

Return to Interactive games