Skip to content

Commit

Permalink
update demo.gif
Browse files Browse the repository at this point in the history
  • Loading branch information
sizzle0121 committed May 9, 2020
1 parent 4868a83 commit 9faf95f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 19 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Launch and play the game (human player)

### How to Run?
* To play the game
`python3 2048.py`
> `python3 2048.py`
* To see arguments
`python3 2048.py -h`
> `python3 2048.py -h`
* To train your AI (the tuple network will be saved to the directory tupleNet/)
`python3 2048.py --play=n --train=on -e=5000 -m=500`
> `python3 2048.py --play=n --train=on -e=5000 -m=500`
* To test your AI for one game round
`python3 2048.py --play=n --train=off`
> `python3 2048.py --play=n --train=off`


Expand Down
5 changes: 0 additions & 5 deletions agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,11 @@ def step(self, prev):
B = Board()
B.initialize()
while True:
#print("\nAI's turn")
act, r = AI.step(B)
if B.end_game():
#B.printBoard()
break
#B.printBoard()
#print("\nEnv's turn")
B.GenRandTile(r)
if B.end_game():
#B.printBoard()
break
#B.printBoard()
if e % 100 == 0:
Expand Down
6 changes: 1 addition & 5 deletions analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,5 @@ def reset(self):
'17': 0,
'18': 0,
'19': 0,
'20': 0,
'21': 0,
'22': 0,
'23': 0,
'24': 0
'20': 0
}
5 changes: 0 additions & 5 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,6 @@
KEY_DOWN = "'s'"
KEY_LEFT = "'a'"
KEY_RIGHT = "'d'"
#KEY_BACK = "'b'"

KEY_AUTOPLAY = "'z'"
KEY_HINT = "'h'"
#KEY_J = "'j'"
#KEY_K = "'k'"
#KEY_L = "'l'"
#KEY_H = "'h'"
Binary file modified img/demo1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9faf95f

Please sign in to comment.