SUPER LOTTO

IL VALORE MEDIO O MEDIOVALORE FABARRI

« Older   Newer »
  Share  
CAT_IMG Posted on 29/1/2018, 18:03

Group:
Administrator
Posts:
8,316
Location:
Pescara

Status:


IL VALORE MEDIO O MEDIOVALORE

Per questo metodo per ogni estrazione ho fatto una sola ricerca, praticamente lo script appena trovata una combinazione valida, passa ad un altra estrazione, senza andare a cercare nelle altre ruote altre possibili combinazioni, perchč se vado a cercare nelle altre ruote mi vengono fuori un mucchio di doppioni.

Quindi per ogni estrazione solo 2 ruote consecutive, la prima coppia che trova con le caratteristiche del sistema.

Ho fatto 2 script, il primo calcola il valore medio di un estratto per eccesso o per difetto, poi siccome ad un certo punto, nell'articolo l'autore dice che bisogna inoltre attenersi possibilmente a valori precisi, allora nell'altro script ho ottenuto il valore medio, solo da somme con finale zero in modo che non ci siano decimali.



Script con valore medio arrotondato per eccesso e per difetto

'PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI
'SCRIPT BY SALVO50
'Valore medio per eccesso o per difetto
Option Explicit
Sub Main
Dim fin,es,esq,clp,col,esqcol,ess,ess7,es1
Dim posta(1),ruote(2),ambata(1)
Dim r1,r2,p1,casi,Xnum,num,ok,numb,x
Dim estra,estrb,estrc,estrd,somma1,somma2,somma3
fin = EstrazioneFin
esq = InputBox("Inserisci l'estrazione che vuoi iniziare",,9000)
clp = InputBox("Per quanti colpi vuoi giocare l'ambata?",,7)
col = CInt(InputBox(" Quante estrazioni vuoi controllare ",,380))
posta(1) = 1
esqcol = esq + col
If esqcol > fin Then esqcol =(fin - 1)
For es = esq To esqcol
Messaggio es
AvanzamentoElab esq,esqcol,es
ok = 0
es1 = es + 1
ess7 = es + 7
If ess7 > fin Then ess7 = fin
For ess = es1 To ess7
For r1 = 1 To 9
r2 = r1 + 1
somma1 = SommaEstratti(es,r1)
somma2 = SommaEstratti(es,r2)
somma3 = somma1 + somma2
Xnum =(somma3 \ 10)
x = ModX(somma3,10)
If x > 4 Then Xnum = Xnum + 1
For p1 = 1 To 5
estra = Estratto(es,r1,p1)
estrb = Estratto(es,r2,p1)
estrc = Estratto(ess,r1,p1)
estrd = Estratto(ess,r2,p1)
If estra = Xnum Or estrb = Xnum Or estrc = Xnum Or estrd = Xnum Then ok = 1
If ok = 1 Then Exit For
Next
If ok = 1 Then
num =(91 - Xnum)
If num <> estra And num <> estrb And num <> estrc And num <> estrd Then
casi = casi + 1
ColoreTesto 1
Scrivi String(96,"o") & " Casi " & FormattaStringa(casi,"0000")
ColoreTesto 0
Scrivi(" Estrazione n." & Format2(es) & " del " & DataEstrazione(es)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(es,r1) & " Somma Estratti = " & FormattaStringa(somma1,"000"),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(es,r2) & " Somma Estratti = " & FormattaStringa(somma2,"000"),2
Scrivi Space(53) & " Somma Totale = " & FormattaStringa(somma3,"000"),2
Scrivi Space(53) & " Valore Medio = " & Format2(Xnum),2
Scrivi Space(53) & " Integrativo = " & Format2(num),2
Scrivi
If estrc = Xnum Or estrd = Xnum Then
Scrivi(" Estrazione n." & Format2(ess) & " del " & DataEstrazione(ess)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(ess,r1),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(ess,r2),2
Scrivi
End If
ruote(1) = r1
ruote(2) = r2
ambata(1) = num
ImpostaGiocata 1,ambata,ruote,posta,clp,1
If estra = Xnum Or estrb = Xnum Then ess = ess - 1
Gioca ess
End If
End If
If ok = 1 Then Exit For
Next
If ok = 1 Then Exit For
Next
Next
ScriviResoconto
Scrivi Space(50) & "PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI"
Scrivi Space(50) & "SCRIPT - BY SALVO50"
End Sub
Function ModX(n,m)
ModX = n -(Fix(n/m) * m)
End Function

Script con valore medio esatto


'PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI
'SCRIPT BY SALVO50
'valore medio da somma zerata
Option Explicit
Sub Main
Dim fin,es,esq,clp,col,esqcol,ess,ess7,es1
Dim posta(1),ruote(2),ambata(1)
Dim r1,r2,p1,casi,Xnum,num,ok,numb,x
Dim estra,estrb,estrc,estrd,somma1,somma2,somma3
fin = EstrazioneFin
esq = InputBox("Inserisci l'estrazione che vuoi iniziare",,9000)
clp = InputBox("Per quanti colpi vuoi giocare l'ambata?",,7)
col = CInt(InputBox(" Quante estrazioni vuoi controllare ",,380))
posta(1) = 1
esqcol = esq + col
If esqcol > fin Then esqcol =(fin - 1)
For es = esq To esqcol
Messaggio es
AvanzamentoElab esq,esqcol,es
ok = 0
es1 = es + 1
ess7 = es + 7
If ess7 > fin Then ess7 = fin
For ess = es1 To ess7
For r1 = 1 To 9
r2 = r1 + 1
somma1 = SommaEstratti(es,r1)
somma2 = SommaEstratti(es,r2)
somma3 = somma1 + somma2
Xnum =(somma3 / 10)
For p1 = 1 To 5
estra = Estratto(es,r1,p1)
estrb = Estratto(es,r2,p1)
estrc = Estratto(ess,r1,p1)
estrd = Estratto(ess,r2,p1)
If estra = Xnum Or estrb = Xnum Or estrc = Xnum Or estrd = Xnum Then ok = 1
If ok = 1 Then Exit For
Next
If ok = 1 Then
num =(91 - Xnum)
If num <> estra And num <> estrb And num <> estrc And num <> estrd Then
casi = casi + 1
ColoreTesto 1
Scrivi String(96,"o") & " Casi " & FormattaStringa(casi,"0000")
ColoreTesto 0
Scrivi(" Estrazione n." & Format2(es) & " del " & DataEstrazione(es) & " " & SiglaRuota(r1)),0,0
Scrivi " " & StringaEstratti(es,r1) & " Somma Estratti = " & FormattaStringa(somma1,"000"),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(es,r2) & " Somma Estratti = ",0,0
Scrivi FormattaStringa(somma2,"000"),2
Scrivi Space(53) & " Somma Totale = " & FormattaStringa(somma3,"000"),2
Scrivi Space(53) & " Valore Medio = " & Format2(Xnum),2
Scrivi Space(53) & " Integrativo = " & Format2(num),2
Scrivi
If estrc = Xnum Or estrd = Xnum Then
Scrivi(" Estrazione n." & Format2(ess) & " del " & DataEstrazione(ess)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(ess,r1),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(ess,r2),2
Scrivi
End If
ruote(1) = r1
ruote(2) = r2
ambata(1) = num
ImpostaGiocata 1,ambata,ruote,posta,clp,1
If estra = Xnum Or estrb = Xnum Then ess = ess - 1
Gioca ess
End If
End If
If ok = 1 Then Exit For
Next
If ok = 1 Then Exit For
Next
Next
ScriviResoconto
Scrivi Space(50) & "PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI"
Scrivi Space(50) & "SCRIPT - BY SALVO50"
End Sub


Script con mediovalore esatto ed anche per eccesso e difetto con la ricerca di pił coppie per estrazione

'PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI
'SCRIPT BY SALVO50
Option Explicit
Sub Main
Dim fin,es,esq,clp,col,esqcol,ess,ess7,es1
Dim posta(1),ruote(2),ambata(1)
Dim r1,r2,p1,casi,Xnum,num,ok,numb,x,caso
Dim estra,estrb,estrc,estrd,somma1,somma2,somma3
fin = EstrazioneFin
esq = InputBox("Inserisci l'estrazione che vuoi iniziare",,9300)
clp = InputBox("Per quanti colpi vuoi giocare l'ambata?",,7)
col = CInt(InputBox(" Quante estrazioni vuoi controllare ",,100))
posta(1) = 1
esqcol = esq + col
If esqcol > fin Then esqcol =(fin - 1)
For es = esq To esqcol
Messaggio es
AvanzamentoElab esq,esqcol,es
caso = 0
es1 = es + 1
ess7 = es + 7
If ess7 > fin Then ess7 = fin
For ess = es1 To ess7
For r1 = 1 To 9
r2 = r1 + 1
somma1 = SommaEstratti(es,r1)
somma2 = SommaEstratti(es,r2)
somma3 = somma1 + somma2
Xnum =(somma3 \ 10)
x = ModX(somma3,10)
If x > 4 Then Xnum = Xnum + 1
For p1 = 1 To 5
ok = 0
estra = Estratto(es,r1,p1)
estrb = Estratto(es,r2,p1)
estrc = Estratto(ess,r1,p1)
estrd = Estratto(ess,r2,p1)
If estra = Xnum Or estrb = Xnum Or estrc = Xnum Or estrd = Xnum Then
num =(91 - Xnum)
If num <> estra And num <> estrb And num <> estrc And num <> estrd Then
casi = casi + 1
caso = caso + 1
ColoreTesto 1
Scrivi String(89,"o") & " Casi Totali " & FormattaStringa(casi,"0000")
ColoreTesto 2
Scrivi String(80,"o") & " Estrazione " &(es) & " caso " & FormattaStringa(caso,"0000")
ColoreTesto 0
Scrivi(" Estrazione n." & Format2(es) & " del " & DataEstrazione(es)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(es,r1) & " Somma Estratti = " & FormattaStringa(somma1,"000"),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(es,r2) & " Somma Estratti = " & FormattaStringa(somma2,"000"),2
Scrivi Space(53) & " Somma Totale = " & FormattaStringa(somma3,"000"),2
Scrivi Space(53) & " Valore Medio = " & Format2(Xnum),2
Scrivi Space(53) & " Integrativo = " & Format2(num),2
Scrivi
If estrc = Xnum Or estrd = Xnum Then
Scrivi(" Estrazione n." & Format2(ess) & " del " & DataEstrazione(ess)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(ess,r1),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(ess,r2),2
Scrivi
End If
ruote(1) = r1
ruote(2) = r2
ambata(1) = num
ImpostaGiocata 1,ambata,ruote,posta,clp,1
If estra = Xnum Or estrb = Xnum Then
Gioca es
Else
Gioca ess
End If
End If
End If
ok = 1
Next
Next
If ok = 1 Then Exit For
Next
Next
ScriviResoconto
Scrivi Space(50) & "PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI"
Scrivi Space(50) & "SCRIPT - BY SALVO50"
End Sub
Function ModX(n,m)
ModX = n -(Fix(n/m) * m)
End Function
 
Web  Contacts  Top
CAT_IMG Posted on 29/1/2018, 19:53
Avatar

Group:
Utente
Posts:
3,010
Location:
avellino

Status:


CITAZIONE (pigreko73.. @ 29/1/2018, 18:03) 
IL VALORE MEDIO O MEDIOVALORE

Per questo metodo per ogni estrazione ho fatto una sola ricerca, praticamente lo script appena trovata una combinazione valida, passa ad un altra estrazione, senza andare a cercare nelle altre ruote altre possibili combinazioni, perchč se vado a cercare nelle altre ruote mi vengono fuori un mucchio di doppioni.

Quindi per ogni estrazione solo 2 ruote consecutive, la prima coppia che trova con le caratteristiche del sistema.

Ho fatto 2 script, il primo calcola il valore medio di un estratto per eccesso o per difetto, poi siccome ad un certo punto, nell'articolo l'autore dice che bisogna inoltre attenersi possibilmente a valori precisi, allora nell'altro script ho ottenuto il valore medio, solo da somme con finale zero in modo che non ci siano decimali.



Script con valore medio arrotondato per eccesso e per difetto

'PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI
'SCRIPT BY SALVO50
'Valore medio per eccesso o per difetto
Option Explicit
Sub Main
Dim fin,es,esq,clp,col,esqcol,ess,ess7,es1
Dim posta(1),ruote(2),ambata(1)
Dim r1,r2,p1,casi,Xnum,num,ok,numb,x
Dim estra,estrb,estrc,estrd,somma1,somma2,somma3
fin = EstrazioneFin
esq = InputBox("Inserisci l'estrazione che vuoi iniziare",,9350)
clp = InputBox("Per quanti colpi vuoi giocare l'ambata?",,7)
col = CInt(InputBox(" Quante estrazioni vuoi controllare ",,fin))
posta(1) = 1
esqcol = esq + col
If esqcol > fin Then esqcol =(fin - 1)
For es = esq To esqcol
Messaggio es
AvanzamentoElab esq,esqcol,es
ok = 0
es1 = es + 1
ess7 = es + 7
If ess7 > fin Then ess7 = fin
For ess = es1 To ess7
For r1 = 1 To 9
r2 = r1 + 1
somma1 = SommaEstratti(es,r1)
somma2 = SommaEstratti(es,r2)
somma3 = somma1 + somma2
Xnum =(somma3 \ 10)
x = ModX(somma3,10)
If x > 4 Then Xnum = Xnum + 1
For p1 = 1 To 5
estra = Estratto(es,r1,p1)
estrb = Estratto(es,r2,p1)
estrc = Estratto(ess,r1,p1)
estrd = Estratto(ess,r2,p1)
If estra = Xnum Or estrb = Xnum Or estrc = Xnum Or estrd = Xnum Then ok = 1
If ok = 1 Then Exit For
Next
If ok = 1 Then
num =(91 - Xnum)
If num <> estra And num <> estrb And num <> estrc And num <> estrd Then
casi = casi + 1
ColoreTesto 1
Scrivi String(96,"o") & " Casi " & FormattaStringa(casi,"0000")
ColoreTesto 0
Scrivi(" Estrazione n." & Format2(es) & " del " & DataEstrazione(es)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(es,r1) & " Somma Estratti = " & FormattaStringa(somma1,"000"),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(es,r2) & " Somma Estratti = " & FormattaStringa(somma2,"000"),2
Scrivi Space(53) & " Somma Totale = " & FormattaStringa(somma3,"000"),2
Scrivi Space(53) & " Valore Medio = " & Format2(Xnum),2
Scrivi Space(53) & " Integrativo = " & Format2(num),2
Scrivi
If estrc = Xnum Or estrd = Xnum Then
Scrivi(" Estrazione n." & Format2(ess) & " del " & DataEstrazione(ess)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(ess,r1),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(ess,r2),2
Scrivi
End If
ruote(1) = r1
ruote(2) = r2
ambata(1) = num
ImpostaGiocata 1,ambata,ruote,posta,clp,1
If estra = Xnum Or estrb = Xnum Then ess = ess - 1
Gioca ess
End If
End If
If ok = 1 Then Exit For
Next
If ok = 1 Then Exit For
Next
Next
ScriviResoconto
Scrivi Space(50) & "PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI"
Scrivi Space(50) & "SCRIPT - BY SALVO50"
End Sub
Function ModX(n,m)
ModX = n -(Fix(n/m) * m)
End Function

Script con valore medio esatto


'PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI
'SCRIPT BY SALVO50
'valore medio da somma zerata
Option Explicit
Sub Main
Dim fin,es,esq,clp,col,esqcol,ess,ess7,es1
Dim posta(1),ruote(2),ambata(1)
Dim r1,r2,p1,casi,Xnum,num,ok,numb,x
Dim estra,estrb,estrc,estrd,somma1,somma2,somma3
fin = EstrazioneFin
esq = InputBox("Inserisci l'estrazione che vuoi iniziare",,9350)
clp = InputBox("Per quanti colpi vuoi giocare l'ambata?",,7)
col = CInt(InputBox(" Quante estrazioni vuoi controllare ",,fin))
posta(1) = 1
esqcol = esq + col
If esqcol > fin Then esqcol =(fin - 1)
For es = esq To esqcol
Messaggio es
AvanzamentoElab esq,esqcol,es
ok = 0
es1 = es + 1
ess7 = es + 7
If ess7 > fin Then ess7 = fin
For ess = es1 To ess7
For r1 = 1 To 9
r2 = r1 + 1
somma1 = SommaEstratti(es,r1)
somma2 = SommaEstratti(es,r2)
somma3 = somma1 + somma2
Xnum =(somma3 / 10)
For p1 = 1 To 5
estra = Estratto(es,r1,p1)
estrb = Estratto(es,r2,p1)
estrc = Estratto(ess,r1,p1)
estrd = Estratto(ess,r2,p1)
If estra = Xnum Or estrb = Xnum Or estrc = Xnum Or estrd = Xnum Then ok = 1
If ok = 1 Then Exit For
Next
If ok = 1 Then
num =(91 - Xnum)
If num <> estra And num <> estrb And num <> estrc And num <> estrd Then
casi = casi + 1
ColoreTesto 1
Scrivi String(96,"o") & " Casi " & FormattaStringa(casi,"0000")
ColoreTesto 0
Scrivi(" Estrazione n." & Format2(es) & " del " & DataEstrazione(es) & " " & SiglaRuota(r1)),0,0
Scrivi " " & StringaEstratti(es,r1) & " Somma Estratti = " & FormattaStringa(somma1,"000"),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(es,r2) & " Somma Estratti = ",0,0
Scrivi FormattaStringa(somma2,"000"),2
Scrivi Space(53) & " Somma Totale = " & FormattaStringa(somma3,"000"),2
Scrivi Space(53) & " Valore Medio = " & Format2(Xnum),2
Scrivi Space(53) & " Integrativo = " & Format2(num),2
Scrivi
If estrc = Xnum Or estrd = Xnum Then
Scrivi(" Estrazione n." & Format2(ess) & " del " & DataEstrazione(ess)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(ess,r1),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(ess,r2),2
Scrivi
End If
ruote(1) = r1
ruote(2) = r2
ambata(1) = num
ImpostaGiocata 1,ambata,ruote,posta,clp,1
If estra = Xnum Or estrb = Xnum Then ess = ess - 1
Gioca ess
End If
End If
If ok = 1 Then Exit For
Next
If ok = 1 Then Exit For
Next
Next
ScriviResoconto
Scrivi Space(50) & "PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI"
Scrivi Space(50) & "SCRIPT - BY SALVO50"
End Sub


Script con mediovalore esatto ed anche per eccesso e difetto con la ricerca di pił coppie per estrazione

'PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI
'SCRIPT BY SALVO50
Option Explicit
Sub Main
Dim fin,es,esq,clp,col,esqcol,ess,ess7,es1
Dim posta(1),ruote(2),ambata(1)
Dim r1,r2,p1,casi,Xnum,num,ok,numb,x,caso
Dim estra,estrb,estrc,estrd,somma1,somma2,somma3
fin = EstrazioneFin
esq = InputBox("Inserisci l'estrazione che vuoi iniziare",,9350)
clp = InputBox("Per quanti colpi vuoi giocare l'ambata?",,7)
col = CInt(InputBox(" Quante estrazioni vuoi controllare ",,fin))
posta(1) = 1
esqcol = esq + col
If esqcol > fin Then esqcol =(fin - 1)
For es = esq To esqcol
Messaggio es
AvanzamentoElab esq,esqcol,es
caso = 0
es1 = es + 1
ess7 = es + 7
If ess7 > fin Then ess7 = fin
For ess = es1 To ess7
For r1 = 1 To 9
r2 = r1 + 1
somma1 = SommaEstratti(es,r1)
somma2 = SommaEstratti(es,r2)
somma3 = somma1 + somma2
Xnum =(somma3 \ 10)
x = ModX(somma3,10)
If x > 4 Then Xnum = Xnum + 1
For p1 = 1 To 5
ok = 0
estra = Estratto(es,r1,p1)
estrb = Estratto(es,r2,p1)
estrc = Estratto(ess,r1,p1)
estrd = Estratto(ess,r2,p1)
If estra = Xnum Or estrb = Xnum Or estrc = Xnum Or estrd = Xnum Then
num =(91 - Xnum)
If num <> estra And num <> estrb And num <> estrc And num <> estrd Then
casi = casi + 1
caso = caso + 1
ColoreTesto 1
Scrivi String(89,"o") & " Casi Totali " & FormattaStringa(casi,"0000")
ColoreTesto 2
Scrivi String(80,"o") & " Estrazione " &(es) & " caso " & FormattaStringa(caso,"0000")
ColoreTesto 0
Scrivi(" Estrazione n." & Format2(es) & " del " & DataEstrazione(es)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(es,r1) & " Somma Estratti = " & FormattaStringa(somma1,"000"),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(es,r2) & " Somma Estratti = " & FormattaStringa(somma2,"000"),2
Scrivi Space(53) & " Somma Totale = " & FormattaStringa(somma3,"000"),2
Scrivi Space(53) & " Valore Medio = " & Format2(Xnum),2
Scrivi Space(53) & " Integrativo = " & Format2(num),2
Scrivi
If estrc = Xnum Or estrd = Xnum Then
Scrivi(" Estrazione n." & Format2(ess) & " del " & DataEstrazione(ess)),0,0
Scrivi " " & SiglaRuota(r1) & " " & StringaEstratti(ess,r1),2
Scrivi Space(35) & SiglaRuota(r2) & " " & StringaEstratti(ess,r2),2
Scrivi
End If
ruote(1) = r1
ruote(2) = r2
ambata(1) = num
ImpostaGiocata 1,ambata,ruote,posta,clp,1
If estra = Xnum Or estrb = Xnum Then
Gioca es
Else
Gioca ess
End If
End If
End If
ok = 1
Next
Next
If ok = 1 Then Exit For
Next
Next
ScriviResoconto
Scrivi Space(50) & "PROGETTO - IL VALORE MEDIO O MEDIOVALORE - BY FABARRI"
Scrivi Space(50) & "SCRIPT - BY SALVO50"
End Sub
Function ModX(n,m)
ModX = n -(Fix(n/m) * m)
End Function
 
Top
1 replies since 29/1/2018, 18:03   512 views
  Share