Patterns Game 1.5

Interactive on-site game threads go here

Postby TTHsieh » Wed Feb 06, 2008 4:23 am

Code: Select all
java -Xrs -Xmx1000m -cp SudokuExplainer.jar diuf.sudoku.test.ED 100200300020040010005001006500700600070050080009002005900800100080020060004003008 > Output.txt

Output.txt :20.0/9.8/9.4

TTHsieh
TTHsieh
 
Posts: 1390
Joined: 13 July 2007

Postby g.r.emlin » Wed Feb 06, 2008 4:58 am

::: adjustment :::
Code: Select all
2008-02-06+00:43:00-0000 TTHsieh multiple-solutions -50
User avatar
g.r.emlin
Moderator
 
Posts: 11580
Joined: 07 December 2007
Location: www

Postby gsf » Wed Feb 06, 2008 5:10 am

TTHsieh wrote:
Code: Select all
java -Xrs -Xmx1000m -cp SudokuExplainer.jar diuf.sudoku.test.ED 100200300020040010005001006500700600070050080009002005900800100080020060004003008 > Output.txt

Output.txt :20.0/9.8/9.4

the --man option (see serate(1)) explains that 0.0 and 20.0 are error indications
if you see 0.0 or 20.0 for a given puzzle then verify it by other means

0.0 means invalid puzzle detected on input
20.0 means unsolvable; this could mean multiple solutions or SE ran out of techniques

I was lucky enough to extend SE for ER/EP/ED without damaging the code flow
getting more than 0.0 and 20.0 for error conditions (or additional checks) would be pushing that luck
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby TTHsieh » Wed Feb 06, 2008 5:57 am

Thanks, gsf
In this situation, Will I get a penalty of consecutive entry, if I post another puzzle immediatly.

TTHsieh
TTHsieh
 
Posts: 1390
Joined: 13 July 2007

Postby gsf » Wed Feb 06, 2008 6:49 am

::: comment :::
TTHsieh wrote:Thanks, gsf
In this situation, Will I get a penalty of consecutive entry, if I post another puzzle immediatly.

good question
this probably needs better documentation
the referee makes a distinction between
(1) syntactically correct submission -- looks like a grid+rating
(2) valid puzzle -- matches pattern, minimal, 1 solution
(3) valid submission -- meets player / rating rules

submissions meeting at least (1) and (2) count towards consecutive entry
you met (1) but not (2), so you can make another move
a ::: status ::: would also confirm the last-entry
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby gsf » Wed Feb 06, 2008 12:25 pm

Code: Select all
1 . . 2 . . 3 . .
. 4 . . 5 . . 6 .
. . 2 . . 4 . . 7
6 . . 5 . . 7 . .
. 8 . . 6 . . 9 .
. . 4 . . 3 . . 6
4 . . 9 . . 1 . .
. 9 . . 2 . . 7 .
. . 5 . . 8 . . 9  ED=9.6/9.6/9.6
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Postby JPF » Wed Feb 06, 2008 12:32 pm

Code: Select all
 1 . . | 2 . . | 3 . .
 . 4 . | . 3 . | . 5 .
 . . 3 | . . 6 | . . 7
-------+-------+-------
 3 . . | 6 . . | 8 . .
 . 1 . | . 9 . | . 6 .
 . . 6 | . . 4 | . . 9
-------+-------+-------
 5 . . | 7 . . | 9 . .
 . 7 . | . 5 . | . 2 .
 . . 8 | . . 1 | . . 5     ED=9.7/9.7/9.7


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

Postby g.r.emlin » Wed Feb 06, 2008 12:46 pm

::: adjustment :::
Code: Select all
2008-02-06+11:32:00-0000 JPF self-trump -50
User avatar
g.r.emlin
Moderator
 
Posts: 11580
Joined: 07 December 2007
Location: www

Postby JPF » Wed Feb 06, 2008 12:48 pm

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

Postby g.r.emlin » Wed Feb 06, 2008 12:51 pm

::: game 0016 status LIGHTNING :::
Code: Select all
game 0016 2008-02-03+10:16:00-0000 LIGHTNING duration 3d01h dealer Mauricio page 87 (open) 7 players 1 resigned

   1.2/1.2/1.2 Mauricio        1.5/1.2/1.2 Pat             1.7/1.2/1.2 tarek           2.0/2.0/2.0 TTHsieh   
   2.3/2.0/2.0 TTHsieh         2.5/2.5/2.5 Mauricio        2.6/2.5/2.5 TTHsieh         2.8/2.5/2.5 Mauricio   
   3.0/3.0/3.0 TTHsieh         3.2/3.0/3.0 Mauricio        3.4/3.4/3.4 TTHsieh         3.6/3.6/3.6 gsf       
   3.8/3.8/3.8 TTHsieh         4.2/4.2/3.6 Mauricio        4.4/3.8/3.8 Mauricio        4.5/3.8/3.8 tarek     
   4.6/3.6/3.6 m_b_metcalf     4.7/3.6/3.4 tarek           5.6/3.8/3.8 Mauricio        5.7/3.8/3.8 Mauricio   
   6.2/3.8/3.8 Mauricio        6.5/3.8/3.8 gsf             6.6/6.6/3.6 Mauricio        6.7/3.8/3.8 TTHsieh   
   6.8/4.5/3.4 TTHsieh         6.9/3.8/3.8 Mauricio        7.0/7.0/3.6 Mauricio        7.1/7.1/7.1 Mauricio   
   7.2/7.2/7.2 Mauricio        7.3/7.3/7.3 Mauricio        7.4/7.4/7.3 Mauricio        7.5/7.5/3.8 Mauricio   
   7.6/7.6/3.8 m_b_metcalf     7.7/7.7/3.4 tarek           7.8/7.8/3.8 tarek           7.9/7.9/3.8 TTHsieh   
   8.0/1.2/1.2 TTHsieh         8.2/8.2/8.2 Mauricio        8.3/8.3/8.3 tarek           8.4/8.4/8.4 TTHsieh   
   8.5/8.5/8.5 Mauricio        8.6/8.6/8.4 TTHsieh         8.7/8.7/8.4 TTHsieh         8.8/8.8/8.8 Mauricio   
   8.9/8.9/8.9 TTHsieh         9.0/9.0/9.0 TTHsieh         9.1/9.1/9.1 Mauricio        9.2/9.2/9.2 TTHsieh   
   9.3/9.3/9.3 Mauricio        9.4/9.4/9.4 Mauricio        9.5/9.5/9.3 JPF             9.6/9.6/9.6 gsf       
   9.7/9.7/9.7 JPF             9.8/9.8/9.7 Mauricio        9.9/9.9/9.9 Mauricio       10.0/1.2/1.2 JPF       
 10.3/10.3/9.3 Mauricio      10.6/10.6/9.8 JPF                                                               

       submitter  entries  score  response  notes
     -----------  -------  -----  --------  -----
             Pat        1     -8     3m39s  dup-puzzle
     m_b_metcalf        2     83     6m49s  pearl-diamond*2,dup-puzzle
             gsf        3    263     6m12s  pearl-diamond*3,dup-rating-tie*2,lower-pearl*2,dup-puzzle*2
           tarek        6    503    11m31s  consecutive-entry,pearl-diamond*4,resigned
             JPF        4    861    17m33s  self-trump,pearl-diamond*2,last-entry,highest-rating
         TTHsieh       16   1008     8m53s  consecutive-entry,self-trump*2,pearl-diamond*10,multiple-solutions
        Mauricio       26   3309    11m07s  self-trump*3,pearl-diamond*22,dealer
     -----------  -------
               7       58
User avatar
g.r.emlin
Moderator
 
Posts: 11580
Joined: 07 December 2007
Location: www

Postby ronk » Wed Feb 06, 2008 1:03 pm

::: comment :::

gsf, so as to locate the "post boundaries" between games, is there a unique set of search keys for either the opening or closing post:?:
Last edited by ronk on Wed Feb 06, 2008 9:09 am, edited 1 time in total.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby JPF » Wed Feb 06, 2008 1:09 pm

::: comment :::

Thanks g.r.emlin...

but it's still not easy to understand how to reconcile score[n] and score [n+1], especially after a trump puzzle.:(

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

Postby Pat » Wed Feb 06, 2008 1:19 pm

::: comment :::

ronk wrote:so as to locate the "post boundaries" between games,
is there a unique set of search keys
for either the opening or closing post


well, it ought to be unique, but cannot be guaranteed, as suppose i included such strings in the present post -- the search would then find the present post !

look at this boundary
    game #### closed
    game #### start
    game #### final
    game #### open
add triple-colons-and-a-space ahead of each
User avatar
Pat
 
Posts: 4056
Joined: 18 July 2005

Postby ronk » Wed Feb 06, 2008 2:00 pm

::: comment :::

Thanks Pat. A two keyword search -- "game" and "start" -- with "g.r.emlin" as author works the best.
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Postby gsf » Wed Feb 06, 2008 5:00 pm

::: comment :::
Pat wrote:well, it ought to be unique, but cannot be guaranteed, as suppose i included such strings in the present post -- the search would then find the present post !

this will be slightly off-topic for some, especially those without unix/linux

its not easy to separate the wheat from the chaff

the referee is coded into two passes, one piped into the other
the first pass transforms the raw post html to a op data line form
that form is then processed by a straightforward shell while/case loop on the ops
in that loop PG_NAME marks the start of the next post
in each post there may be a PG_DEAL
if the data is comment then ignore the rest of the post until the next PG_NAME

here is the first pass, put it in an executable sh(1) script file
and call it with the raw forum patterns game html file(s) as operand(s)
it abuses sed(1) to the point where it requires \? to mean 0 or 1 of the previous re
the at&t ast sed and gnu sed support this
linux provides gnu sed so the script should at least work there

g.r.emlin wrote:
CONTROL_PREFIX=:::
CONTROL_SUFFIX=:::
{
cat "$@"
echo PG_NAME
echo PG_DONE
} |
sed -e '/>Last edited by /s/<[^<>]*>Last edited by [^<>]* on \(.*\);.*/\nPG_EDIT \1/' |
sed \
-e 's/^M$//' \
-e 's/&nbsp;//g' \
-e 's/:/:/g' \
-e 's/.*>Posted: *\([^<]*\)<.*/PG_DATE \1/' \
-e '/^PG_DATE /s/,//g' \
-e '/>Last edited/s/<[^<>]*>Last edited by [^<>]* on \(.*\);.*/'$'\n''PG_EDIT \1/' \
-e '/^PG_EDIT /s/,//g' \
-e '/No posts exist for this topic/s/.*/PG_DEAD/' \
-e '/phpBB : <b>Critical Error<\/b>/s/.*/PG_DEAD/' \
-e 's/.*'$CONTROL_PREFIX' *\(.*\) *'$CONTROL_SUFFIX'.*/PG_DEAL \1/' \
-e '/^PG_DEAL/s/<[^>]*>//g' \
-e 's/.*<span class="name">.*<b>\([^<]*\).*Joined:.*/PG_NAME \1/' \
-e '/<td class="quote">.*<td class="code">/,/<\/table>/d' \
-e '/<td class="quote">/s/.*<td class="quote">//' \
-e 's/>Code:</></g' \
-e '/[0-9.]\{81\}/s/<[^>]*>[ ]*//g' \
-e 's%^\([0-9.]\{81\}\)[ ,#][ #SsEeDdPpRr=/]*\([12]\?[0-9]\.[0-9]\)\(\(/[12]\?[0-9]\.[0-9]\)*\).*$%PG_MORE \1 \2\3%' \
-e '/<td class="code">/,/<span class="nav">/s/^/PG_GRID /' \
-e 's%^PG_GRID \([12]\?[0-9]\.[0-9]\)\(\(/[12]\?[0-9]\.[0-9]\)*\)[# ]*</span><span.*%PG_RATE \1\2%' \
-e 's/\(. . . . . . . . .\)<\/td>.*<span class="postbody">.*/\1/' \
-e '/All times are GMT [-+] /s/.*All times are GMT \(.\) \([0-9][0-9]*\).*/PG_ZONE \1 \2/' \
-e '/^PG_/!d' \
-e 's/^PG_GRID [SsEe][DdEePpRr] *= *//' \
-e '/^PG_GRID /s/.*<td class="code">/PG_GRID /' \
-e '/^PG_GRID [^-+|&P.0-9]/d' \
-e 's/^PG_GRID PG_/PG_/' \
-e '/^PG_GRID *$/d' \
-e 's%^PG_GRID \([0-9.]\{81\}\)[ ,][ #SsEeDdPpRr=/]*\([12]\?[0-9]\.[0-9]\)\(\(/[12]\?[0-9]\.[0-9]\)*\) *$%PG_MORE \1 \2\3%' \
-e '/^PG_GRID [0-9.]\{81\}/d' \
-e 's/ at least /=/' \
-e 's%\(.*\) *\<[SsEe][DdEePpRr] *=\? *\([12]\?[0-9]\.[0-9]\)\(\(/[12]\?[0-9]\.[0-9]\)*\).*%\1\nPG_RATE \2\3%' \
-e 's%^[SsEeDdPpRr=]*\([12]\?[0-9]\.[0-9]\)\(\(/[12]\?[0-9]\.[0-9]\)*\).*%PG_RATE \1\2%' \
-e '/^PG_GRID [^\n]*[A-Za-z]/d' \
-e '/[<>{},]/d'


here's the head and tail of the script output for the game 0016
to be recognized a submission needs the right number of PG_GRID lines and a PG_RATE line
Code: Select all
PG_POST 1320
PG_NAME g.r.emlin
PG_DATE Sun Feb 03 2008 2:16 am
PG_DEAL game 0016 open LIGHTNING dealer Mauricio 27 clues diagonal and antidiagonal symmetry
PG_GRID 1 . . 2 . . 3 . .
PG_GRID . 2 . . 1 . . 4 .
PG_GRID . . 3 . . 5 . . 6
PG_GRID 7 . . 6 . . 5 . .
PG_GRID . 5 . . 8 . . 7 .
PG_GRID . . 8 . . 4 . . 1
PG_GRID 8 . . 7 . . 4 . .
PG_GRID . 3 . . 6 . . 2 .
PG_GRID . . 9 . . 2 . . 7
PG_RATE 1.2/1.2/1.2
PG_NAME Pat
PG_DATE Sun Feb 03 2008 2:33 am
PG_GRID 3 . . | 4 . . | 5 . .
PG_GRID . 5 . | . 9 . | . 7 .
PG_GRID . . 6 | . . 8 | . . 4
PG_GRID -------+-------+------
PG_GRID 6 . . | 3 . . | 1 . .
PG_GRID . 4 . | . 6 . | . 8 .
PG_GRID . . 1 | . . 9 | . . 7
PG_GRID -------+-------+------
PG_GRID 2 . . | 8 . . | 7 . .
PG_GRID . 6 . | . 2 . | . 1 .
PG_GRID . . 4 | . . 1 | . . 2
PG_NAME gsf
PG_DATE Sun Feb 03 2008 2:42 am
PG_GRID 1 . . 2 . . 3 . .
PG_GRID . 2 . . 1 . . 4 .
PG_GRID . . 3 . . 5 . . 6
PG_GRID 7 . . 6 . . 5 . .
PG_GRID . 6 . . 9 . . 7 .
PG_GRID . . 8 . . 7 . . 1
PG_GRID 8 . . 9 . . 4 . .
PG_GRID . 3 . . 6 . . 5 .
PG_GRID . . 9 . . 2 . . 7
PG_RATE 8.4/2.0/2.0

...

PG_NAME gsf
PG_DATE Wed Feb 06 2008 3:25 am
PG_GRID 1 . . 2 . . 3 . .
PG_GRID . 4 . . 5 . . 6 .
PG_GRID . . 2 . . 4 . . 7
PG_GRID 6 . . 5 . . 7 . .
PG_GRID . 8 . . 6 . . 9 .
PG_GRID . . 4 . . 3 . . 6
PG_GRID 4 . . 9 . . 1 . .
PG_GRID . 9 . . 2 . . 7 .
PG_GRID . . 5 . . 8 . . 9
PG_RATE 9.6/9.6/9.6
PG_NAME JPF
PG_DATE Wed Feb 06 2008 3:32 am
PG_GRID 1 . . | 2 . . | 3 . .
PG_GRID . 4 . | . 3 . | . 5 .
PG_GRID . . 3 | . . 6 | . . 7
PG_GRID -------+-------+-------
PG_GRID 3 . . | 6 . . | 8 . .
PG_GRID . 1 . | . 9 . | . 6 .
PG_GRID . . 6 | . . 4 | . . 9
PG_GRID -------+-------+-------
PG_GRID 5 . . | 7 . . | 9 . .
PG_GRID . 7 . | . 5 . | . 2 .
PG_GRID . . 8 | . . 1 | . . 5
PG_RATE 9.7/9.7/9.7
PG_NAME g.r.emlin
PG_DATE Wed Feb 06 2008 3:46 am
PG_DEAL adjustment
PG_NAME JPF
PG_DATE Wed Feb 06 2008 3:48 am
PG_DEAL status
PG_NAME g.r.emlin
PG_DATE Wed Feb 06 2008 3:51 am
PG_DEAL game 0016 status LIGHTNING
PG_NAME ronk
PG_DATE Wed Feb 06 2008 4:03 am
PG_DEAL comment
PG_EDIT Wed Feb 06 2008 4:09 am
PG_NAME JPF
PG_DATE Wed Feb 06 2008 4:09 am
PG_DEAL comment
PG_NAME Pat
PG_DATE Wed Feb 06 2008 4:19 am
PG_DEAL comment
PG_NAME ronk
PG_DATE Wed Feb 06 2008 5:00 am
PG_DEAL comment
PG_ZONE - 8
PG_NAME
PG_DONE
Last edited by gsf on Thu Feb 07, 2008 2:56 pm, edited 1 time in total.
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

PreviousNext

Return to Interactive games