Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adversarial_search_fall_2021 #10

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
9debf4d
initial creation done
theablemo Oct 22, 2021
82dca8a
images added
theablemo Oct 22, 2021
1060d86
image extensions fixed
theablemo Oct 22, 2021
7fec1fa
First part of Introduction
MoaliMkh Oct 23, 2021
ee05b02
Second part of introduction done!
MoaliMkh Oct 23, 2021
9c2932b
Different categories of games added Vs modifications in Introduction
MoaliMkh Oct 24, 2021
b057f5f
Different types of games and Single Agent Trees Finished!
MoaliMkh Oct 24, 2021
4135891
Differnt types of trees completed!
MoaliMkh Oct 24, 2021
b040650
Add resource limits, eval function and minimax pruning
mtndaghyani Oct 24, 2021
6a657cd
Merge branch 'master' of github.com:mothegoat/notes
mtndaghyani Oct 24, 2021
3e55e00
Minimax Startegy Completed
MoaliMkh Oct 24, 2021
5608168
Minimax Strategy and properties completed!
MoaliMkh Oct 24, 2021
f1a852a
Initialize Other types of games
MoaliMkh Oct 24, 2021
1f89db5
First Version of summary
MoaliMkh Oct 25, 2021
594ec02
Summary Finished!
MoaliMkh Oct 25, 2021
ecca3b5
Finished!
MoaliMkh Oct 25, 2021
c66f7be
alpha beta pruning
theablemo Oct 29, 2021
4207d73
colors added
MoaliMkh Oct 29, 2021
84ff450
new colors
MoaliMkh Oct 29, 2021
f7f9307
expectimax search
theablemo Oct 29, 2021
84742bc
Table of contents added
MoaliMkh Nov 9, 2021
94dc1fc
Some Modifications
MoaliMkh Nov 9, 2021
7979b87
Reviewed The grammar for the first time
MoaliMkh Nov 9, 2021
8bb4eb5
Add useful links section
mtndaghyani Nov 11, 2021
dc57c75
Better connection to minimax pruning.
theablemo Nov 12, 2021
449bc7b
added images to better comprehend the problem.
theablemo Nov 12, 2021
528909f
Add index.md
mtndaghyani Nov 12, 2021
096056c
Fix index.md fonts and headers
mtndaghyani Nov 12, 2021
515d8d9
Delete index.ipynb
mtndaghyani Nov 12, 2021
7087e98
Add introduction link
mtndaghyani Nov 13, 2021
a8c417e
Update index.md
MoaliMkh Nov 13, 2021
827f5f4
Update index.md
MoaliMkh Nov 13, 2021
962092b
Update index.md
MoaliMkh Nov 13, 2021
9288c05
Update index.md
MoaliMkh Nov 13, 2021
26ba2c1
Update index.md
MoaliMkh Nov 13, 2021
578d948
Update index.md
MoaliMkh Nov 13, 2021
057cd3a
Update index.md
MoaliMkh Nov 13, 2021
e80f1e8
Update index.md
MoaliMkh Nov 13, 2021
906afd5
Update index.md
MoaliMkh Nov 13, 2021
5584980
Update index.md
MoaliMkh Nov 13, 2021
6abd4a8
Update index.md
MoaliMkh Nov 13, 2021
b6dbfc9
Update index.md
MoaliMkh Nov 13, 2021
66176b1
Update index.md
MoaliMkh Nov 13, 2021
d7610d0
Create index.md
MoaliMkh Nov 13, 2021
933cc87
Update index.md
MoaliMkh Nov 13, 2021
4d0ac79
Update index.md
MoaliMkh Nov 13, 2021
5a176f7
Update index.md
MoaliMkh Nov 13, 2021
88d9bac
Update index.md
MoaliMkh Nov 13, 2021
954482a
Update index.md
MoaliMkh Nov 13, 2021
8dc4c27
Update index.md
MoaliMkh Nov 13, 2021
74441c0
Update index.md
MoaliMkh Nov 13, 2021
1dedaf3
Update index.md
MoaliMkh Nov 13, 2021
85845d5
Update index.md
MoaliMkh Nov 13, 2021
51b4a64
Update index.md
MoaliMkh Nov 13, 2021
13bc545
Update index.md
MoaliMkh Nov 13, 2021
743c1d5
Update index.md
MoaliMkh Nov 13, 2021
7e59b02
Update index.md
MoaliMkh Nov 13, 2021
c515ddf
Update index.md
MoaliMkh Nov 13, 2021
dfe7de0
Update index.md
MoaliMkh Nov 13, 2021
b9279a2
Fix formulas
mtndaghyani Dec 17, 2021
79588d1
Adversarial Agent bold fix
MoaliMkh Dec 17, 2021
4cf50bd
Update index.md
MoaliMkh Dec 17, 2021
529897f
Add title and fix +inf
mtndaghyani Dec 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"cells": [
Copy link

@sinatav sinatav Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your file should be .md and not .ipynb

{
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add table of contents!

"cell_type": "markdown",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to add pictures if possible

"metadata": {},
"source": [
"# Introduction\n",
"### The concept of adversarial search and an introduction to Game Theory\n",
"In previous lectures, we discussed situations in which we had only a single agent. We didn't consider other parameters affecting our environment but in this chapter, a new type of search is introduced which is called **Adversarial Search**. In adversarial search, we define our problem in a multi-agent context. For instance, while playing a game, our agent has to consider the other agent's moves (adversarial moves) to play in an efficient way. Even in some games we can define a winning stategy which means we can guarantee that in every state of our game, no matter how bad it is, our agent is able to win the game.\n",
"To gather more information about the concept of adversarial search, visit <a href=\"https://www.techslang.com/definition/what-is-adversarial-search/\">this link</a>."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Game Theory Explanation\n",
"Briefly, Game Theory is designing the strategies and the steps of our player to interact in the best way, according to the rival's steps and strategies. In other words, Game theory is the study of mathematical models of strategic interactions among rational decision-makers. To know the game theory better, you can stop by <a href=\"https://en.wikipedia.org/wiki/Game_theory\">here</a>.\n",
"To achieve this goal, we need to express our game and its rules and actions in a mathematical form. The common model used to represent games is the model below:\n",
"<ul>\n",
" <li>States of the game: $S_i$, starting with $S_0$</li>\n",
"Which means how the game will look after each action of competitors.\n",
" <li>Players: P = {1,2,...,n}</li>\n",
"represents number of agents playing the game which varies from 1 to n.\n",
" <li>Actions: $A_i$</li>\n",
"In every state, each player has a set of legitimate moves to change that state to another state by playing its turn.\n",
" <li>Transition functions: S x A -> S</li>\n",
"Transition function is a function which takes a state S, and does the action A to that state, and returns another state which is built as a consequence of that action.\n",
" <li>Terminal tests: S -> {True, False}</li>\n",
"It is a boolean function which determines whether our game has reached a final state or not.\n",
" <li>Terminal utilities: S ✕ P -> R </li>\n",
"It takes a state S, and a player P, and returns a Real number which indicates the score of the player P (The utility of the P, to be more precise) till that moment.\n",
" <li> Policy/Strategy: S -> A </li>\n",
"The Policy is the strategy defined by our AI program. It takes a state S, and according to the program, does action A which is the best action for that situation. \n",
"</ul>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Resource Limits\n",
Copy link

@sinatav sinatav Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

try to make a stronger connection between different parts, for example don't jump into minimax without any preparation, make a strong structure

"Although the minimax algorithm would be proper for problems with relatively small state space, it isn't an efficient and feasible one for problems with more complicated and larger state space. Since the number of game states it has to examine is exponential in the depth of the tree.\n",
"\n",
"Consider a _reasonable_ chess game with $b \\approx 35$ and $m \\approx 100$ . Due to the time complexity of this algorithm which is $O(b^m)$, solving the game is not possible at all. We'll discuss some ideas to solve the problem in details below."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Depth-limited search\n",
"One idea might be running the algorithm up to a specified depth instead of the searching the whole tree which(_depth-limited search_).\n",
Copy link

@sinatav sinatav Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

review your english grammar (one example is instead of the searching the whole tree)

"\n",
"![hello](1.jpg)"
]
Copy link

@sinatav sinatav Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add conclusion (or summary) and references

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

my mistake.

}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a "other useful links" section can be useful

],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
614 changes: 614 additions & 0 deletions notebooks/adversarial_search_fall_2021/index.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions notebooks/adversarial_search_fall_2021/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
title: Adversarial Search # shown on browser tab

header:
title: Adversarial Search # title of your notebook
description: An intro into aversarial search # short description of your notebook

authors:
label:
position: top
content:
- name: Mohammad Abolnejadian
role: Author
image: mohammad_abolnejadian.jpeg
contact:
- link: https://github.com/mothegoat
icon: fab fa-github
- link: mailto:[email protected]
icon: fas fa-envelope

- name: Mohammadali MohammadKhani
role: Author
image: mohammadali_mohammadkhani.jpeg
contact:
- link: https://github.com/MoaliMkh
icon: fab fa-github
- link: mailto:[email protected]
icon: fas fa-envelope
# optionally add other contact information like
# - link: <change this> # contact link
# icon: <change this> # awsomefont tag for link (check: https://fontawesome.com/v5.15/icons)

- name: Matin Daghyani
role: Author
image: matin_daghyani.jpeg
contact:
- link: https://github.com/mtndaghyani
icon: fab fa-github
- link: mailto:[email protected]
icon: fas fa-envelope

# comments:
# # enable comments for your post
# label: false
# kind: comments
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions notebooks/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ notebooks:
kind: S2021, LN, PDF
- notebook: notebooks/8_adversarial_search/
kind: S2021, LN, Notebook
- notebook: notebooks/adversarial_search_fall_2021/
kind: F2021, LN, Notebook
- notebook: notebooks/9_bayesian_networks/index1.ipynb
kind: S2021, LN, Notebook
metadata: notebooks/9_bayesian_networks/metadata.yml
Expand Down