Welcome Guest
Log In | Register )
You last visited December 10, 2016, 9:06 pm
All times shown are
Eastern Time (GMT-5:00)

P4 Pair Predictor

Topic closed. 7 replies. Last post 7 years ago by RJOh.

Page 1 of 1
PrintE-mailLink
Avatar

United States
Member #7437
October 3, 2004
383 Posts
Offline
Posted: July 28, 2009, 12:08 pm - IP Logged

I just finished testing a P4 pair predictor, which predicts which pairs to play over the next five days, and it seems to do pretty well. It's based on the abscence of certain triples over the last N draws, where N is determined by the system. Without going into the mechanics of the system, below the asterisks you'll find the C code to compile and create the executable program. The program, p4PairPredictor.exe, displays the results of the analysis on the monitor, and prints out the same text to a file, after you exit the program. The output file is called out.txt. Here are the instructions you need to create the executable code:

1. Below the asterisks you'll find the C code. Copy and paste all of the lines of code to your text editor and save in a working directory as p4PairPredictor.c

2. Run you C compiler on p4PairPredictor.c

3. Prepare a drawfile with at least 50 past draws from the P4 you are playing. Latest draw on top, oldest draw on bottom. One entry per line. No spaces or other characters.

4. Click on the icon p4PairPredictor.exe

    Avatar

    United States
    Member #7437
    October 3, 2004
    383 Posts
    Offline
    Posted: July 28, 2009, 12:34 pm - IP Logged

    Hi:

     

    Not sure what happened, but somehow I got cutoff from editing the original post. So here we go again with everthing that should have been in the above post:

     

    I just finished testing a P4 pair predictor, which predicts whichpairs to play over the next five days, and it seems to do pretty well.It's based on the abscence of certain triples over the last N draws,where N is determined by the system. Without going into the mechanicsof the system, below the asterisks you'll find the C code to compileand create the executable program. The program, p4PairPredictor.exe,displays the results of the analysis on the monitor, and prints out thesame text to a file, after you exit the program. The output file iscalled out.txt. Here are the instructions you need to create the executable code:

    1. Below the asterisks you'll find the C code. Copy and paste all ofthe lines of code to your text editor and save in a working directoryas p4PairPredictor.c

    2. Run you C compiler on p4PairPredictor.c

    3. Prepare a drawfile with at least 50 past draws from the P4 youare playing. Latest draw on top, oldest draw on bottom. One entry perline. No spaces or other characters. Call the draw file drawsP4.txt

    4. Click on the icon p4PairPredictor.exe and you'll see the results on your monitor. After you exit the program, by entering any key, you can open the file out.txt to view the results again.

     

    Let's have a look at a few results of the testing

    Illinois Daily 4 07/22/09 and back

    The output for p4PairPredictor was :

    Pairs to play are:
    23-28-29-38-39-89

    The results over the next five days were:

    6409-3003-9782-0147-0330

     

    Georgia Cash 4 07/22/09 and back

    The output for p4PairPredictor was :

    Pairs to play are:
    12-17-18-27-28-78

    The results over the next five days were:

    2935-9291-7413-7085-6704


    Massachusetts Numbers 07/22/09 and back

    The output for p4PairPredictor was :

    Pairs to play are:
    23-28-29-38-39-89

    The results over the next five days were:

    3517-8137-7048-4155-6761

     

    Please send your feedback.

     

    jayemmar

    ***********************************************************

    #include <math.h>
    #include <stdlib.h>
    #include <stdio.h>

    int main()
    {

    FILE *in, *out;
    int i, j, k, temp, temp1, temp2, temp3, temp4, a, a1, a2, a3, a4;
    int arrayOf4[25] =
    {123,134,145,156,167,178,189,1234,1245,1256,1267,1278,1289,
     2345,2356,2367,2378,2389,3456,3467,3489,4567,5678,5689,6789};

    int inArray[100], matchArray1[10], matchArray2[10], found = 0, possible;
    int numCount, score;


       /*
       ** Open
       */
        if((in = fopen("drawsP4.txt", "r")) == NULL)
        {
           printf("could not open drawsP4.txt\n");
           getch();
           exit(0);
        }

        if((out = fopen("out.txt", "w")) == NULL)
        {
           printf("could not open out.txt\n");
           getch();
           exit(0);
        }
        /*
        ** Start scanning
        */


         i = 0;
         while(!feof(in) && i < 50)
         {
              fscanf(in, "%d", (inArray + i));
              i++;  
         }

         numCount = i;
         printf("Pairs to play are:\n");
         fprintf(out, "Pairs to play are:\n");

    start:

         for(i = 0; i < 25; i++)
         {
              possible = 0;
              score = 0;
              temp = arrayOf4[i];
              temp1 = temp/1000;
              temp2 = (temp - 1000*temp1)/100;
              temp3 = (temp - 1000*temp1 - 100*temp2)/10;
              temp4 = (temp - 1000*temp1 - 100*temp2 - 10*temp3);


              j = 0;
              for(j = 0; j < numCount; j++)
              {
                   for( k = 0; k < 10; k++)
                   {
                       matchArray1[k] = 0;
                       matchArray2[k] = 0;
                   }
                   
                   a = inArray[j];   
                   a1 = a/1000;
                   a2 = (a - 1000*a1)/100;
                   a3 = (a - 1000*a1 - 100*a2)/10;
                   a4 = (a - 1000*a1 - 100*a2 - 10*a3);
                   
                   matchArray1[temp1] = 1;
                   matchArray1[temp2] = 1;
                   matchArray1[temp3] = 1;
                   matchArray1[temp4] = 1;
                   

                   matchArray1[a1]++;
                   matchArray1[a2]++;
                   matchArray1[a3]++;
                   matchArray1[a4]++;
                   
                   score = 0;
                   for(k = 0; k < 10; k++)
                   {
                      if(matchArray1[k] == 2)
                      {
                         score = score + 1;
                      }   
                         
                   }
                   
                   if(score < 3 )
                   {
                      possible++;     
                   }
                   
                   
              }
             
              if(possible == numCount)
              {
                    printf("%d%d-", temp1,temp2);
                    printf("%d%d-", temp1,temp3);
                    printf("%d%d-", temp1,temp4);
                    printf("%d%d-", temp2,temp3);
                    printf("%d%d-", temp2,temp4);
                    printf("%d%d\n", temp3,temp4);
                   
                    fprintf(out, "%d%d-%d%d-%d%d-%d%d-%d%d-%d%d\n",
                            temp1, temp2, temp1, temp3, temp1, temp4,
                            temp2, temp3, temp2, temp4, temp3, temp4);     

                 found = 1;
              }       

         }   
         
         if(found == 0)
         {
            numCount = numCount - 1;
            goto start;     
                     
         }
         
         printf("Enter any key to continue\n", numCount);
         getch();
         
         

         close(in);
         close(out);

    }

      Raven62's avatar - binary
      New Jersey
      United States
      Member #17843
      June 28, 2005
      49835 Posts
      Offline
      Posted: July 28, 2009, 12:44 pm - IP Logged

      I just finished testing a P4 pair predictor, which predicts which pairs to play over the next five days, and it seems to do pretty well. It's based on the abscence of certain triples over the last N draws, where N is determined by the system. Without going into the mechanics of the system, below the asterisks you'll find the C code to compile and create the executable program. The program, p4PairPredictor.exe, displays the results of the analysis on the monitor, and prints out the same text to a file, after you exit the program. The output file is called out.txt. Here are the instructions you need to create the executable code:

      1. Below the asterisks you'll find the C code. Copy and paste all of the lines of code to your text editor and save in a working directory as p4PairPredictor.c

      2. Run you C compiler on p4PairPredictor.c

      3. Prepare a drawfile with at least 50 past draws from the P4 you are playing. Latest draw on top, oldest draw on bottom. One entry per line. No spaces or other characters.

      4. Click on the icon p4PairPredictor.exe

      Clicked on: p4PairPredictor.exe, but it didn't download?

      A mind once stretched by a new idea never returns to its original dimensions!

        Avatar

        United States
        Member #7437
        October 3, 2004
        383 Posts
        Offline
        Posted: July 28, 2009, 12:53 pm - IP Logged

        Clicked on: p4PairPredictor.exe, but it didn't download?

        Hi Raven:

         

        When the program is compiled in your working directory, the compiler creates the executable p4PairPredictor.exe. Did you run the C compiler on the file: p4PairPredictor.c ?

         

        jayemmar

          Raven62's avatar - binary
          New Jersey
          United States
          Member #17843
          June 28, 2005
          49835 Posts
          Offline
          Posted: July 28, 2009, 1:00 pm - IP Logged

          Hi Raven:

           

          When the program is compiled in your working directory, the compiler creates the executable p4PairPredictor.exe. Did you run the C compiler on the file: p4PairPredictor.c ?

           

          jayemmar

          Not everyone has a C-Compiler! Thud

          A mind once stretched by a new idea never returns to its original dimensions!

            Avatar

            United States
            Member #7437
            October 3, 2004
            383 Posts
            Offline
            Posted: July 28, 2009, 1:02 pm - IP Logged

            I'd like to PM you, please clean up your mail box.

             

            jayemmar

              LANTERN's avatar - kilroy 28_173_reasonably_small.jpg
              Tx
              United States
              Member #4570
              May 4, 2004
              5180 Posts
              Offline
              Posted: July 28, 2009, 1:59 pm - IP Logged

              I just finished testing a P4 pair predictor, which predicts which pairs to play over the next five days, and it seems to do pretty well. It's based on the abscence of certain triples over the last N draws, where N is determined by the system. Without going into the mechanics of the system, below the asterisks you'll find the C code to compile and create the executable program. The program, p4PairPredictor.exe, displays the results of the analysis on the monitor, and prints out the same text to a file, after you exit the program. The output file is called out.txt. Here are the instructions you need to create the executable code:

              1. Below the asterisks you'll find the C code. Copy and paste all of the lines of code to your text editor and save in a working directory as p4PairPredictor.c

              2. Run you C compiler on p4PairPredictor.c

              3. Prepare a drawfile with at least 50 past draws from the P4 you are playing. Latest draw on top, oldest draw on bottom. One entry per line. No spaces or other characters.

              4. Click on the icon p4PairPredictor.exe

              It might just be best for most people if you compile the program yourself and then post a download link to it, as on the Web there are plenty of free file hosting sites.

              Thanks.

              BibleOnline  ParishesOnline  ChristianRadioOnline   MassOnline   Mass

              "Ten measures of beauty descended to the world, nine were taken by Jerusalem."

                RJOh's avatar - chipmunk
                mid-Ohio
                United States
                Member #9
                March 24, 2001
                19831 Posts
                Offline
                Posted: July 28, 2009, 2:19 pm - IP Logged

                It might just be best for most people if you compile the program yourself and then post a download link to it, as on the Web there are plenty of free file hosting sites.

                Thanks.

                I think jayemmar is trying to get more members into programming, they'll never learn if he does it for them and all they have to do it download the compiled program.

                 * you don't need to buy more tickets, just buy a winning ticket * 
                   
                             Evil Looking