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

Programs which generate, solve, and analyze Sudoku puzzles

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Mon May 18, 2020 2:04 am

Hi champagne:
Would you please modify the code to meet the requirements of sukaku. Now it can only handle low ER sukaku.
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Mon May 18, 2020 5:33 am

yzfwsf wrote:Hi champagne:
Would you please modify the code to meet the requirements of sukaku. Now it can only handle low ER sukaku.

SKFR is based on a very old code and has been specifically designed to clone the original Sudoku Explainer used in the interactive game(even an older code). To give a relevant reply to your question, I have to understand what you are doing with skfr. This could come in a private message as well
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Mon May 18, 2020 7:44 am

champagne wrote:SKFR is based on a very old code and has been specifically designed to clone the original Sudoku Explainer used in the interactive game(even an older code). To give a relevant reply to your question, I have to understand what you are doing with skfr. This could come in a private message as well

I use the ER of skfr as the grading basis of the puzzle generator, but skfr can't solve the very difficult sukaku at present, and sometimes even crashes. I only modify the initialization code of skfr to support sukaku (a line of 729 characters).But I don't understand the internal algorithm, and I don't know how to use C + + programming language.Tks.
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby 1to9only » Mon May 18, 2020 8:21 am

yzfwsf wrote:and sometimes even crashes.

i seem to recall that skfr needs some 8MB of stack space to run properly, otherwise it crashes.
gcc: --stack,8192000
vs: /stack:8192000
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Fri Jul 03, 2020 11:08 am

Hi brothers:How to fix this bug.
access.png
access.png (26.33 KiB) Viewed 1268 times

acc.png
acc.png (9.05 KiB) Viewed 1268 times
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby 1to9only » Fri Jul 03, 2020 12:32 pm

Look in bitfields.h:
Code: Select all
#define BFTAG_size 20
#define BFTAG_BitSize 20*32

the comments say:
Code: Select all
Bitfield 640 bits used in chains and within a layer in the solver.
WARNING: using bit at position 0 implies error when using BFTAG::First
This bitfield uses 20 32bits unsigned int.
Size of this bitfield class can be changed by [the] 2 #define lines.
...

You can try increase size to 30 and 30*32.
I don't know how this will affect the program.
Maybe champagne (who wrote this program) will add his comments!
User avatar
1to9only
 
Posts: 4177
Joined: 04 April 2018

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Fri Jul 03, 2020 12:42 pm

Hi 1to9only :Thanks.
I've tried, but there are still problems.I use skfr for rating sukaku.If sukaku is not so hard(no more than se 11.0 ), then everything is OK
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Fri Jul 03, 2020 2:22 pm

Hi yzfwsf,
could you post the puzzle creating problem, I'll try to dig in the past
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Fri Jul 03, 2020 2:43 pm

Hi champagne:I use rateUnique to rate "Just One Cell" sudoku.Thank you so much.
Cause crash
Code: Select all
100000000007020000080000020400000000060000050000000200000800600005190003070000040

Not rated:
Code: Select all
000000900000600008006090000001800000000050070240000090000060000600000000000000100  skfr: 0
000007000000000100000050000050020008000001900800900040000090000003004000000600300  skfr: 0


Hidden Text: Show
Code: Select all
int __stdcall rateUnique(char *ze,char *sol, int * er, int * ep, int * ed, int * aig) {
#pragma comment(linker, "/EXPORT:"__FUNCTION__"="__FUNCDNAME__)
   return skfr::rateUniqueC(ze,sol, er, ep, ed, aig);
}

Hidden Text: Show
Code: Select all
int rateUniqueC(char *ze,char * sol, int * er, int * ep, int * ed, int * aig)
{
   //*er = 1; *ep = 2; *ed = 3; *aig = 4; return 0; //debug
   PUZZLE* puz = new PUZZLE(); //instantiate a puzzle //28.2.2018 MD: use heap for 32-bit dll, else stack overflows in the calling application
   puz->options = Op; //clone the options
   // do standard processing
   int rc = puz->Unique(ze,sol);
   *er = puz->ermax;
   *ep = puz->epmax;
   *ed = puz->edmax;
   *aig = puz->stop_rating;
   delete puz;
   return  rc;
}

Hidden Text: Show
Code: Select all
int PUZZLE::Unique(char * ze,char * sol) {
   stop_rating = 0;
   cycle = assigned = c_ret = 0;
   ermax = epmax = edmax = 0;

   // final location for the normalized puzzle in a global variable
   for(int i = 0; i < 81; i++) //get normalised puzzle in puz
      if(ze[i] - '.')
         gg.pg[i] = ze[i];
      else gg.pg[i] = '0';

   // check if the puzzle is correct
   //(no duplicate givens in a house)
   // one solution and only one
      /*
   char puz_zero_based[81];
   char solutions[2][81];
   for(int i = 0; i < 81; i++) {
      puz_zero_based[i] = (ze[i] >= '1' && ze[i] <= '9') ? ze[i] - '0' : 0;
   }
   if(1 != fsss(puz_zero_based, 2, solutions[0])) { //zero or more than one solutions
        edmax=1;
      return 0;
   }
   */
   for(int i = 0; i < 81; i++) {
      solution[i] = sol[i];
   }

   /* the solution is stored in an appropriate form
    * 9 81 bitfield indicating for each digit the positions
    * to check later the validity of eliminations
    * this is a debugging control
    */
   //for(int i=0;i<9;i++)
   //   csol[i].SetAll_0();
   //for(int i=0;i<81;i++)
   //   csol[solution[i]-'1'].Set(i);


   //================== assign clues to start
   cInit(1);
   PKInit();
   //tdebut = GetTimeMillis();
   //long told = tdebut;
   T81->init();  //initial candidats au lieu de Traite_Init();
   for(int i = 0; i < 81; i++) { // first assignment from clues
      int w = gg.pg[i];
      if(w > '0' && w <= '9')
         T81->Fixer(w - '1', i, 2);
   }
   cReport(); // and preparing T81 from PM per digit

   EE.Enl(); // new line in case test is done

   //MD: non-minimals dump
//#define DUMP_NON_MINIMALS 97
   //output the non-assigned cells after latest step rated 9.7+
#ifdef DUMP_NON_MINIMALS
   //MD: non-minimals dump
   int nUnknowns = 81 - gg.NBlancs();
   int numCellSolvingSteps = 0;
   GG knownCellsStates[81-16];
   int knownCellsStateRating[81-16];
   knownCellsStateRating[0] = 0;
   knownCellsStates[0] = gg; //structure copy
#endif

   //===========================================================
   while (cycle++ < 150) {
      if(cycle > 148) {
         Seterr(7);
         break;
      } //
      if(stop_rating) {
         Seterr(5);
         break;
      }

      int ir_ed = is_ed_ep();
      if(ir_ed > 2)
         return ir_ed;//split filter
      if(ir_ed)
         return 0; // pure ed ep filter
      if(!Recale()) {
         Seterr(6);
         break;
      }
      //MD 22.5.2013 start
      //dump here cycle, difficulty, gg.pg
#ifdef DUMP_NON_MINIMALS
      int newUnknowns = gg.NBlancs();
      if(nUnknowns != newUnknowns) {
         //Some cells have been solved in the last cycle
         knownCellsStates[numCellSolvingSteps] = gg; //structure copy
         knownCellsStateRating[numCellSolvingSteps] = difficulty;
         numCellSolvingSteps++;
      }
      else {
         if(knownCellsStateRating[numCellSolvingSteps] < difficulty) {
            knownCellsStateRating[numCellSolvingSteps] = difficulty;
         }
      }
      //printf("%d\t%d\t%81.81s\n", cycle, difficulty, gg.pg); //debug
#endif
      //MD 22.5.2013 end
      if (assigned)
         break;
      if(!gg.NBlancs())
         break; // finished
      // processing 1.0 to <6.2
      int ir_a = Traite_u();   

      if(!ir_a)
         return rating_ir;
      else if(ir_a < 2)
         continue;
      //  start of processes using the tagging infrastructure.
      // the table of candidates is loaded once per cycle
      //++chainscnt;
      zpln.Init();  // table of candidates 
      if(stop_rating)
         break; // in case we would exceed the TCAND limit
      //=========================
      tchain.NewCycle();
      
      Step(AlignedPairExclusion);
      if(rating_ir > 1)
         return rating_ir;
      else if(rating_ir)
         continue;
      if(AlignedPairN()) {
         SetEr();
         continue;
      }  //6.2
      
      if ((ermax < 74)) { // skip that if high ER already reached
         Step(AIC_X_cycle);
         if(rating_ir > 1)
            return rating_ir;
         else if(rating_ir)
            continue;
         if(Rating_base_65()) {
            SetEr();
            continue;
         }  //6.5 and 6.6
         Step(AIC_XY);
         if(rating_ir > 1)
            return rating_ir;
         else if(rating_ir)
            continue;
         if(Rating_base_70()) {
            SetEr();
            continue;
         }  //70
      }
      else if ((ermax < 77)) { // just skip 6.5 6.6 as a first step
         if(options.ot)
            EE.Enl("go direct to XY");
         Step(AIC_XY);
         if(rating_ir > 1)
            return rating_ir;
         else if(rating_ir)
            continue;
         if(Rating_base_70()) {
            SetEr();
            continue;
         }  //70
      }      
      else {
         if(options.ot)
            EE.Enl("gofast");
         if(zcf.Fast_Aic_Chain())
            continue;
      }

      Step(AlignedTripletExclusion);
      if(rating_ir>1)
         return rating_ir;
      else if(rating_ir)
         continue;
      if(AlignedTripletN()) {
         SetEr();
         continue;
      }  //7.5 

      // at that point, we set to nill dynamic processing done
      // this is done once for all the cycle
      dynamic_form1.SetAll_0();
      for(int i=0;i<320;i++){
         dynamic_form2[i].SetAll_0();
         dynamic_sets[i].SetAll_0();
      }

      if(Rating_base_75()) { 
         SetEr();
         continue;
      }  //7.5
      if(options.oexclude - 1) {
         Step(MultipleForcingChain);
         if(rating_ir > 1)
            return rating_ir;
         else if(rating_ir)
            continue;
         if(Rating_base_80()) {
            SetEr();
            continue;
         }  //8.0

         if(options.oexclude - 2) {       
            Step(DynamicForcingChain);
            if(rating_ir>1)
               return rating_ir;
            else if(rating_ir)
               continue;
            if(Rating_base_85()) {
               SetEr();
               continue;
            }  //8.5

            if(options.oexclude - 3) {   
               Step(DynamicForcingChainPlus);
               if(rating_ir > 1)
                  return rating_ir;
               else if(rating_ir)
                  continue;
               if(Rating_base_90()) {
                  SetEr();
                  continue;
               }  //9.0

               if(options.oexclude - 4) {
                  InitNested();
                  Step(NestedForcingChain);
                  if(rating_ir>1)
                     return rating_ir;
                  else if(rating_ir)
                     continue;
                  if(Rating_baseNest(95, options.oq)) {
                     SetEr();
                     continue;
                  }  //9.5

                  if(options.oexclude - 5) {   
                     Step(NestedLevel3);
                     if(rating_ir>1)
                        return rating_ir;
                     else if(rating_ir)
                        continue;
                     if(Rating_baseNest(100, options.oq)) {
                        SetEr();
                        continue;
                     }  //100
                     if(options.oexclude - 6) {
                        Step(NestedLevel4);
                        if(rating_ir > 1)
                           return rating_ir;
                        else if(rating_ir)
                           continue;
                        if(Rating_baseNest(105, options.oq)) {
                           SetEr();
                           continue;
                        }  //105
                     }// end level4
                  }// end level 3 and more
               } // end level 2 and more
            } // end if >2
         } // end if >1
      } // end if oexclude
      if(Rating_end(200)) {
         SetEr();
         continue;
      } // clean the file
      if(options.ot)
         T81->Candidats();
      stop_rating=2;
      break;
   }     
   //=========================================================================   
   EE.E("fin traitement stop_rating=");
   EE.Enl(stop_rating );
   gg.Image(&EE, "fin");

#ifdef DUMP_NON_MINIMALS
   //MD
   //dump solved cells at "singles to the end" state
   for(int i = numCellSolvingSteps - 1; i >= 0; i--) {
      if(knownCellsStateRating[i] < DUMP_NON_MINIMALS) {
         continue;
      }
      printf("%81.81s\t%d\n", knownCellsStates[i].pg, knownCellsStateRating[i]);
      break;
   }
#endif

   return stop_rating;
}

Hidden Text: Show
Code: Select all
int PUZZLE::Traite_u() {
   if (Directs ()) {
      Step(LastCell);
      if(rating_ir > 1)
         return 0;
      else if(rating_ir)
         return 1;
      if(FaitDirects(LastCell)) {
         SetEr();
         return 1;
      }   //1.0

      Step(SingleBox);
      if(rating_ir > 1)
         return 0;
      else if(rating_ir)
         return 1;
      if(FaitDirects(SingleBox)) {
         SetEr();
         return 1;
      }  //1.2

      Step(Single_R_C);
      if(rating_ir > 1)
         return 0;
      else if(rating_ir)
         return 1;
      if(FaitDirects(Single_R_C)) {
         SetEr();
         return 1;
      }  //1.5
   }
   Actifs(); // update of active cells must be done from here

   Step(Single_after_Locked);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(TraiteLocked(Single_after_Locked)) {
      SetEr();
      return 1;
   }  //1.7

   Step(HiddenPair_single);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(yt.Tiroirs(2,1,1)) {
      SetEr();
      return 1;
   }  //2.0

   if(Directs()) {
     Step(NakedSingle);
     if(rating_ir > 1)
        return 0;
     else if(rating_ir)
        return 1;
      if(FaitDirects(NakedSingle)) {
         SetEr();
         return 1;
      }
   }  //2.3

    Step(HiddenTriplet_single);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(yt.Tiroirs(3,1,1)) {
      SetEr();
      return 1;
   }  //2.5

   Step(Locked_box);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(TraiteLocked(Locked_box)) {
      SetEr();
      return 1;
   }  //2.6

   Step(Locked_RC);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(TraiteLocked(Locked_RC)) {
      SetEr();
      return 1;
   }  //2.8

   Step(NakedPair);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(yt.Tiroirs(2,0,0)) {
      SetEr();
      return 1;
   }  //3.0

   Step(XWing);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(yt.XW(2)) {
      SetEr();
      return 1;
   }  //3.2

   Step(HiddenPair);
   if(rating_ir > 1)return 0;
   else if(rating_ir)
      return 1;
    if(yt.Tiroirs(2,1,0)) {
      SetEr();
      return 1;
   }  //3.4

   Step(Naked_triplet);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(yt.Tiroirs(3,0,0)) {
      SetEr();
      return 1;
   }  //3.6

   Step(swordfish);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(yt.XW(3)) {
      SetEr();
      return 1;
   }  //3.8

   Step(HiddenTriplet);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(yt.Tiroirs(3,1,0)) {
      SetEr();
      return 1;
   }  //4.0

    if(options.ot)
      T81->Candidats();

    Copie_T_c(); // to be done now copie for UR same rating
    zpaires.CreerTable(T81t); 

   Step(XYWing);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(zpaires.XYWing()) {
      SetEr();
      return 1;
   }  //4.2

   Step(XYZWing);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(zpaires.XYZWing()) {
      SetEr();
      return 1;
   }  //4.4

   /*
   Step(UniqueRect1);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
   if(T81->RIN()) {
      SetEr();
      return 1;
   }  //4.5

   Step(UniqueRect2);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(urt.Traite(46)) {
      SetEr();
      return 1;
   }  //4.6 t
    if(zpaires.UL()) {
      SetEr();
      return 1;
   }   

   Step(UniqueRect3);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(urt.Traite(47)) {
       SetEr();
       return 1;
    } //4.7
    if(tult.Traite(47)) {
       SetEr();
       return 1;
    }

   Step(UniqueLoop1);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
   if(urt.Traite(48)) {
      SetEr();
      return 1;
   } //4.7
   if(tult.Traite(48)) {
      SetEr();
      return 1;
   }  //4.8
                        
   Step(UniqueLoop2);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
   if(tult.Traite(49)) {
      SetEr();
      return 1;
   }  //4.9
   */
   Step(NakedQuad);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(tult.Traite(50)) {
      SetEr();
      return 1;
   }  //4.9
    if(yt.Tiroirs(4,0,0)) {
      SetEr();
      return 1;
   }  //5.0
/*
   Step(UniqueLoop3);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
   if(tult.Traite(51)) {
      SetEr();
      return 1;
   }  //5.1
 */
   Step(Jellyfish);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
   if(tult.Traite(52)) {
      SetEr();
      return 1;
   }  //5.2
    if(yt.XW(4)) {
      SetEr();
      return 1;
   }  //5.2

   Step(HiddenQuad);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(yt.Tiroirs(4,1,0)) {
      SetEr();
      return 1;
   }  //5.4
   /*
   Step(BUG);
   if(rating_ir > 1)
      return 0;
   else if(rating_ir)
      return 1;
    if(zpaires.BUG()) {
      SetEr();
      return 1;
   }  //5.6 a 5.8
   
   if(zpaires.aigun) {
      Step((SolvingTechnique)59);
      if(rating_ir > 1)
         return 0;
      else if(rating_ir)
         return 1;
      if(zpaires.Bug3a(59)) {
         SetEr();
         return 1;
      }  //5.9
      Step((SolvingTechnique)60);
      if(rating_ir > 1)
         return 0;
      else if(rating_ir)
         return 1;
      if(zpaires.Bug3a(60)) {
         SetEr();
         return 1;
      }  //6.0
      Step((SolvingTechnique)61);
      if(rating_ir > 1)
         return 0;
      else if(rating_ir)
         return 1;
      if(zpaires.Bug3a(61)) {
         SetEr();
         return 1;
      }  //6.1
   }*/
   return 2;
}
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Sat Jul 04, 2020 3:44 am

I have modified two codes, which will not crash now, but still can't rate some sukaku. I modified it based on tdillon's search results,87 clues sukaku.
Code: Select all
#define BFTAG_size 41            //yzf 2020/07/04   20-->41
#define BFTAG_BitSize 41*32     

Code: Select all
class BFTAG {
   bm128 ff[11];//2020/07/04 yzf ff[5]-->ff[11]
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby champagne » Sun Jul 05, 2020 6:35 am

yzfwsf wrote:Hi champagne:I use rateUnique to rate "Just One Cell" sudoku.Thank you so much.
Cause crash
Code: Select all
100000000007020000080000020400000000060000050000000200000800600005190003070000040

Not rated:
Code: Select all
000000900000600008006090000001800000000050070240000090000060000600000000000000100  skfr: 0
000007000000000100000050000050020008000001900800900040000090000003004000000600300  skfr: 0


[hidden][code]


Hi yzfwsf,

late answer to your post;
a) skfr does not rate puzzles with multiple solutions. skfr does not rate the first puzzle
b) As a consequence, skfr does not rate puzzles with less than 17 clues, all of them have multiple solutions.

You are using the DLL for puzzles passing these limits, this is the source of the crash.
As you found the appropriate action, I have nothing more to say

The dll could likely process puzzles with 16 clues if you bypass the control, but then, you could have to increase the size of other tables.
champagne
2017 Supporter
 
Posts: 7455
Joined: 02 August 2007
Location: France Brittany

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Sun Jul 05, 2020 8:43 am

Hi champagne:Thank you.
Would you please try tdillon's famous 87 sukaku.
Code: Select all
1.3.5.7.91234567891234567891234567891.3.5.78.1.3.567891.34567..123.56789123456789..345.7.9123456..9.234567891234567.9123456789..345...9123456789.2345.7.912345.7891234567891..4.6..9.2.4.6.8912.456.89123456789.23456789123456.8.12345678912.4.678.12345678912.456.89.2.456.89123456789123456789..34567.9..34567.9.23...789123456789123.5678912...6...12.456.8912.45...91234567891.3456.891234.6.89123.5678912...6789123.5.78.12345678912345678912345.78912345678.1234567891234.6789..3....89123...7891.34567..12345678912345678912345678912345678.1.345678....456...1234567891...5678.12345678912.4.6.89.2.4.6.89.2.4...891234..78912345678912345678912345678912.456789123.567891234.6789.234.678912345.789123...78.123456789..345678..23.56789123456789


I have modified the capacity of the relevant tables and used the method of passing in the final solution to avoid the problem that fsolve cannot deal with sukaku.
I use NestedLevel5, but It still doesn't get a score. No crash.
yzfwsf
 
Posts: 905
Joined: 16 April 2019

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby dobrichev » Wed Jul 08, 2020 5:08 pm

Hi yzfwsf,

As Champagne already mentioned, skfr isn't designed for pencilmark-only puzzles.
In addition to capacity modification of the relevant tables, new resolving methods must be implemented for puzzles harder than the hardest known vanilla.
I tried this puzzle by tdillon trough the modified sudoku explainer and it was unable to resolve it. Being extended to deeper nesting up to some degree.

This isn't the best thread for puzzle analysis, but I found this puzzle has nearly perfect balance in the templates survived after direct eliminations from the given pencilmarks.
A template is one of the 46656 valid configurations for digit 1 in the solution grid. Any solution is union of 9 such templates.
The templates distribution for this puzzle is (digit, #templates)
Code: Select all
7   2421
4   2520
3   2592
5   2700
1   3016
2   3530
6   4772
9   4840
8   6204


BTW
I have modified two codes, which will not crash now, but still can't rate some sukaku.

isn't clear to me. Does the function take infinite time, or soon it returns rating of 20.0 which means "this puzzle is behind my capacity"?
dobrichev
2016 Supporter
 
Posts: 1863
Joined: 24 May 2010

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby m_b_metcalf » Wed Jul 08, 2020 5:44 pm

My solver finds the solution to tdillon's sukaku in 0.45s, but has never completed the proof of uniquness.

Mike

Hidden Text: Show
Code: Select all
  1  2  3  4  5  6  7  8  9
  4  5  6  7  8  9  1  2  3
  7  9  8  1  3  2  5  4  6
  2  1  5  8  9  3  6  7  4
  3  6  4  2  7  1  9  5  8
  8  7  9  5  6  4  2  3  1
  5  3  1  6  2  8  4  9  7
  6  8  2  9  4  7  3  1  5
  9  4  7  3  1  5  8  6  2
User avatar
m_b_metcalf
2017 Supporter
 
Posts: 13622
Joined: 15 May 2006
Location: Berlin

Re: projects skfr-fast-rating and sudoku-multi-purpose-progr

Postby yzfwsf » Wed Jul 08, 2020 11:34 pm

Hi dobrichev:
isn't clear to me. Does the function take infinite time, or soon it returns rating of 20.0 which means "this puzzle is behind my capacity"?

After 30 ~ 40 seconds, skfr returned the score of ER/ EP / ED 0 / 0 /. 5. But most of the sukakus that are too difficult will be rated 0/0/0.
yzfwsf
 
Posts: 905
Joined: 16 April 2019

PreviousNext

Return to Software