Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if current_value == 0:
- print("Remíza dosažena!")
- break
- hod = -2000 if current_value > 0 else 2000
- best_fen = None
- for move in board.legal_moves:
- board.push(move)
- POZ2 = board.fen()
- simplified_POZ2 = simplify_fen(POZ2)
- if simplified_POZ2 in AR and AR[simplified_POZ2]['parent'] == simplified_current_fen:
- hod2 = -AR[simplified_POZ2]['to_end']
- if current_value > 0: # Silnější hráč
- if hod2 > hod:
- hod = hod2
- best_fen = simplified_POZ2
- else: # Slabší hráč
- if hod2 < hod:
- hod = hod2
- best_fen = simplified_POZ2
- board.pop()
- if best_fen is None:
- print("Žádný další tah nebyl nalezen.")
- break
- optimal_moves.append(best_fen)
- current_fen = best_fen
- simplified_current_fen = simplify_fen(current_fen)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement