Skip to content

Comments

feat: add initial implementation of history threats#176

Open
ptsouchlos wants to merge 6 commits intomainfrom
feature/hist-threat
Open

feat: add initial implementation of history threats#176
ptsouchlos wants to merge 6 commits intomainfrom
feature/hist-threat

Conversation

@ptsouchlos
Copy link
Owner

Changes

  • Added tracking of threats for history in the form of is_from_attacked and is_to_attacked flags.

See #166

bench: 1176279

Comment on lines +101 to +105
let grid = self.table[side as usize][piece_type][square];
print!(
"{:5} | {:5}\n------\n[{:5} | {:5} ]",
grid[0][0], grid[0][1], grid[1][0], grid[1][1]
);
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't actually tested this to see what it looks like - might have broken things.

Make `get_attacked_squares` public so we can use it for threat
detection.

bench: 1176279
Use move gens `is_square_attacked` function instead.

bench: 1176279
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 95.74468% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 91.21%. Comparing base (8980308) to head (228b303).

Files with missing lines Patch % Lines
engine/src/history_table.rs 93.58% 5 Missing ⚠️
engine/src/move_order.rs 96.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   91.04%   91.21%   +0.16%     
==========================================
  Files          40       40              
  Lines        7136     7248     +112     
==========================================
+ Hits         6497     6611     +114     
+ Misses        639      637       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants