You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RL_exhibit/index.html

56 lines
2.5 KiB

5 years ago
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<script src="https://unpkg.com/konva@4.0.0/konva.min.js"></script>
5 years ago
<script src='https://unpkg.com/vue/dist/vue.js'></script>
<script src='https://cdn.jsdelivr.net/npm/vue-konva@2.0.11/umd/vue-konva.min.js'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script>
5 years ago
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.7.1/Chart.min.js"></script>
<script src="https://unpkg.com/vue-chartjs@3.4.2/dist/vue-chartjs.js"></script>
5 years ago
5 years ago
<title>RL exhibit - prototype</title>
<link rel="stylesheet" href="css/style.min.css">
</head>
<body>
5 years ago
<div id="app">
5 years ago
<v-stage ref="stage" :config="stage_config">
5 years ago
<!-- <v-layer ref="local_layer" :config="local_layer">
5 years ago
<v-group ref="map_group" :config="map_config">
<v-rect v-for="(t_type, idx) in maze.map.flat()" :config="get_tile_config(idx, t_type, true)" :key="idx"></v-rect>
5 years ago
<v-regular-polygon :config="agent_config"></v-regular-polygon>
5 years ago
</v-group>
5 years ago
</v-layer> -->
5 years ago
<v-layer ref="map_layer">
<v-group ref="mini_map_group" :config="mini_map_config">
<!-- <v-group ref="grid_group">
<v-line v-for="y in maze.height+1" :config="get_grid_line_config(y-1, true)"></v-line>
<v-line v-for="x in maze.width+1" :config="get_grid_line_config(x-1)"></v-line>
</v-group> -->
<v-rect v-for="(t_type, idx) in maze.map.flat()" :config="get_tile_config(idx, t_type)" :key="idx"></v-rect>
5 years ago
<v-regular-polygon :config="agent_config"></v-regular-polygon>
5 years ago
</v-group>
</v-layer>
</v-stage>
5 years ago
<line-chart css-classes="plot" :chart-data="datacollection" :options="{responsive: true, maintainAspectRatio: false,scales: {xAxes: [{ticks:{maxTicksLimit:11}}]},legend: {display: false}}"></line-chart>
5 years ago
</div>
<nav>
5 years ago
<button class="button" onclick="machine.run(1)">run 100 episodes!</button>
<button class="button" onclick="machine.auto_step();">auto step!</button>
<button class="button" onclick="machine.greedy_step();">greedy step!</button>
5 years ago
</nav>
5 years ago
<script>
var map = [
5 years ago
[0, 0, 4, 8, 0, 0, 0, 0],
5 years ago
[0, 0, 4, 4, 4, 4, 0, 0],
[4, 0, 0, 0, 0, 4, 0, 4],
5 years ago
[0, 0, 1, 0, 0, 0, 0, 0],
[2, 0, 1, 0, 4, 0, 0, 4]
5 years ago
];
</script>
5 years ago
<script src="js/rl.js"></script>
<script src="js/controls.js"></script>
5 years ago
<script src="js/view.js"></script>
5 years ago
</body>
</html>