-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
200 lines (164 loc) · 6.18 KB
/
index.html
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<link rel="stylesheet" href="styles/ion.rangeSlider.min.css">
<link rel="stylesheet" href="styles/style.css">
</head>
<body>
<div id="app">
<div id="canvas"></div>
<div id="controls">
<div class="ui-group">
<div class="ui-group-header">
<div class="ui-group-header-title">Main settings</div>
</div>
<div class="ui-group-body">
<div class="ui-field">
<div class="ui-label">
<div class="ui-label-text">Select track</div>
<div class="ui-label-subtext">Pick one of multiple tracks</div>
</div>
<div class="ui-value">
<select id="track-select">
<option value="0">Track 1</option>
<option value="1">Track 2</option>
<option value="2">Track 3</option>
</select>
</div>
</div>
<div class="ui-field">
<div class="ui-label">
<div class="ui-label-text">Main</div>
<div class="ui-label-subtext">Main simulation controls</div>
</div>
<div class="ui-value">
<button id="kill-active">Kill active</button>
<button id="reset">Reset all</button>
<button id="reverse">Reverse</button>
</div>
</div>
<div class="ui-field">
<div class="ui-label">
<div class="ui-label-text">Display</div>
<div class="ui-label-subtext">Change displayed elements</div>
</div>
<div class="ui-value">
<button data-config="visionLines" class="toggle-button" id="vision-lines">Vision lines</button>
<button data-config="visionPoints" class="toggle-button" id="vision-points">Vision points</button>
<button data-config="checkpoints" class="toggle-button" id="checkpoints">Checkpoints</button>
</div>
</div>
</div>
</div>
<div class="ui-group">
<div class="ui-group-header">
<div class="ui-group-header-title">Car</div>
</div>
<div class="ui-group-body">
<div class="ui-field">
<div class="ui-label">
<div class="ui-label-text">Vision line length:</div>
<div class="ui-label-subtext">Applied on the next generation</div>
</div>
<div class="ui-value slider">
<input type="text" id="vision-line-length-slider" />
</div>
</div>
</div>
</div>
<div class="ui-group">
<div class="ui-group-header">
<div class="ui-group-header-title">Population</div>
</div>
<div class="ui-group-body">
<div class="ui-field">
<div class="ui-label">
<div class="ui-label-text">Total units:</div>
<div class="ui-label-subtext">Applied on the next generation</div>
</div>
<div class="ui-value slider">
<input type="text" id="total-units-slider" />
</div>
</div>
<div class="ui-field">
<div class="ui-label">
<div class="ui-label-text">Mutation rate:</div>
<div class="ui-label-subtext">Applied on the next generation</div>
</div>
<div class="ui-value slider">
<input type="text" id="mutation-rate-slider" />
</div>
</div>
</div>
</div>
<div class="ui-group">
<div class="ui-group-header">
<div class="ui-group-header-title">Data</div>
</div>
<div class="ui-group-body">
<div class="ui-field">
<div class="ui-label">
<div class="ui-label-text">Pre-trained</div>
<div class="ui-label-subtext">Use pre-trained examples</div>
</div>
<div class="ui-value">
<select id="pre-trained-data">
<option value="" selected disabled hidden>Select data</option>
</select>
</div>
</div>
<div class="ui-field">
<button id="save-data">Save data</button>
<div class="info-text ui-value">Save brain data as json file from currently best unit.</div>
</div>
<div class="ui-field">
<label class="file-upload ui-label">
<input id="load-data" type="file" />
<span>Load data</span>
</label>
<div class="info-text ui-value">
<div>Load brain data from json file.</div>
<div>Data will be applied to whole population + mutation.</div>
<div>Data size must match brain size of current population.</div>
</div>
</div>
<div class="ui-field column">
<div class="ui-label ui-buttons">
<button id="apply-data">Apply data</button>
<button id="clear-data">Clear data</button>
</div>
<div class="ui-value">
<textarea id="loaded-data" cols="30" rows="5"></textarea>
</div>
</div>
</div>
</div>
</div><!-- End of controls -->
</div>
<!-- Scripts -->
<script src="scripts/jquery.min.js"></script>
<script src="scripts/ion.rangeSlider.min.js"></script>
<script src="scripts/p5.min.js"></script>
<script src="scripts/p5.collide2d.min.js"></script>
<script src="scripts/custom.js"></script>
<!-- Data -->
<script src="data/tracks.js"></script>
<script src="data/trained.js"></script>
<!-- Game -->
<script src="source/config.js"></script>
<script src="source/population.js"></script>
<script src="source/car.js"></script>
<script src="source/track.js"></script>
<script src="source/stats.js"></script>
<script src="source/controls.js"></script>
<!-- Neural network -->
<script src="neural-network/matrix.js"></script>
<script src="neural-network/activation.js"></script>
<script src="neural-network/layer.js"></script>
<script src="neural-network/network.js"></script>
<!-- Index -->
<script src="index.js"></script>
</body>
</html>