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

fixed fixed_lag_smoothing #1261

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1,389 changes: 1,389 additions & 0 deletions Chapter-02-Intellegent-Agents.ipynb

Large diffs are not rendered by default.

868 changes: 868 additions & 0 deletions Chapter-03-Solving-Problems-Searching.ipynb

Large diffs are not rendered by default.

1,874 changes: 1,874 additions & 0 deletions Chapter-04-Searchin-Complex-Enviroment.ipynb

Large diffs are not rendered by default.

537 changes: 537 additions & 0 deletions Chapter-05-Adversarial-Search-Games.ipynb

Large diffs are not rendered by default.

927 changes: 927 additions & 0 deletions Chapter-06-Constraint-Satisfaction-Problems.ipynb

Large diffs are not rendered by default.

66,068 changes: 66,068 additions & 0 deletions Chapter-07-Logical-Agents.ipynb

Large diffs are not rendered by default.

1,282 changes: 1,282 additions & 0 deletions Chapter-09-Inference-in-First-Order-Logic.ipynb

Large diffs are not rendered by default.

2,666 changes: 2,666 additions & 0 deletions Chapter-11-Automated-Planning.ipynb

Large diffs are not rendered by default.

1,165 changes: 1,165 additions & 0 deletions Chapter-12-Quantifying-Uncertainty.ipynb

Large diffs are not rendered by default.

3,532 changes: 3,532 additions & 0 deletions Chapter-13-Probabilistic-Reasoning.ipynb

Large diffs are not rendered by default.

1,189 changes: 1,189 additions & 0 deletions Chapter-14-Probability-Reasoning-over-Time.ipynb

Large diffs are not rendered by default.

1,323 changes: 1,323 additions & 0 deletions Chapter-17-Making-Complex-Decisions.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ Features from Python 3.6 and 3.7 that we will be using for this version of the c
- [`dataclasses` module](https://docs.python.org/3.7/library/dataclasses.html#module-dataclasses): replace `namedtuple` with `dataclass`.


[//]: # (There is a sibling [aima-docker]https://github.com/rajatjain1997/aima-docker project that shows you how to use docker containers to run more complex problems in more complex software environments.)
[//]: # "There is a sibling [aima-docker]https://github.com/rajatjain1997/aima-docker project that shows you how to use docker containers to run more complex problems in more complex software environments."


## Installation Guide

To download the repository:

`git clone https://github.com/aimacode/aima-python.git`
`git clone https://github.com/shengmincui/aima-python.git`

Then you need to install the basic dependencies to run the project on your system:

Expand Down
515 changes: 485 additions & 30 deletions agents.ipynb

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def display(self, canvas, x, y, width, height):
# Do we need this?
pass


class Agent(Thing):
"""An Agent is a subclass of Thing with one required instance attribute
(aka slot), .program, which should hold a function that takes one argument,
Expand Down
4 changes: 2 additions & 2 deletions arc_consistency_heuristics.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1991,7 +1991,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.5rc1"
"version": "3.7.10"
}
},
"nbformat": 4,
Expand Down
910 changes: 529 additions & 381 deletions csp.ipynb

Large diffs are not rendered by default.

81 changes: 75 additions & 6 deletions games.ipynb

Large diffs are not rendered by default.

199 changes: 137 additions & 62 deletions games4e.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
{
"cell_type": "code",
"execution_count": 73,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -81,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 66,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -160,7 +160,7 @@
},
{
"cell_type": "code",
"execution_count": 67,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -217,7 +217,7 @@
},
{
"cell_type": "code",
"execution_count": 68,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -264,7 +264,7 @@
},
{
"cell_type": "code",
"execution_count": 69,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -286,68 +286,143 @@
},
{
"cell_type": "code",
"execution_count": 74,
"execution_count": 44,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Player X move: (0, 0)\n",
"X . .\n",
"Player X move: (1, 1)\n",
". . .\n",
". X .\n",
". . .\n",
"\n",
"Player O move: (1, 1)\n",
"X . .\n",
". O .\n",
"Player O move: (0, 0)\n",
"O . .\n",
". X .\n",
". . .\n",
"\n",
"Player X move: (1, 2)\n",
"X . .\n",
". O .\n",
". X .\n",
"Player X move: (0, 1)\n",
"O . .\n",
"X X .\n",
". . .\n",
"\n",
"Player O move: (0, 1)\n",
"X . .\n",
"Player O move: (2, 1)\n",
"O . .\n",
"X X O\n",
". . .\n",
"\n",
"Player X move: (2, 2)\n",
"O . .\n",
"X X O\n",
". . X\n",
"\n",
"Player O move: (1, 0)\n",
"O O .\n",
". X .\n",
"X X O\n",
". . X\n",
"\n",
"Player X move: (2, 1)\n",
"X . .\n",
"O O X\n",
". X .\n",
"Player X move: (1, 2)\n",
"O O .\n",
"X X O\n",
". X X\n",
"\n",
"Player O move: (2, 0)\n",
"X . O\n",
"O O X\n",
"O O O\n",
"X X O\n",
". X X\n",
"\n",
"CPU times: user 826 ms, sys: 0 ns, total: 826 ms\n",
"Wall time: 824 ms\n"
]
},
{
"data": {
"text/plain": [
"-1"
]
},
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%time play_game(TicTacToe(), dict(X=random_player, O=player(minimax_search)), verbose=True).utility"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Player X move: (1, 0)\n",
". X .\n",
". . .\n",
". . .\n",
"\n",
"Player O move: (1, 2)\n",
". X .\n",
". . .\n",
". O .\n",
"\n",
"Player X move: (2, 2)\n",
"X . O\n",
"O O X\n",
". X X\n",
". X .\n",
". . .\n",
". O X\n",
"\n",
"Player O move: (0, 2)\n",
"Player O move: (0, 0)\n",
"O X .\n",
". . .\n",
". O X\n",
"\n",
"Player X move: (2, 0)\n",
"O X X\n",
". . .\n",
". O X\n",
"\n",
"Player O move: (2, 1)\n",
"O X X\n",
". . O\n",
". O X\n",
"\n",
"Player X move: (0, 1)\n",
"O X X\n",
"X . O\n",
"O O X\n",
". O X\n",
"\n",
"Player O move: (1, 1)\n",
"O X X\n",
"\n"
"X O O\n",
". O X\n",
"\n",
"Player X move: (0, 2)\n",
"O X X\n",
"X O O\n",
"X O X\n",
"\n",
"CPU times: user 109 ms, sys: 4.04 ms, total: 113 ms\n",
"Wall time: 111 ms\n"
]
},
{
"data": {
"text/plain": [
"-1"
"0"
]
},
"execution_count": 74,
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"play_game(TicTacToe(), dict(X=random_player, O=player(alphabeta_search)), verbose=True).utility"
"%time play_game(TicTacToe(), dict(X=random_player, O=player(alphabeta_search)), verbose=True).utility"
]
},
{
Expand All @@ -359,7 +434,7 @@
},
{
"cell_type": "code",
"execution_count": 75,
"execution_count": 37,
"metadata": {},
"outputs": [
{
Expand All @@ -371,44 +446,44 @@
"X . .\n",
". . .\n",
"\n",
"Player O move: (0, 0)\n",
"O . .\n",
"X . .\n",
". . .\n",
"\n",
"Player X move: (2, 0)\n",
"O . X\n",
"X . .\n",
". . .\n",
"\n",
"Player O move: (2, 1)\n",
"O . X\n",
". . .\n",
"X . O\n",
". . .\n",
"\n",
"Player X move: (1, 2)\n",
"O . X\n",
". . .\n",
"X . O\n",
". X .\n",
"\n",
"Player O move: (0, 2)\n",
"O . X\n",
"Player O move: (0, 0)\n",
"O . .\n",
"X . O\n",
"O X .\n",
". X .\n",
"\n",
"Player X move: (1, 0)\n",
"O X X\n",
"X . O\n",
"O X .\n",
"Player X move: (1, 1)\n",
"O . .\n",
"X X O\n",
". X .\n",
"\n",
"Player O move: (1, 1)\n",
"O X X\n",
"X O O\n",
"Player O move: (1, 0)\n",
"O O .\n",
"X X O\n",
". X .\n",
"\n",
"Player X move: (2, 0)\n",
"O O X\n",
"X X O\n",
". X .\n",
"\n",
"Player O move: (0, 2)\n",
"O O X\n",
"X X O\n",
"O X .\n",
"\n",
"Player X move: (2, 2)\n",
"O X X\n",
"X O O\n",
"O O X\n",
"X X O\n",
"O X X\n",
"\n"
]
Expand All @@ -419,13 +494,13 @@
"0"
]
},
"execution_count": 75,
"execution_count": 37,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"play_game(TicTacToe(), dict(X=player(alphabeta_search), O=player(minimax_search)), verbose=True).utility"
"play_game(TicTacToe(), dict(X=player(minimax_search), O=player(alphabeta_search)), verbose=True).utility"
]
},
{
Expand Down Expand Up @@ -1645,7 +1720,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -1659,7 +1734,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
"version": "3.7.10"
}
},
"nbformat": 4,
Expand Down
6 changes: 3 additions & 3 deletions index.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -60,9 +60,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.1"
"version": "3.7.10"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
Loading