-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.js
49 lines (38 loc) · 995 Bytes
/
settings.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
var h = 20;
var w = 20;
var gui;
var gameWidth = 400;
var gameHeight = 400;
var networkHeight = 400;
var networkWidth = 400;
var networkTextWidth = 70;
var infoHeight = 200;
var infoWidth = gameWidth;
var block = gameWidth / w;
var directions = [];
var r, d, l, u;
var snake;
var view = true;
var show = true;
var autoEvolve = false;
var logInfo = false;
var fruitColor;
var gameColor;
var snakeColor;
var generationBests = [];
var generationAverages = [];
var generationWorst = [];
var mutationRate = 0.05;
var noOfHiddenNeurons = 14;
var noOfHiddenLayers = 0;
var noOfInputs = 13;
var noOfOutputs = 4;
var noOfNetworks = 200;
var noOfRuns = 10;
var maxMoves = 180;
var movePoints = 1;
var fruitPoints = 40;
var viewing = 0;
var oldViewing = -1;
var inputTitles = ["Fruit Right", "Body Right", "Wall Right", "Fruit Down", "Body Down", "Wall Down", "Fruit Left", "Body Left", "Wall Left", "Fruit Up", "Body Up", "Wall Up", "Bias"];
var outputTitles = ["Right", "Down", "Left", "Up"];