-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.html
More file actions
132 lines (126 loc) · 5.93 KB
/
index.html
File metadata and controls
132 lines (126 loc) · 5.93 KB
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="info_buttons">
<input type="button" value="About" onclick="aboutClicked()">
</div>
<div id="header">
<img src="./images/ant150px.png" />AntSim <img class="flipped" src="./images/ant150px.png" />
</div>
<div style="height:20px;"></div>
<div id="options">
<input type="button" value="Tutorial" onclick="tutorialClicked()">
<input type="button" value="Teaser" id="teaserButton">
<input type="button" value="Simulation" onclick="simulationClicked()">
<input type="button" value="Training" onclick="trainingClicked()">
</div>
<div id="all">
<p id="mode"></p>
<div id="allContainer">
<div id="simulationOptions">
<div id="modes">
<input type="radio" id="solo" name="simulationMode" value="0" checked>
<label for="solo"> Solo</label>
<input type="radio" id="competitive" name="simulationMode" value="1">
<label for="competitive"> Competitive</label>
</div>
<div id="typesEnemy">
EnemyAnt<select id="AntTypeEnemy" size="1">
<option value="1" selected>Simple</option>
<option value="2">NeuralNet</option>
</select>
<!-- HiveType<select id="HiveTypeEnemy" size="1">
<option selected>Default</option>
<option>Custom</option>
</select>-->
</div>
<input type="button" value="Next" id="nextButton">
<!-- Editor stuff -->
</div>
<!-- Training view -->
<div id="editorContainer">
<div id="trainingButtons">
<input type="button" value="train" id="startTrainingButton">
<input type="button" value="test" id="testTrainingButton">
<input type="button" value="reset" id="resetTrainingButton">
<input id="selectNetwork" type="file" accept=".neuraln" onpropertychange="handleFileSelect()" style="position:absolute;visibility:hidden;"/>
<input type="button" value="load" id="loadNetwork">
<a id="downloadAnchorElem" style="display:none"></a>
<input type="button" value="save" id="saveNetwork">
<!--<div id="loadNetwork" style="display: inline-block; width:50px; height:50px">
</div>-->
Seed <input type="number" id="seed" style="width:50px" value="0" /><br/>
</div>
<div id="simulationButtons">
<input type="button" value="API" onclick="apiClicked()">
<input type="checkbox" id="showUI" checked /> ShowUI
<input type="button" value="Run" id="runButton">
</div>
<div id="typesSelf">
AntType<select id="AntTypeSelf" size="1">
<option value="0" selected>Custom</option>
<option value="1">Simple</option>
<option value="2">NeuralNet</option>
</select>
<!-- HiveType<select id="HiveTypeSelf" size="1">
<option selected>Default</option>
<option>Custom</option>
</select> -->
</div>
<br>
<pre id="editor"></pre>
</div>
<!-- Simulation view -->
<div id="simulationSandbox">
<div id="simulationContainer">
<div id="frameCounter">
Frame<input type="number" id="frame" style="width:50px" value="0" readonly /><br/>
</div>
<div align="center" id="graphs" style="display:none;">
<div id="graphAnts"></div>
<div id="graphStats"></div>
</div>
<canvas align="center" width="600" height="350" class="terrarium" id="canvasSimulation"></canvas>
<div id="settings">Settings<br/>
FPS<input type="number" id="fps" style="width:50px" value="30" max="60" min="1" onchange="SettingsGlobal.setFramesPerSecond(document.getElementById('fps').value);" /><br/>
<div id="debugContainer">Debug stuff<br>
<input type="checkbox" id="debugShowLife" onchange="Debug.setShowLife(document.getElementById('debugShowLife').checked);" /> Show life <br/>
<input type="checkbox" id="debugVisibility" onchange="Debug.setVisibility(document.getElementById('debugVisibility').checked);" /> Show visibility <br/>
<input type="checkbox" id="debugCollider" onchange="Debug.setShowCollider(document.getElementById('debugCollider').checked);" /> Show collider <br/>
<input type="checkbox" id="debugFoodAmount" onchange="Debug.setShowFoodAmount(document.getElementById('debugFoodAmount').checked);" /> Show food amount <br/>
<input type="checkbox" id="debugSmellingDistance" onchange="Debug.setShowSmellingDistance(document.getElementById('debugSmellingDistance').checked);" /> Show smelling distance <br/>
<input type="checkbox" id="debugSmelledObjectsPosition" onchange="Debug.setShowSmelledObjectsPosition(document.getElementById('debugSmelledObjectsPosition').checked);" /> Show smelled object distance <br/>
<input type="checkbox" id="debugPheromones" onchange="Debug.setShowPheromones(document.getElementById('debugPheromones').checked);" /> Show pheromones <br/>
</div>
</div>
<!-- no ui -->
<div id="NoUI" style="display:none;">...Simulating...</div>
</div>
</div>
<div id="cleared"></div>
<div id="floatingContainer">
<iframe id="message" src="./user-code_doc/index.html"></iframe>
<input type="button" id="message_close" value="Close" onclick="closeMessage()">
</div>
</div>
<div id="cleared"></div>
</div>
<!-- doesnt work with requirejs -->
<script src="./js/external/ace_min_noconflict/ace.js"></script>
<script src="./js/external/ace_min_noconflict/ext-language_tools.js"></script>
<script src="./js/external/flotr2/flotr2.min.js"></script>
<script src="./js/external/require.js"></script>
<script src="./exampleAnts/simpleAnt.js"></script>
<script src="./exampleAnts/neuralNetworkAnt.js"></script>
<script src="./js/settingsGlobal.js"></script>
<script src="./js/debug.js"></script>
<script src="./js/globals.js"></script>
<script src="./js/initSimulation.js"></script>
<script src="./js/init.js"></script>
</body>
</html>