More hyperparameters!

This commit is contained in:
MaxRobinsonTheGreat
2020-07-20 14:03:16 -06:00
parent 3e137499f7
commit c94e137ae4
8 changed files with 369 additions and 35 deletions

View File

@@ -96,6 +96,31 @@ class ControlPanel {
Hyperparams.lifespanMultiplier = lifespan;
}
}.bind(this));
$('#mover-rot').change(function() {
Hyperparams.moversCanRotate = this.checked;
});
$('#offspring-rot').change(function() {
Hyperparams.offspringRotate = this.checked;
});
$('#insta-kill').change(function() {
Hyperparams.instaKill = this.checked;
});
$('#evolved-mutation').change( function() {
if (this.checked) {
$('.global-mutation-in').css('display', 'none');
$('#avg-mut').css('display', 'block');
}
else {
$('.global-mutation-in').css('display', 'block');
$('#avg-mut').css('display', 'none');
}
Hyperparams.useGlobalMutability = !this.checked;
});
$('#global-mutation').change( function() {
Hyperparams.globalMutability = $('#global-mutation').val();
});
$('.mut-prob').change( function() {
switch(this.id){
case "add-prob":
@@ -115,15 +140,11 @@ class ControlPanel {
$('#change-prob').val(Math.floor(Hyperparams.changeProb));
$('#remove-prob').val(Math.floor(Hyperparams.removeProb));
});
$('#mover-rot').change(function() {
Hyperparams.moversCanRotate = this.checked;
$('#movers-produce').change( function() {
Hyperparams.moversCanProduce = this.checked;
});
$('#offspring-rot').change(function() {
Hyperparams.offspringRotate = this.checked;
});
$('#insta-kill').change(function() {
Hyperparams.instaKill = this.checked;
$('#food-blocks').change( function() {
Hyperparams.foodBlocksReproduction = this.checked;
});
}

View File

@@ -67,6 +67,14 @@ class EnvironmentController extends CanvasController{
}
}
dropWall(cell) {
}
dropFood(cell) {
}
}