Add self driving car app
This commit is contained in:
@@ -59,8 +59,8 @@ export class SimpleGA {
|
||||
// 3. Fill rest
|
||||
while (nextPop.length < popSize) {
|
||||
// Diversity Injection (Random Immigrants)
|
||||
// 5% chance to just insert a completely fresh brain to maintain diversity
|
||||
if (Math.random() < 0.05) {
|
||||
// Increased from 5% to 15% to combat stagnation
|
||||
if (Math.random() < 0.15) {
|
||||
const dn = new DenseNetwork(this.layerSizes);
|
||||
nextPop.push(dn.getWeights());
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user