| <!DOCTYPE html>
|
| <html lang="en">
|
| <head>
|
| <meta charset="UTF-8">
|
| <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| <title>Codette Quantum Simulation Interface</title>
|
| <style>
|
| body {
|
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
|
| background: linear-gradient(135deg, #0f0f23 0%, #1a1a3e 100%);
|
| color: white;
|
| margin: 0;
|
| padding: 2rem;
|
| min-height: 100vh;
|
| }
|
|
|
| .container {
|
| max-width: 1200px;
|
| margin: 0 auto;
|
| }
|
|
|
| .header {
|
| text-align: center;
|
| margin-bottom: 2rem;
|
| }
|
|
|
| .header h1 {
|
| font-size: 2.5rem;
|
| background: linear-gradient(45deg, #00f5ff, #a8e6cf);
|
| -webkit-background-clip: text;
|
| -webkit-text-fill-color: transparent;
|
| background-clip: text;
|
| }
|
|
|
| .nav-bar {
|
| background: rgba(255, 255, 255, 0.1);
|
| backdrop-filter: blur(10px);
|
| border-radius: 8px;
|
| padding: 1rem;
|
| margin-bottom: 2rem;
|
| text-align: center;
|
| }
|
|
|
| .nav-bar a {
|
| color: white;
|
| text-decoration: none;
|
| padding: 0.5rem 1rem;
|
| margin: 0 0.5rem;
|
| border-radius: 4px;
|
| transition: background 0.3s ease;
|
| }
|
|
|
| .nav-bar a:hover {
|
| background: rgba(255, 255, 255, 0.2);
|
| }
|
|
|
| .simulation-controls {
|
| background: rgba(255, 255, 255, 0.1);
|
| backdrop-filter: blur(10px);
|
| border-radius: 16px;
|
| padding: 2rem;
|
| margin-bottom: 2rem;
|
| border: 1px solid rgba(255, 255, 255, 0.2);
|
| }
|
|
|
| .control-group {
|
| margin-bottom: 1.5rem;
|
| }
|
|
|
| .control-group label {
|
| display: block;
|
| margin-bottom: 0.5rem;
|
| font-weight: bold;
|
| color: #a8e6cf;
|
| }
|
|
|
| .control-group input, .control-group select {
|
| width: 100%;
|
| padding: 0.8rem;
|
| border: none;
|
| border-radius: 8px;
|
| background: rgba(255, 255, 255, 0.9);
|
| color: #333;
|
| font-size: 1rem;
|
| }
|
|
|
| .btn-quantum {
|
| background: linear-gradient(45deg, #00f5ff, #0099cc);
|
| color: white;
|
| padding: 1rem 2rem;
|
| border: none;
|
| border-radius: 8px;
|
| font-size: 1rem;
|
| cursor: pointer;
|
| transition: all 0.3s ease;
|
| margin: 0.5rem;
|
| }
|
|
|
| .btn-quantum:hover {
|
| transform: translateY(-2px);
|
| box-shadow: 0 5px 15px rgba(0, 245, 255, 0.4);
|
| }
|
|
|
| .simulation-results {
|
| background: rgba(255, 255, 255, 0.1);
|
| backdrop-filter: blur(10px);
|
| border-radius: 16px;
|
| padding: 2rem;
|
| margin: 2rem 0;
|
| border: 1px solid rgba(255, 255, 255, 0.2);
|
| }
|
|
|
| .results-grid {
|
| display: grid;
|
| grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
| gap: 1.5rem;
|
| margin: 1rem 0;
|
| }
|
|
|
| .result-card {
|
| background: rgba(0, 0, 0, 0.3);
|
| border-radius: 8px;
|
| padding: 1.5rem;
|
| border: 1px solid rgba(255, 255, 255, 0.1);
|
| }
|
|
|
| .quantum-visualization {
|
| background: rgba(255, 255, 255, 0.05);
|
| border-radius: 12px;
|
| padding: 1.5rem;
|
| margin: 2rem 0;
|
| text-align: center;
|
| }
|
|
|
| .quantum-state {
|
| display: inline-block;
|
| width: 80px;
|
| height: 80px;
|
| border-radius: 50%;
|
| margin: 10px;
|
| display: flex;
|
| align-items: center;
|
| justify-content: center;
|
| color: white;
|
| font-weight: bold;
|
| animation: quantum-pulse 2s infinite;
|
| }
|
|
|
| @keyframes quantum-pulse {
|
| 0%, 100% { transform: scale(1); opacity: 0.8; }
|
| 50% { transform: scale(1.1); opacity: 1; }
|
| }
|
|
|
| .loading-quantum {
|
| display: none;
|
| text-align: center;
|
| padding: 2rem;
|
| }
|
|
|
| .quantum-spinner {
|
| border: 4px solid rgba(0, 245, 255, 0.3);
|
| border-radius: 50%;
|
| border-top: 4px solid #00f5ff;
|
| width: 50px;
|
| height: 50px;
|
| animation: spin 1s linear infinite;
|
| margin: 0 auto 1rem;
|
| }
|
|
|
| @keyframes spin {
|
| 0% { transform: rotate(0deg); }
|
| 100% { transform: rotate(360deg); }
|
| }
|
|
|
| .cocoon-list {
|
| max-height: 300px;
|
| overflow-y: auto;
|
| background: rgba(0, 0, 0, 0.2);
|
| border-radius: 8px;
|
| padding: 1rem;
|
| }
|
|
|
| .cocoon-item {
|
| background: rgba(255, 255, 255, 0.05);
|
| border-radius: 4px;
|
| padding: 0.8rem;
|
| margin-bottom: 0.5rem;
|
| border-left: 3px solid #00f5ff;
|
| }
|
| </style>
|
| </head>
|
| <body>
|
| <div class="container">
|
| <nav class="nav-bar">
|
| <a href="/">🏠 Home</a>
|
| <a href="/dashboard">📊 Dashboard</a>
|
| <a href="/quantum">⚛️ Quantum</a>
|
| <a href="/cognitive">🧠 Cognitive</a>
|
| </nav>
|
|
|
| <header class="header">
|
| <h1>⚛️ Quantum Simulation Interface</h1>
|
| <p>Citizen-science quantum and chaos simulations with AI meta-commentary</p>
|
| </header>
|
|
|
| <div class="simulation-controls">
|
| <h2>🔬 Simulation Parameters</h2>
|
|
|
| <div class="control-group">
|
| <label for="coreCount">CPU Cores to Use:</label>
|
| <input type="number" id="coreCount" value="4" min="1" max="16">
|
| </div>
|
|
|
| <div class="control-group">
|
| <label for="simulationType">Simulation Type:</label>
|
| <select id="simulationType">
|
| <option value="quantum_chaos">Quantum + Chaos</option>
|
| <option value="quantum_only">Quantum Only</option>
|
| <option value="chaos_only">Chaos Only</option>
|
| <option value="cosmic_entropy">Cosmic Entropy</option>
|
| </select>
|
| </div>
|
|
|
| <div class="control-group">
|
| <label for="perspectiveAgents">AI Perspective Agents:</label>
|
| <select id="perspectiveAgents" multiple>
|
| <option value="Quantum" selected>Quantum</option>
|
| <option value="Newton" selected>Newtonian</option>
|
| <option value="Stardust" selected>Stardust</option>
|
| <option value="DaVinci">Da Vinci</option>
|
| <option value="Ethical">Ethical</option>
|
| </select>
|
| </div>
|
|
|
| <button onclick="runQuantumSimulation()" class="btn-quantum">
|
| 🚀 Launch Quantum Simulation
|
| </button>
|
|
|
| <button onclick="analyzeCocoons()" class="btn-quantum">
|
| 🔍 Analyze Cocoons
|
| </button>
|
|
|
| <button onclick="visualize3D()" class="btn-quantum">
|
| 📊 3D Visualization
|
| </button>
|
| </div>
|
|
|
| <div class="loading-quantum" id="quantumLoading">
|
| <div class="quantum-spinner"></div>
|
| <p>Running quantum simulation across multiple cores...</p>
|
| <p>AI agents are analyzing each universe...</p>
|
| </div>
|
|
|
| <div class="simulation-results" id="resultsSection" style="display: none;">
|
| <h2>🎯 Simulation Results</h2>
|
|
|
| <div class="quantum-visualization" id="quantumViz">
|
| <h3>Quantum State Visualization</h3>
|
| <div id="quantumStates"></div>
|
| </div>
|
|
|
| <div class="results-grid" id="resultsGrid">
|
|
|
| </div>
|
|
|
| <div>
|
| <h3>📝 Generated Cocoons</h3>
|
| <div class="cocoon-list" id="cocoonList">
|
|
|
| </div>
|
| </div>
|
| </div>
|
| </div>
|
|
|
| <script>
|
| async function runQuantumSimulation() {
|
| const cores = parseInt(document.getElementById('coreCount').value);
|
| const loading = document.getElementById('quantumLoading');
|
| const results = document.getElementById('resultsSection');
|
|
|
|
|
| loading.style.display = 'block';
|
| results.style.display = 'none';
|
|
|
| try {
|
| const response = await fetch('/api/quantum-simulation', {
|
| method: 'POST',
|
| headers: {
|
| 'Content-Type': 'application/json',
|
| },
|
| body: JSON.stringify({
|
| cores: cores,
|
| simulation_type: document.getElementById('simulationType').value
|
| })
|
| });
|
|
|
| const data = await response.json();
|
|
|
|
|
| loading.style.display = 'none';
|
| results.style.display = 'block';
|
|
|
| if (data.error) {
|
| alert(`Simulation Error: ${data.error}`);
|
| } else {
|
| displaySimulationResults(data);
|
| }
|
|
|
| } catch (error) {
|
| loading.style.display = 'none';
|
| alert(`Network Error: ${error.message}`);
|
| }
|
| }
|
|
|
| function displaySimulationResults(data) {
|
| const resultsGrid = document.getElementById('resultsGrid');
|
| const cocoonList = document.getElementById('cocoonList');
|
| const quantumStates = document.getElementById('quantumStates');
|
|
|
|
|
| resultsGrid.innerHTML = '';
|
| cocoonList.innerHTML = '';
|
| quantumStates.innerHTML = '';
|
|
|
|
|
| for (let i = 0; i < data.cores_used; i++) {
|
| const state = document.createElement('div');
|
| state.className = 'quantum-state';
|
| state.style.background = `hsl(${i * 360 / data.cores_used}, 70%, 50%)`;
|
| state.textContent = `Core ${i + 1}`;
|
| quantumStates.appendChild(state);
|
| }
|
|
|
|
|
| data.results.forEach((result, index) => {
|
| const card = document.createElement('div');
|
| card.className = 'result-card';
|
| card.innerHTML = `
|
| <h4>🔬 Core ${index + 1} Results</h4>
|
| <p><strong>File:</strong> ${result}</p>
|
| <p><strong>Status:</strong> ✅ Simulation Complete</p>
|
| <p><strong>AI Commentary:</strong> Generated</p>
|
| `;
|
| resultsGrid.appendChild(card);
|
| });
|
|
|
|
|
| data.results.forEach(result => {
|
| const cocoonItem = document.createElement('div');
|
| cocoonItem.className = 'cocoon-item';
|
| cocoonItem.innerHTML = `
|
| <strong>📦 ${result}</strong><br>
|
| <small>Quantum state, chaos dynamics, and AI perspectives</small>
|
| `;
|
| cocoonList.appendChild(cocoonItem);
|
| });
|
| }
|
|
|
| async function analyzeCocoons() {
|
| alert('Cocoon analysis will be implemented in the next update!');
|
| }
|
|
|
| async function visualize3D() {
|
| alert('3D visualization will be implemented in the next update!');
|
| }
|
|
|
|
|
| document.addEventListener('DOMContentLoaded', function() {
|
| console.log('Quantum interface initialized');
|
| });
|
| </script>
|
| </body>
|
| </html> |