-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
81 lines (66 loc) · 2.89 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
<head>
<title>Projeto Simoes</title>
<meta charset="iso-8859-1"/>
<script src="https://cdn.plot.ly/plotly-latest.min.js"></script>
<script type="text/javascript" src="script.js"></script>
<link rel="stylesheet" type="text/css" href="style.css"/>
</head>
<body>
<div class="user" id="user-options">
<form>
<b>Select function</b>
<select id="funcToPlot" name="funcToPlot" onchange="changeOtherReadOnly(this)">
<option value="x+y">x+y</option>
<option value="x*Math.sin(x) + y*Math.cos(y)">x*Math.sin(x) + y*Math.cos(y)</option>
<option value="(x*x/9 + y*y/16)/25">(x*x/9 + y*y/16)/25</option>
<option value="Math.exp(Math.sin(x)) - Math.sin(x**3*y**2) + Math.sqrt(y/10) + Math.log(x**4*y**3+1) - Math.sqrt(x/10)">Math.exp(Math.sin(x)) - Math.sin(x**3*y**2) + Math.sqrt(y/10) + Math.log(x**4*y**3+1) - Math.sqrt(x/10)</option>
<option value="other">Other</option>
</select>
<input type="text" id="funcToPlotTxt" name="funcToPlotTxt" readonly="true"><br>
<br>
<label><input type="checkbox" id="plotOrNo" name="plotOrNo" value="plotOrNo" checked> Plot function?</label><br>
<b>Evolution method:</b> <br>
<label><input type="checkbox" id="elitism" name="elitism" value="e" checked> Elitism</label><br>
<label><input type="checkbox" id="roulette" name="roulette" value="e" checked> Roulette</label><br>
<label><input type="checkbox" id="tournament" name="tournament" value="t" checked> Tournament</label><br>
<label>Generations: <input type="number" id="generations" name="generations" min="0" value="5"></label><br>
<label>Population: <input type="number" id="population" name="population" min="0" value="5"></label><br>
<label>Mutation Ratio: <input type="number" id="mutation" step="0.1" name="mutation" value="10"></label>
<button type="button" onclick="generateAll()">Generate!</button>
</form>
</div>
<br>
<!-- Elitism -->
<div class="functions" id="f-elitism" style="display: none;">
<div class="points-description"><h2>Elitism</h2><br>
<div id="desc-elitism"></div>
</div>
<div class="plot-function" id="func-elitism"></div>
<br><br>
</div>
<!-- Roulette -->
<div class="functions" id="f-roulette" style="display: none;">
<div class="points-description"><h2>Roulette</h2><br>
<div id="desc-roulette"></div>
</div>
<div class="plot-function" id="func-roulette"></div>
<br>
</div>
<!-- Tournament -->
<div class="functions" id="f-tournament" style="display: none;">
<div class="points-description"><h2>Tournament</h2><br>
<div id="desc-tournament"></div>
</div>
<div class="plot-function" id="func-tournament"></div>
<br>
</div>
<!-- Comparison -->
<div class="functions" id="f-compare" style="display: none;">
<h2>Comparison</h2>
<div id="func-compare"></div>
<br>
</div>
<a href="https://github.com/andrefakhoury/genetic-max-value-calculator">
<div id="footer">You can view the codes here!</div>
</a>
</body>