Spaces:
Sleeping
Sleeping
AttackingOrDefending commited on
Commit ·
44b8fb6
1
Parent(s): 2307736
Update tests.py (#83)
Browse filesAdd `NetworkDelay` to avoid timeouts.
tests.py
CHANGED
|
@@ -78,7 +78,7 @@ def run_bot(CONFIG, logging_level):
|
|
| 78 |
board = shogi.Board()
|
| 79 |
for move in summary['moves']:
|
| 80 |
board.push_usi(move)
|
| 81 |
-
win = board.turn == (shogi.
|
| 82 |
assert win
|
| 83 |
|
| 84 |
run_test()
|
|
@@ -109,8 +109,9 @@ def test_bot():
|
|
| 109 |
CONFIG['engine']['name'] = 'yo.exe'
|
| 110 |
CONFIG['engine']['usi_options']['BookFile'] = 'no_book'
|
| 111 |
CONFIG['engine']['usi_options']['EvalDir'] = './shoginet-main/eval'
|
|
|
|
| 112 |
run_bot(CONFIG, logging_level)
|
| 113 |
|
| 114 |
|
| 115 |
if __name__ == '__main__':
|
| 116 |
-
test_bot()
|
|
|
|
| 78 |
board = shogi.Board()
|
| 79 |
for move in summary['moves']:
|
| 80 |
board.push_usi(move)
|
| 81 |
+
win = board.turn == (shogi.WHITE if starting else shogi.BLACK) and board.is_game_over()
|
| 82 |
assert win
|
| 83 |
|
| 84 |
run_test()
|
|
|
|
| 109 |
CONFIG['engine']['name'] = 'yo.exe'
|
| 110 |
CONFIG['engine']['usi_options']['BookFile'] = 'no_book'
|
| 111 |
CONFIG['engine']['usi_options']['EvalDir'] = './shoginet-main/eval'
|
| 112 |
+
CONFIG['engine']['usi_options']['NetworkDelay'] = 500
|
| 113 |
run_bot(CONFIG, logging_level)
|
| 114 |
|
| 115 |
|
| 116 |
if __name__ == '__main__':
|
| 117 |
+
test_bot()
|