-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.html
181 lines (173 loc) · 7.92 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Imperialistic competitive algorithm</title>
<link rel="stylesheet" type="text/css" href="./styles.css" />
</head>
<body>
<div class="wrapper">
<div id="fun-container" class="bordered"></div>
<div class="middle-panel-container">
<div id="controls-container">
<button id="State" class="big-btn">STOP</button>
<table class="middle-container">
<tr>
<td>
<p id="DelayDisplay">Speed:</p>
</td>
<td>
<input id="Delay" type="range" min="-3000" max="-1" value="-1500">
</td>
</tr>
</table>
<div id="stats-wrapper">
<table id="stats-table">
<tr>
<td>Iteration</td>
<td class="info-table">
<div id="iteration"></div>
</td>
</tr>
<tr>
<td>Empires alive</td>
<td class="info-table">
<div id="empires-alive"></div>
</td>
</tr>
<tr>
<td>Best empire</td>
<td class="info-table">
<div id="best-empire-color"></div>
</td>
</tr>
<tr>
<td>Optimum</td>
<td class="info-table">
<div id="optimum-args"></div>
</td>
</tr>
<tr>
<td>Optimum value</td>
<td class="info-table">
<div id="found-optimum"></div>
</td>
</tr>
</table>
</div>
</div>
<div id="info-container"></div>
</div>
<div class="right-panel-container">
<div id="avg-value-container"></div>
<div id="parameters-wrapper">
<table width="600" id="parameters-table">
<tr>
<td>Number of nations:</td>
<td class="right-column-table">
<input type="number" id="nations" name="nations" size="4" min="0">
</td>
</tr>
<tr>
<td>Number of empires:</td>
<td class="right-column-table">
<input type="number" id="empires" name="empires" size="4" min="0">
</td>
</tr>
<tr>
<td>Number of iterations:</td>
<td class="right-column-table">
<input type="number" id="iterations-number" name="iterations-number" size="4" min="0">
</td>
</tr>
<tr>
<td>Alpha:</td>
<td class="right-column-table">
<input type="number" id="alpha" name="alpha" size="4" step="0.1" min="0">
</td>
</tr>
<tr>
<td>Beta:</td>
<td class="right-column-table">
<input type="number" id="beta" name="beta" size="2" step="0.4" min="0">
</td>
</tr>
<tr>
<td>Gamma:</td>
<td class="right-column-table">
<input type="number" id="gamma" name="gamma" size="4" step="0.087" min="0" max="3.14">
</td>
</tr>
<tr>
<td>Rescale plot:</td>
<td class="right-column-table">
<input id="rescale-never" type="radio" name="rescale" value="never"> never
<br>
<input id="rescale-empires" type="radio" name="rescale" value="empires"> based on empires
<br>
<input id="rescale-nations" type="radio" name="rescale" value="nations"> based on all
nations
<br>
<br>
</td>
</tr>
<tr>
<td>Function:</td>
<td class="right-column-table">
<select class="functions-input" id="functions-select">
<option value="Rastrigin">Rastrigin</option>
<option value="Ackley">Ackley</option>
<option value="Sphere">Sphere</option>
<option value="Rosenbrock">Rosenbrock</option>
<option value="Himmelblau">Himmelblau's</option>
<option value="Custom">Custom</option>
</select>
</td>
</tr>
<tr>
<td>Formula:</td>
<td class="right-column-table">
<input type="text" class="formula" id="formula">
</td>
</tr>
<tr>
<td>Search domain [- 10^3, 10^3]:</td>
<td class="right-column-table">
<div>
X:
<input type="number" id="minX" name="minX" size="4" step="0.5" min="-100" max="100">
<input type="number" id="maxX" name="maxX" size="4" step="0.5" min="-100" max="100">
</div>
<div>
Y:
<input type="number" id="minY" name="minY" size="4" step="0.5" min="-100" max="100">
<input type="number" id="maxY" name="maxY" size="4" step="0.5" min="-100" max="100">
</div>
</td>
</tr>
<tr>
<td>
<button id="Reset" class="right-table-btn">RESTART WITH PARAMETERS</button>
</td>
<td class="right-column-table">
<button id="Reset-params" class="right-table-btn">RESET PARAMETERS TO DEFAULT</button>
</td>
</tr>
</table>
</div>
</div>
</div>
<footer>
<a class="github-link" href="https://github.com/tomsiemek/imperialistic-competitive-algorithm-visualisation">Github</a><a class="confused-link" href="https://github.com/tomsiemek/imperialistic-competitive-algorithm-visualisation#what-is-it">Confused?</a>
</footer>
<script src='./lib/math.min.js'></script>
<script src='./lib/d3.v4.min.js'></script>
<script src='./scripts/helper.js'></script>
<script src='./scripts/functions.js'></script>
<script src='./scripts/algorithm.js'></script>
<script src='./scripts/avg-graph.js'></script>
<script src='./scripts/bubble-graph.js'></script>
</body>
</html>