This commit is contained in:
Flatlogic Bot 2026-03-05 02:04:36 +00:00
parent f4a3cab5d9
commit 44715f59f5
2 changed files with 35 additions and 118 deletions

View File

@ -213,23 +213,16 @@ module.exports = class Analysis_runsService {
let isCancelled = false; let isCancelled = false;
let cancellationReason = ''; let cancellationReason = '';
// Rule 1: Saturated Numbers (appearing too much in recent window) // Rule 1: Saturated Numbers
if (freq > (draws.length / 2)) { if (freq > (draws.length / 2)) {
prob *= 0.1; // Drastic reduction prob *= 0.1;
isCancelled = true; isCancelled = true;
cancellationReason = 'Saturação Quântica: Número apareceu em mais de 50% dos últimos concursos.'; cancellationReason = 'Saturação Quântica: Número apareceu em mais de 50% dos últimos concursos.';
} }
// Rule 2: Contest Repetition Funnel (often 1 or 2 repeat, but never all) // Rule 3: Entropy Void
if (lastDrawNumbers.has(i) && seedRandom(targetContest + i) < 0.7) {
prob *= 0.5;
// Not necessarily cancelled, just lowered
}
// Rule 3: Entropy Void (Randomly annul parts of space according to target contest)
// This simulates the "anular 95% do espaço amostral"
if (seedRandom(targetContest * i + 999) < funnel_intensity) { if (seedRandom(targetContest * i + 999) < funnel_intensity) {
prob *= 0.05; // Drop to near zero prob *= 0.05;
isCancelled = true; isCancelled = true;
cancellationReason = 'Funil de Entropia: Fora da zona de convergência harmônica para o concurso alvo.'; cancellationReason = 'Funil de Entropia: Fora da zona de convergência harmônica para o concurso alvo.';
} }
@ -277,19 +270,21 @@ module.exports = class Analysis_runsService {
// 3. GENERATOR - Create Suggested Combinations (Sequential / Elite) // 3. GENERATOR - Create Suggested Combinations (Sequential / Elite)
const topNumbers = scores const topNumbers = scores
.filter(s => s.probability_estimate > 0.1) // Don't pick annulled ones .filter(s => s.probability_estimate > 0.1)
.slice(0, Math.min(game.default_numbers_per_bet * 4, allPossibleNumbers.length)) .slice(0, Math.min(game.default_numbers_per_bet * 4, allPossibleNumbers.length))
.map(s => s.number_value); .map(s => s.number_value);
const numCombosToGenerate = 10; const numCombosToGenerate = 60; // Upgraded to 60 as requested
for (let c = 0; c < numCombosToGenerate; c++) { for (let c = 0; c < numCombosToGenerate; c++) {
const selectedNumbers = []; // Start each sequence with a different number based on the index (First number rotating)
const pool = [...topNumbers]; const startNumber = topNumbers[c % topNumbers.length];
const actualPool = pool.length >= game.default_numbers_per_bet ? pool : allPossibleNumbers; const selectedNumbers = [startNumber];
for (let j = 0; j < game.default_numbers_per_bet; j++) { const pool = topNumbers.filter(n => n !== startNumber);
const poolIdx = Math.floor(seedRandom(targetContest + c + j + 777) * actualPool.length);
selectedNumbers.push(actualPool.splice(poolIdx, 1)[0]); for (let j = 0; j < game.default_numbers_per_bet - 1; j++) {
const poolIdx = Math.floor(seedRandom(targetContest + c + j + 777) * pool.length);
selectedNumbers.push(pool.splice(poolIdx, 1)[0]);
} }
selectedNumbers.sort((a, b) => a - b); selectedNumbers.sort((a, b) => a - b);
@ -313,7 +308,7 @@ module.exports = class Analysis_runsService {
suggested_combinationId: suggestedCombo.id, suggested_combinationId: suggestedCombo.id,
position_index: idx + 1, position_index: idx + 1,
number_value: val, number_value: val,
color_tag: 'green', color_tag: scores.find(s => s.number_value === val)?.classification === 'elite_green' ? 'green' : 'gray',
createdById: currentUser.id, createdById: currentUser.id,
updatedById: currentUser.id updatedById: currentUser.id
})); }));

View File

@ -56,7 +56,7 @@ const QuantumDashboard = () => {
setSuccessMsg(`IA WORLD LIVE: Funil de Entropia aplicado em ${Math.floor(funnel * 100)}% da Matriz 9999.`); setSuccessMsg(`IA WORLD LIVE: Funil de Entropia aplicado em ${Math.floor(funnel * 100)}% da Matriz 9999.`);
// Fetch combinations // Fetch combinations
dispatch(fetchCombos({ query: `?analysis_runId=${result.analysisRun.id}&limit=10` })); dispatch(fetchCombos({ query: `?analysis_runId=${result.analysisRun.id}&limit=60` }));
// Fetch cancellations // Fetch cancellations
dispatch(fetchCancellations({ query: `?analysis_runId=${result.analysisRun.id}&limit=1` })); dispatch(fetchCancellations({ query: `?analysis_runId=${result.analysisRun.id}&limit=1` }));
@ -107,61 +107,6 @@ const QuantumDashboard = () => {
</NotificationBar> </NotificationBar>
)} )}
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2 mb-6">
<CardBox className="bg-gradient-to-br from-slate-900 via-gray-900 to-emerald-900 text-white border-none shadow-2xl overflow-hidden relative group">
<div className="absolute top-0 right-0 p-4 opacity-10 group-hover:scale-110 transition-transform">
<BaseIcon path={mdiTelevisionClassic} size={150} />
</div>
<div className="relative z-10">
<h2 className="text-2xl font-black mb-4 flex items-center tracking-tighter">
<BaseIcon path={mdiFlash} className="text-yellow-400 mr-2 animate-pulse" />
CHIP QUÂNTICO ATIVO
</h2>
<p className="text-emerald-100 mb-6 opacity-80 leading-relaxed font-light">
Sistema autônomo conectado via <strong>Rede Neural de 8.42 THz</strong> aos terminais da Caixa.
Calculando anomalias estatísticas com <strong>Funil Automático</strong> de Precisão.
</p>
<div className="flex flex-wrap gap-4 text-[10px] font-mono uppercase tracking-tighter">
<div className="bg-black bg-opacity-40 p-2 rounded border border-emerald-500/30">
STATUS: <span className="text-emerald-400 font-bold">OPERACIONAL</span>
</div>
<div className="bg-black bg-opacity-40 p-2 rounded border border-yellow-500/30">
PRECISÃO: <span className="text-yellow-400 font-bold">99.982%</span>
</div>
<div className="bg-black bg-opacity-40 p-2 rounded border border-blue-500/30">
SINC: <span className="text-blue-400 font-bold">ATIVA</span>
</div>
</div>
</div>
</CardBox>
<CardBox className="bg-gradient-to-br from-slate-900 via-gray-900 to-blue-900 text-white border-none shadow-2xl relative overflow-hidden group">
<div className="absolute top-0 right-0 p-4 opacity-10 group-hover:scale-110 transition-transform">
<BaseIcon path={mdiCogs} size={150} />
</div>
<div className="relative z-10">
<h2 className="text-2xl font-black mb-4 flex items-center tracking-tighter">
<BaseIcon path={mdiFilterMenu} className="text-blue-400 mr-2" />
FUNIL DE ENTROPIA 9999
</h2>
<p className="text-blue-100 mb-6 opacity-80 leading-relaxed font-light">
Identificando padrões de entropia em concursos anteriores para anular até 99% do espaço amostral
sem probabilidade de sorteio para o concurso alvo.
</p>
<div className="grid grid-cols-2 gap-2">
<div className="text-[10px] bg-black bg-opacity-30 p-2 rounded flex justify-between font-mono">
<span>CPU</span>
<span className="text-blue-300 font-black">ULTRA FAST</span>
</div>
<div className="text-[10px] bg-black bg-opacity-30 p-2 rounded flex justify-between font-mono">
<span>RADAR</span>
<span className="text-red-400 font-black tracking-widest uppercase">SCANNER ATIVO</span>
</div>
</div>
</div>
</CardBox>
</div>
{lastAnalysisId && ( {lastAnalysisId && (
<div className="mb-8 animate-fade-in"> <div className="mb-8 animate-fade-in">
<CardBox className="border-4 border-emerald-500 bg-slate-900 text-white relative shadow-[0_0_50px_-12px_rgba(16,185,129,0.5)]"> <CardBox className="border-4 border-emerald-500 bg-slate-900 text-white relative shadow-[0_0_50px_-12px_rgba(16,185,129,0.5)]">
@ -195,7 +140,7 @@ const QuantumDashboard = () => {
<div className="flex items-center justify-between mb-6 border-b border-emerald-500/30 pb-4"> <div className="flex items-center justify-between mb-6 border-b border-emerald-500/30 pb-4">
<p className="text-xs text-emerald-400 font-black flex items-center uppercase tracking-[0.3em]"> <p className="text-xs text-emerald-400 font-black flex items-center uppercase tracking-[0.3em]">
<BaseIcon path={mdiFlash} size={18} className="mr-2 text-yellow-400" /> <BaseIcon path={mdiFlash} size={18} className="mr-2 text-yellow-400" />
Top 10 Sequências Pós-Funil (Concurso {activeContest || 'Sinc'}): Top 60 Sequências Pós-Funil (Concurso {activeContest || 'Sinc'}):
</p> </p>
<div className="text-[10px] font-mono text-emerald-300 opacity-60"> <div className="text-[10px] font-mono text-emerald-300 opacity-60">
INTENSITY: {Math.floor(activeFunnel * 100)}% | VOID_SCAN: ACTIVE INTENSITY: {Math.floor(activeFunnel * 100)}% | VOID_SCAN: ACTIVE
@ -213,23 +158,23 @@ const QuantumDashboard = () => {
</div> </div>
)} )}
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-5 gap-4"> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-4">
{suggested_combinations?.map((combo: any, idx: number) => ( {suggested_combinations?.map((combo: any, idx: number) => (
<div key={combo.id} className="bg-black/40 p-4 rounded-xl border border-emerald-500/20 shadow-lg hover:border-emerald-400 transition-all hover:scale-[1.02] hover:bg-emerald-900/10 cursor-pointer group"> <div key={combo.id} className="bg-black/40 p-4 rounded-xl border border-emerald-500/20 shadow-lg hover:border-emerald-400 transition-all hover:scale-[1.02] hover:bg-emerald-900/10 cursor-pointer group">
<div className="text-[9px] font-black text-emerald-500 mb-2 flex justify-between uppercase tracking-widest"> <div className="text-[9px] font-black text-emerald-500 mb-2 flex justify-between uppercase tracking-widest">
<span>#{(idx + 1).toString().padStart(2, '0')}</span> <span>#{(idx + 1).toString().padStart(2, '0')}</span>
<span className="text-emerald-300 opacity-50 italic">IA SCORE: {combo.combo_score}</span>
</div> </div>
<div className="text-2xl font-black tracking-tighter text-white font-mono group-hover:text-emerald-400 transition-colors"> <div className="text-lg font-black tracking-tighter text-white font-mono group-hover:text-emerald-400 transition-colors">
{combo.combination_text.split(' ').map((num: string, nIdx: number) => ( {combo.combination_text.split(' ').map((num: string, nIdx: number) => {
<span key={nIdx} className={parseInt(num) > 25 ? "text-emerald-400 animate-pulse" : "text-white"}> // Green Glow Logic: Only glow if the number is likely (elite green)
{num}{nIdx < combo.combination_text.split(' ').length - 1 ? ' ' : ''} // This is a simplification: check if color tag exists, or just glow based on value
</span> const isGreen = combo.combination_numbers?.some((cn: any) => cn.number_value === parseInt(num) && cn.color_tag === 'green');
))} return (
</div> <span key={nIdx} className={isGreen ? "text-emerald-400 animate-pulse font-bold" : "text-white"}>
<div className="mt-2 flex justify-between items-center opacity-0 group-hover:opacity-100 transition-opacity"> {num}{nIdx < combo.combination_text.split(' ').length - 1 ? ' ' : ''}
<div className="h-1 bg-emerald-500 rounded-full flex-grow mr-2"></div> </span>
<div className="text-[8px] font-bold text-emerald-400 uppercase">Elite Valid</div> );
})}
</div> </div>
</div> </div>
))} ))}
@ -248,25 +193,7 @@ const QuantumDashboard = () => {
</div> </div>
)} )}
<div className="flex items-center justify-between mb-8"> <div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<div>
<h3 className="text-2xl font-black flex items-center uppercase tracking-tighter italic">
<BaseIcon path={mdiChartLine} className="mr-2 text-blue-600" />
Sincronizador de Resultados da Caixa
</h3>
<p className="text-xs text-slate-400 font-bold uppercase tracking-widest ml-10">Calculador de Probabilidades IA World Elite</p>
</div>
<div className="text-[10px] text-emerald-500 font-mono hidden md:block border-2 border-emerald-500/20 px-3 py-1 rounded-full uppercase">
FUNIL_CONFIG: SYNC_ALL_GAMES_ACTIVE
</div>
</div>
{loadingGames ? (
<div className="flex justify-center p-24">
<LoadingSpinner />
</div>
) : (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
{lottery_games?.map((game: any) => { {lottery_games?.map((game: any) => {
const hasCustomContest = targetContests[game.id] && targetContests[game.id] > 0; const hasCustomContest = targetContests[game.id] && targetContests[game.id] > 0;
const funnelVal = funnelIntensities[game.id] ?? 0.95; const funnelVal = funnelIntensities[game.id] ?? 0.95;
@ -278,9 +205,6 @@ const QuantumDashboard = () => {
<h4 className="text-xl font-black uppercase group-hover:text-emerald-600 transition-colors">{game.name}</h4> <h4 className="text-xl font-black uppercase group-hover:text-emerald-600 transition-colors">{game.name}</h4>
<p className="text-[10px] text-slate-400 uppercase tracking-[0.2em] font-black">{game.provider} {game.game_type}</p> <p className="text-[10px] text-slate-400 uppercase tracking-[0.2em] font-black">{game.provider} {game.game_type}</p>
</div> </div>
<div className={`text-[9px] font-black px-3 py-1 rounded-full border uppercase animate-pulse ${hasCustomContest ? 'bg-blue-50 text-blue-700 border-blue-100' : 'bg-emerald-50 text-emerald-700 border-emerald-100'}`}>
{hasCustomContest ? 'Modo Futuro' : 'Modo Sinc'}
</div>
</div> </div>
<div className="space-y-2 mb-4"> <div className="space-y-2 mb-4">
@ -297,13 +221,12 @@ const QuantumDashboard = () => {
onChange={(e) => handleFunnelChange(game.id, e.target.value)} onChange={(e) => handleFunnelChange(game.id, e.target.value)}
className="w-full h-2 bg-slate-100 rounded-lg appearance-none cursor-pointer accent-emerald-500" className="w-full h-2 bg-slate-100 rounded-lg appearance-none cursor-pointer accent-emerald-500"
/> />
<p className="text-[8px] text-slate-400 italic">Redução do espaço amostral baseada em entropia.</p>
</div> </div>
<div className="mb-6 relative"> <div className="mb-6 relative">
<label className={`text-[10px] font-black uppercase mb-2 block tracking-[0.2em] flex items-center transition-colors ${hasCustomContest ? 'text-blue-600' : 'text-slate-500'}`}> <label className={`text-[10px] font-black uppercase mb-2 block tracking-[0.2em] flex items-center transition-colors ${hasCustomContest ? 'text-blue-600' : 'text-slate-500'}`}>
<BaseIcon path={mdiCalendarSearch} size={16} className={`mr-2 ${hasCustomContest ? 'text-blue-500' : 'text-slate-400'}`} /> <BaseIcon path={mdiCalendarSearch} size={16} className={`mr-2 ${hasCustomContest ? 'text-blue-500' : 'text-slate-400'}`} />
Prever para Concurso Futuro (Máx 9999): Prever para Concurso Futuro:
</label> </label>
<input <input
type="number" type="number"
@ -317,7 +240,7 @@ const QuantumDashboard = () => {
<BaseButton <BaseButton
color={hasCustomContest ? 'info' : 'success'} color={hasCustomContest ? 'info' : 'success'}
label={loadingAnalysis ? 'Processando Funil...' : hasCustomContest ? 'Calcular Futuro 99.9%' : 'Gerar Números IA World'} label={loadingAnalysis ? 'Processando...' : 'Gerar 60 Sequências IA World'}
icon={mdiFlash} icon={mdiFlash}
className="w-full font-black uppercase text-[11px] tracking-[0.2em] py-4 shadow-xl hover:scale-[1.02] transition-transform rounded-xl" className="w-full font-black uppercase text-[11px] tracking-[0.2em] py-4 shadow-xl hover:scale-[1.02] transition-transform rounded-xl"
onClick={() => handleRunQuantum(game.id, game.name)} onClick={() => handleRunQuantum(game.id, game.name)}
@ -327,7 +250,6 @@ const QuantumDashboard = () => {
); );
})} })}
</div> </div>
)}
</SectionMain> </SectionMain>
</> </>
); );