projects skfr-fast-rating and sudoku-multi-purpose-program

Programs which generate, solve, and analyze Sudoku puzzles

Re: Cloning Sudoku Explainer thru tagging

Postby champagne » Tue Feb 28, 2012 6:49 am

ronk wrote:skfr apparently detects a uniqueness loop ("UL") Type 2 in r1c78,r6c79,r9c89 for r7c8<>5, whereas Sudoku Explainer ("SE") does not.

Code: Select all
 5789  1     2     | 678   3     69    |*89   *89+5  4
 3789  4     37    | 278   278   5     | 6     12    1389
 6     389   35    | 248   1     49    | 23    7     3589
-------------------+-------------------+------------------
 12    5     8     | 9     6     7     | 23    4     13
 1349  369   1346  | 348   48    2     | 5     16    7
 2347  367   3467  | 345   45    1     |*89    26   *89
-------------------+-------------------+------------------
 13457 2     13457 | 1457  4579  8     | 47    9-5   6
 14578 678   9     | 14567 457   46    | 47    3     2
 457   67    4567  | 24567 24579 3     | 1    *89+5 *89+5


An SE bug? Maybe, maybe not. Depends upon how the UL Type 2 is defined. SE could require all the extra candidates to be in one row, column or box. Inspection of some ER=4.6 that SE does find would provide a hint.



I had in mind that serate was missing some ULs.
If I am right, this is a true UL, with 2 solutions if none of the '5' is in the loop.

serate does not recognize ULs with no solution, but that bug has been reproduced in principle in skfr by lksudoku.

If this is a valid UL leading to <5> r8c8, then we have a simple fact and we are again in the permanent conflict we have in that "cloning" task

Do we look for a fast rating program based on the rules applied in serate
or do we intend to reproduce exactly serate including all the bugs

I feel we have a ration 1 to 3 or more in performance depending on the track followed

champagne
champagne
2017 Supporter
 
Posts: 5614
Joined: 02 August 2007
Location: France Brittany

Re: Cloning Sudoku Explainer thru tagging

Postby gsf » Tue Feb 28, 2012 8:07 am

champagne wrote:Do we look for a fast rating program based on the rules applied in serate
or do we intend to reproduce exactly serate including all the bugs

I feel we have a ration 1 to 3 or more in performance depending on the track followed

go for correctness on concept rather than faithfulness to serate
especially when it comes to bugs or artifacts of implementation
but list and explain each divergence from serate
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Re: Cloning Sudoku Explainer thru tagging

Postby champagne » Tue Feb 28, 2012 9:49 am

gsf wrote:
champagne wrote:Do we look for a fast rating program based on the rules applied in serate
or do we intend to reproduce exactly serate including all the bugs

I feel we have a ration 1 to 3 or more in performance depending on the track followed

go for correctness on concept rather than faithfulness to serate
especially when it comes to bugs or artifacts of implementation
but list and explain each divergence from serate


Thank you glen for your comments. this goes in the way we are currently working.

Could you when you have time comment also on these 2 issues

Is the replacement of the referee one day open and what would be the pre requisite
Could we open a little more the game suppressing the symmetry constraint

champagne

PS: BTW the pattern game remains by far the most active topic in that forum
champagne
2017 Supporter
 
Posts: 5614
Joined: 02 August 2007
Location: France Brittany

Postby ronk » Tue Feb 28, 2012 1:09 pm

Groundhog day!

dobrichev wrote:... and one striking difference
Code: Select all
.12.3...4.4...56..6...1..7...896..4......25.7.....1....2...8..6..9....32......1.. skfr=4.6/3.6/2.6 serate=8.3/3.6/2.6 <<

Unquestionably a Sudoku Explainer bug. Merely transposing this puzzle produces the two different ratings.

Code: Select all
.12.3...4.4...56..6...1..7...896..4......25.7.....1....2...8..6..9....32......1.. # ED=8.3/3.6/2.6
..241.........6...9...2...8........9..85..12.....31..63....7..42.6.4..7..1.6...5. # ED=4.6/3.6/2.6
ronk
2012 Supporter
 
Posts: 4764
Joined: 02 November 2005
Location: Southeastern USA

Re:

Postby dobrichev » Tue Feb 28, 2012 2:58 pm

ronk wrote:Unquestionably a Sudoku Explainer bug. Merely transposing this puzzle produces the two different ratings.


Thank you
dobrichev
2016 Supporter
 
Posts: 1311
Joined: 24 May 2010

Re: Cloning Sudoku Explainer thru tagging

Postby gsf » Tue Feb 28, 2012 4:07 pm

champagne wrote:Is the replacement of the referee one day open and what would be the pre requisite

do you mean replacing the rating part or something more?
Could we open a little more the game suppressing the symmetry constraint

we could put that on the todo list

how about first fleshing out a plan to change the rating program to sfkr
one of the sfkr maintainers should start a thread in the interactive games forum
starting with the pros of sfkr vs SE
I have some thoughts but will hold them for the new thread
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Re: Cloning Sudoku Explainer thru tagging

Postby champagne » Tue Feb 28, 2012 4:48 pm

gsf wrote:
champagne wrote:Is the replacement of the referee one day open and what would be the pre requisite

do you mean replacing the rating part or something more?


I had in mind the replacement of serate, not more


gsf wrote:
champagne wrote:Could we open a little more the game suppressing the symmetry constraint

we could put that on the todo list


This is quite another topic, but after several years, most of the symmetric patterns of value have been covered.
As noticed coloin, by construction, the symmetry reduces the number of puzzles a pattern can offer and also put a severe limitation in the number of patterns available.
If everybody agree on that concept, it should not be too difficult to suppress that constraint.




gsf wrote:how about first fleshing out a plan to change the rating program to sfkr
one of the sfkr maintainers should start a thread in the interactive games forum
starting with the pros of sfkr vs SE
I have some thoughts but will hold them for the new thread


I am not sure to catch the meaning of "fleshing out" (not in my dictionary).
But if an agreement is reached to try to replace serate by a better performing program, this has for sure to be discussed and planned carefully.

skfr as it is can be a good start, but not yet ready.

To start a new thread, I would suggest that mladen does it.

He has the best English level in the team.
He is a professional of EDP projects
He is less involved than me in the current code and we need fresh eyes


champagne
champagne
2017 Supporter
 
Posts: 5614
Joined: 02 August 2007
Location: France Brittany

Re: Cloning Sudoku Explainer thru tagging

Postby gsf » Tue Feb 28, 2012 5:10 pm

champagne wrote:
gsf wrote:how about first fleshing out a plan to change the rating program to sfkr


I am not sure to catch the meaning of "fleshing out" (not in my dictionary).

thefreedictionary.com wrote:flesh out - add details, as to an account or idea; clarify the meaning of and discourse in a learned way, usually in writing; "She elaborated on the main ideas in her dissertation"

basically present a bunch of ideas with little detail,
and then fill in the details via discussion
gsf
2014 Supporter
 
Posts: 7306
Joined: 21 September 2005
Location: NJ USA

Re: Cloning Sudoku Explainer thru tagging

Postby champagne » Tue Feb 28, 2012 5:20 pm

gsf wrote:basically present a bunch of ideas with little detail,
and then fill in the details via discussion


quite clear now, thanks

champagne
champagne
2017 Supporter
 
Posts: 5614
Joined: 02 August 2007
Location: France Brittany

Re: Cloning Sudoku Explainer thru tagging

Postby zhouyundong_2012 » Fri Mar 23, 2012 1:05 pm

Greetings,
Your software is great.
I want to write it last month.
zhouyundong_2012
 
Posts: 138
Joined: 10 February 2012

Re: Cloning Sudoku Explainer thru tagging

Postby champagne » Fri Mar 23, 2012 1:31 pm

zhouyundong_2012 wrote:Greetings,
Your software is great.
I want to write it last month.


you could also join the team and bring fresh ideas in that open source project.

a third possibility would be to enter a new project, always open source, developing freely a well performing "multi purpose program" including a solver and a puzzle generator, without the constraint to stay very close to Sudoku Explainer.

I have a draft of such a program very close in general design to skfr and I am drafting some new ideas to solve puzzles in the middle range of ratings with nicer paths.

a second release of skfr should be worked out when this new ideas will have been evaluated, say in one or 2 months.

champagne
champagne
2017 Supporter
 
Posts: 5614
Joined: 02 August 2007
Location: France Brittany

Re: Cloning Sudoku Explainer thru tagging

Postby zhouyundong_2012 » Fri Mar 23, 2012 1:42 pm

[ronk-moderator edit: Without a timely edit of this post showing how this code is relevant to this thread, this post may unexpectedly disappear.]

Unexplained Code part 1: Show
Code: Select all
struct CSingleRow {
public:
   int          ThinkN;
   int          ThinkRow;
public:
   int          SingleRow;
};

bool SearchSingleRow(CSingleRow *pSingleRow, bool next)
{
   int ThinkN = pSingleRow->ThinkN;
   int ThinkRow = pSingleRow->ThinkRow;
   for (int i = pSingleRow; i < 9; i++)
   {
      if (TblNumberOne[HML_9_BIT(F[i], TblRmder3[i])] == 1)
      {
         if (F[TblAnother1[i]] & )
         {
            pSingleRow->ThinkRow = i;
            pSingleRow->SingleRow = i;
            return true;
         }
      }
   }
   return false;
}

struct CSingleColumn {
public:
   int          ThinkN;
   int          ThinkColumn;
public:
   int          SingleColumn;
};

bool SearchSingleColumn(CSingleColumn *pSingleColumn, bool next)
{
   int ThinkN = pSingleColumn->ThinkN;
   int ThinkColumn = pSingleColumn->ThinkColumn;
}

struct CSinglePalace {
public:
   int          ThinkN;
   int          ThinkPalace;
public:
   int          SinglePalace;
};

bool SearchSinglePalace(CSinglePalace *pSinglePalace, bool next)
{
   int ThinkN = pSinglePalace->ThinkN;
   int ThinkPalace = pSinglePalace->ThinkPalace;
   for (int i = ThinkN; i < 9; i++)
   {
      if (TblNumberOne[TblPalaceMask(F[], TblRmder3[i])] == 1)
      {
         if ((F[] & HML_9_BIT(F[], Row)) || (F[TblAnother1[]] & TblCombineMask[]) || (F[TblAnother2[]] & TblCombineMask[]))
         {
            pSinglePalace->ThinkN = i;
            pSinglePalace->
            return true;
         }
      }
   }
   return false;
}


struct CDoubleRow {
};

bool SearchDoubleRow(CDoubleRow *pDoubleRow, bool next)
{
}

struct CDoubleColumn {
};

bool SearchDoubleColumn(CDoubleColumn *pDoubleColumn, bool next)
{
}

struct CDoublePalace {
};

bool SearchDoublePalace(CDoublePalace *pDoublePalace, bool next)
{
}

struct CHorizontalCross {
};

bool SearchHorizontalCross(CHorizontalCross *pHorizontalCross, bool next)
{
}

struct CVerticalCross {
};

bool SearchVerticalCross(CVerticalCross *pVerticalCross, bool next)
{
}

struct CDoubleHorizontalCross {
};

bool SearchDoubleHorizontalCross(CDoubleHorizontalCross *pDoubleHorizontalCross, bool next)
{
}

struct CDoubleVerticalCross {
};

bool SearchDoubleVerticalCross(CDoubleVerticalCross *pDoubleVerticalCross, bool next)
{
}

struct CHorizontalRectangle {
};

bool SearchHorizontalRectangle(CHorizontalRectangle *pHorizontalRectangle, bool next)
{
}

struct CVerticalRectangle {
};

bool SearchVerticalRectangle(CVerticalRectangle *pVerticalRectangle, bool next)
{
}

struct CHiddenSingleRow {
};

bool SearchHiddenSingleRow(CHiddenSingleRow *pHiddenSingleRow, bool next)
{
}

struct CHiddenSingleColumn {
};

bool SearchHiddenSingleColumn(CHiddenSingleColumn *pHiddenSingleColumn, bool next)
{
}

struct CHiddenSinglePalace {
};

bool SearchHiddenSinglePalace(CHiddenSinglePalace *pHiddenSinglePalace, bool next)
{
}

part 2: Show
Code: Select all
bool Search(bool next)
{
   if (SearchSingleRow(g_pSingleRow, next))
      return true;
   if (SearchSingleColumn(g_pSingleColumn, next))
      return true;
   if (SearchSinglePalace(g_pSinglePalace, next))
      return true;
   if (SearchDoubleRow(g_pDoubleRow, next))
      return true;
   if (SearchDoubleColumn(g_pDoubleColumn, next))
      return true;
   if (SearchHorizontalCross(g_pHorizontalCross, next))
      return true;
   if (SearchVerticalCross(g_pVerticalCross, next))
      return true;
   if (SearchDoubleHorizontalCross(g_pDoubleHorizontalCross, next))
      return true;
   if (SearchDoubleVerticalCross(g_pDoubleVerticalCross, next))
      return true;
   if (SearchHorizontalRectangle(g_pHorizontalRectangle, next))
      return true;
   if (SearchVerticalRectangle(g_pVerticalRectangle, next))
      return true;
   if (SearchTwoChainRow(g_pTwoChainRow, next))
      return true;
   if (SearchTwoChainColumn(g_pTwoChainColumn, next))
      return true;
   if (SearchTwoChainPalace(g_pTwoChainPalace, next))
      return true;
   if (SearchThreeChainRow(g_pThreeChainRow, next))
      return true;
   if (SearchThreeChainColumn(g_pThreeChainColumn, next))
      return true;
   if (SearchThreeChainPalace(g_pThreeChainPalace, next))
      return true;
   if (SearchFourChainRow(g_pFourChainRow, next))
      return true;
   if (SearchFourChainColumn(g_pFourChainColumn, next))
      return true;
   if (SearchFourChainPalace(g_pFourChainPalace, next))
      return true;
}

part 3: Show
Code: Select all

void AnimateSingleRow(CSingleRow *pSingleRow, int nFrame)
{
}

void AnimateSingleColumn(CSingleColumn *pSingleColumn, int nFrame)
{
}

void AnimateSinglePalace(CSinglePalace *pSinglePalace, int nFrame)
{
}

void Animate()
{
   switch (AlgorithmMethod)
   {
   case AM_SINGLEROW:
      AnimateSingleRow(g_pSingleRow, g_nFrame);
      break;
   case AM_SINGLECOLUMN:
      AnimateSingleRow(g_pSingleColumn, g_nFrame);
      break;
   case AM_SINGLEPALACE:
      AnimateSingleRow(g_pSinglePalace, g_nFrame);
      break;
   case AM_DOUBLEROW:
      AnimateDoubleRow(g_pDoubleRow, g_nFrame);
      break;
   case AM_DOUBLECOLUMN:
      AnimateDoubleRow(g_pDoubleColumn, g_nFrame);
      break;
   case AM_HORIZONTALCROSS:
      AnimateHorizontalCross(g_pHorizontalCross, g_nFrame);
      break;
   case AM_VERTICALCROSS:
      AnimateVerticalCross(g_pVerticalCross, g_nFrame);
      break;
   }
}
zhouyundong_2012
 
Posts: 138
Joined: 10 February 2012

Re: Cloning Sudoku Explainer thru tagging

Postby dobrichev » Fri Mar 23, 2012 10:21 pm

Dear zhouyundong_2012,

The purpose of this thread is to discuss one or more of the alternatives of a popular rating software which assigns a difficulty level to each sudoku puzzle according to some predefined rules.

I can't understand what in common your latest posts have with this discussion.

Some people, including me, prefer long pieces of code to be uploaded on some free server and only references to be posted in the topics.

If you posted the code here by mistake, please edit (erase) your posts.

Thank you in advance,
MD
dobrichev
2016 Supporter
 
Posts: 1311
Joined: 24 May 2010

Re: Cloning Sudoku Explainer thru tagging

Postby zhouyundong_2012 » Sat Mar 24, 2012 12:21 am

I just show my idea by code. I haven't written it.
zhouyundong_2012
 
Posts: 138
Joined: 10 February 2012

sudoku-multi-purpose-program

Postby champagne » Tue Aug 14, 2012 4:09 pm

There is not much to say so far about the project skfr-sudoku-fast-rating

I opened a new project in google

project skmpp

to share all my own new tools. As many features are in continuity with what has been done in the previous project, it makes sense to me to use the same thread to open discussions

champagne
champagne
2017 Supporter
 
Posts: 5614
Joined: 02 August 2007
Location: France Brittany

PreviousNext

Return to Software

cron