Skip to content

Instantly share code, notes, and snippets.

View Rishav159's full-sized avatar

Rishav Agarwal Rishav159

  • Bengaluru
View GitHub Profile
@Rishav159
Rishav159 / final-submission.md
Last active November 12, 2021 21:52
Final Submissions for GSoC-2017 under aimacode-javascript

Final Submissions for GSoC 2017

Aimacode - Javascript

Project

This project aims to design and implement Javascript visualizations for the book Artificial Intelligence: A Modern Approach. These visualization would work as an educational aid along with the book.

Since each chapters can have a lot of potential visualization and animation, we wanted to approach each of them on a priority basis. The priority of a visualization was judged on the basis of how much time/resources it would take against how much can it enhance the user’s experience as compared to the book.

Deliverables

let states = [];
for(let i = 0; i < 100; i++) {
states.push(50);
}
let peaks = [0,20,40,60,75,85,99];
for(let i = 1; i < peaks.length-1; i++) {
peaks[i] += (Math.floor(Math.random()*14 -7));
f(i) {
return 1 + Math.sin(0.1 + (i * 0.7) * Math.cos(9 + i*0.3))
}
generateRandomHill() {
let states = [];
let x = Math.random()*(30-5)+20;
let y = Math.random()*(100)
for(let i = 0; i < 100; i++) {
states.push(Math.floor(this.f(i/x + y)*(100-5) + 5))
}
t = int(input())
for test in range(t):
n = int(input())
i = 0
while(True):
if n < 2**i:
i = i-1
break
else:
i += 1
@Rishav159
Rishav159 / index.html
Created May 28, 2017 15:30
8 Queen Problem using freezer
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div class="wrapper">
<div class="canvas">