mirror of
https://github.com/wassname/rl_2d_walker.js.git
synced 2026-08-22 12:20:24 +08:00
58 lines
1.8 KiB
HTML
58 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<title>HTML5 Genetic Algorithm Biped Walkers</title>
|
|
<link rel="stylesheet" href="css/walkers.css" type="text/css" />
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.3/Chart.js"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js"></script>
|
|
<script src="vendor/jsbox2d.js"></script>
|
|
<script src="vendor/neurojs-v2.js"></script>
|
|
<script src="js/walker.js"></script>
|
|
<script src="js/game.js"></script>
|
|
<script src="js/floor.js"></script>
|
|
<script src="js/draw.js"></script>
|
|
<script src="js/agent.js"></script>
|
|
<script src="js/charts.js"></script>
|
|
<script>
|
|
|
|
function init() {
|
|
gameInit();
|
|
}
|
|
|
|
window.addEventListener("load", init, false);
|
|
|
|
</script>
|
|
|
|
</head>
|
|
<body>
|
|
<div id="main_holder">
|
|
<h1>Reinforcement Learning 2D Humanoid Walkers</h1>
|
|
<h3 id="page_quote">"Play that funky music, robot"</h3>
|
|
<canvas id="main_screen" width="800" height="350"></canvas>
|
|
<div id="generation_timer"><div id="generation_timer_bar"> </div></div>
|
|
|
|
<div id="info"></div>
|
|
|
|
<div class="row">
|
|
<button onclick="window.downloadBrain(0);">Save agent</button>
|
|
<button onclick="document.getElementById('brainFile').click();">Open brain file</button>
|
|
</div>
|
|
|
|
<input id="brainFile" type='file' accept='*/*' onchange='window.readBrain(event)' style="display: none">
|
|
|
|
<div style="margin-top: 20px"><input type="checkbox" onclick="window.updateIfLearning(this.checked);" checked>Learning</div>
|
|
|
|
<div id="stats-wrapper">
|
|
<h3>Progress</h3>
|
|
<pre id="stats-prog"></pre>
|
|
<h3>Agent 1</h3>
|
|
<pre id="stats-ag0"></pre>
|
|
</div>
|
|
|
|
<div id="charts"></div>
|
|
|
|
</div>
|
|
</body>
|
|
</html>
|
|
|