Skip to content

Commit

Permalink
Untracked files issue resolved to fix .gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar-Radwan committed Jan 3, 2021
1 parent 0b56b22 commit 2903b0a
Show file tree
Hide file tree
Showing 588 changed files with 163,909 additions and 164,355 deletions.
141 changes: 138 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,138 @@
*.pyc
*.cfg
*.xml
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
.pybuilder/
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/

# pytype static type analyzer
.pytype/

# Cython debug symbols
cython_debug/
16 changes: 8 additions & 8 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions .idea/Risk.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .idea/inspectionProfiles/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Risk Game


Risk is strategy game in which each player wants to conquer more cities in the map and keep his cities safe


## How The Game Works


At the start each player has 20 armies to be placed over the available territories in the
board. Each turn consists of two parts: placing armies and attacking. At the beginning of your
turn, count the total number of territories you own and divide by three. This is the number of
additional armies you will receive for territory (ignoring fractions). If the number of territories
divided by three is less than three, you receive three armies instead. After placing your armies
you may declare attacks. You may only attack territories adjacent to your own, where your
territory contains two or more armies. You may attack with any number of armies except for
one, which must remain to defend your territory. There will be no fortifying step, for simplicity.

## Types Of Agents In the Game


### Non-AI Agents


1. A human agent, that can make actions using the GUI.
2. A completely passive agent, that places all of its bonus armies to the territory
with the fewest armies, and doesn’t make any attacks.
3. An aggressive agent, that always places all its bonus armies on the territory with
the most armies, and greedily attempts to attack territories with most armies that
he can attack.
4. A nearly pacifist agent, that places its armies like the completely passive agent,
then conquers only the one territory with fewest armies (if it can).


### AI Agents


1. A greedy agent, that picks the move with best immediate heuristic value.
2. An agent using A* search, with the same heuristic.
3. An agent using real-time A*.
4. A Minimax with alpha-beta pruning agent.


## Mini-MAX Agent vs Passive Agent Gameplay

![](./readme-assets/minimax_passive.gif)
Binary file removed __pycache__/Agent.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/City.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/Game.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/Map.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/a_star_agent.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/action_manager.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/game_engine.cpython-38.pyc
Binary file not shown.
Binary file modified __pycache__/gui.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/helping_functions.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/heuristics.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/logic_gui_controller.cpython-38.pyc
Binary file not shown.
Binary file removed __pycache__/passive_agent.cpython-38.pyc
Binary file not shown.
74 changes: 0 additions & 74 deletions a_star_agent.py

This file was deleted.

Binary file modified agents/__pycache__/agressive_agent.cpython-38.pyc
Binary file not shown.
Binary file modified agents/__pycache__/greedy_agent.cpython-38.pyc
Binary file not shown.
Binary file modified agents/__pycache__/minimax_agent.cpython-38.pyc
Binary file not shown.
Binary file modified agents/__pycache__/nearly_pacifist_agent.cpython-38.pyc
Binary file not shown.
Binary file removed agents/__pycache__/realtime_agent.cpython-38.pyc
Binary file not shown.
Loading

0 comments on commit 2903b0a

Please sign in to comment.