File size: 3,874 Bytes
15f353f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<template>
	<div class="mcts-analysis-container">
		<h1>MCTS Analysis</h1>

		<div class="mcts-grid">
			<!-- Left sidebar: Control Panel -->
			<div class="control-panel">
				<h2>Controls</h2>

				<!-- Data Loader Section -->
				<section class="panel-section">
					<h3>Data Source</h3>
					<p class="info-text">
						Upload a TGN game file and its corresponding visit counts JSON to analyze MCTS
						behavior. Only 2D boards are supported.
					</p>
					<MCTSDataLoader />
				</section>

				<!-- Move Navigation Section -->
				<section class="panel-section">
					<h3>Navigation</h3>
					<MCTSMoveNavigation v-if="hasData" />
					<div v-else class="nav-placeholder">
						<p>Load data to enable navigation</p>
					</div>
				</section>

				<!-- Visualization Settings Section -->
				<section class="panel-section">
					<h3>Statistics</h3>
					<MCTSStatisticsPanel />
				</section>
			</div>

			<!-- Right content area -->
			<div class="content-area">
				<!-- Tree Visualization -->
				<div class="visualization-panel tree-panel">
					<h3>Search Tree</h3>
					<MCTSTreeVisualization />
				</div>

				<!-- Board Heatmap -->
				<div class="visualization-panel heatmap-panel">
					<h3>Board Heatmap</h3>
					<MCTSBoardHeatmap />
				</div>
			</div>
		</div>
	</div>
</template>

<script setup lang="ts">
import { ref, computed, onMounted } from "vue";
import { useMCTSStore } from "@/stores/mctsStore";
import MCTSDataLoader from "@/components/mcts/MCTSDataLoader.vue";
import MCTSMoveNavigation from "@/components/mcts/MCTSMoveNavigation.vue";
import MCTSStatisticsPanel from "@/components/mcts/MCTSStatisticsPanel.vue";
import MCTSBoardHeatmap from "@/components/mcts/MCTSBoardHeatmap.vue";
import MCTSTreeVisualization from "@/components/mcts/MCTSTreeVisualization.vue";

const mctsStore = useMCTSStore();

const hasData = computed(() => mctsStore.hasData);

onMounted(() => {
	console.log("[MCTS Analysis] View mounted");
});
</script>

<style scoped lang="scss">
@use "@/styles/test-pages.scss" as *;

.mcts-analysis-container {
	@include test-page-container('dark');
	padding: 20px;

	h1 {
		margin: 0 0 20px 0;
		font-size: 28px;
		color: #e94560;
	}
}

.mcts-grid {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 20px;
	min-height: calc(100vh - 80px);
}

/* ============================================================================
   Control Panel (Left Sidebar)
   ============================================================================ */

.control-panel {
	@include control-panel('dark');
}

.panel-section {
	@extend .panel-section;
}

.info-text {
	@extend .info-text;
	color: #a0a0a0;
}

.nav-placeholder {
	padding: 15px;
	background-color: #1a1a1a;
	border-radius: 4px;
	border: 1px dashed #404040;
	text-align: center;
	color: #606060;
	font-size: 12px;
}

/* ============================================================================
   Content Area (Right Side)
   ============================================================================ */

.content-area {
	display: grid;
	grid-template-rows: auto 1fr;
	gap: 20px;
	overflow: hidden;
}

.visualization-panel {
	@include test-section('dark');
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 20px;

	h3 {
		margin: 0 0 15px 0;
		font-size: 18px;
		color: #4a90e2;
		flex-shrink: 0;
	}
}

.tree-panel {
	overflow: visible;
}

/* ============================================================================
   Responsive
   ============================================================================ */

@media (max-width: 1200px) {
	.mcts-grid {
		grid-template-columns: 280px 1fr;
	}
}

@media (max-width: 900px) {
	.mcts-grid {
		grid-template-columns: 1fr;
		grid-template-rows: auto 1fr;
		min-height: auto;
	}

	.control-panel {
		max-height: 400px;
	}

	.content-area {
		min-height: 800px;
		max-height: none;
	}
}
</style>