diff --git a/boundary.js b/boundary.js
index da4342a..c30a8e6 100644
--- a/boundary.js
+++ b/boundary.js
@@ -5,6 +5,16 @@
// 2D Ray Casting
// https://editor.p5js.org/codingtrain/sketches/Nqsq3DFv-
+/**
+ * @tutorial https://www.npmjs.com/package/@types/p5
+ * @description run npm i @types/p5
+ */
+
+///
+///
+
+///
+
class Boundary {
constructor(x1, y1, x2, y2) {
this.a = createVector(x1, y1);
diff --git a/ga.js b/ga.js
index 12d565f..2e0810e 100644
--- a/ga.js
+++ b/ga.js
@@ -1,9 +1,11 @@
// Daniel Shiffman
// Neuro-Evolution Steering
+///
+
function nextGeneration() {
console.log('next generation');
- calculateFitness(end);
+ calculateFitness();
for (let i = 0; i < TOTAL; i++) {
population[i] = pickOne();
}
@@ -13,6 +15,9 @@ function nextGeneration() {
savedParticles = [];
}
+/**
+ * @returns {Particle}
+ */
function pickOne() {
let index = 0;
let r = random(1);
@@ -28,7 +33,7 @@ function pickOne() {
return child;
}
-function calculateFitness(target) {
+function calculateFitness() {
for (let particle of savedParticles) {
particle.calculateFitness();
}
diff --git a/index.html b/index.html
index e704f28..51fee56 100644
--- a/index.html
+++ b/index.html
@@ -1,5 +1,6 @@
+
@@ -9,6 +10,7 @@
2D Ray Casting
+
@@ -16,5 +18,7 @@
+
-
+
+