diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 5f9fd13..16f331d 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/templates/core/sequential_generator.html b/core/templates/core/sequential_generator.html index 8b6dcce..e731fd6 100644 --- a/core/templates/core/sequential_generator.html +++ b/core/templates/core/sequential_generator.html @@ -11,13 +11,13 @@

- SUPERCOMPUTADOR DE ELITE SINCRO: 10.000 CONCURSOS + SUPERCOMPUTADOR DE ELITE SINCRO: {{ supercomputer_sync }} SIMULAÇÕES

-

Gerador Sequencial com Matemática Neural Convergente de 99.9%.

+

Gerador Sequencial com Matemática Neural Convergente, histórico recente e 10.000 simulações por análise.

- PRECISÃO 99.9% ATIVA + SINAL ESTATÍSTICO ATIVO
IA ANALISANDO... @@ -34,7 +34,7 @@
-
CONFIGURAÇÕES DE ELITE MODO 99.9%
+
CONFIGURAÇÕES DE ELITE
@@ -49,7 +49,7 @@
- +
@@ -101,8 +101,8 @@ AGUARDANDO SELEÇÃO...
- PROBABILIDADE DE ACERTO - 99.982% (MATEMÁTICA PURA) + SINAL ESTATÍSTICO + Aguardando dados reais
@@ -159,7 +159,7 @@
-
Elite Verde (Próximo Concurso Real)
+
Faixa Prioritária do Próximo Jogo
@@ -175,14 +175,46 @@
-
HITS DE ELITE
+
PAINEL DO SUPERCOMPUTADOR
-
-
-
Nenhum acerto de elite detectado ainda...
+
+
+
+
+ JANELA REAL +
--
+
+
+
+
+ BASE HISTÓRICA +
--
+
+
+
+
+ ODDS OFICIAIS +
--
+
+
+
+
+ MOTOR +
--
+
+
+
+
+
Top sequências da simulação
+
Selecione uma loteria para carregar o ranking real.
+
+
+
+
+
Nenhum hit de elite detectado ainda...
@@ -210,7 +242,7 @@
-

Números marcados em azul serão IGNORADOS pelo motor de cálculo do Supercomputador.

+

Números marcados em azul serão ignorados pelo motor estatístico nas novas sequências.

@@ -338,21 +370,86 @@ const viewport = document.querySelector(".generator-viewport"); const elitePanel = document.getElementById("elite-panel"); const btnOpenBrowser = document.getElementById("btn-open-browser"); + const signalDisplay = document.getElementById("signal-display"); + const predictionPanel = document.getElementById("prediction-panel"); - // Recalibragem Neural para Elite 99.9% + + function formatNumber(number) { + return number.toString().padStart(2, "0"); + } + + function updateMetricsPanel() { + if (!lotteryData) return; + + document.getElementById("sync-status").innerText = `SINCRO: ${lotteryData.supercomputer_sync.toLocaleString()} SIMULAÇÕES`; + document.getElementById("concurso-info").innerText = `Último concurso real: ${lotteryData.last_real_contest} • janela: ${lotteryData.analysis_window || 0}`; + signalDisplay.innerText = lotteryData.signal_label || "--"; + document.getElementById("metric-window").innerText = `${lotteryData.analysis_window || 0} concursos`; + document.getElementById("metric-draws").innerText = `${lotteryData.total_real_draws || 0} reais`; + document.getElementById("metric-odds").innerText = lotteryData.combination_odds || "--"; + document.getElementById("metric-method").innerText = lotteryData.methodology || "--"; + + const sequences = lotteryData.top_sequences || []; + if (!sequences.length) { + predictionPanel.innerHTML = '
Ainda não há base suficiente para exibir sequências ranqueadas.
'; + return; + } + + predictionPanel.innerHTML = sequences.map((item, index) => ` +
+
${item.numbers.map(formatNumber).join(' • ')}
+ ${item.hits}x +
+ `).join(''); + } + + function buildWeightedSequence() { + const pool = (lotteryData.weighted_numbers || []).filter(item => !annulledFunnel.has(item.num)); + const fallbackPool = []; + for (let i = 1; i <= lotteryData.max_number; i++) { + if (!annulledFunnel.has(i)) fallbackPool.push({ num: i, score: 1 }); + } + const source = pool.length >= lotteryData.numbers_to_draw ? pool : fallbackPool; + const selected = []; + const available = source.map(item => ({ ...item })); + + while (available.length && selected.length < lotteryData.numbers_to_draw) { + const totalWeight = available.reduce((acc, item) => acc + Math.max(item.score || 1, 0.1), 0); + let threshold = Math.random() * totalWeight; + let chosenIndex = available.length - 1; + + for (let idx = 0; idx < available.length; idx++) { + threshold -= Math.max(available[idx].score || 1, 0.1); + if (threshold <= 0) { + chosenIndex = idx; + break; + } + } + + const [picked] = available.splice(chosenIndex, 1); + if (picked && !selected.includes(picked.num)) { + selected.push(picked.num); + } + } + + return selected.sort((a, b) => a - b); + } + + // Recalibragem do motor estatístico async function recalculateDeepElite() { if (!lotteryData) return; const key = lotterySelect.value; - speak(`Sincronizando Supercomputador com 10.000 concursos da ${lotteryData.name}.`); + speak(`Sincronizando Supercomputador com ${lotteryData.supercomputer_sync || 10000} simulações da ${lotteryData.name}.`); const resp = await fetch(`/api/lottery-info/${key}/`); lotteryData = await resp.json(); fillEliteInputs(lotteryData.elite_greens); updateElitePanel(); + updateMetricsPanel(); - speak("Matemática de Elite aplicada com convergência de 99.9%. Previsão para o próximo sorteio calculada."); + speak("Análise atualizada com base no histórico real, atrasos e 10.000 simulações."); } lotterySelect.addEventListener("change", async (e) => { @@ -360,7 +457,6 @@ if (!key) return; document.getElementById("lottery-display").innerText = e.target.options[e.target.selectedIndex].text; - document.getElementById("concurso-info").innerText = "SINCRO 10K: OK"; const resp = await fetch(`/api/lottery-info/${key}/`); lotteryData = await resp.json(); @@ -378,6 +474,7 @@ setupFunnel(lotteryData.max_number); fillEliteInputs(lotteryData.elite_greens); updateElitePanel(); + updateMetricsPanel(); btnStart.disabled = false; resetGenerator(); @@ -431,7 +528,7 @@ if (lotteryData.next_prediction) { const nextDiv = document.createElement("div"); nextDiv.className = "w-100 mt-2 p-2 rounded bg-black border border-warning text-center"; - nextDiv.innerHTML = `PRÓXIMO SORTEIO PREVISTO:
`; + nextDiv.innerHTML = `FAIXA PRIORITÁRIA DO PRÓXIMO JOGO:
`; lotteryData.next_prediction.forEach(n => { nextDiv.innerHTML += `${n.toString().padStart(2, "0")}`; }); @@ -471,20 +568,12 @@ for (let i = 0; i < 5; i++) { let sequence = []; - let attempts = 0; - while (sequence.length < nToDraw && attempts < 500) { - let val; - if (eliteModeActive && eliteNums.length >= nToDraw) { - val = eliteNums[Math.floor(Math.random() * eliteNums.length)]; - } else { - val = Math.floor(Math.random() * maxNum) + 1; - } - - if (!annulledFunnel.has(val) && !sequence.includes(val)) { - sequence.push(val); - } - attempts++; + if (eliteModeActive && eliteNums.length >= nToDraw) { + const shuffledElite = [...eliteNums].filter(val => !annulledFunnel.has(val)).sort(() => Math.random() - 0.5); + sequence = shuffledElite.slice(0, nToDraw); + } else { + sequence = buildWeightedSequence(); } if (sequence.length === nToDraw) { @@ -550,7 +639,7 @@ generatorRunning = true; btnStart.classList.add("d-none"); btnPause.classList.remove("d-none"); - speak("Cálculos iniciados. Supercomputador sincronizado com 10.000 concursos."); + speak("Cálculos iniciados. Supercomputador sincronizado com 10.000 simulações estatísticas."); generateChunk(); }); @@ -595,7 +684,7 @@ let html = ` - HITS DE ELITE - Supercomputador 99.9% + HITS DE ELITE - Supercomputador Estatístico