Added '--play' flag, so you can now play against the ai.
This commit is contained in:
parent
2c02689577
commit
00974b0f11
2
board.py
2
board.py
|
@ -230,8 +230,6 @@ class Board:
|
||||||
#print("boards after first die: ", boards)
|
#print("boards after first die: ", boards)
|
||||||
|
|
||||||
for die in roll[1:]:
|
for die in roll[1:]:
|
||||||
# if die != 0:
|
|
||||||
if True:
|
|
||||||
# Calculate boards resulting from second move
|
# Calculate boards resulting from second move
|
||||||
nested_boards = [calc_moves(board, die) for board in boards]
|
nested_boards = [calc_moves(board, die) for board in boards]
|
||||||
#print("nested boards: ", nested_boards)
|
#print("nested boards: ", nested_boards)
|
||||||
|
|
3
main.py
3
main.py
|
@ -205,6 +205,9 @@ if __name__ == "__main__":
|
||||||
if not config['train_perpetually']:
|
if not config['train_perpetually']:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
elif args.play:
|
||||||
|
network = Network(config, config['model'])
|
||||||
|
network.play_against_network()
|
||||||
|
|
||||||
elif args.eval:
|
elif args.eval:
|
||||||
network = Network(config, config['model'])
|
network = Network(config, config['model'])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user