Skip to content

Commit 8f2a868

Browse files
add gitignore
1 parent 3282f78 commit 8f2a868

20 files changed

+142
-2
lines changed

.DS_Store

0 Bytes
Binary file not shown.

.Rhistory

Whitespace-only changes.

.gitignore

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
#ignore huggingface
2+
summarizeApp
3+
#ignore fine-tuning
4+
test_trainer/
5+
6+
#ignore pytorch artifacts
7+
data
8+
model.pth
9+
10+
# Byte-compiled / optimized / DLL files
11+
__pycache__/
12+
*.py[cod]
13+
*$py.class
14+
15+
# C extensions
16+
*.so
17+
18+
# Distribution / packaging
19+
.Python
20+
build/
21+
develop-eggs/
22+
dist/
23+
downloads/
24+
eggs/
25+
.eggs/
26+
lib/
27+
lib64/
28+
parts/
29+
sdist/
30+
var/
31+
wheels/
32+
pip-wheel-metadata/
33+
share/python-wheels/
34+
*.egg-info/
35+
.installed.cfg
36+
*.egg
37+
MANIFEST
38+
39+
# PyInstaller
40+
# Usually these files are written by a python script from a template
41+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
42+
*.manifest
43+
*.spec
44+
45+
# Installer logs
46+
pip-log.txt
47+
pip-delete-this-directory.txt
48+
49+
# Unit test / coverage reports
50+
htmlcov/
51+
.tox/
52+
.nox/
53+
.coverage
54+
.coverage.*
55+
.cache
56+
nosetests.xml
57+
coverage.xml
58+
*.cover
59+
*.py,cover
60+
.hypothesis/
61+
.pytest_cache/
62+
63+
# Translations
64+
*.mo
65+
*.pot
66+
67+
# Django stuff:
68+
*.log
69+
local_settings.py
70+
db.sqlite3
71+
db.sqlite3-journal
72+
73+
# Flask stuff:
74+
instance/
75+
.webassets-cache
76+
77+
# Scrapy stuff:
78+
.scrapy
79+
80+
# Sphinx documentation
81+
docs/_build/
82+
83+
# PyBuilder
84+
target/
85+
86+
# Jupyter Notebook
87+
.ipynb_checkpoints
88+
89+
# IPython
90+
profile_default/
91+
ipython_config.py
92+
93+
# pyenv
94+
.python-version
95+
96+
# pipenv
97+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
98+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
99+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
100+
# install all needed dependencies.
101+
#Pipfile.lock
102+
103+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
104+
__pypackages__/
105+
106+
# Celery stuff
107+
celerybeat-schedule
108+
celerybeat.pid
109+
110+
# SageMath parsed files
111+
*.sage.py
112+
113+
# Environments
114+
.env
115+
.venv
116+
env/
117+
venv/
118+
ENV/
119+
env.bak/
120+
venv.bak/
121+
122+
# Spyder project settings
123+
.spyderproject
124+
.spyproject
125+
126+
# Rope project settings
127+
.ropeproject
128+
129+
# mkdocs documentation
130+
/site
131+
132+
# mypy
133+
.mypy_cache/
134+
.dmypy.json
135+
dmypy.json
136+
137+
# Pyre type checker
138+
.pyre/

2048/2048.py 2048.py

File renamed without changes.

2048/.DS_Store

-6 KB
Binary file not shown.

2048/__pycache__/AI.cpython-36.pyc

-6.72 KB
Binary file not shown.

2048/__pycache__/AI.cpython-38.pyc

-8.68 KB
Binary file not shown.

2048/__pycache__/AI.cpython-39.pyc

-6.94 KB
Binary file not shown.

2048/__pycache__/UI.cpython-36.pyc

-11.6 KB
Binary file not shown.

2048/__pycache__/UI.cpython-38.pyc

-11.3 KB
Binary file not shown.

2048/__pycache__/UI.cpython-39.pyc

-11.3 KB
Binary file not shown.

2048/__pycache__/board.cpython-36.pyc

-6.56 KB
Binary file not shown.

2048/__pycache__/board.cpython-38.pyc

-6.5 KB
Binary file not shown.

2048/__pycache__/board.cpython-39.pyc

-6.42 KB
Binary file not shown.
-1.14 KB
Binary file not shown.

2048/AI.py AI.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import random
44
import copy
5-
import math
65
import time
76
from board import Board
87

@@ -122,6 +121,7 @@ def getMaxMove1(self):
122121
elif score == bestScore:
123122
bestActions.append(action)
124123

124+
legalMoves = self.getLegalMoves()
125125
bestAction = random.choice(bestActions) if bestActions else random.choice(legalMoves)
126126
print("action: %d\n" % bestAction)
127127
self.performAction(bestAction)
@@ -161,6 +161,7 @@ def getMaxMove2(self):
161161
elif score == bestScore:
162162
bestActions.append(action)
163163

164+
legalMoves = self.getLegalMoves()
164165
bestAction = random.choice(bestActions) if bestActions else random.choice(legalMoves)
165166
print("action: %d\n" % bestAction)
166167
self.performAction(bestAction)
@@ -411,7 +412,8 @@ def getMaxMove4(self):
411412
# (score, action) = self.expectiMaxieMoveAlphaBeta(5, -float('inf'), float('inf'))
412413

413414
# print("bestScore, bestAction:", (score, action))
414-
self.performAction(action)
415+
# self.performAction(action)
416+
pass
415417

416418
def getMaxMove5(self):
417419
# apply deep reinforcement learning

2048/RL.py RL.py

File renamed without changes.

2048/UI.py UI.py

File renamed without changes.

2048/board.py board.py

File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)