HaileyStorm commited on
Commit
a7a9aed
1 Parent(s): 7b1a352

Update chess-gpt-eval-contrastive/main.py

Browse files
Files changed (1) hide show
  1. chess-gpt-eval-contrastive/main.py +7 -7
chess-gpt-eval-contrastive/main.py CHANGED
@@ -629,24 +629,24 @@ def play_games(
629
  if update_activations:
630
  if player_one_resignation or player_one_failed_to_find_legal_move:
631
  player_one.update_activations("lost")
632
- player_two.update_activations("won")
633
  elif player_two_resignation or player_two_failed_to_find_legal_move:
634
  player_one.update_activations("won")
635
- player_two.update_activations("lost")
636
  else:
637
  if board.result() == "1-0":
638
  player_one.update_activations("won")
639
- player_two.update_activations("lost")
640
  elif board.result() == "0-1":
641
  player_one.update_activations("lost")
642
- player_two.update_activations("won")
643
  else: # Draw
644
  player_one.update_activations("draw")
645
- player_two.update_activations("draw")
646
 
647
- if games_saved % contrastive_activation_save_interval == 0:
648
  player_one.save_activations(activations_path)
649
- player_two.save_activations(activations_path)
650
 
651
  if isinstance(player_one, StockfishPlayer):
652
  player_one.close()
 
629
  if update_activations:
630
  if player_one_resignation or player_one_failed_to_find_legal_move:
631
  player_one.update_activations("lost")
632
+ #player_two.update_activations("won")
633
  elif player_two_resignation or player_two_failed_to_find_legal_move:
634
  player_one.update_activations("won")
635
+ #player_two.update_activations("lost")
636
  else:
637
  if board.result() == "1-0":
638
  player_one.update_activations("won")
639
+ # player_two.update_activations("lost")
640
  elif board.result() == "0-1":
641
  player_one.update_activations("lost")
642
+ # player_two.update_activations("won")
643
  else: # Draw
644
  player_one.update_activations("draw")
645
+ # player_two.update_activations("draw")
646
 
647
+ if update_activations and games_saved % contrastive_activation_save_interval == 0:
648
  player_one.save_activations(activations_path)
649
+ #player_two.save_activations(activations_path)
650
 
651
  if isinstance(player_one, StockfishPlayer):
652
  player_one.close()