Skip to content

Commit 91d2b28

Browse files
committed
last changes hopefully
1 parent 1d56261 commit 91d2b28

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/visuals/bitboards/bitboard-visualizer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export default function BitboardVisualizer({ codeLines, steps, stepDelay = 2000
110110
</div>
111111
<div className="info-item">
112112
<span className="info-label">Set bits: </span>
113-
<span className="info-value">{bitIndices.length > 0 ? bitIndices.join(", ") : "none"}</span>
113+
<span className="info-value">{bitIndices.length > 0 ? bitIndices.join(", ").padEnd(32, " \u00A0") : "none".padEnd(32, " \u00A0")}</span>
114114
</div>
115115
</div>
116116
</div>

posts/visualizing-chess-bitboards.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ The "not file" masks here are used to prevent invalid wraparounds. From `g5`, th
8787

8888
<div className="bitboards" id="knightAttack"></div>
8989

90-
In practice, chess engines often pre-compute and store attack masks in lookup tables for even better performance, rather than calculating them on the fly like this – as well as other sophisticated techniques like [zobrist hashing](https://www.chessprogramming.org/Zobrist_Hashing) and [magic bitboard](https://www.chessprogramming.org/Magic_Bitboards).
91-
9290
I hope this helps show how bitboards can be the building blocks of any kind of chess computation.
9391

92+
In practice, chess engines often pre-compute and store attack masks in lookup tables for even better performance, rather than calculating them on the fly like this – as well as other sophisticated techniques like [zobrist hashing](https://www.chessprogramming.org/Zobrist_Hashing) and [magic bitboards](https://www.chessprogramming.org/Magic_Bitboards).
93+
9494
For further reading, I've found the [Chess Programming Wiki](https://www.chessprogramming.org/Bitboards) and the source code for `python-chess` (e.g. [calculating attack masks](https://github.com/niklasf/python-chess/blob/ffa04827e325de5b4d39a67eee3528474b814285/chess/__init__.py#L875)) to both be very useful.
9595

9696
I also have an older post which serves as a gentle introduction to chess engines: [Building My Own Chess Engine](/building-my-own-chess-engine).

0 commit comments

Comments
 (0)