Skip to content

fix: correct typo self.ec to self.wc in sunfish_nnue.py - #133

Open
professor314 wants to merge 1 commit into
thomasahle:masterfrom
professor314:fix/typo-self-ec-to-self-wc
Open

fix: correct typo self.ec to self.wc in sunfish_nnue.py#133
professor314 wants to merge 1 commit into
thomasahle:masterfrom
professor314:fix/typo-self-ec-to-self-wc

Conversation

@professor314

Copy link
Copy Markdown

Summary

Fixes a typo on lines 217 and 261 of sunfish_nnue.py where \self.ec\ was used instead of \self.wc.

Changes

  • Line 217: \self.ec\ -> \self.wc\ (saving castling rights before move generation)
  • Line 261: \self.ec\ -> \self.wc\ (restoring castling rights after move generation)

Motivation

Fixes #120. The field \self.ec\ does not exist on the Position class. The correct field is \self.wc\ (white castling rights), matching the destructuring pattern \old_ep, old_kp, old_wc, old_bc.

Testing

Two-character fix. The code was previously referencing a non-existent attribute, so this corrects the logic to match the original sunfish.py implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Typo in sunfish_nnue.py lines 217 and 261

1 participant