awacke1 commited on
Commit
0ea72a5
·
verified ·
1 Parent(s): 314c009

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +59 -60
index.html CHANGED
@@ -7,97 +7,96 @@
7
  body { margin: 0; overflow: hidden; }
8
  #info {
9
  position: absolute;
10
- top: 10px; left: 10px;
 
 
11
  color: #fff;
12
  font-family: sans-serif;
13
- background: rgba(0,0,0,0.4);
14
- padding: 8px 12px;
15
  border-radius: 4px;
16
- font-size: 14px;
 
17
  }
 
 
 
 
 
 
 
18
  </style>
19
  </head>
20
  <body>
21
  <div id="info">
22
- <strong>Particles:</strong> Ensemble Kalman Inversion (attraction to mean)<br/>
23
- <strong>Noise:</strong> Affine-Invariant Langevin Dynamics
 
 
 
 
 
 
 
 
24
  </div>
 
25
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js"></script>
26
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/examples/js/controls/OrbitControls.js"></script>
27
  <script>
28
  // --- SCENE SETUP ---
29
- let scene = new THREE.Scene();
30
- let camera = new THREE.PerspectiveCamera(60, window.innerWidth / window.innerHeight, 0.1, 1000);
31
  camera.position.set(0, 0, 50);
32
 
33
- let renderer = new THREE.WebGLRenderer({ antialias: true });
34
  renderer.setSize(window.innerWidth, window.innerHeight);
35
  document.body.appendChild(renderer.domElement);
36
 
37
- let controls = new THREE.OrbitControls(camera, renderer.domElement);
38
-
39
  window.addEventListener('resize', () => {
40
- camera.aspect = window.innerWidth / window.innerHeight;
41
  camera.updateProjectionMatrix();
42
  renderer.setSize(window.innerWidth, window.innerHeight);
43
  });
44
 
45
- // --- PARTICLE SYSTEM PARAMETERS ---
46
- const PARTICLE_COUNT = 100;
47
  const particles = [];
48
- const geometry = new THREE.SphereGeometry(0.5, 8, 8);
49
-
50
- // Initialize particles with random positions
51
- for (let i = 0; i < PARTICLE_COUNT; i++) {
52
- let material = new THREE.MeshBasicMaterial({
53
- color: new THREE.Color(Math.random(), Math.random(), Math.random())
54
- });
55
- let p = new THREE.Mesh(geometry, material);
56
- p.position.set(
57
- (Math.random() - 0.5) * 40,
58
- (Math.random() - 0.5) * 40,
59
- (Math.random() - 0.5) * 40
60
- );
61
- particles.push(p);
62
- scene.add(p);
63
  }
64
 
65
- // --- UPDATE LOOP ---
66
- function updateParticles() {
67
- // 1) Compute ensemble mean
68
- let mean = new THREE.Vector3();
69
- particles.forEach(p => mean.add(p.position));
70
- mean.divideScalar(PARTICLE_COUNT);
71
-
72
- // 2) Compute a rough measure of covariance (average squared distance)
73
- let cov = 0;
74
- particles.forEach(p => cov += p.position.distanceToSquared(mean));
75
- cov /= PARTICLE_COUNT;
76
-
77
- // 3) For each particle: apply EKI‐style attraction + ALDI noise
78
- const attractionStrength = 0.01;
79
- const noiseScale = 0.1 * Math.sqrt(cov);
80
-
81
- particles.forEach(p => {
82
- // Attraction toward mean (EKI)
83
- let toMean = mean.clone().sub(p.position).multiplyScalar(attractionStrength);
84
-
85
- // Affine-Invariant Langevin noise
86
- let noise = new THREE.Vector3(
87
- (Math.random() - 0.5),
88
- (Math.random() - 0.5),
89
- (Math.random() - 0.5)
90
- ).multiplyScalar(noiseScale);
91
-
92
- // Update position
93
  p.position.add(toMean).add(noise);
94
  });
95
  }
96
 
97
- // --- RENDER LOOP ---
98
- function animate() {
99
  requestAnimationFrame(animate);
100
- updateParticles();
101
  controls.update();
102
  renderer.render(scene, camera);
103
  }
 
7
  body { margin: 0; overflow: hidden; }
8
  #info {
9
  position: absolute;
10
+ top: 10px;
11
+ left: 10px;
12
+ background: rgba(0,0,0,0.6);
13
  color: #fff;
14
  font-family: sans-serif;
15
+ padding: 10px;
 
16
  border-radius: 4px;
17
+ max-width: 300px;
18
+ line-height: 1.4;
19
  }
20
+ #info h1 {
21
+ margin: 0 0 6px;
22
+ font-size: 16px;
23
+ }
24
+ #info p { margin: 4px 0; font-size: 13px; }
25
+ #info a { color: #66ccff; text-decoration: none; }
26
+ #info a:hover { text-decoration: underline; }
27
  </style>
28
  </head>
29
  <body>
30
  <div id="info">
31
+ <h1>Gradient-Free Sequential BOED</h1>
32
+ <p><strong>Gruhlke et al.</strong></p>
33
+ <p>
34
+ <a href="https://arxiv.org/abs/2504.13320" target="_blank">arXiv Abstract</a> |
35
+ <a href="https://arxiv.org/pdf/2504.13320" target="_blank">PDF</a>
36
+ </p>
37
+ <p style="font-size:12px;">
38
+ Uses Ensemble Kalman Inversion + Affine-Invariant Langevin sampling<br/>
39
+ for gradient-free sequential experimental design.
40
+ </p>
41
  </div>
42
+
43
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js"></script>
44
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/examples/js/controls/OrbitControls.js"></script>
45
  <script>
46
  // --- SCENE SETUP ---
47
+ const scene = new THREE.Scene();
48
+ const camera = new THREE.PerspectiveCamera(60, window.innerWidth/window.innerHeight, 0.1, 1000);
49
  camera.position.set(0, 0, 50);
50
 
51
+ const renderer = new THREE.WebGLRenderer({ antialias: true });
52
  renderer.setSize(window.innerWidth, window.innerHeight);
53
  document.body.appendChild(renderer.domElement);
54
 
55
+ const controls = new THREE.OrbitControls(camera, renderer.domElement);
 
56
  window.addEventListener('resize', () => {
57
+ camera.aspect = window.innerWidth/window.innerHeight;
58
  camera.updateProjectionMatrix();
59
  renderer.setSize(window.innerWidth, window.innerHeight);
60
  });
61
 
62
+ // --- PARTICLES ---
63
+ const N = 100;
64
  const particles = [];
65
+ const sphereGeo = new THREE.SphereGeometry(0.5, 8, 8);
66
+ for(let i=0; i<N; i++){
67
+ const mat = new THREE.MeshBasicMaterial({ color: new THREE.Color(Math.random(),Math.random(),Math.random()) });
68
+ const m = new THREE.Mesh(sphereGeo, mat);
69
+ m.position.set((Math.random()-0.5)*40, (Math.random()-0.5)*40, (Math.random()-0.5)*40);
70
+ particles.push(m);
71
+ scene.add(m);
 
 
 
 
 
 
 
 
72
  }
73
 
74
+ function step(){
75
+ // ensemble mean
76
+ const mean = new THREE.Vector3();
77
+ particles.forEach(p=>mean.add(p.position));
78
+ mean.divideScalar(N);
79
+ // covariance proxy
80
+ let cov=0;
81
+ particles.forEach(p=>cov+=p.position.distanceToSquared(mean));
82
+ cov/=N;
83
+ const alpha=0.01, noiseAmp=0.1*Math.sqrt(cov);
84
+ particles.forEach(p=>{
85
+ // EKI attraction
86
+ const toMean = mean.clone().sub(p.position).multiplyScalar(alpha);
87
+ // ALDI noise
88
+ const noise = new THREE.Vector3(
89
+ (Math.random()-0.5),
90
+ (Math.random()-0.5),
91
+ (Math.random()-0.5)
92
+ ).multiplyScalar(noiseAmp);
 
 
 
 
 
 
 
 
 
93
  p.position.add(toMean).add(noise);
94
  });
95
  }
96
 
97
+ function animate(){
 
98
  requestAnimationFrame(animate);
99
+ step();
100
  controls.update();
101
  renderer.render(scene, camera);
102
  }