Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement PEXT bitboards for bishop and rook attacks #451

Merged
merged 3 commits into from Oct 20, 2023
Merged

Conversation

eduherminio
Copy link
Member

@eduherminio eduherminio commented Oct 20, 2023

Score of Lynx 1712 - pext vs Lynx 1706 - main: 5927 - 5819 - 4034  [0.503] 15780
...      Lynx 1712 - pext playing White: 3740 - 2139 - 2012  [0.601] 7891
...      Lynx 1712 - pext playing Black: 2187 - 3680 - 2022  [0.405] 7889
...      White vs Black: 7420 - 4326 - 4034  [0.598] 15780
Elo difference: 2.4 +/- 4.7, LOS: 84.0 %, DrawRatio: 25.6 %
SPRT: llr -0.107 (-3.6%), lbound -2.94, ubound 2.94
C:\dev\sprt [main ≡]> python3 .\sprt.py --wins 5930 --losses 5823 --draws 4037 --elo0 -5 --elo1 0
ELO: 2.35 +- 4.67 [-2.31, 7.02]
LLR: 3.85 [-5.0, 0.0] (-2.94, 2.94)
H1 Accepted
 * BenchmarkDotNet v0.13.9+228a464e8be6c580ad9408e98f18813f6407fb5a, Ubuntu 22.04.3 LTS (Jammy Jellyfish)
 * Intel Xeon Platinum 8171M CPU 2.60GHz, 1 CPU, 2 logical and 2 physical cores
 * .NET SDK 8.0.100-rc.2.23502.2
 *   [Host]     : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
 *   DefaultJob : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
 *
 *
 * | Method       | Mean     | Error   | StdDev  | Ratio | Allocated | Alloc Ratio |
 * |------------- |---------:|--------:|--------:|------:|----------:|------------:|
 * | MagicNumbers | 378.1 ns | 6.19 ns | 5.79 ns |  1.00 |         - |          NA |
 * | PEXT         | 229.7 ns | 2.79 ns | 2.61 ns |  0.61 |         - |          NA |
 *
 * BenchmarkDotNet v0.13.9+228a464e8be6c580ad9408e98f18813f6407fb5a, Windows 10 (10.0.20348.2031) (Hyper-V)
 * Intel Xeon CPU E5-2673 v4 2.30GHz, 1 CPU, 2 logical and 2 physical cores
 * .NET SDK 8.0.100-rc.2.23502.2
 *   [Host]     : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
 *   DefaultJob : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
 *
 *
 * | Method       | Mean     | Error   | StdDev   | Ratio | RatioSD | Allocated | Alloc Ratio |
 * |------------- |---------:|--------:|---------:|------:|--------:|----------:|------------:|
 * | MagicNumbers | 408.9 ns | 8.14 ns | 13.59 ns |  1.00 |    0.00 |         - |          NA |
 * | PEXT         | 326.3 ns | 6.46 ns |  7.93 ns |  0.79 |    0.03 |         - |          NA |
 *
 * BenchmarkDotNet v0.13.9+228a464e8be6c580ad9408e98f18813f6407fb5a, macOS Monterey 12.6.9 (21G726) [Darwin 1.6.0]
 * Intel Core i7-8700B CPU 3.20GHz (Max: 3.19GHz) (Coffee Lake), 1 CPU, 4 logical and 4 physical cores
 * .NET SDK 8.0.100-rc.2.23502.2
 *   [Host]     : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
 *   DefaultJob : .NET 8.0.0 (8.0.23.47906), X64 RyuJIT AVX2
 *
 *
 * | Method       | Mean     | Error    | StdDev   | Ratio | RatioSD | Allocated | Alloc Ratio |
 * |------------- |---------:|---------:|---------:|------:|--------:|----------:|------------:|
 * | MagicNumbers | 436.3 ns | 28.75 ns | 84.33 ns |  1.00 |    0.00 |         - |          NA |
 * | PEXT         | 274.5 ns | 20.23 ns | 58.69 ns |  0.66 |    0.19 |         - |          NA |
 *
 */

@eduherminio eduherminio marked this pull request as ready for review October 20, 2023 10:28
@eduherminio eduherminio merged commit b4048f4 into main Oct 20, 2023
24 checks passed
@eduherminio eduherminio deleted the pext branch October 20, 2023 11:18
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.

None yet

1 participant