Skip to content

Commit 0df6bcf

Browse files
committed
Add Pagerank Solution
1 parent 0880c17 commit 0df6bcf

21 files changed

+421
-2
lines changed

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ Projects for [CS50's Introduction to Artificial Intelligence with Python](http:/
66
- Search:
77
- [Degrees](./degrees/) : Program that determines how many “degrees of separation” apart two actors are, based on [IMBb](https://imdb.com)
88
- [Tic-Tac-Toe](./tictactoe/) : Using Minimax game theory, implementation of an AI to play Tic-Tac-Toe optimally.
9-
- Search:
10-
- [Knights](./knights/) : Solve logic puzzles.
9+
- Knowledge:
10+
- [Knights](./knights/) : solves three classic Knights and Knave Puzzles using Symbolic Logic.
1111
- [Minesweeper](./minesweeper/) : AI to play Minesweeper.
12+
- Uncertainty:
13+
- [PageRank](./pagerank/) : Evaluates pagerank using the PageRank Algorithm using corpus of HTML webpage.
1214

1315

1416
### Completed Demos:

pagerank/corpus0/1.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>1</title>
5+
</head>
6+
<body>
7+
<h1>1</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="2.html">2</a></li>
12+
</ul>
13+
</body>
14+
</html>

pagerank/corpus0/2.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>2</title>
5+
</head>
6+
<body>
7+
<h1>2</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="1.html">1</a></li>
12+
<li><a href="3.html">3</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus0/3.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>3</title>
5+
</head>
6+
<body>
7+
<h1>3</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="2.html">2</a></li>
12+
<li><a href="4.html">4</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus0/4.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>4</title>
5+
</head>
6+
<body>
7+
<h1>4</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="2.html">2</a></li>
12+
</ul>
13+
</body>
14+
</html>

pagerank/corpus1/bfs.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>BFS</title>
5+
</head>
6+
<body>
7+
<h1>BFS</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="search.html">Search</a></li>
12+
</ul>
13+
</body>
14+
</html>

pagerank/corpus1/dfs.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>DFS</title>
5+
</head>
6+
<body>
7+
<h1>DFS</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="bfs.html">BFS</a></li>
12+
<li><a href="search.html">Search</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus1/games.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Games</title>
5+
</head>
6+
<body>
7+
<h1>Games</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="tictactoe.html">TicTacToe</a></li>
12+
<li><a href="minesweeper.html">Minesweeper</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus1/minesweeper.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Minesweeper</title>
5+
</head>
6+
<body>
7+
<h1>Minesweeper</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="games.html">Games</a></li>
12+
</ul>
13+
</body>
14+
</html>

pagerank/corpus1/minimax.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Minimax</title>
5+
</head>
6+
<body>
7+
<h1>Minimax</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="search.html">Search</a></li>
12+
<li><a href="games.html">Games</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus1/search.html

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Search</title>
5+
</head>
6+
<body>
7+
<h1>Search</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="dfs.html">DFS</a></li>
12+
<li><a href="bfs.html">BFS</a></li>
13+
<li><a href="minimax.html">Minimax</a></li>
14+
</ul>
15+
</body>
16+
</html>

pagerank/corpus1/tictactoe.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>TicTacToe</title>
5+
</head>
6+
<body>
7+
<h1>TicTacToe</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="games.html">Games</a></li>
12+
<li><a href="minimax.html">Minimax</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus2/ai.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>AI</title>
5+
</head>
6+
<body>
7+
<h1>AI</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="inference.html">Inference</a></li>
12+
<li><a href="algorithms.html">Algorithms</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus2/algorithms.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Algorithms</title>
5+
</head>
6+
<body>
7+
<h1>Algorithms</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="programming.html">Programming</a></li>
12+
<li><a href="recursion.html">Recursion</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus2/c.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>C</title>
5+
</head>
6+
<body>
7+
<h1>C</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="programming.html">Programming</a></li>
12+
</ul>
13+
</body>
14+
</html>

pagerank/corpus2/inference.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Inference</title>
5+
</head>
6+
<body>
7+
<h1>Inference</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="ai.html">AI</a></li>
12+
</ul>
13+
</body>
14+
</html>

pagerank/corpus2/logic.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Logic</title>
5+
</head>
6+
<body>
7+
<h1>Logic</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="inference.html">Inference</a></li>
12+
</ul>
13+
</body>
14+
</html>

pagerank/corpus2/programming.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Programming</title>
5+
</head>
6+
<body>
7+
<h1>Programming</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="c.html">C</a></li>
12+
<li><a href="python.html">Python</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus2/python.html

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Python</title>
5+
</head>
6+
<body>
7+
<h1>Python</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="programming.html">Programming</a></li>
12+
<li><a href="ai.html">AI</a></li>
13+
</ul>
14+
</body>
15+
</html>

pagerank/corpus2/recursion.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<title>Recursion</title>
5+
</head>
6+
<body>
7+
<h1>Recursion</h1>
8+
9+
<div>Links:</div>
10+
<ul>
11+
<li><a href="recursion.html">Recursion</a></li>
12+
</ul>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)