Add 2 files
Browse files- README.md +7 -5
- index.html +716 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: https-huggingface-co-spaces-lunarflu-rpg
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: green
|
| 5 |
+
colorTo: blue
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,716 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>AI Driving Simulation</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<style>
|
| 9 |
+
#simulationCanvas {
|
| 10 |
+
background-color: #2d3748;
|
| 11 |
+
border-radius: 0.5rem;
|
| 12 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
.car {
|
| 16 |
+
position: absolute;
|
| 17 |
+
width: 12px;
|
| 18 |
+
height: 20px;
|
| 19 |
+
background-color: #3b82f6;
|
| 20 |
+
border-radius: 3px;
|
| 21 |
+
transform-origin: center;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
.track-wall {
|
| 25 |
+
position: absolute;
|
| 26 |
+
background-color: #4a5568;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.checkpoint {
|
| 30 |
+
position: absolute;
|
| 31 |
+
background-color: rgba(74, 222, 128, 0.3);
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
.progress-bar {
|
| 35 |
+
transition: width 0.3s ease;
|
| 36 |
+
}
|
| 37 |
+
</style>
|
| 38 |
+
</head>
|
| 39 |
+
<body class="bg-gray-900 text-white min-h-screen">
|
| 40 |
+
<div class="container mx-auto px-4 py-8">
|
| 41 |
+
<h1 class="text-4xl font-bold text-center mb-6 text-blue-400">AI Driving Simulation</h1>
|
| 42 |
+
|
| 43 |
+
<div class="flex flex-col lg:flex-row gap-8">
|
| 44 |
+
<div class="lg:w-3/4">
|
| 45 |
+
<div class="relative">
|
| 46 |
+
<canvas id="simulationCanvas" width="800" height="500" class="w-full"></canvas>
|
| 47 |
+
|
| 48 |
+
<div id="bestCarContainer" class="absolute top-4 left-4 bg-gray-800 bg-opacity-80 p-3 rounded-lg">
|
| 49 |
+
<div class="flex items-center gap-2">
|
| 50 |
+
<div class="w-4 h-4 bg-blue-500 rounded-sm"></div>
|
| 51 |
+
<span class="text-sm">Best Car</span>
|
| 52 |
+
</div>
|
| 53 |
+
<div class="mt-2 text-xs">
|
| 54 |
+
<div>Generation: <span id="generationCount">0</span></div>
|
| 55 |
+
<div>Alive: <span id="aliveCount">0</span>/<span id="populationCount">0</span></div>
|
| 56 |
+
<div>Max Fitness: <span id="maxFitness">0</span></div>
|
| 57 |
+
</div>
|
| 58 |
+
</div>
|
| 59 |
+
</div>
|
| 60 |
+
|
| 61 |
+
<div class="mt-4 grid grid-cols-1 md:grid-cols-3 gap-4">
|
| 62 |
+
<div class="bg-gray-800 p-4 rounded-lg">
|
| 63 |
+
<h3 class="font-semibold text-blue-300 mb-2">Simulation Controls</h3>
|
| 64 |
+
<div class="flex flex-wrap gap-2">
|
| 65 |
+
<button id="startBtn" class="bg-green-600 hover:bg-green-700 px-3 py-1 rounded text-sm">
|
| 66 |
+
Start
|
| 67 |
+
</button>
|
| 68 |
+
<button id="pauseBtn" class="bg-yellow-600 hover:bg-yellow-700 px-3 py-1 rounded text-sm">
|
| 69 |
+
Pause
|
| 70 |
+
</button>
|
| 71 |
+
<button id="resetBtn" class="bg-red-600 hover:bg-red-700 px-3 py-1 rounded text-sm">
|
| 72 |
+
Reset
|
| 73 |
+
</button>
|
| 74 |
+
</div>
|
| 75 |
+
</div>
|
| 76 |
+
|
| 77 |
+
<div class="bg-gray-800 p-4 rounded-lg">
|
| 78 |
+
<h3 class="font-semibold text-blue-300 mb-2">AI Settings</h3>
|
| 79 |
+
<div class="space-y-2">
|
| 80 |
+
<div>
|
| 81 |
+
<label class="text-xs block">Population:</label>
|
| 82 |
+
<input type="range" id="populationSlider" min="10" max="500" value="100" class="w-full">
|
| 83 |
+
<span id="populationValue" class="text-xs">100</span>
|
| 84 |
+
</div>
|
| 85 |
+
<div>
|
| 86 |
+
<label class="text-xs block">Mutation Rate:</label>
|
| 87 |
+
<input type="range" id="mutationSlider" min="1" max="100" value="10" class="w-full">
|
| 88 |
+
<span id="mutationValue" class="text-xs">10%</span>
|
| 89 |
+
</div>
|
| 90 |
+
</div>
|
| 91 |
+
</div>
|
| 92 |
+
|
| 93 |
+
<div class="bg-gray-800 p-4 rounded-lg">
|
| 94 |
+
<h3 class="font-semibold text-blue-300 mb-2">Performance</h3>
|
| 95 |
+
<div class="text-xs space-y-1">
|
| 96 |
+
<div>FPS: <span id="fpsCounter">0</span></div>
|
| 97 |
+
<div>Generation Time: <span id="genTime">0</span>ms</div>
|
| 98 |
+
<div>Best Progress:
|
| 99 |
+
<div class="w-full bg-gray-700 h-2 rounded-full mt-1">
|
| 100 |
+
<div id="bestProgressBar" class="h-full bg-green-500 rounded-full progress-bar" style="width: 0%"></div>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
</div>
|
| 107 |
+
|
| 108 |
+
<div class="lg:w-1/4">
|
| 109 |
+
<div class="bg-gray-800 p-4 rounded-lg sticky top-4">
|
| 110 |
+
<h3 class="font-semibold text-blue-300 mb-3">How It Works</h3>
|
| 111 |
+
<div class="text-sm space-y-3 text-gray-300">
|
| 112 |
+
<p>This simulation demonstrates how AI can learn to drive through a course using a genetic algorithm.</p>
|
| 113 |
+
|
| 114 |
+
<p>Each car has a neural network that controls steering based on sensor inputs. Cars that perform better (reach further checkpoints) have a higher chance to pass their "DNA" to the next generation.</p>
|
| 115 |
+
|
| 116 |
+
<p>Key components:</p>
|
| 117 |
+
<ul class="list-disc pl-5 space-y-1">
|
| 118 |
+
<li><span class="font-medium">Sensors:</span> 5 distance sensors (front, left, right, front-left, front-right)</li>
|
| 119 |
+
<li><span class="font-medium">Neural Network:</span> 5 inputs, 1 hidden layer (6 neurons), 2 outputs (left/right)</li>
|
| 120 |
+
<li><span class="font-medium">Fitness:</span> Based on distance traveled and checkpoints reached</li>
|
| 121 |
+
<li><span class="font-medium">Mutation:</span> Random changes to keep diversity</li>
|
| 122 |
+
</ul>
|
| 123 |
+
|
| 124 |
+
<div class="pt-2 border-t border-gray-700 mt-4">
|
| 125 |
+
<p class="text-xs text-gray-400">Watch as the AI improves over generations!</p>
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
|
| 133 |
+
<script>
|
| 134 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 135 |
+
// Canvas setup
|
| 136 |
+
const canvas = document.getElementById('simulationCanvas');
|
| 137 |
+
const ctx = canvas.getContext('2d');
|
| 138 |
+
|
| 139 |
+
// UI elements
|
| 140 |
+
const startBtn = document.getElementById('startBtn');
|
| 141 |
+
const pauseBtn = document.getElementById('pauseBtn');
|
| 142 |
+
const resetBtn = document.getElementById('resetBtn');
|
| 143 |
+
const populationSlider = document.getElementById('populationSlider');
|
| 144 |
+
const mutationSlider = document.getElementById('mutationSlider');
|
| 145 |
+
const populationValue = document.getElementById('populationValue');
|
| 146 |
+
const mutationValue = document.getElementById('mutationValue');
|
| 147 |
+
const generationCount = document.getElementById('generationCount');
|
| 148 |
+
const aliveCount = document.getElementById('aliveCount');
|
| 149 |
+
const populationCount = document.getElementById('populationCount');
|
| 150 |
+
const maxFitness = document.getElementById('maxFitness');
|
| 151 |
+
const fpsCounter = document.getElementById('fpsCounter');
|
| 152 |
+
const genTime = document.getElementById('genTime');
|
| 153 |
+
const bestProgressBar = document.getElementById('bestProgressBar');
|
| 154 |
+
|
| 155 |
+
// Simulation parameters
|
| 156 |
+
let populationSize = parseInt(populationSlider.value);
|
| 157 |
+
let mutationRate = parseInt(mutationSlider.value) / 100;
|
| 158 |
+
let isRunning = false;
|
| 159 |
+
let generation = 0;
|
| 160 |
+
let lastFrameTime = 0;
|
| 161 |
+
let fps = 0;
|
| 162 |
+
let bestCarProgress = 0;
|
| 163 |
+
|
| 164 |
+
// Track definition
|
| 165 |
+
const track = {
|
| 166 |
+
walls: [],
|
| 167 |
+
checkpoints: [],
|
| 168 |
+
startPosition: { x: 100, y: 250, angle: 0 },
|
| 169 |
+
createTrack() {
|
| 170 |
+
// Outer walls
|
| 171 |
+
this.walls = [
|
| 172 |
+
// Outer boundary
|
| 173 |
+
{ x: 50, y: 50, width: 700, height: 20 },
|
| 174 |
+
{ x: 50, y: 50, width: 20, height: 400 },
|
| 175 |
+
{ x: 50, y: 430, width: 700, height: 20 },
|
| 176 |
+
{ x: 730, y: 50, width: 20, height: 400 },
|
| 177 |
+
|
| 178 |
+
// Inner obstacles
|
| 179 |
+
{ x: 200, y: 100, width: 20, height: 200 },
|
| 180 |
+
{ x: 400, y: 200, width: 20, height: 200 },
|
| 181 |
+
{ x: 600, y: 100, width: 20, height: 200 },
|
| 182 |
+
{ x: 300, y: 300, width: 200, height: 20 }
|
| 183 |
+
];
|
| 184 |
+
|
| 185 |
+
// Checkpoints
|
| 186 |
+
this.checkpoints = [
|
| 187 |
+
{ x: 700, y: 100, width: 30, height: 50 },
|
| 188 |
+
{ x: 600, y: 400, width: 30, height: 50 },
|
| 189 |
+
{ x: 300, y: 400, width: 30, height: 50 },
|
| 190 |
+
{ x: 100, y: 300, width: 30, height: 50 }
|
| 191 |
+
];
|
| 192 |
+
},
|
| 193 |
+
draw(ctx) {
|
| 194 |
+
// Draw walls
|
| 195 |
+
ctx.fillStyle = '#4a5568';
|
| 196 |
+
this.walls.forEach(wall => {
|
| 197 |
+
ctx.fillRect(wall.x, wall.y, wall.width, wall.height);
|
| 198 |
+
});
|
| 199 |
+
|
| 200 |
+
// Draw checkpoints
|
| 201 |
+
ctx.fillStyle = 'rgba(74, 222, 128, 0.3)';
|
| 202 |
+
this.checkpoints.forEach(checkpoint => {
|
| 203 |
+
ctx.fillRect(checkpoint.x, checkpoint.y, checkpoint.width, checkpoint.height);
|
| 204 |
+
});
|
| 205 |
+
|
| 206 |
+
// Draw start position
|
| 207 |
+
ctx.fillStyle = 'rgba(96, 165, 250, 0.5)';
|
| 208 |
+
ctx.fillRect(this.startPosition.x - 15, this.startPosition.y - 25, 30, 50);
|
| 209 |
+
}
|
| 210 |
+
};
|
| 211 |
+
|
| 212 |
+
// Car class
|
| 213 |
+
class Car {
|
| 214 |
+
constructor(brain) {
|
| 215 |
+
this.reset();
|
| 216 |
+
this.brain = brain ? brain : new NeuralNetwork([5, 6, 2]);
|
| 217 |
+
this.fitness = 0;
|
| 218 |
+
this.checkpointIndex = 0;
|
| 219 |
+
this.sensors = [0, 0, 0, 0, 0]; // Front, left, right, front-left, front-right
|
| 220 |
+
this.sensorAngles = [0, -Math.PI/4, Math.PI/4, -Math.PI/8, Math.PI/8];
|
| 221 |
+
this.sensorLength = 100;
|
| 222 |
+
this.color = 'rgba(59, 130, 246, 0.8)';
|
| 223 |
+
this.isBest = false;
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
reset() {
|
| 227 |
+
this.x = track.startPosition.x;
|
| 228 |
+
this.y = track.startPosition.y;
|
| 229 |
+
this.angle = track.startPosition.angle;
|
| 230 |
+
this.speed = 0;
|
| 231 |
+
this.maxSpeed = 5;
|
| 232 |
+
this.acceleration = 0.1;
|
| 233 |
+
this.rotationSpeed = 0.05;
|
| 234 |
+
this.damaged = false;
|
| 235 |
+
this.checkpointIndex = 0;
|
| 236 |
+
this.fitness = 0;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
update() {
|
| 240 |
+
if (this.damaged) return;
|
| 241 |
+
|
| 242 |
+
// Update position
|
| 243 |
+
this.speed = this.maxSpeed;
|
| 244 |
+
this.x += Math.sin(this.angle) * this.speed;
|
| 245 |
+
this.y -= Math.cos(this.angle) * this.speed;
|
| 246 |
+
|
| 247 |
+
// Update sensors
|
| 248 |
+
this.updateSensors();
|
| 249 |
+
|
| 250 |
+
// Get neural network outputs
|
| 251 |
+
const outputs = this.brain.predict(this.sensors);
|
| 252 |
+
|
| 253 |
+
// Apply steering (outputs[0] = left, outputs[1] = right)
|
| 254 |
+
const steering = outputs[1] - outputs[0]; // -1 to 1
|
| 255 |
+
this.angle += steering * this.rotationSpeed;
|
| 256 |
+
|
| 257 |
+
// Check collisions
|
| 258 |
+
this.checkCollisions();
|
| 259 |
+
|
| 260 |
+
// Check checkpoints
|
| 261 |
+
this.checkCheckpoints();
|
| 262 |
+
|
| 263 |
+
// Update fitness
|
| 264 |
+
this.fitness += this.speed;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
updateSensors() {
|
| 268 |
+
this.sensors = this.sensorAngles.map(angle => {
|
| 269 |
+
const sensorAngle = this.angle + angle;
|
| 270 |
+
let sensorX = this.x;
|
| 271 |
+
let sensorY = this.y;
|
| 272 |
+
let sensorEndX = this.x + Math.sin(sensorAngle) * this.sensorLength;
|
| 273 |
+
let sensorEndY = this.y - Math.cos(sensorAngle) * this.sensorLength;
|
| 274 |
+
|
| 275 |
+
let minDistance = this.sensorLength;
|
| 276 |
+
|
| 277 |
+
// Check against all walls
|
| 278 |
+
for (const wall of track.walls) {
|
| 279 |
+
const intersection = this.lineRectIntersection(
|
| 280 |
+
this.x, this.y, sensorEndX, sensorEndY,
|
| 281 |
+
wall.x, wall.y, wall.width, wall.height
|
| 282 |
+
);
|
| 283 |
+
|
| 284 |
+
if (intersection) {
|
| 285 |
+
const distance = Math.sqrt(
|
| 286 |
+
Math.pow(intersection.x - this.x, 2) +
|
| 287 |
+
Math.pow(intersection.y - this.y, 2)
|
| 288 |
+
);
|
| 289 |
+
minDistance = Math.min(minDistance, distance);
|
| 290 |
+
}
|
| 291 |
+
}
|
| 292 |
+
|
| 293 |
+
// Normalize distance to 0-1 range (1 = no obstacle, 0 = obstacle at car)
|
| 294 |
+
return 1 - (minDistance / this.sensorLength);
|
| 295 |
+
});
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
lineRectIntersection(x1, y1, x2, y2, rx, ry, rw, rh) {
|
| 299 |
+
// Check if the line has hit any of the rectangle's sides
|
| 300 |
+
const left = this.lineLineIntersection(x1, y1, x2, y2, rx, ry, rx, ry + rh);
|
| 301 |
+
const right = this.lineLineIntersection(x1, y1, x2, y2, rx + rw, ry, rx + rw, ry + rh);
|
| 302 |
+
const top = this.lineLineIntersection(x1, y1, x2, y2, rx, ry, rx + rw, ry);
|
| 303 |
+
const bottom = this.lineLineIntersection(x1, y1, x2, y2, rx, ry + rh, rx + rw, ry + rh);
|
| 304 |
+
|
| 305 |
+
let closestIntersection = null;
|
| 306 |
+
let minDistance = Infinity;
|
| 307 |
+
|
| 308 |
+
[left, right, top, bottom].forEach(intersection => {
|
| 309 |
+
if (intersection) {
|
| 310 |
+
const distance = Math.sqrt(Math.pow(intersection.x - x1, 2) + Math.pow(intersection.y - y1, 2));
|
| 311 |
+
if (distance < minDistance) {
|
| 312 |
+
minDistance = distance;
|
| 313 |
+
closestIntersection = intersection;
|
| 314 |
+
}
|
| 315 |
+
}
|
| 316 |
+
});
|
| 317 |
+
|
| 318 |
+
return closestIntersection;
|
| 319 |
+
}
|
| 320 |
+
|
| 321 |
+
lineLineIntersection(x1, y1, x2, y2, x3, y3, x4, y4) {
|
| 322 |
+
// Calculate the intersection point between two lines
|
| 323 |
+
const denominator = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1);
|
| 324 |
+
|
| 325 |
+
if (denominator === 0) return null; // Lines are parallel
|
| 326 |
+
|
| 327 |
+
const ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denominator;
|
| 328 |
+
const ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denominator;
|
| 329 |
+
|
| 330 |
+
if (ua >= 0 && ua <= 1 && ub >= 0 && ub <= 1) {
|
| 331 |
+
return {
|
| 332 |
+
x: x1 + ua * (x2 - x1),
|
| 333 |
+
y: y1 + ua * (y2 - y1)
|
| 334 |
+
};
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
return null;
|
| 338 |
+
}
|
| 339 |
+
|
| 340 |
+
checkCollisions() {
|
| 341 |
+
// Simple collision detection with walls
|
| 342 |
+
for (const wall of track.walls) {
|
| 343 |
+
if (this.x > wall.x && this.x < wall.x + wall.width &&
|
| 344 |
+
this.y > wall.y && this.y < wall.y + wall.height) {
|
| 345 |
+
this.damaged = true;
|
| 346 |
+
break;
|
| 347 |
+
}
|
| 348 |
+
}
|
| 349 |
+
|
| 350 |
+
// Boundary checks
|
| 351 |
+
if (this.x < 0 || this.x > canvas.width || this.y < 0 || this.y > canvas.height) {
|
| 352 |
+
this.damaged = true;
|
| 353 |
+
}
|
| 354 |
+
}
|
| 355 |
+
|
| 356 |
+
checkCheckpoints() {
|
| 357 |
+
if (this.checkpointIndex >= track.checkpoints.length) return;
|
| 358 |
+
|
| 359 |
+
const checkpoint = track.checkpoints[this.checkpointIndex];
|
| 360 |
+
if (this.x > checkpoint.x && this.x < checkpoint.x + checkpoint.width &&
|
| 361 |
+
this.y > checkpoint.y && this.y < checkpoint.y + checkpoint.height) {
|
| 362 |
+
this.checkpointIndex++;
|
| 363 |
+
this.fitness += 1000; // Bonus for reaching checkpoint
|
| 364 |
+
|
| 365 |
+
// Update best progress
|
| 366 |
+
const progress = this.checkpointIndex / track.checkpoints.length;
|
| 367 |
+
if (progress > bestCarProgress) {
|
| 368 |
+
bestCarProgress = progress;
|
| 369 |
+
bestProgressBar.style.width = `${progress * 100}%`;
|
| 370 |
+
}
|
| 371 |
+
}
|
| 372 |
+
}
|
| 373 |
+
|
| 374 |
+
draw(ctx) {
|
| 375 |
+
if (this.damaged) return;
|
| 376 |
+
|
| 377 |
+
ctx.save();
|
| 378 |
+
ctx.translate(this.x, this.y);
|
| 379 |
+
ctx.rotate(this.angle);
|
| 380 |
+
|
| 381 |
+
// Draw car body
|
| 382 |
+
ctx.fillStyle = this.isBest ? 'rgba(220, 38, 38, 0.9)' : this.color;
|
| 383 |
+
ctx.fillRect(-6, -10, 12, 20);
|
| 384 |
+
|
| 385 |
+
// Draw sensors (for best car)
|
| 386 |
+
if (this.isBest) {
|
| 387 |
+
ctx.strokeStyle = 'rgba(255, 255, 255, 0.5)';
|
| 388 |
+
ctx.lineWidth = 1;
|
| 389 |
+
|
| 390 |
+
this.sensorAngles.forEach((angle, i) => {
|
| 391 |
+
const sensorAngle = this.angle + angle;
|
| 392 |
+
const sensorValue = this.sensors[i];
|
| 393 |
+
const sensorEndX = Math.sin(sensorAngle) * this.sensorLength * (1 - sensorValue);
|
| 394 |
+
const sensorEndY = -Math.cos(sensorAngle) * this.sensorLength * (1 - sensorValue);
|
| 395 |
+
|
| 396 |
+
ctx.beginPath();
|
| 397 |
+
ctx.moveTo(0, 0);
|
| 398 |
+
ctx.lineTo(sensorEndX, sensorEndY);
|
| 399 |
+
ctx.stroke();
|
| 400 |
+
});
|
| 401 |
+
}
|
| 402 |
+
|
| 403 |
+
ctx.restore();
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
clone() {
|
| 407 |
+
return new Car(this.brain.clone());
|
| 408 |
+
}
|
| 409 |
+
}
|
| 410 |
+
|
| 411 |
+
// Neural Network class
|
| 412 |
+
class NeuralNetwork {
|
| 413 |
+
constructor(neuronCounts) {
|
| 414 |
+
this.levels = [];
|
| 415 |
+
for (let i = 0; i < neuronCounts.length - 1; i++) {
|
| 416 |
+
this.levels.push(new Level(
|
| 417 |
+
neuronCounts[i], neuronCounts[i + 1]
|
| 418 |
+
));
|
| 419 |
+
}
|
| 420 |
+
}
|
| 421 |
+
|
| 422 |
+
static feedForward(givenInputs, network) {
|
| 423 |
+
let outputs = Level.feedForward(
|
| 424 |
+
givenInputs, network.levels[0]
|
| 425 |
+
);
|
| 426 |
+
for (let i = 1; i < network.levels.length; i++) {
|
| 427 |
+
outputs = Level.feedForward(
|
| 428 |
+
outputs, network.levels[i]
|
| 429 |
+
);
|
| 430 |
+
}
|
| 431 |
+
return outputs;
|
| 432 |
+
}
|
| 433 |
+
|
| 434 |
+
predict(inputs) {
|
| 435 |
+
return NeuralNetwork.feedForward(inputs, this);
|
| 436 |
+
}
|
| 437 |
+
|
| 438 |
+
clone() {
|
| 439 |
+
const clone = new NeuralNetwork([]);
|
| 440 |
+
clone.levels = this.levels.map(level => level.clone());
|
| 441 |
+
return clone;
|
| 442 |
+
}
|
| 443 |
+
|
| 444 |
+
mutate(rate) {
|
| 445 |
+
for (const level of this.levels) {
|
| 446 |
+
for (let i = 0; i < level.biases.length; i++) {
|
| 447 |
+
if (Math.random() < rate) {
|
| 448 |
+
level.biases[i] = lerp(
|
| 449 |
+
level.biases[i],
|
| 450 |
+
Math.random() * 2 - 1,
|
| 451 |
+
0.5
|
| 452 |
+
);
|
| 453 |
+
}
|
| 454 |
+
}
|
| 455 |
+
for (let i = 0; i < level.weights.length; i++) {
|
| 456 |
+
for (let j = 0; j < level.weights[i].length; j++) {
|
| 457 |
+
if (Math.random() < rate) {
|
| 458 |
+
level.weights[i][j] = lerp(
|
| 459 |
+
level.weights[i][j],
|
| 460 |
+
Math.random() * 2 - 1,
|
| 461 |
+
0.5
|
| 462 |
+
);
|
| 463 |
+
}
|
| 464 |
+
}
|
| 465 |
+
}
|
| 466 |
+
}
|
| 467 |
+
}
|
| 468 |
+
}
|
| 469 |
+
|
| 470 |
+
function lerp(a, b, t) {
|
| 471 |
+
return a + (b - a) * t;
|
| 472 |
+
}
|
| 473 |
+
|
| 474 |
+
class Level {
|
| 475 |
+
constructor(inputCount, outputCount) {
|
| 476 |
+
this.inputs = new Array(inputCount);
|
| 477 |
+
this.outputs = new Array(outputCount);
|
| 478 |
+
this.biases = new Array(outputCount);
|
| 479 |
+
this.weights = [];
|
| 480 |
+
|
| 481 |
+
for (let i = 0; i < inputCount; i++) {
|
| 482 |
+
this.weights[i] = new Array(outputCount);
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
Level.#randomize(this);
|
| 486 |
+
}
|
| 487 |
+
|
| 488 |
+
static #randomize(level) {
|
| 489 |
+
for (let i = 0; i < level.inputs.length; i++) {
|
| 490 |
+
for (let j = 0; j < level.outputs.length; j++) {
|
| 491 |
+
level.weights[i][j] = Math.random() * 2 - 1;
|
| 492 |
+
}
|
| 493 |
+
}
|
| 494 |
+
|
| 495 |
+
for (let i = 0; i < level.biases.length; i++) {
|
| 496 |
+
level.biases[i] = Math.random() * 2 - 1;
|
| 497 |
+
}
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
static feedForward(givenInputs, level) {
|
| 501 |
+
for (let i = 0; i < level.inputs.length; i++) {
|
| 502 |
+
level.inputs[i] = givenInputs[i];
|
| 503 |
+
}
|
| 504 |
+
|
| 505 |
+
for (let i = 0; i < level.outputs.length; i++) {
|
| 506 |
+
let sum = 0;
|
| 507 |
+
for (let j = 0; j < level.inputs.length; j++) {
|
| 508 |
+
sum += level.inputs[j] * level.weights[j][i];
|
| 509 |
+
}
|
| 510 |
+
|
| 511 |
+
level.outputs[i] = sum > level.biases[i] ? 1 : 0;
|
| 512 |
+
}
|
| 513 |
+
|
| 514 |
+
return level.outputs;
|
| 515 |
+
}
|
| 516 |
+
|
| 517 |
+
clone() {
|
| 518 |
+
const clone = new Level(0, 0);
|
| 519 |
+
clone.inputs = [...this.inputs];
|
| 520 |
+
clone.outputs = [...this.outputs];
|
| 521 |
+
clone.biases = [...this.biases];
|
| 522 |
+
clone.weights = this.weights.map(arr => [...arr]);
|
| 523 |
+
return clone;
|
| 524 |
+
}
|
| 525 |
+
}
|
| 526 |
+
|
| 527 |
+
// Genetic algorithm functions
|
| 528 |
+
function nextGeneration() {
|
| 529 |
+
const startTime = performance.now();
|
| 530 |
+
generation++;
|
| 531 |
+
generationCount.textContent = generation;
|
| 532 |
+
|
| 533 |
+
// Calculate fitness
|
| 534 |
+
calculateFitness();
|
| 535 |
+
|
| 536 |
+
// Create new population
|
| 537 |
+
const newPopulation = [];
|
| 538 |
+
|
| 539 |
+
// Add the best car from previous generation (elitism)
|
| 540 |
+
const bestCar = getBestCar();
|
| 541 |
+
bestCar.isBest = true;
|
| 542 |
+
newPopulation.push(bestCar.clone());
|
| 543 |
+
|
| 544 |
+
// Fill the rest with crossover and mutation
|
| 545 |
+
for (let i = 1; i < populationSize; i++) {
|
| 546 |
+
const parent = selectParent();
|
| 547 |
+
const child = parent.clone();
|
| 548 |
+
child.brain.mutate(mutationRate);
|
| 549 |
+
newPopulation.push(child);
|
| 550 |
+
}
|
| 551 |
+
|
| 552 |
+
// Replace old population
|
| 553 |
+
cars = newPopulation;
|
| 554 |
+
|
| 555 |
+
// Reset cars
|
| 556 |
+
cars.forEach(car => car.reset());
|
| 557 |
+
|
| 558 |
+
// Update UI
|
| 559 |
+
const endTime = performance.now();
|
| 560 |
+
genTime.textContent = Math.round(endTime - startTime);
|
| 561 |
+
bestCarProgress = 0;
|
| 562 |
+
bestProgressBar.style.width = '0%';
|
| 563 |
+
}
|
| 564 |
+
|
| 565 |
+
function calculateFitness() {
|
| 566 |
+
let sum = 0;
|
| 567 |
+
let max = 0;
|
| 568 |
+
|
| 569 |
+
cars.forEach(car => {
|
| 570 |
+
// Add bonus for checkpoints reached
|
| 571 |
+
car.fitness += car.checkpointIndex * 500;
|
| 572 |
+
sum += car.fitness;
|
| 573 |
+
if (car.fitness > max) max = car.fitness;
|
| 574 |
+
});
|
| 575 |
+
|
| 576 |
+
// Normalize fitness
|
| 577 |
+
cars.forEach(car => {
|
| 578 |
+
car.fitness = car.fitness / sum;
|
| 579 |
+
});
|
| 580 |
+
|
| 581 |
+
maxFitness.textContent = Math.round(max);
|
| 582 |
+
}
|
| 583 |
+
|
| 584 |
+
function getBestCar() {
|
| 585 |
+
let bestCar = cars[0];
|
| 586 |
+
let bestFitness = cars[0].fitness;
|
| 587 |
+
|
| 588 |
+
for (let i = 1; i < cars.length; i++) {
|
| 589 |
+
if (cars[i].fitness > bestFitness) {
|
| 590 |
+
bestFitness = cars[i].fitness;
|
| 591 |
+
bestCar = cars[i];
|
| 592 |
+
}
|
| 593 |
+
}
|
| 594 |
+
|
| 595 |
+
return bestCar;
|
| 596 |
+
}
|
| 597 |
+
|
| 598 |
+
function selectParent() {
|
| 599 |
+
let index = 0;
|
| 600 |
+
let r = Math.random();
|
| 601 |
+
|
| 602 |
+
while (r > 0) {
|
| 603 |
+
r -= cars[index].fitness;
|
| 604 |
+
index++;
|
| 605 |
+
}
|
| 606 |
+
|
| 607 |
+
index--;
|
| 608 |
+
return cars[index];
|
| 609 |
+
}
|
| 610 |
+
|
| 611 |
+
// Simulation state
|
| 612 |
+
let cars = [];
|
| 613 |
+
let animationId;
|
| 614 |
+
let lastTime = 0;
|
| 615 |
+
let frameCount = 0;
|
| 616 |
+
let lastFpsUpdate = 0;
|
| 617 |
+
|
| 618 |
+
// Initialize simulation
|
| 619 |
+
function init() {
|
| 620 |
+
track.createTrack();
|
| 621 |
+
|
| 622 |
+
// Create initial population
|
| 623 |
+
cars = [];
|
| 624 |
+
for (let i = 0; i < populationSize; i++) {
|
| 625 |
+
cars.push(new Car());
|
| 626 |
+
}
|
| 627 |
+
|
| 628 |
+
generation = 0;
|
| 629 |
+
generationCount.textContent = generation;
|
| 630 |
+
populationCount.textContent = populationSize;
|
| 631 |
+
|
| 632 |
+
// Start simulation
|
| 633 |
+
isRunning = true;
|
| 634 |
+
lastTime = performance.now();
|
| 635 |
+
animate();
|
| 636 |
+
}
|
| 637 |
+
|
| 638 |
+
// Main animation loop
|
| 639 |
+
function animate(currentTime = 0) {
|
| 640 |
+
if (!isRunning) return;
|
| 641 |
+
|
| 642 |
+
animationId = requestAnimationFrame(animate);
|
| 643 |
+
|
| 644 |
+
// Calculate FPS
|
| 645 |
+
frameCount++;
|
| 646 |
+
if (currentTime - lastFpsUpdate >= 1000) {
|
| 647 |
+
fps = Math.round((frameCount * 1000) / (currentTime - lastFpsUpdate));
|
| 648 |
+
fpsCounter.textContent = fps;
|
| 649 |
+
frameCount = 0;
|
| 650 |
+
lastFpsUpdate = currentTime;
|
| 651 |
+
}
|
| 652 |
+
|
| 653 |
+
// Clear canvas
|
| 654 |
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
| 655 |
+
|
| 656 |
+
// Draw track
|
| 657 |
+
track.draw(ctx);
|
| 658 |
+
|
| 659 |
+
// Update and draw cars
|
| 660 |
+
let alive = 0;
|
| 661 |
+
cars.forEach(car => {
|
| 662 |
+
car.update();
|
| 663 |
+
car.draw(ctx);
|
| 664 |
+
if (!car.damaged) alive++;
|
| 665 |
+
});
|
| 666 |
+
|
| 667 |
+
aliveCount.textContent = alive;
|
| 668 |
+
|
| 669 |
+
// Check if all cars are dead
|
| 670 |
+
if (alive === 0) {
|
| 671 |
+
nextGeneration();
|
| 672 |
+
}
|
| 673 |
+
|
| 674 |
+
// Highlight best car
|
| 675 |
+
const bestCar = getBestCar();
|
| 676 |
+
if (bestCar) {
|
| 677 |
+
bestCar.isBest = true;
|
| 678 |
+
bestCar.color = 'rgba(220, 38, 38, 0.9)';
|
| 679 |
+
}
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
// Event listeners
|
| 683 |
+
startBtn.addEventListener('click', () => {
|
| 684 |
+
if (!isRunning) {
|
| 685 |
+
isRunning = true;
|
| 686 |
+
animate();
|
| 687 |
+
}
|
| 688 |
+
});
|
| 689 |
+
|
| 690 |
+
pauseBtn.addEventListener('click', () => {
|
| 691 |
+
isRunning = false;
|
| 692 |
+
cancelAnimationFrame(animationId);
|
| 693 |
+
});
|
| 694 |
+
|
| 695 |
+
resetBtn.addEventListener('click', () => {
|
| 696 |
+
isRunning = false;
|
| 697 |
+
cancelAnimationFrame(animationId);
|
| 698 |
+
init();
|
| 699 |
+
});
|
| 700 |
+
|
| 701 |
+
populationSlider.addEventListener('input', () => {
|
| 702 |
+
populationSize = parseInt(populationSlider.value);
|
| 703 |
+
populationValue.textContent = populationSize;
|
| 704 |
+
});
|
| 705 |
+
|
| 706 |
+
mutationSlider.addEventListener('input', () => {
|
| 707 |
+
mutationRate = parseInt(mutationSlider.value) / 100;
|
| 708 |
+
mutationValue.textContent = `${parseInt(mutationSlider.value)}%`;
|
| 709 |
+
});
|
| 710 |
+
|
| 711 |
+
// Initialize the simulation
|
| 712 |
+
init();
|
| 713 |
+
});
|
| 714 |
+
</script>
|
| 715 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=lunarflu/https-huggingface-co-spaces-lunarflu-rpg" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 716 |
+
</html>
|