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);
}