-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex-updatedversion.html
More file actions
172 lines (144 loc) · 5.29 KB
/
index-updatedversion.html
File metadata and controls
172 lines (144 loc) · 5.29 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
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
<!--
Copyright 2018 Google LLC. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================
-->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="/tfjs-examples.44bb3400.css">
<link rel="shortcut icon" href="dog3.jpg" />
<title>The Machine Learning Adventures of Jojo and Junior</title>
</head>
<body>
<style>#app-status {
color: blue;
padding-bottom: 1em;
}
#create-model, #delete-stored-model, #train, #test {
background-color: rgb(124, 181, 236);
}
.buttons-section {
margin-top: 12px;
}
.init-model {
width: 80%;
margin-right: 50px;
}
.input-div, .status {
margin-top: 6px;
margin-bottom: 12px;
}
label {
min-width: 200px;
display: inline-block;
}
button {
max-width: 300px;
}
.note {
font-size: 80%;
font-style: italic;
display: inline-block;
margin-left: 15px;
}
h1 {
font-size: 2.5em;
}
p.section-head {
border-left: 1px solid rgb(124, 181, 236);
}
</style>
<body>
<div class="tfjs-example-container centered-container">
<section class="title-area">
<h1>The Machine Learning Adventures of Jojo and Junior</h1>
<p class="subtitle">Using Tensorflow.js to implement reinforcement learning</p>
</section>
<section>
<p class="section-head">Description</p>
<p>This is the client front end where Tensorflow.js performs reinforcement learning, using an implementation of the policy-gradient method.</p>
<p>The trained model is exported to the operating system's file system, then imported to the Node.js server that runs the simulation.</p>
</section>
<section>
<p class="section-head">Status</p>
<div>
<span id="app-status">Standing by.</span>
</div>
<div>
<p class="section-head">Initialize Model</p>
<div class="with-cols">
<div class="with-rows init-model">
<div class="input-div with-rows">
<label class="input-label">Hidden layer size(s) (e.g.: "256", "32,64"):</label>
<input id="hidden-layer-sizes" value="128">
</div>
<button id="create-model" disabled="true">Create model</button>
</div>
<div class="with-rows init-model">
<div class="input-div with-rows">
<label class="input-label">Locally-stored model</label>
<input id="stored-model-status" value="N/A" disabled="true" readonly="true">
</div>
<button id="delete-stored-model" disabled="true">Delete stored model</button>
</div>
</div>
<p class="section-head">Training Parameters</p>
<div class="with-rows">
<div class="input-div">
<label class="input-label">Number of iterations:</label>
<input id="num-iterations" value="20">
</div>
<div class="input-div">
<label class="input-label">Games per iteration:</label>
<input id="games-per-iteration" value="20">
</div>
<div class="input-div">
<label class="input-label">Max. steps per game:</label>
<input id="max-steps-per-game" value="500">
</div>
<div class="input-div">
<label class="input-label">Reward discount rate:</label>
<input id="discount-rate" value="0.95">
</div>
<div class="input-div">
<label class="input-label">Learning rate:</label>
<input id="learning-rate" value="0.05">
</div>
<div class="buttons-section">
<button id="train" disabled="true">Train</button>
<button id="test" disabled="true">Test</button>
</div>
</div>
</div>
</section>
<section>
<p class="section-head">Training Progress</p>
<div class="with-rows">
<div class="status">
<label id="train-status">Iteration #:</label>
<progress value="0" max="100" id="train-progress"></progress>
</div>
<div class="status">
<label id="iteration-status">Game #:</label>
<progress value="0" max="100" id="iteration-progress"></progress>
</div>
<div class="status">
<label>Training speed:</label>
<span id="train-speed" class="status-span"></span>
</div>
<div id="steps-container"></div>
</div>
</section>
<script src="/cart-pole.e31bb0bc.js"></script>
</div></body>
</body></html>